diff --git a/libs/DevIL-1.7.8/AUTHORS b/libs/DevIL-1.7.8/AUTHORS new file mode 100644 index 00000000..0f80b3c4 --- /dev/null +++ b/libs/DevIL-1.7.8/AUTHORS @@ -0,0 +1,4 @@ +The main programmer is Denton Woods, but this could not have been possible +without contributions and some pieces of code from other projects. + +For contributors and credits, read the CREDITS file. diff --git a/libs/DevIL-1.7.8/COPYING b/libs/DevIL-1.7.8/COPYING new file mode 100644 index 00000000..30c8ca21 --- /dev/null +++ b/libs/DevIL-1.7.8/COPYING @@ -0,0 +1,506 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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/libs/DevIL-1.7.8/CREDITS b/libs/DevIL-1.7.8/CREDITS new file mode 100644 index 00000000..b30dc468 --- /dev/null +++ b/libs/DevIL-1.7.8/CREDITS @@ -0,0 +1,264 @@ +Credits as of 02/06/2009 +------------------------ + +If I inadvertently omitted anyone's name from this list, please e-mail me at +doomwiz@users.sourceforge.net to remedy the problem. + + +James Joplin, alias jayjay (rjoplin@webzone.net) +for all his invaluable help and encouragement with DevIL. + +Edouard Gomez for his invaluable help. + +All the #flipCode gang for their support. + +All my friends at uni for their support. + +SoftImage .pic support based off of code obtained from +http://www.swin.edu.au/astronomy/pbourke/dataformats/ + +TestPic, used in TestIL +http://www.paintlib.de/paintlib/testpic.zip + +Png Test Images +http://www.schaik.com/pngsuite/pngsuite.html + +John Villar (john.villar@eliaschev.com) for making the suggestion of not +letting the user use ILimage structs but instead binding images like OpenGL. +He also made a suggestion on how to load luminance .jpg images, along with +other suggestions. + +http://www.opengl.org/Coding/KilgardTechniques/oglpitfall/oglpitfall.html +section 6 for the values the NTSC uses, so I could convert from coloured +images to luminance values. + +Kodak Photo CD code from the .pcd link on http://www.wotsit.org. + +Foper (foper@hotmail.com) from #flipCode for supplying the excellent +flipcode.jpg in testil\in. The original can be found at +http://webpatterns.com/flip/flipshow.htm + +Lightman (cdthompson@home.net) from #flipCode for restructuring the project +into /bin, /obj, etc. + +Alexander Blach (alexander@abee.de) from #flipCode for creating the Delphi +headers and test app. He figured out that we needed to use .def files to +prevent name decoration of the dlls. He has contributed multiple ideas and +found flaws. Alexander also created a lovely documentation database to help +with documenting DevIL. + +Randy Heit for finding problems in my Doom texture code. + +Oliver Kurowski (oliver.kurowski@gmx.de) for locating a bug in ilut's +DllMain() and another very harmful bug with ilDeleteImages(). + +Ender Wiggin's article on "Elementary Digital Filtering", +found at http://www.gamedev.net/reference/programming/features/edf/ +for many filters in DevIL. + +SGI's "Graphica Obscura" site at http://www.sgi.com/grafica/matrix/index.html +for several filters in DevIL. + +The http://bae.fse.missouri.edu/luw/course/image/project1/project1.html +page for help in determining filter code for Graphica Obscura's interpolation +article at http://www.sgi.com/grafica/interp/index.html. + +Matt Denham for suggesting optimizations in ilNegativeImage(), +iluEdgeDetectS() and iluEdgeDetectP(). + +Timo Heister (Timo-Heister@gmx.de) from #flipCode for creating the original +Visual Basic headers and test apps for VB. + +The OpenGL SuperBible for code for ilutGetHPal(). + +DJ Luminescent (luminescent@uswest.net) for finding a couple of bugs in the +.bmp-loading code and diligently beta testing. + +Lionel Brits, alias Zaewo from #flipCode for slapping me around and telling +me how Microsoft does their .bmp padding. He then wrote most of the +iluEqualize() code from the base code on +http://www.manning.com/Kabir/Files.html . + +Joel Wilsson, alias Siigron (siigron@hotmail.com) for pointing-out several +design flaws that I (Denton) had introduced and posing very useful +suggestions. + +Sean Montgomery, alias Vapor (sean@astralfx.com) for patiently listening to +my endless drivel about DevIL. + +Perlin Noise site http://freespace.virgin.net/hugo.elias/models/m_perlin.htm +for information on interpolation used in iluScale(). + +Shimon Shvartsbroit, alias MasterBoy (cobra11@netvision.net.il) from #flipCode +for explaining bilinear interpolation to me. + +Lbm source from http://www.wotsit.org + +Eran Kampf, alias ttentacle (ekampf@internet-zahav.net) for giving me +resource-loading code for ilutLoadResource and helping with the Windows +clipboard functions. + +Strumpf from #flipCode for writing a really good DirectDraw class for me to +use in the DDraw test, which is based off of his test, too. + +NullSoft (http://www.nullsoft.com), for their SuperPiMP installer. It is +extremely easy to learn to use and very powerful. + +Serun from #flipCode for noticing that Quake2 .pcx files sometimes don't have +the checksum byte for palette'd .pcx files. + +Conor Stokes, aka DirtyPunk from #flipCode for helping explain several things +to me. + +Half-Life model viewer sources (at http://www.swissquake.ch/chumbalum-soft/) +for specs for the Half-Life model format. + +Rich Schwab, alias endura (endura29@hotmail.com) for contributing +girlfriend.cpp. + +The Djgpp libc sources (http://www.delorie.com/djgpp), from where I copied +several functions. + +Roman Podobedov (romka@ut.ee) of Romka Graphics (http://romka.demonews.com) +for his colour quantization sources, which he was kind enough to let me use. + +Pcx document on http://www.wotsit.org for .pcx saving code. + +http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue2.html#Insight +for iluWave(). + +.lif specs from http://www.infinite-mass.com/bob/files/lifed.zip and + http://www.infinite-mass.com/bob/files/lif.zip + +Rune Kock (rune@vupti.com) for writing the new Visual Basic headers and for +finding a return bug in iluScaleAdvanced. + +Julien Verchere and Xavier Decoret for suggesting that I use const char*'s +instead of char*'s as function parameters. + +Jason Reeve (jason@retribution-entertainment.com) for finding a bug in iluCrop, +several origin-related problems, and helping me bring my targa-loading code up +to spec. + +Darren Adams for telling me the #pragmas to use in MSVC++ to disable the +console window in a "console app". + +David Gould for getting onto me about my crappy Linux support. + +David Galeano for his DX8 Surface to TGA code, modified to save to any texture. +The original can be found at http://rt000s2p.eresmas.net/downloads.htm + +RLE code from TrueVision's TGA sample code available as Tgautils.zip at +ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/PC.Version/ + +Jeroen Janssen for creating a Mandrake RPM patch for DevIL. + +Greg Priem for his help with supporting libungif and some various other things. + +Nelson Rush for SDL surface support and finding several bugs with DevIL. + +George McBay for his wonderful help finding bugs in my mipmapping code. + +Marco Kögler for finding bugs in my .jpg and .png code. + +Falco Kleinschmidt for fixing problems with the Linux makefiles. + +Olivier Bucher for finding a bug in saving 8-bit .bmp files. + +Derek Wills for noticing a problem with ilutGLScreenie when the screen width is +not a multiple of 4. + +Dale Schumacher's "Filtered Image Rescaling" code in Graphic Gems III for some +scaling algorithms in ILU. + +Kevin Park for making some suggestions on the ilImage C++ wrapper. + +Alessandro Pedretti for finding a bug in my TIFF code and making suggestions +about portability issues. + +boostrlns from #flipCode for finding the ilutGLLoadImage bug in the 1.1.5 +release. + +Ismo Kärkkäinen (iak@cs.joensuu.fi) for making some really nice new makefiles +for Linux. + +Kishan (http://www.hackorama.com) for the nice directions on how to compile +the external libraries under Linux. + +Wojciech Sobczuk for creating FreeBSD versions of the makefiles. + +nVidia for code to load .DDS files available at +http://www.nvidia.com/view.asp?IO=dxtc_decompression_code + +PixiGreg for noticing that many viewers don't like .bmp files with negative +heights (flipped), even though the specs say that it is valid. + +Matthias Stiller and Andre Normann for their invaluable help with getting +DevIL to work on Big Endian machines. + +Jean-Francois Richard for the Python bindings of DevIL. + +Nick Marley for post-build information in MSVC++. + +Kenneth Hurley for his help in expanding and fixing my DDS code. + +Mark Callow for EXIF-loading and saving code, along with il[Load/Save]FromJpegStruct + +Sam for several fixes to my .bmp and .jpg loaders. + +chris79 for his help debugging my .psp and .gif code in several versions. + +Nick Marley for his MSVC++ post-build fixes. + +Marc Gregoire for sending images that DevIL would not load. + +Alberto Barbati for noticing that the IL_NEU_QUANT_SAMPLE mode wasn't being used properly. + +Ryan Butterfoss for his contributions to the DDS saving code. + +Computer Graphics (C Version) book by Hearn and Baker for the arbitrary polygon filling code. + +Nicolas Weber + +Meloni Dario + +Erick Tryzelaar + +Matej Tyc for completely redoing the Linux makefile system and rewriting the documentation. + +Matevz Tadel for fixing makefile for Scientific Linux. + +Richard Sim for contributing several fixes, especially for .psd loading + +robin_charlton for contributing a patch for Windows BMP support in ILUT. + +Vincent Richomme for DirectX Mobile support + +Antibyte for DDS save bugfix + +Stefan Cornelius, Secunia Research, for finding some buffer overflow vulnerabilities. + +Nico Golde for finding that my fix for the above vulnerability was not totally complete. + +GAIA (Group for Artificial Intelligence Applications) for contributions including .iff-loading +and redoing the ilutConvertToHBitmap code. Their changes are at +http://gaia.fdi.ucm.es/grupo/projects/javy/devzone.html#DevILNotes. + +Jesse Maurais for support of X11 component + + +Translations: +------------- + +Carlos Aragonés, for Spanish translation + +Bart De Lathouwer, for Danish translation + +Osamu Ohara, for English translation + +Abdullah Alshammari, for Arabic translation + +Osamu Ohara, for Japanese translation + +Andreas Stöckel, for German translation + diff --git a/libs/DevIL-1.7.8/ChangeLog b/libs/DevIL-1.7.8/ChangeLog new file mode 100644 index 00000000..aeae0005 --- /dev/null +++ b/libs/DevIL-1.7.8/ChangeLog @@ -0,0 +1,604 @@ +2009-03-08 MatÄ›j Týč + * docs/Makefile.am: Fixed distcheck by overriding dvi target. + * lib/Makefile.am: Renoved ilu_mipmap.h file + * configure.ac: Added option to disable checks for 'nvidia texture tools' and + 'libsquish' + +2009-03-08 Denton Woods + * il_ilbm.c:410: Changed to IL_BGR from IL_RGB. + * il_iff.c (ilLoadIffF/ilLoadIffL): Changed to call Lbm loading functions + if Iff loading fails, since they both can have the .iff extension. + * il_ilbm.c:416: Added origin reference. + * configure.ac: Added more file formats to the format checks. + * Makefile.am: Removed ilu_mipmap.h. Added ilu_error-french.h. + +2009-03-07 Denton Woods + * Updated version numbers to 1.7.8 project-wide. + * DevIL_manual.texi: Added several file formats to the appendix. + * il_io.c: Updated Doxygen comments for loading/saving functions. + * libraries.txt: Updated with new libraries. + * il_io.c (ilTypeFromExt): Changed return value of FITS files to IL_FITS. + Added DICOM, FTX, Rot and Texture checks. + * il_states.c/.h: Updated with newer file formats. + * il_blp.c:649: Fixed ilNewImageFull call to use color index. + 659: Fixed memcpy from base image to new mipmap. + * il_dcx.c, il_exr.cpp and many more: Checks return value of ilFixImage now. + * il_iff.c:271: Got rid of ilConvertImage call. + +2009-03-06 Denton Woods + * Updated VC8 projects to use il_mp3.c. + * il.h: Added description to IL_WDP. + +2009-03-05 Denton Woods + * il_mp3.c: Added this file. + * il_io.c: Added loading calls for .mp3 files. + * il_internal.h: Added .mp3 loading declarations. + * Makefile.am: Added il_mp3.c to source line. + * il.h: Added IL_MP3 define. + +2009-03-04 Denton Woods + * il_utx.cpp: Started cleanup of file using C++ constructs. + * Updated VC8 projects to use il_utx.cpp. + +2009-03-03 Denton Woods + * ilu_error-french.h: Added French translation of errors. + * ilu.h: Added ILU_FRENCH define. + * Changed il_utx.c to il_utx.cpp. + +2009-03-02 Denton Woods + * il_utx.c: Added DXT1 loading in UTX files. + * il_utx.h: Added this file. + * lib/Makefile.am: Added il_utx.h to include line. + * il_utx.c: Fixed loading of larger images. + * windows_example.rc: Fixed accelerator for menu. + +2009-03-01 Denton Woods + * il_utx.c: Added this file. + * lib/Makefile.am: Added il_utx.c to source line. + * il_internal.h: Added .utx loading declarations. + * il_io.c: Added loading calls for .utx files. + +2009-02-28 Denton Woods + * il_states.c / il_states.h: Added ilVtfCompression to IL_STATES. + * il_vtf.c: Added more formats to saving. + * il.h: Added IL_VTF_COMP define. + * il_io.c: Added saving calls for .vtf files. + * il_dds.c: Added DecompressARGB16 to load a2r10g10b10 and a2b10g10r10 formats. + * il_convbuff (iSwitchTypes): Added several missing break statements. + * il_convbuff:1988: Changed to check types instead of bpc. + +2009-02-27 Denton Woods + * il_dpx.c / il_dpx.h: Got basic dpx loading working. + * WindowsTest.cpp: Fixed memory leak when loading files. + * il_vtf.c (iGetVtfHead): Added support for headers of 64 bytes. + * il_iwi.c (iLoadIwiInternal): Added IL_INVALID_FILE_HEADER error. + * il_vtf.c: Added VTF writing functions. + +2009-02-26 Denton Woods + * configure.ac, lib/Makefile.am, il.h, il_internal.h, il_ilbm.c, il_io.c: Added + patch from Ben Campbell for ILBM files at + https://sourceforge.net/tracker2/index.php?func=detail&aid=2635333&group_id=4470&atid=304470. + * il_dpx.c / il_dpx.h: Added these files. + * lib/Makefile.am: Added il_dpx.c and il_dpx.h to source/include lines. + * il_internal.h: Added .dpx loading declarations. + * il_io.c: Added loading calls for .dpx files. + +2009-02-25 Denton Woods + * il_iwi.c:329: Changed IL_MAX parameter from 16 to 8 (copy+paste error). + * WindowsTest.cpp: Added mipmap functionality to 0-9 keys (0 goes to main image). + +2009-02-24 Denton Woods + * vc9 Unicode projects: Changed settings to use x64 and x86 directories for .obj files. + * test/in: Removed this directory. + * Added "Test Images" to SVN. + * il_dds.c (DecompressFloat): Added proper support for G16B16, G32B32, R16 and R32 images. + +2009-02-23 Denton Woods + * il_pnm.c: Fixed bug at https://sourceforge.net/forum/message.php?msg_id=6491617 - + Changed order of lines 448 and 450. + +2009-02-22 Denton Woods + * il_internal.h: Added IL_NO_EXTLIBS define. + * il_dds-save.c: Removed unused variables. + * ilu_mipmap.c: Finished redoing all mipmap functions. + * ilu_mipmap.h: Removed this file. + +2009-02-21 Denton Woods + * ilu_mipmap.c: Redid mipmap functions to use iluScale functions instead of nearest. + +2009-02-20 MatÄ›j Týč + * docs/Makefile.am,docs/Devil_manual.texi: Added new ILU images to the + manual, set the manual license to GFDL. + * testil, ilur: Licensed under GPL v3 + +2009-02-19 Denton Woods + * windows_example\resources: Added DevIL Logo.ico, removed OpenIL Logo.ico. + * windows_example\resource.h: Changed to use DevIL Logo.ico. + * il_io.c (ilSaveL): Fixed bug where return type was cast to 1 byte. + +2009-02-18 Denton Woods + * configure.ac: Added descriptions of more image formats. + * il_ftx.c (iLoadFtxInternal): Changed to load all FTX images as RGBA. + +2009-02-17 Denton Woods + * ilu_mipmap.c: Changed all references of Next to Mipmaps to fix bug noticed at + https://sourceforge.net/forum/message.php?msg_id=6443698. + * Added support for IL_NO_GAMES in il_internal.h. + +2009-02-17 MatÄ›j Týč + * configure.ac, m4/devil-definitions.m4 (TEST_FORMAT): Added an option + to describe image formats. + +2009-02-16 MatÄ›j Týč + * src-ILU/ilur: Made ilur independent on regex.h + * autogen.sh: Simplified autotools invocation to autoreconf only + * configure.ac: Added support for IL_NO_GAMES if users don't want + support for game formats + * docs/DevIL_manual.texi: Fixed errors causing trouble when making + info files + some minor syntax enhancements. + +2009-02-16 Denton Woods + * il_manip.c (ilGetAlpha): Added IL_ALPHA case. + * il_manip.c (ilSetAlpha): Cleaned up formatting. Added IL_ALPHA case. + Fixed casting issue in integer case. + * il_texture.c: Added this file and the simple .texture loading. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_texture.c to source line. + * il.h: Added IL_TEXTURE define. + * il_internal.h: Added .texture loading declarations. + * DevIL.nb: Removed the test image from the notebook to drop it from over 9MB to 4.5KB. + +2009-02-15 Denton Woods + * il_blp.c (iLoadBlpInternal): Finished testing and fixed BLP2 RAW with 1-bit alpha. + * il_dicom.c: Added this file. + * config.h.win: Added defines for new image formats. + * il_io.c / il_jp2.c: Added .jpx, .j2k and .j2c extensions for JPEG 2000. + * il_io.c / il_jpeg.c: Added .jif and .jfif extensions for JPEG. + * il_dicom.c: Added DICOM loading for uncompressed formats and little endian data. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_dicom.c to source line. + * il_dicom.c: Added DICOM support for big endian data. + * test/in/tiff: Removed this directory. + * il_rot.c: Added this file. Added .rot loading. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_rot.c to source line. + * il.h: Added IL_ROT define. + * il_internal.h: Added Rot loading declarations. + +2009-02-15 MatÄ›j Týč + * src-ILU/ilur: Added the ilur - commandline ILU frontend + * bin, examples/Makefile.am: Moved examples's Makefile.am to bin + directory. Added ilur to it. + * docs/DevIL_manual.texi: Made slight syntax corrections, fixed the + sample program and added functions index + +2009-02-14 Denton Woods + * il_blp.c (iLoadBlp1): Support for mipmaps added. + * il_gif.h: Moved iCopyPalette declaration out of here into il_internal.h. + * il_gif.c: Moved iCopyPalette definition out of here into il_pal.c. + * projects/Mathematica: Added this folder. + * il_fits.c (iCheckFits): Implemented this. + * il_fits.c (iLoadFitsInternal): Renormalized float and double data. + * il_blp.c (iLoadBlp1): Added seeks to image data (not necessarily following palette). + * il_blp.c (iLoadBlpInternal): Added loading for BLP2 RAW with 1-bit alpha. + +2009-02-13 Denton Woods + * WindowsTest.cpp: Added slideshow capabilities with Page Up and Page Down. + * il_jpeg.c:357: Added ilFixImage call. + * il_jpeg.c (ilLoadFromJpegStruct): Changed return value to the return of ilFixImage. + * il_blp.c:466-467: Fixed to read these images properly. + * WindowsTest Project: Changed x64 debug to use runtime library debug DLLs. + +2009-02-12 Denton Woods + * il_ftx.c: Added this file. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_ftx.c to source line. + * il_io.c: Added Ftx loading function calls. + * il_blp.c: Added BLP1-loading functions. + +2009-02-11 Denton Woods + * il_jpeg.c (ilSaveJpegL): Changed the itellw call to after iSetOutputLump + (was returning bad values, since the lump was not set yet). + * il_io.c (ilSaveL): Changed return value to Ret and got rid of IL_FALSE check. + * il_bmp.c, il_dds-save.c, il_hdr.c, il_jp2.c, il_pcx.c, il_png.c, il_pnm.c, il_psd.c, il_raw.c, + il_sgi.c, il_wbmp.c: Fixed same problem that il_jpeg.c had with saving lumps. + * il_sgi.c: Put header on file. + * il_iwi.c:337: Removed this line, which called iread a second time for CompData. + +2009-02-10 Denton Woods + * il_io.c: Added ilLoadBlp calls in il_io.c. + * VC9 projects: Turned off x64 incremental linking to prevent debugging problems described here: + http://stackoverflow.com/questions/218747/msvcr90ddll-not-found-in-debug-mode-with-visual-c-2008 + * il_blp.c: Added code to read BLP2 files. + +2009-02-09 Denton Woods + * ilu_scale2d.c (iluScale2DBilinear_): Started rewrite, since results were really ugly. + * il_iwi.c / il_vtf.c: Changed max references to IL_MAX. + * il_wdp.c: Redid all of the code so that it actually works now. + * il_internal.h:42-46: Added lines to define IL_NO_WDP if not in Windows. + * il_io.c: Added Iwi and Fits loading calls. + * il.h: Added IL_BLP and IL_DICOM. Switched IL_DICOM and IL_IWI defines. + * il_internal.h: Added Blp and Dicom function defines. + * il_blp.c: Added this file and started code. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_blp.c to source line. + +2009-02-09 MatÄ›j Týč + * tests/testil.c: Added checks what IL loading/saving routines ended + * build system: Removed --enable-monolithic option. + +2009-02-07/08 Denton Woods + * il_iwi.c: Added this file and code to load .iwi files. + * il_vtf.c (iLoadVtfInternal): Added checks for CompData == NULL. + * il_dds.c/il_dds.h: Changed CompFormat to a local variable. Renamed Decompress to DdsDecompress. + * ChangeLog (this file): Changed order to newest at the top. + * il.h: Added IL_FITS and IL_IWI defines. + * config.h.win: Added IL_FITS, IL_IWI, IL_SUN and IL_TPL. + * lib/Makefile.am and src-IL/src/Makefile.am: Added il_fits.c and il_iwi.c to source line. + + +--- 1.7.7 release --- + +2009-02-06 MatÄ›j Týč + * configure.ac, lib/Makefile.am: Added explicit linking with libm + library + fixed the ilut_x11.c file conditions of compilation + * examples/Makefile.am + IL examples, test/Makefile.am + testil: Added + conditional compilation option when compiling only with IL (without + ILU, iluErrorString() absence workaround) + +2009-02-06 Denton Woods + * README.win and README.unix: Updated with Cygwin/MinGW instructions. + +2009-02-05 Denton Woods + * il_tga.c: Fixed bug loading malformed RLE Targa images. + * il_rle.c:20: Changed size_t cast to ILint to resolve compiler warning. + * il.def: Added definitions. + * Updated version numbers to 1.7.7 everywhere. + +2009-02-04 Denton Woods + * ilut_opengl.c:160: Changed checks to see if less than 0. + * il_fits.c: Got this reading FITS files properly. + +2009-02-04 MatÄ›j Týč + * configure.ac: Corrected handling of --enable-debug options, added + working install support for pkg-config + * data/Makefile.am, *.pc.in: Corrected pkg-config files + +2009-02-03 Denton Woods + * il_io.c: Updated Doxygen comments. + * il_fits.c: Added this file (not in any projects yet). + * il_fits.c: Wrote beginning of FITS loading code. + +2009-02-02 Denton Woods + * il_manip.c (ilCopyPixels):311: Added check for destination format of color index. + * il_convbuff.c (ilConvertBuffer): Changed to accept the source image palette. Added code to + convert from buffers that are related to a palette before the large switch. + * il_alloc.c (ifree): Changed so that if Ptr == NULL, it does not try to free the pointer. + * il_nvidia.cpp/il_squish.cpp: Added empty functions if nVidia or libsquish support is not + compiled in. + * test/format_test/testil.c:5: Added _USE_MATH_DEFINES. + +2009-02-01 MatÄ›j Týč + * test/format_test: Tweaked the script to use wine if cross-compiling + to run the tests, extended testil capabilities + * m4/devil-definitions.m4: Fixed bugs that caused that you couldn't + disable support for some formats no matter what :-) + * m4/devil-api-checks.m4: Added Xrender build support (by Jesse Maurais) + +2009-02-01 Denton Woods + * devil_internal_exports.h: Commented members of ILimage struct using Doxygen-style comments. + Removed deprecated, commented-out members (NumNext, NumLayers, NumMips). + * Updated several functions with appropriate Doxygen comments. + * il.h: Updated IL_XXX file format defines with Doxygen comments. + * ilu_rotate.c: Changed min/max calls to IL_MIN/IL_MAX. + * ilut_states.c (ilutSetInteger): Fixed ILUT_MAXTEX_DEPTH call and added checks around first + three calls for Param >= 1. + +2009-01-31 Denton Woods + * Added newlines to the end of several files to keep gcc quiet. + * Added new MSVC++ projects for examples. + * il_bmp.c:556: Changed to Header->biWidth from iCurImage->Width. iCurImage->Width was not + updated to the new width at this point. + * il_rotate.c (iluRotate_): Rewrote to fix 1 pixel shifting issue. + * Updated DevIL Manual with new ilSaveL information. + * il_stack.c (ilCloseImage): Added missing delete of Faces member. + * il_dds-save.c (ilCompressDXT): Added this function. + * il.h: Removed ilNVidiaCompressDXT and ilSquishCompressDXT - moved to il_internal.h. + * il_dds-save.c:151: Changed to Faces from Images. + * il_dds-save.c (CompressTo565): Added IL_ALPHA case. + * Updated DevIL Manual with new DXTC information. + +2009-01-30 Denton Woods + * Added DevIL.NET to projects folder. + * il_dds.c: Changed Image->Next code for cubemaps to read Image->Faces. Also changed Image->Next + code for mipmaps to read Image->Mipmaps, even further down the chain. + * il_dds.c (ilTexImageDxtc): Added call to ilCloseImage for Image->Faces. + * il_endian.h:113: Fixed bug #2545848 - inline GCC ASM changed. + * ilut_directx9.c (ilutD3D9CubeTexture): Changed ->Next to ->Faces. + * ilut_directx9.c (iD3D9CreateMipmaps): Changed ->Next to ->Mipmaps. + * il_states.c:605: Changed from ->Next to ->Mipmaps. + * il_states.c (iGetActiveNum): Rewrote to not use ->Next pointer for everything. + * il_vtf.c (VtfInitMipmaps): Changed to reflect the new mipmap arrangement as well. + * il_wal.c:141,142: Changed ->Next to ->Mipmaps. + * il_wal.c: Cleaned up the formatting a bit. + * il_stack.c (ilActiveMipmap): Changed ->Next to ->Mipmaps. + * il_stack.c (ilActiveImage/Mipmap/Face/Layer): Added another check for NULL, changed error. + Changed order of statements in for loop. This leads to much much less in the way of + ilSetError calls, since we do not have iCurImage == NULL. + * il_vtf.h:43: Changed to ILuint from ILint. + * il_vtf.c: Changed VtfInitMipmaps calls to VtfInitFacesMipmaps calls and changed iLoadVtfInternal + to support environment maps. + * il.h:384: Added IL_SPHEREMAP. + * il_hdr.c:467: Changed to char* to get OS X to stop issuing a warning. + * il_size.c:53: Changed return value to ILuint. + * devil_cpp_wrapper.hpp: Removed MSVC++ #pragma at the top for deprecated lib. + +2009-01-28 Denton Woods + * il_tpl.c: Added line 219. + +2009-01-27 Denton Woods + * il_bits.c (bseek): Changed check for return values of iseek. + * il_tpl.c: Added support for many more TPL data formats. + * il_tpl.c: Added support for color indexed data formats. + * il_tpl.c: Added support for multiple images in a file. + * il_sdl.c (ilutConvertToSDLSurface): Overhauled this code. + * ilut_opengl.c: Removed iGLSetMaxW/H/D and MaxTexW/H/D. + * ilut_states.h/ilut_states.c: Added MaxTexW/H/D to ILUT_STATES. + * ilut_states.c (ilutGetIntegerv): Added ILUT_MAXTEX_WIDTH/HEIGHT/DEPTH. + +2009-01-26 Denton Woods + * projects/win mobile: Added Windows Mobile projects. + * Removed .cvsignore files from SVN. + * il_bits.c:65: Commented out icloser call. + * include/IL/DevIL.i: Removed IL/ prefix on header filenames. + * include/IL/build-python and build-lua: Updated paths. + * projects folder: Renamed msvc to msvc9. + * il_tpl.c: Added for TPL support. + * il_io.c: Added function calls for TPL support. + * il_internal.h: Added declarations for TPL support. + +2009-01-25 Denton Woods + * ilut_internal.h:63-67: Redid definitions of IL_TEXT to coincide with il_internal.h. + * il_states.c: Updated _ilLoadExt/_ilSaveExt with all extensions. + * il_states.h: Updated with all extensions. + * All image formats with saving: Changed return values of ilSaveXxxF and ilSaveXxxL to be + an integer stating the number of bytes written. This is what ilSaveF/L have been + trying to return all along. + * il_pal.c:1075: Added error condition. + * lib/Makefile.am: Added il_size.c. + * simple.c: Added iluInit call. + * il_dds-save.c (GetAlphaBlock): Applied code from GetBlock, since it was still reading out of bounds. + * il_psd.c (ParseResources):808: Added check for ResourceSize being too small. + 834-837: Added check to insure that we are not copying from past the end of Resource. + * il_hdr.c:527-528: Changed order so that beg_run+run_count is tested first. + * il_psd.c:829: Subtracted an additional 4 for the Size obtained in the lines before. + * il_jp2.c:792-792: Added cleanup code if failure. 676-680: Added call to jas_init. + Added code throughout to prevent from having to initialize Jasper more than once. + * il_internal.h/il_internal.c: Added strdup for Windows CE. + * il_internal.h:105-107: Added so that we do not try to compile inline ASM with Windows Mobile. + +2009-01-24 Denton Woods + * il_internal.h,il_tiff.c: Changed ilSaveTiffL to void* instead of const void*. + * il_tiff.c: Added _tiffFileReadProcW. Changed _tiffFileSeekProc(W) to return the + result of itellw instead of tOff. This allows us to finally overload the TIFF + writing code. + * il_internal.h: Removed #pragma comments, which were commented out anyway. + * il_io.c (ilSaveL): Added call to ilDetermineSize. + * il_size.c: Added this file. + * il_manip.c:14: Removed #include . + * il_jpeg.c:53: Added check for IL_USE_IJL. + * il_exr.cpp:319,329: Changed to write functions instead of read. + * il_files.c: Added iSetOutputFake. + * il_files.c (iSetOutputLump): Added check for NULL to accomodate ilDetermineSize function. + * il_hdr.c:457: Changed from char* to ILbyte*. + * il_icns.h:24,30: Changed from ILbyte to char. + * il_size.c: Added #ifdefs for when user has declared IL_NO_XXX. Changed error to ENUM instead of PARAM. + * Updated MSVC8 projects with il_size.c. + * src-IL/src/Makefile.am: Added il_size.c. + * il_jp2.c: Added ilIsValidJp2* functions. + * il.h: Added ilDetermineType and ilDetermineTypeL to declarations. + * il_io.c: Changed ilDetermineTypeL to be exported. + * il_pcx.c: Formatting issues fixed. + * il_mdl.c: Added ilIsValidJp2* functions. + * il_io.c: Added JP2, MDL and XPM support to ilDetermineType and ilIsValid functions. + * il_icon.c/il_png.c: Renamed color_type to ico_color_type and png_color_type to avoid name conflicts. + * il_iff.c: Changed all malloc->ialloc and free->ifree. Added checks for ialloc failure. + * il_io.c (ilDetermineTypeL): Changed VTF check to return IL_VTF instead of the miscopied IL_SUN. + * il_size.c (ilDetermineSize): Now calls iTargaSize for Targa files. + * il_tga.c: Added iTargaSize. + +2009-01-22 Denton Woods + * ilut_internal.h:66: Changed to compile under Cygwin. + * ilut_opengl.c:108: Replaced _MSC_VER with _WIN32 and _WIN64. + * il_dds-save.c:343: Fixed bug #1067590 - Removed this line, which caused crashes. + * il_pic.c (iLoadPicInternal): Fixed ilTexImage call, moved it after channel information read. + * il_pic.c (readScanline):294-295: Added check for alpha channel. + * il_pic.c: Added ilSetError calls throughout. + * il_sgi.c (iLoadSgiInternal): Fixed bug #1060946 - Removed IL_LUMINANCE_ALPHA filetype. + * WindowsTest.cpp:52,53: Changed border size to accomodate Windows Vista/7. + * il_endian.h:20: Changed to give __BIG_ENDIAN__ a value of 1. The Google cached page of + http://74.125.47.132/search?q=cache:YfSl36C2pAQJ:patch-tracking.debian.net/patch/series/view/devil/1.7.2-1/00_endian_and_ILvoid_fixes.diff+devil+big+endian&hl=en&ct=clnk&cd=11&gl=us&lr=lang_en + has this patch (Nov. 24, 2008 cache). + * devil_internal_exports.h:34: Uncommented and commented line 30. + +2009-01-20 MatÄ›j Týč + * test/format_test: Added a program and script as 'make check' target. + Those will test whether IL is capable of saving and loading images and whether the saved and + loaded image is similar to the original. + * configure.ac, lib/Makefile.am: Added support to IFF compilation. + * docs/DevIL_manual.texi: Added missing documentation about getting + image data + fixed some typos. + * include/IL/devil_cpp_wrapper.hpp: Fixed a typo that caused + compilation error + +2009-01-20 Denton Woods + * ilut_opengl.c (ilutGLScreen): Added glPixelStorei call. + * Added il_iff.c from GAIA. + * Added "x64 DLL Install.exe" to SVN. + * il_internal.h: Renamed ilIsValidJpg* functions to ilIsValidJpeg*. Added Iff functions. + * il_io.c: Added checks for Iff-loading. + * ilut_win32.c (ilutConvertSliceToHBitmap): Added better error handling. + * src-IL/src/Makefile.am: Added il_iff.c. + * ilu_rotate.c (iluRotate_): Changed ilResizeImage call. + * Added ilut_config.h. + * ilut.h: Added reference to ilut_config.h for Windows. + * il_files.c/il_icon.c/il_png.c/il_mng.c: Fixed typecasting warnings. + * il_jp2.c/il_wbmp.c (ilSaveJp2L/ilSaveWbmpL): Removed const qualifier. + +2009-01-19 Denton Woods + * il_hdr.c: Changed line 73 to have space for terminating NULL. + * src-IL/src/Makefile.am: Added il_vtf.c and *.cpp files. + * Fixed the MSVC++ 9 solutions pointing to the MSVC++ 8 project files. + * devil_cpp_wrapper.hpp: Updated to use ILconst_string instead of char*. + * il.h: Changed definition of IL_ALPHA to match OpenGL's GL_ALPHA. + * src-IL/include/Makefile.am: Added il_exr.h. + * il_dds.c/il.h: Readded DXT extension code. + * il_internal.h: Added declaration of ilFixCur. + +2009-01-16 Denton Woods + * Updated x64 projects + +2009-01-15 MatÄ›j Týč + * il_io.h, include/IL/il.h, il_states.h: Changed some normal strings to constant + strings (in ilSave, ilIsValid and ilGetString) + * configure.ac, lib/Makefile.am: Added wbmp compilation support + * il_jp2.c, il_wbmp.c: Fixed a typo that prevented compilation + * include/IL/devil_cpp_wrapper.hpp: Added a hopefully harmless solution for + the initialization of DevIL. + +2009-01-15 Denton Woods + * il_manip.c / il.h: Added ilClampNTSC function. + * il_squish.cpp: Added file. + * il_dds-save.c: Added line 688. + * il_states.c: Added lines for libsquish support. + * il_dds-save.c (Compress): Added libsquish compression. + * il_io.c (ilDetermineTypeF/L and ilIsValid/F/L): Added VTF, SUN and EXR. + * il_io.c (ilIsValidF/L): Added TIF + * il_jp2.c:131-137: Added these lines to take care of erroneous error generated by JasPer's buffering. + * il_jp2.c: Added functions to save JPEG 2000 images. + * il_utility.c (ilGetBppFormat): Added IL_ALPHA. + * il_jp2.c (iLoadJp2Internal): Added 1 and 2 channel format loading. + * il_dds-save.c:700-701: Changed to IL_RGBA. + * il_dds-save.c (ChooseEndpoints): Changed to use norm squared instead of a sum of the components. + * il_dds-save.c (GetBlock): Changed to copy adjacent data if it goes beyond the bounds of the image. + * il_icon.c: Removed extra whitespace. + * il_icns.c / il_internal.h: Added ilIsValidIcns*. + * il_icns.h: Changed comments on ICNSDATA. + * il_exr.c: Added ilIsValidExr*. + * il_io.c (ilLoadF): Uncommented ilLoadJp2F. + * il_dds-save.c (CompressTo565): Changed 24-bit to 16-bit code based on Charles Bloom's rant. + * il_dds.c (DxtcReadColor/DxtcReadColors): Changed conversion to copy high bits to lowest bits as well. + * il_io.c: Reenabled PhotoCD support. + * il_pcd.c (iLoadPcdInternal): Added check for end-of-file. + * il_exr.c: Added EXR saving functions. + +2009-01-13 Denton Woods + * Converted source repository to SVN from CVS. + +2009-01-12 Denton Woods + * ilut_directx9.c: Cleared up formatting some. + +2009-01-11 Denton Woods + * MSVC9 Unicode projects: Updated to work better in 64-bit Windows. + * il_vtf.c: Removed commented lines 238-242. + * Created application to copy DLL files to the System32 directory. + +2009-01-10 MatÄ›j Týč + * m4/devil-definitions.m4, m4/devil-reports.m4: Added a report saying + what libraries were linked with DevIL (should be helpful to packagers + who need to know DevIL dependencies) + * il_endian.h (iGwapUShort/iSwapUInt): Finished fixing bug #2023453 + (inline GCC asm, there was a typo left) + * src_IL/src/il_tiff.c (ilSaveTiff): Fixed a typo that was causing + conflicting declarations error + * configure.ac:264: Added IL_NO_WBMP since the Wbmp loading functions + that are referenced, but not implemented, caused linking errors + +2009-01-09 Denton Woods + * ilut_opengl.h: Moved ILGLCOMPRESSEDTEXIMAGE2DARBPROC typedef out of #ifdefs. + * ilut_opengl.c: Added ilutGLSetTex2D and ilutGLSetTex3D. Changed ilutGLSetTex to + just call ilutGLSetTex2D. Did the same thing for ilutGLSubTex. Added checks for + volume image extensions. Renamed MakeGLCompliant to MakeGLCompliant2D. Added + MakeGLCompliant3D. + * ilut_opengl.c (ilutGLScreen): Added check for ilTexImage failing. + * il_vtf.c (iLoadVtfInternal): Added BGRA4444 support. + * il_alloc.c / ilu_scale.c: Cleaned up formatting some. + * devil_internal_exports.h: Added Faces member to ILimage. + * il_devil.c (iCopySubImages): Added support for faces. + * il_register.c: Added ilRegisterNumFaces. + * il_convert.c (ilFixImage): Added support for faces. + * il_stack.c: Added ilActiveFace. + * ilut_directx9:63,779: Added ILboolean typecast. + * ilut_win32:102: Added ILboolean typecast. + * il_jpeg.c:987: Commented out pragma warning at the end. + * il_mng.c: Added #pragma warning at the top to get rid of redefinition warning when compiling. + * il_nvidia.cpp (ilNVidiaCompressDXT): Added check for Data being NULL. + * ilut_win32.c (ilutConvertSliceToHBitmap): Fixed bug #2496509 - added line 117 and + added DataSize member. + * il_hdr.c (iGetHdrHead): Fixed bug #2496518 - Added check for count. Changed + sscanf to use %2s format specifier to prevent buffer overruns in x and y. + * il_pnm.c (iGetWord): Fixed bug mentioned in #2496518 - igetc was moved back + into the while loop. Added a check for WordPos to prevent buffer overflow. + Restructured the while loop to work properly. + * il_convert.c (iConvertPalette): Changed references of iCurImage to Image. + * il_gif.c (GifGetData): Added DataPtr and changed line 636 to use Data instead of Image->Data. + * il_gif.c (iGetPalette / GetImages): Changed to better deal with local palettes. + +2009-01-08 MatÄ›j Týč + * TODO: Added some tasks that I would like to undertake + * ChangeLog, NEWS: Copied old ChangeLog entries to NEWS file + * lib/Makefile.am: Added two new files to the list of IL sources + (il_sun.c, il_nvidia.cpp) + * examples/iller: Made empty files where the ILU frontend will be in + the future. + * configure.ac, m4/devil-reports.m4: Put the report stage of the + configure script to a separate m4 file. + +2009-01-08 Denton Woods + * opengl_example/gltest.c (main): Added iluInit/ilutInit calls. + * ilut_opengl.c (ilutGLFormat): Added IL_ALPHA support. + * il_bmp.c: Minor formatting issues fixed. + * il.h: Added IL_NVIDIA_COMPRESS #define. + * il_states.h: Added ilUseNVidiaDXT to IL_STATES. + * il_state.c: Added IL_NVIDIA_COMPRESS support. + * il_dds-save.c (Compress): Changed to use NVTT if needed. + * il_nvidia.cpp: Added ilNVidiaCompressDXTFile and Depth parameter to ilNVidiaCompressDXT. + +2009-01-06/07 Denton Woods + * Added il_sun.c (Sun Raster file support) + * ilut_opengl.c (ilutGLInit): Changed Linux ilGLCompressed2D pointer casting + to coincide with the old SVN version. + * il_tiff.c / il_alloc.c: Fixed a few pointer casts that were fixed in SVN. + * test/DDrawTest: Fixed extra whitespace in all files in this project. + * il_endian.h (iGwapUShort/iSwapUInt): Fixed bug #2023453 (inline GCC asm). + * ilut_win32.c (ilutConvertSliceToBitmap): Fixed bug #1775036 (definition of buff). + * il_psd.c (PsdGetData): Fixed bug #2219350 (16-bit luminance images not loading properly). + * il_manip.c: Cleared up some minor formatting issues. + * il_png.c (iSavePngInternal): Fixed bug #1680577 (some metadata not written correctly). + * il_nvidia.cpp (ilnVidiaCompressDXT1): Disabled mipmap generation and added code to + ilOutputHandler constructor to determine the proper size of the buffer. + * il.h: Added IL_DXT1A define for nVidia Texture Tools. + * il_nvidia.cpp: Added DXT1a, DXT3 and DXT5 support. Renamed ilnVidiaCompressDXT to + ilnVidiaCompressDXT and added the DxtType parameter. + * il_internal.c: Cleaned up extra whitespace toward end. + +2009-01-02 MatÄ›j Týč + * src-{IL,ILU,ILUT}/src/*_internal.c: Hopefully resolved the + HAVE_CONFIG_H thing once for all :-) + * src-IL/src/il_exr.cpp: Undefined OPENEXR_DLL if we are not on + Windows (=> when HAVE_CONFIG_H is not defined) + * src-IL/src/il_io.c:765: Fixed a typo + * src-IL/src/il_vtf.c: Added min and max macros to the beginning + * docs/Devil_manual.texi: Corrected typos and missing @code and other + formatting stuff, corrected image names and incorrect usage of @xref + etc. that prevented compilation + * build setup (Makefile.am and configure.ac): Added support for + compilation of EXR and WDP formats + various other tweaks. + +Up to 2009-01-02 (since 1.7.5 release) Denton Woods + * Readded EXR code. + * Redefined clamping values in il.h. + * Added 64-bit integer types. + * Fixed bug in iRegisterLoad (https://sourceforge.net/forum/message.php?msg_id=5973761). + * Changed seek functions in il_files.c to return ILint. + * Added rpcsal.h and sal.h #includes to ilut.h for DX10. + * Added IL_MAX_QUANT_INDICES to use instead of IL_MAX_QUANT_INDEXS (mispelled). + * Added WBMP support (loading and saving). + * EXR files can now be loaded as file streams and lumps. + * Changed iNeuQuant to take number of colors in palette. + * Compiled MNG support back in. diff --git a/libs/DevIL-1.7.8/INSTALL b/libs/DevIL-1.7.8/INSTALL new file mode 100644 index 00000000..d3c5b40a --- /dev/null +++ b/libs/DevIL-1.7.8/INSTALL @@ -0,0 +1,237 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 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. + + 6. Often, you can also type `make uninstall' to remove the installed + files again. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +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). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of 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/libs/DevIL-1.7.8/Libraries.txt b/libs/DevIL-1.7.8/Libraries.txt new file mode 100644 index 00000000..727652ad --- /dev/null +++ b/libs/DevIL-1.7.8/Libraries.txt @@ -0,0 +1,40 @@ +Libraries needed to compile DevIL* : +---------------------------------- + +(Most of these are optional) + + +Libpng for .png (and some .ico) support available at http://www.libpng.org/pub/png/libpng.html +ZLib for .png (and some .ico) support available at http://www.gzip.org/zlib/ +Libjpeg for .jpg (and some .blp) support from http://www.ijg.org/ +Libtiff for .tif support from http://www.libtiff.org/ +Libmng for .mng and .jng support from http://www.libmng.com/ +JasPer for .jp2 (and some .icns) support available at http://www.ece.uvic.ca/~mdadams/jasper/ +HD Photo Device Porting Kit for .wdp/.hdp support from http://www.microsoft.com/Downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en. +Little CMS for color profiles (ILU) from http://www.littlecms.com/ +Colour Picker lib for WindowsTest from http://www.fluidstudios.com/freeware.html +Freeglut (or glut) for GLTest from http://freeglut.sourceforge.net +glext.h from http://oss.sgi.com/projects/ogl-sample/ABI/glext.h (as if using OpenGL) +libsquish for DXT compression from http://code.google.com/p/libsquish/ +nVidia Texture Tools for DXT compression from http://developer.nvidia.com/object/nv_texture_tools.html. + +MSVC++ precompiled versions of libpng, zlib, libjpeg, libtiff, lcms and JasPer can be found +at http://openil.sourceforge.net/libs/LibCompiled-vc8.zip or +http://openil.sourceforge.net/libs/LibCompiled-vc9.zip. + +Sources of libpng, zlib, libjpeg, libmng, libungif, libtiff, lcms and JasPer can be +found at http://openil.sourceforge.net/libs/LibSrc.zip + +Intel Jpeg Library from + http://developer.intel.com/software/products/perflib/ijl/index.htm + + +MAC OS X +These library are not still uploaded! +To learn how to install these libraries, read README.macosx + +Source of external framework, downloaded from the previous sites +http://openil.sourceforge.net/libs/ExternFrameworksSrc.sitx + +Complete Compiled Library +http://openil.sourceforge.net/libs/OpenILBin.sitx \ No newline at end of file diff --git a/libs/DevIL-1.7.8/MSVC++.txt b/libs/DevIL-1.7.8/MSVC++.txt new file mode 100644 index 00000000..c26d2204 --- /dev/null +++ b/libs/DevIL-1.7.8/MSVC++.txt @@ -0,0 +1,31 @@ +README.win is more relevant in this release. + +CMAKE files are included, but they need to be updated. +This is the only way to create VC6 and VC2003 projects. + + +...... + + +Installation +------------ + +Edit config.h to tell DevIL what external libraries you are using. + +Then go to Tools - Options - Directories to add in the include and lib +directories for DevIL. + +All MSVC++ project files are in the projects/msvc or projects/msvc8 folders. + + + +Usage +----- + +When compiling a program that uses DevIL*, it must be configured to use the +multithreaded dll version of the libc runtime. To do this, go to Project +Settings - C/C++ tab - Change "Category" to 'Code Generation' - Change +"Use run-time library" to 'Multithreaded DLL' or 'Debug Multithreaded DLL', +based on whether the project you are build is release or debug, respectively. + +For more information, look at the tutorials. diff --git a/libs/DevIL-1.7.8/Makefile.am b/libs/DevIL-1.7.8/Makefile.am new file mode 100644 index 00000000..686b6c8b --- /dev/null +++ b/libs/DevIL-1.7.8/Makefile.am @@ -0,0 +1,13 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = lib bin docs test data + +#SUBDIRS = src-IL src-ILU src-ILUT include +#DIST_SUBDIRS = src-IL src-ILU src-ILUT include +EXTRA_DIST = README.unix README.win Libraries.txt CREDITS MSVC++.txt configure.bat README.macosx + +# (uncoment this if you want to include examples to the distributed tarball) +# Actually it has to be commented now... It is currently very troublesome to include the projects in the distribution archive... +#SUBDIRS += projects + +DISTCHECK_CONFIGURE_FLAGS = --enable-ILU --enable-ILUT --with-examples --disable-dvi diff --git a/libs/DevIL-1.7.8/Makefile.in b/libs/DevIL-1.7.8/Makefile.in new file mode 100644 index 00000000..1a4e4e08 --- /dev/null +++ b/libs/DevIL-1.7.8/Makefile.in @@ -0,0 +1,701 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure \ + $(top_srcdir)/include/IL/config.h.in \ + $(top_srcdir)/test/format_test/format_checks.sh.in AUTHORS \ + COPYING ChangeLog INSTALL NEWS TODO build-aux/compile \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ + build-aux/missing build-aux/texinfo.tex ltmain.sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = test/format_test/format_checks.sh +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 +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = lib bin docs test data + +#SUBDIRS = src-IL src-ILU src-ILUT include +#DIST_SUBDIRS = src-IL src-ILU src-ILUT include +EXTRA_DIST = README.unix README.win Libraries.txt CREDITS MSVC++.txt configure.bat README.macosx + +# (uncoment this if you want to include examples to the distributed tarball) +# Actually it has to be commented now... It is currently very troublesome to include the projects in the distribution archive... +#SUBDIRS += projects +DISTCHECK_CONFIGURE_FLAGS = --enable-ILU --enable-ILUT --with-examples --disable-dvi +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + 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: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +include/IL/config.h: include/IL/stamp-h1 + @if test ! -f $@; then \ + rm -f include/IL/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) include/IL/stamp-h1; \ + else :; fi + +include/IL/stamp-h1: $(top_srcdir)/include/IL/config.h.in $(top_builddir)/config.status + @rm -f include/IL/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status include/IL/config.h +$(top_srcdir)/include/IL/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f include/IL/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f include/IL/config.h include/IL/stamp-h1 +test/format_test/format_checks.sh: $(top_builddir)/config.status $(top_srcdir)/test/format_test/format_checks.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(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-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 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +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: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.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-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-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 + +# 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/libs/DevIL-1.7.8/NEWS b/libs/DevIL-1.7.8/NEWS new file mode 100644 index 00000000..899aeb61 --- /dev/null +++ b/libs/DevIL-1.7.8/NEWS @@ -0,0 +1,1181 @@ +These are just highlights of what was changed during each release. For a more in-depth version of what was changed, please look at the ChangeLog. + +1.7.8 +--- +- Loading added: fits, iwi, blp, dicom, ftx, rot, texture, dpx, ilbm, utx, mp3 +- Saving added: vtf +- Rewrote bilinear scaling routine. +- Rewrote the HD Photo code so that it works properly. +- Fixed return values of ilSaveL. +- Windows Example: Added slideshow capabilities with Page Up and Page Down. +- Windows Example: Added mipmap functionality to 0-9 keys (0 goes to main image). +- Added Mathematica interface project. +- Added the ilur - commandline ILU frontend. +- Added IL_NO_GAMES define. +- Updated documentation. +- Added new ILU images to the manual; set the manual license to GFDL. +- Fixed iluBuildMipmaps (only generated one). +- Redid iluBuildMipmaps to use iluScale functions instead of nearest. +- Added an option to describe image formats in configure script. +- Fixed PNM loading bug. +- Added support for DDS g16b16, g32b32, r16, r32, a2r10g10b10 and a2b10g10r10 images. +- Added support for VTF files with 64-byte headers. +- Fixed some errors in image type conversion. +- Added IL_VTF_COMP define to control the output format of VTF files. +- Added French translation of errors. +- Updated libraries.txt with new external libraries. + + +1.7.7 +--- +- Redefined clamping values in il.h. +- Added 64-bit integer types. +- Fixed bug in iRegisterLoad (https://sourceforge.net/forum/message.php?msg_id=5973761). +- Added WBMP support (loading and saving). +- EXR files can now be loaded as file streams and lumps. +- Changed iNeuQuant to take number of colors in palette. +- Compiled MNG support back in. +- Added Sun Raster file reading. +- Better Linux configuration scripts +- Added libsquish and nVidia Texture Tools support - accessed through ilCompressDXT. +- Added IL_ALPHA support. +- Fixed a bug dealing with 16-bit luminance .psd images. +- Added ilutGLSetTex2D and ilutGLSetTex3D. +- Added support for BGRA4444 .vtf images. +- Changed support for cubemaps to be separate from animation lists. +- Fixed possible buffer overruns in .hdr and .pnm loading code. +- Changed GIF loading code to better load files with local palettes in each frame. +- Added support for environment maps and animations to .vtf loading. +- Added ilClampNTSC function. +- Added TIFF saving to file streams. +- Added JPEG 2000 saving. +- Added support for more .jp2 formats. +- Improved the internal DXT compressor. +- Added OpenEXR saving. +- Reenabled PhotoCD support. +- Fixed SoftImage PIC support. +- Updated MSVC++ x64 projects. +- Readded DXT extension functions. +- Added IFF loading. +- Fixed pixel shift issue with iluRotate. +- Added code in ilSaveL to return the number of bytes required by the output file data. +- Added code to determine the filetypes of JP2, MDL, XMP and EXR from their headers. +- Changed the return values of ilSaveF and ilSaveL to integers telling the number of bytes written. +- Added checks for malformed .psd files. +- Added Windows Mobile projects. +- Added DevIL.Net project. +- Added TPL format loading. +- Updated ilutConvertToSDLSurface. +- Rearranged how mipmaps are stored internally and accessed. +- Fixed bug loading malformed RLE Targa images. +- Added support in ilCopyPixels when copying from indexed images. +- Added Doxygen documentation. +- Updated main documentation. + + +1.7.5 +--- +- Added check in iluScale for parameters of 0, which would cause a crash. +- Cleaned up the tons of extra lines in il_dds.c. +- Added .vtf support. +- Fixed bug in file caching if the buffer was too small. +- Fixed crash saving .tga files if no author name string present. +- Fixed crash in ilActive* if a number too large is specified. +- Added support for alpha-only formats (IL_ALPHA). +- Better conversion from lower bpp to higher bpp data. + +1.7.4 +--- +- Added German translations of error codes in ILU. +- Added ilutGLSubTex back to ilut.h. +- Added 64-bit Windows configurations to projects. +- Fixed various 64-bit bugs. +- Fixed dependency of ILUT on MSVCRT DLL. +- Redefined ILsizei as size_t. +- Changed allocation functions to ILsizei from ILuint. +- Removed ILvoid, since it is now illegal in GCC 4.2. +- Started rewriting Windows HD Photo support from scratch. +- Started DirectX 10 code. +- Changed ilSaveCHeader's second argument to char*. +- Changed ilutGLScreenie to use Unicode if needed. +- Fixed various Unicode problems with ilSetString. +- Added progressive saving of .jpg with IL_JPG_PROGRESSIVE flag. +- Added more to the Fortran wrapper. +- Fixed TIF loading/saving (#define LZW_SUPPORT not enabled in libtiff). +- Changed MSVC++ to use MSVCRT libraries again. +- Added IL_BLIT_BLEND to influence alpha blending in ilBlit/ilOverlayImage. + +1.7.3 +--- +- ilGenImage now returns ILuint instead of ILint. +- Added pkgconfig devil.pc. +- Applied bugfixes from Richard Sims (mainly .psd). +- Added new Xcode framework. +- Added Fortran support. +- Changed MSVC++ 2005 project to link with static MSVCRT library. +- Added patch by SF user robin_charlton for Windows BMP support in ILUT. +- Updated Cmake files. +- Added preliminary Microsoft HD Photo support. +- Added better Unicode support. +- Changed .jp2 loading so that file streams can now be loaded. +- Changed limit/clamp in il.h to IL_LIMIT/IL_CLAMP. +- Added .hdr saving. +- Added Dutch/Spanish/Arabic/Japanese translations of error codes in ILU. +- Added ilut_directxm.c (DirectX Mobile support) from Vincent Richomme. +- Fixed a possible buffer overrun in iClipString. + +1.7.2 +--- +- Added preliminary OpenEXR support. +- Fixed crash in ilSwapColours with images having bits-per-channel greater than 8. +- Fixed ilClearImage not clearing images properly with bpc greater than 8. +- Added MSVC++ 8 projects back. +- Added MSVC++ Unicode projects. + +1.7.1 +--- +- Added Mac OS X .icns support +- Fixed a bug with non-standard .ico files that have PNG compression and palettes. +- Added JPEG 2000 support with JasPer. +- Added support for 256x256 and 512x512 JPEG 2000 encoded .icns. + +1.7.0 +--- +- Fixed a windows padding problem with bitmaps (thanks to robin_charlton) +- Added ILUT-X11 thank's to Jesse Maurais patch +- fixed PNM loading problem if the image contained 0x20 (a gray) in the beginning of the image +- added internal asserts to check pedanticaly check consistency in debug builds +- fixed SSE3 check +- added support for lua with swig +- from now the format of an opengl image can be GL_ALPHA too. (only when for opengl, not usable anywhere else). it's more an hack then a solution. +- new versions of ilReadRLE8Bmp, ilReadRLE4Bmp from Bjƶrn Ganster +- applied submitted patch #1645286. patch for reading X offset and Y offset from TIFF files. +- fixed lump reading bug. from Bjürn Ganster +- Fixed gif loading patched from Bjürn Ganster +- Fixed bug #1643309. wrong buffer size on ilSaveL with IL_BMP +- Fixed some iluCompareImage patched from James Kirkpatrick +- Fixed many security holes patched from Bjürn Ganster +- fixed bug #1637588. iMemSwap bugs +- fixed bug #1634099. Infinite loop on corrupt JPEG +- applied submitted patch #1632474. GIF loading fails on incomplete images +- applied patch #1612477. _UNICODE / UNICODE fixes. more win32 unicode fixes. +- TIFF compression method changed to LZW +- added the DEPRECATED macro and deprecated iluGenImage and iluDeleteImage +- glCompress2DARB now works with OS X too. +- incorporated patches from debian. +- Added support for non power of 2 texture loading (if available) +- fixed bug #1609417. Bug in iluGetImageInfo +- iGetIntegervImage(IL_IMAGE_CHANNELS) now returns a correct value +- fixed bug #1561642. ILstring is poorly implemented (w.r.t const and others) +- fixed bug #1562955. PSD 16 bits +- ilInit and ilShutdown can now be called more then one times or shutdown even if not initialized without crashing anything. +- fixed bug #662903 ilBlit result incorrect when source is not (0,0) +- internal clamp functions now are macros +- ilSetAlpha now returns a boolean value since it can fail +- fixed an error in the configure script were breaking compilation if libpng-config wasn't in the path +- applied submitted patch #1550471. missing const in il_tiff.c +- fixed bug #1554447. broken bmp loading with less then 256 color and a palette +- applied submitted patch #1554358. headers fixes +- Added MSVC++ Express 2008 projects and removed MSVC++ 6 projects. +- Added support for loading Windows Vista icons. + +1.6.8 RC2 +----- +- applied submitted patch #1539074. Fixes some bugs with paletted images, adds iluScaleAlpha (from jbitnet) +- fixed OpenGL loading +- altivec code is now merged inside IL sources, not on a separate directory +- more dds fixes +- now the returned number of layer, mipmaps or subimage is correct (computed at every call) +- added ilGenImage() and ilDeleteImage() +- fixed iluMirror, ilMirror duplicate code +- added _mm_malloc _mm_free for vectorized code memory managment +- fixed precedence for memory mangment variants +- Altivec,SSE,SSE2,SSE3 checks completed +- applied submitted patch #1483941 +- applied submitted patch #1476315 +- applied submitted patch #1085415 DXT3 and DXT5 save is broken +- applied submitted patch #1504388.(by Hans de Goede) +- fixed bug #1411053 now Lump loads parameters are const pointer +- fixed bug #1211071 pcx with the padding header not 0 filled will be loaded +- fixed bug #1092521 png save memory leak fixed +- fixed bug #1183924 iluScale checks for return values of ilTexImage +- fixed bug #1173264 iluInvertAlpha inverting the wrong channels +- fixed bug #1119508 il_tiff high order bit garbage when using uint32 as shorts. +- ilTypeFromExt is now exported +- ILstring now is (const char*). The typecastings are now not necessary to pass ILstrings +- iluFlipImage now is 3x faster and doesn't use any memory allocation +- IL_LUMINANCE and IL_LUMINANCE_ALPHA are now correctly handled; corrected function: + iluInvertAlpha, [iluScaleColours needs testing] +- iluScaleColours will return error when passing not BYTE or UNSIGNED_BYTE images, needs enhanchments to enable all the types. +- Finalized the Unicode support for windows. +- Fixed inlining for small function (i.e.g. endianess, rouding..) +- Added to configure script the ability to configure the path for the libraries + +1.6.8 RC1 +----- + +- Fixed a lot of minor bugs in various image format (especially TIFF) +- Rewritten documentation +- Dev-Cpp support +- Added ilSetAlpha +- Added ilModAlpha +- Removed ilSetSharedPal +- Fixed a common TARGA/TIFF/PNG memory Leak +- Fixed bug 785053 in il_header.c +- Fixed bug 785178 in il_header.c +- Fixed stack problem for name reuse + +1.6.7 +----- + +- Added hdr image format + + +1.6.6 +----- + +- Added .gif support back in. +- Fixed some DDS problems. +- Added DirectX 9 support. + + +1.6.5 +----- + +- Created a stress test application. +- Found out that you have to set PNG_NO_STDIO when compiling libpng on Win32, + or else it will try to write via fprintf on an error, causing a crash. +- Fixed a similar problem with libjpeg, though you don't have to recompile. +- Fixed a problem converting palette'd images to higher than IL_UNSIGNED_BYTE. +- Changed 1-bit .bmp files to use 0 and 1 instead of 0 and 255 (using a palette). +- Fixed a divide by 0 in iluPixelize() if the pixel size was 0. +- Fixed some problems with iluEqualize(). +- Found and fixed three memory leaks using Paul Nettle's memory manager. +- Changed the filters to properly work on images with higher than 8-bit channels. +- Fixed some uninitialized values when using ilConvertImage on palette'd images. +- Fixed a problem saving .dds mipmaps. +- Fixed a bug saving .dds files with blocks of all the same colour. +- Added support for the IL_LUMINANCE_ALPHA format. +- Fixed a bug loading corrupt .gif files. +- Removed .gif support, to comply with the Unisys patent (though the code is still there). +- Added preliminary region checking in ILU. + + +1.6.1 +----- + +- Fixed a bug loading 8-bit .psp files. + + +1.6.0 +----- + +- Removed the NeuQuant samples limit of 15. +- Fixed conversion to IL_FLOAT and IL_DOUBLE types. +- Rewrote a lot of the Endian conversion routines. +- Added missing Endian conversion to .gif and .ico files. +- Removed the unneeded il(u/t)_error.h files. +- Added the devil_internal_exports.h file and moved lots of il(u/t)_internal.h in there. +- Fixed a bug converting from IL_BGR to IL_LUMINANCE on IL_INT and IL_UNSIGNED_INT types. +- Went through the code and fixed many possible problems if ialloc failed. +- Fixed a possible memory leak in iGetPaddedData(). +- Removed a function not being used from the .sgi code. +- Fixed several leaks and double allocations in iConvertPal(). +- Fixed a possible leak in iluColoursUsed(). +- Added IL_LOAD_EXT and IL_SAVE_EXT functionality to ilGetString(). +- Merged in Ryan Butterfoss's changes to the DDS saving code. +- Moved ilSetPal() from il_devil.c to il_pal.c. +- Fixed potential memory leaks while loading a corrupt .gif file. +- Added the IL_FILE_WRITE_ERROR #define. +- Fixed double flipping in ilCopyPixels() and ilSetPixels(), along with some crashes. +- Fixed a crash calling iluColoursUsed() when a 1x1 image was bound. +- Fixed a leak if .dds mipmap reading failed. +- Fixed leaks in ilRegisterMipNum() and ilRegisterNumImages() if they failed. +- Sped up several aspects of loading and saving .sgi files. +- Added ILUT_D3D_POOL for ilutSetInteger() and ilutGetInteger(). +- Changed ilGetString() to return an ILstring. +- Added IL_BGRA support back in to ilApplyProfile(). +- Removed double flipping when saving .pcx and .jpg files. + + +1.5.6 +----- + +- Fixed a problem loading .psd files when IL_MEM_SPEED_HINT is set to IL_FASTEST. +- Fixed a bug loading corrupted .pcx files. +- Fixed some bugs using ilLoadL. + + +1.5.5 +----- + +- Temporarily removed .pcd support, since no .pcd images were loading correctly. +- Fixed problems with greyscale .bmp, .jpg and .pcx files. +- Made ilLoadFromJpegStruct and ilSaveFromJpegStruct exportable even if IL_NO_JPG defined. +- Fixed a bug loading .gif files with "local palettes". +- Fixed a problem loading .ico/.cur files with ColoursUsed set to 0 in their headers. +- Fixed a bug loading 4-bit .bmp images. +- Added a check to see if a .jpg is missing data at the end, so it does not loop infinitely. +- Fixed the Delphi headers. +- Added a check for extensions in GIF87A files. +- Added .psd saving. +- Optimized ilutGetPaddedData a bit. +- Added some checks to prevent corrupt .psd files from crashing the library when loading. +- Fixed a problem using ilLoadL with the IJL. +- Updated the Win CE project files. +- Added .plt support. + + +1.5.1 +----- + +- Fixed several problems with the internal file routines that caused many bugs. +- Fixed a simple problem loading .gif files. + + +1.5.0 +----- + +- Removed the printfs that somehow got left in il_sgi.c. +- Added ILUT_D3D_MIPLEVELS to ilutSetInteger(). +- Updated the static library workspace. +- Updated ilAddAlpha, ilAddAlphaKey and ilRemoveAlpha in il_convert.c to deal + with differing bits per channel. +- Changed the registered loading/saving function handler so that they can return errors. +- Changed ILU and ILUT to use DevIL's memory handler. +- Removed the last of the malloc/free calls. +- Changed the file/lump reading functions to set IL_FILE_READ_ERROR automatically + when one occurs. +- Added IL_EOF for use with other languages. +- Fixed a small memory leak in the .psp loading code. +- Fixed a bug where images with types larger than short were not saving as .sgi correctly. +- Added checks for all file reads to see if they succeeded. +- Added recognition for the .pdd extension (.psd renamed). +- Fixed some leaks in the .dcx code. +- Added ilutFreePaddedData(). +- Fixed some possible leaks in ilTexImage(). +- Fixed a problem with loading some .dds volume textures (LinearSize field appears to be + incorrect on some images). +- Fixed a problem loading some .tga files. +- Added more checks to determine if a .dds file has a volume texture in it. +- Added ilGetDXTCData(). +- Fixed some RLE .sgi loading bugs. +- Added direct S3TC/DXTC to OpenGL code. +- Added ILUT_DIRECT3D8 for use with ilutRenderer. +- Added direct DXTC to Direct3D 8 code. +- Added IL_DXTC_DATA_FORMAT for use with ilGetInteger(v). +- Added support for more formats with IL_TYPE_UNKNOWN. +- Added .pix support. +- Added .pxr support. +- Added .xpm support. +- Fixed MSVC++ post-build, thanks to Nick Marley. +- Changed the load order to check for popular image formats first. + + +1.4.2 +----- + +- Fixed a crash with the .psp code and a large memory leak. +- Fixed .gif loading, even loading animations better than I did with libungif. +- Added the static library workspace to /projects/msvc/static. +- Fixed another Mac OS X compilation problem. +- Removed references to libungif. + + +1.4.0 +----- + +- Fixed .dds volume texture support. +- Wrote the VolTex test application that writes out the individual slices of a volume texture. +- Changed the internal iConvertImage to make things much nicer. +- Fixed iluRotate so that it works on colour-indexed images. +- Added ilGetAlpha(). +- Added iluInvertAlpha(). +- Fixed Halo palette loading (didn't close the file handle after reading). +- Added .act palette support (Adobe Color Table). +- Added support for the Paint Shop Pro file format (.psp). +- Added the last bit of code to load TIFF files from memory buffers. +- Fixed the out-of-date Intel JPEG Library support. +- Rewrote .gif support. +- Fixed some problems with the Mac OS X compilation. +- Added Sam's fixes for .jpg and .bmp handling. + + +1.3.1 +----- + +- Fixed a huge ilLoadPal() bug. +- Disabled SDL (hopefully temporarily) to get rid of their main() mangling. +- Fixed greyscale .bmp saving bug. +- Removed the iluScaleTest() declaration. + + +1.3.0 +----- + +- Reworked sources tree. +- Updated *nix support, now uses autoconf/automake. +- Optimized ilCopyPixels and ilSetPixels if the destination and source formats/types are the same (suggestion by Kenneth Hurley). +- Fixed an ilSetPixels memory leak. +- Fixed the Big Endian versions of GetLittleFloat and GetLittleDouble. +- Changed iprintf to ilprintf to fix an error compiling with Cygwin. +- Changed iCurImage to iluCurImage and ilutCurImage in ILU and ILUT, respectively, to help with static libs. +- Removed ilShutDown call from ilInit (gave an erroneous error). +- Changed return type of ilSaveF and ilSaveL to return how many bytes were written. +- Added colour-indexed support to .tif saving. +- Fixed colour-indexed support with .bmp saving. +- Added MSVC++ 7 solutions and projects. +- Fixed an ilConvertImage bug when a colour profile was present in the image. +- Upgraded to LittleCMS 1.0.8. +- Updated some of the DDS loading to load more images. +- Added .psd support. +- Added some more Endian swap routines. +- Added offsets to internal image struct and added IL_IMAGE_OFFX and IL_IMAGE_OFFY to il.h. +- Added some more permissable Modes to ilSetInteger. +- Changed a malloc to ialloc in il_profiles.c. +- Added Kenneth Hurley's contributions to the DDS code. +- Added NeuQuant code and defines for controlling quantization. +- Fixed PowerBasic test files. +- Added GDI+ and MFC static library interfaces. +- Added more Modes for ilSetString, along with setting the C Header output string. +- Added DDS saving. +- Added preliminary (not functional) .psp support. +- Added a config.h generator for MSVC++. + + +1.2.4 +----- + +- Moved ilInit to il_istack.c. +- Changed iFreeMem to ilShutDown, and made it external. +- Rewrote much of the DDS support. +- Made a "Dynamic" project in the MSVC++ workspace, where it delayloads some external libraries for a smaller memory footprint. + + +1.2.2 +----- + +- Removed saving support for .bmp files with negative heights. +- Added ilApplyProfile for colour profile support. +- Moved several projects from the 'TestIL' directory to 'Examples'. +- Fixed the DDS cyan bug. +- Added DCX support. +- Fixed the iluScaleAdvanced return value, thanks to Rune Kock. + + + +1.2.0 +----- + +- When .bmp files don't have biColorsUsed set, DevIL now uses a default value when a palette is present. +- Added FreeBSD makefiles, thanks to Wojciech Sobczuk. +- Added .dds loading support. +- Updated the manual. +- Fixed some bugs in the documentation. + + +1.1.9 +----- + +- Removed .oil support -- it wasn't used anyway. +- Better Linux makefiles, thanks to Ismo Kļæ½rkkļæ½inen. +- Fixed a problem compiling in Linux. +- Renamed all DevIL files with il_*, to make it easier to compile as a static library (no name conflicts). +- Added IL_STATIC_LIB if you want to compile as a static library (no pragma options in MSVC++). + + +1.1.8 +----- + +- Added the new scaling features to ILU. +- Fixed crash when saving .tif files. +- Added full Windows CE support. +- Fixed iBindImageTemp in ILUT, correcting several functions that used this. +- Fixed ILUT's GL functions when the window did not have a width of 4x. +- Added TexImage and Resize to the ilImage C++ wrapper. +- Corrected Big Endian support in the data (all data was shown with blue and red swapped, and the alpha was in the wrong position). + + +1.1.5 +----- + +- Made ilSetPixels accept negative offsets. +- Cleaned up rle.c some and added credits to the top. +- Fixed .gif animation loading. +- Made memset and memcpy intrinsic -- removed ilMemSet and ilMemCpy. +- Fixed a bug loading .jpg files with overrided versions of the loading functions. +- Fixed a bug loading ASCII .pnm files that do not end with an endline. +- Fixed a loading problem with .png files with bit depths less than 8. +- Fixed a loading problem with .png files of type PNG_COLOR_TYPE_GRAY_ALPHA. +- Changed .png loading to use the gamma values on PCs. +- Removed .lbm support. +- Added several new examples. +- Fixed the RGB order of jpeg loading/saving. +- Enabled ilTypeFunc functionality. +- Removed the bit filters from ILU. + + +1.1.3 +----- + +- Added IL_FLOAT and IL_DOUBLE support to ilConvertImage(). +- Fixed a large bug when writing to "lumps". +- Added ilSetString() and implemented behaviour in states.c for customized strings. +- Changed writing to use a const void* buffer instead of a void* buffer. +- Fixed a bug in reading non-compressed .oil files. +- Fixed lots of problems with mipmaps. +- Added ilSetMemory() and callbacks. + + +1.1.1 +----- + +- Added palette support to iluEqualize(). +- Added palette support to ilu convolution filters. +- Fixed iluEnlargeImage(), which was erroring out. +- Fixed iluScale(), which was not setting the origin of some images correctly. +- Changed all function parameters from char* to const char*. +- Removed WinMain from the GLTest examples but used a linker setting to get rid of the console window. +- Added preliminary .mng support, thanks to libmng. +- Removed anal debug memory messages. +- Added ilutD3D8Texture() and ilutD3D8VolumeTexture(). +- Fixed crash with some palette'd .png images. +- Added ilutD3D8TexFromFile(), ilutD3D8VolTexFromFile() and several more D3D8 functions. +- Removed png_.h from /OpenIL to get rid of any libpng conflicts. +- Added interlace support for .png saving. +- Fixed some problems with origins (notably targa loading). +- Wrote OpenILUT/BeOS.cpp. +- Fixed .bmp saving. +- Fixed .pnm loading when the file is of zero length. +- Fixed ilClearImage(), which was only setting the first byte of each pixel. +- Fixed an iluNoisify() bug where it would crash when the tolerance was too low, and also another bug where the output is garbled. +- Removed the last of the ilutOgl function declarations and the GL compressed functions. +- Fixed the JPEG blockiness problems with some rare JPEGs. +- Removed the two poor gamma correction functions. +- Changed all OpenIL references to NeoIL. +- Added ilBlit(). +- Fixed ilBindImage() behaviour when a new image was requested. +- Added footer writing to .tga saving. +- Added .tga extension support. +- Fixed .sgi RLE writing. +- Added iGetFlipped() internally to speed up temporary flipping of an image (usually for saving). +- Added origin correction to .oil saving. +- Started using libpng 1.0.11. +- Fixed 1-bit .bmp loading (previously assumed luminance when supposed to be textured). +- Added gif.c. +- Removed the glext.h dependency. +- Added ilSet() and ilutSet(). +- Fixed a bug saving 32-bit .bmp files. + + +2.1.4b +------ + +- Fixed crash in iluGammaCorrectCurve() when the image had a palette. +- Non-Windows systems no longer call ilutCompGLInit(). +- Moved #include in alloc.c inside the #ifdef _WIN32. +- Fixed so much with multiple bpc's and image volumes. +- Fixed some quirks in ilConvertImage(). +- Found and fixed a memory leak in 4-bit .pcx and 16-bit .tga support. + + +2.1.3b +------ + +- Started the major work needed to make OpenIL use multiple bytes per channel. +- Created convbuff.c and converted ilConvertBuffer() to convert between types instead of just between formats (extremely exhausting!). +- Finished 2 bpc support for .sgi files. +- Finished 2 bpc support for .png files. +- Found and fixed some problems in ilCopyPixels(). +- Changed iluNoisify to accept a float parameter. +- Added ilApplyPal() and iluReplaceColour(). +- Fixed a bug in all saving functions where it would crash if a file had not been read beforehand. +- Fixed iLoadDataInternal()'s problem with origins. +- Added iluLoadImage(). +- Fixed a problem where ilutGLBuildMipmaps() was flipping images that did not need to be flipped. +- Fixed .png-saving of palette'd images where the colours were in the wrong order (bgr instead of rgb in some cirumstances). +- Fixed a problem saving palettes in the .oil format. +- Added batch conversion to WindowsTest. +- Created openilu/bit.c and moved the bit filters over there. +- Fixed ilutGetPaddedData() where it was not flipping the image and swapping colours. +- Made ilConvertImage() not perform conversions when unnecessary. +- Added seeking and telling to the file writing functions. +- Fixed memory leak in ilCopyPixels(), thanks to m|G-21. +- Added 4-bit .pcx support. +- Added support for the Intel Jpeg Library (IJL). +- Fixed a bug in ilCopyPixels() when the buffer was larger than the image itself. +- Removed IL_IMAGE_DATA from il/il.h. +- Added .lif support. +- Moved #pragmas for external libs into internal.h from il/il.h (fixed SDL linking problem). +- Updated the .oil specs to include lzo compression. +- Added pause / resume to AnimTest. +- Fixed 3d bilinear filtering in iluScale(). +- Fixed .tif-saving orientation problem. +- Changed most functions using ILfloats as parameters to use ILclampf instead. + + +2.1.1b +------ + +- Added back lzo support to oil.c. +- Added alloc.* to help find memory leaks in debug mode in Windows. +- Found and fixed two small memory leaks: + - In iLoadOilInternal(), in oil.c, the directory was not being freed. + - In iConvertPalette(), in convert.c, NewImage's palette was not being freed. +- Added key colour support (not thoroughly tested yet). +- Fixed a problem in AnimTest/WindowsTest where the openfilename buffer was not large enough. +- Fixed a bug in ilFixCur() in convert.c where it was setting the type as the format of the image. +- Rewrote ilutGLSetTex(). + + +2.1.0b +------ + +- Renamed ilSetDefaultCallbacks() to ilResetRead() and ilSetFileCallbacks() to ilSetRead(). +- Created ilResetWrite() and ilSetWrite(). +- Added IL_SEEK_XXX #defines. +- Fixed .sgi loading (was reading too much per channel). += Added ilGetLumpPos(). +- Added ilSaveF and ilSaveL. +- Revamped a lot of the internal file routines (especially saving). +- Fixed .bmp saving and loading (both padding issues). +- Fixed .pcx saving and added support for truecolour .pcx files (including 32-bit). +- Changed ilutSetWinClipboard() to convert images to bgr format before sending to the clipboard. +- Rewrote bitfile routines to use ILHANDLEs. +- Rewrote most saving routines to utilize saving to file streams and memory lumps. +- Wrote ilutWinLoadUrl(). +- Created an internal file buffer in files.c. +- Created ilutOglBindCompressed() (untested so far) and ilutOglMipCompressed(). +- Fixed colour quantization. +- Fixed bugs in ilSetPixels() that caused incorrect copies. +- Added drag-and-drop capability to WindowsTest. +- Fixed a rare case of ilCopyPixels flipping the image when it wasn't supposed to. +- Fixed WindowsTest not working correctly in Windows 2000. +- Wrote oil.c, oil.h and the Oil Gen project to utilize the new .oil format (tentative name). +- Added OS/2-style .bmp loading. +- Created AnimTest to test animation (mainly .oil). + + +2.0.9b +------ + +- Fixed a problem reading some 8-bit .bmp files where the palette was read incorrectly. +- Changed iluScale and the filter functions to convert palette'd images to their truecolour counterparts. I will change them back at the end when I fix the problems with colour quantization. +- Added palette support to iluGammaCorrectCurve. +- Fixed iluSwapColours() where iCurImage was NULL. +- ilut's OpenGL functions now resize a texture before sending it to OpenGL if the texture is too large. +- Fixed a problem when sending large images to OpenGL (now supports extremely large images). +- Fixed a padding bug when loading low-bit .bmp images. +- Changed il.h's ILAPIENTRY and ILAPI #define's. +- Removed the #pragma from the top of WindowsTest. +- Changed the ilActive* functions to reset to the base image when 0 is used as the parameter. +- Fixed ilLoadPal where it was reading extensions incorrectly. +- Added .wal support. +- Fixed a problem in iGetActiveNum, where it was trying to access a NULL pointer's Next pointer. + + +2.0.8b +------ + +- Changed the ilActive* functions to use the current image, not the base image. +- Added the IL_CUR_IMAGE #define to get the current image name via ilGetInteger(). +- Modified WindowsTest to preserve the original image. + + +2.0.7b +------ + +- Added SDL timing to the Benchmark project, though I cannot get it to link correctly. +- Added colour quantization, thanks to romka. +- Changed the WindowsTest icon. +- Included the debug libs and dlls in the full Windows installer. +- Modified ilGenImages()/ilBindImage()/ilDeleteImages() behaviour so that you can bypass ilGenImages() and call ilBindImage() directly. This probably requires more thorough testing but appears to be stable. + + +2.0.6b +------ + +- Fixed some linker problems, so I'm uploading it as 2.0.6b. + + +2.0.5b +------ + +- Changed ilNewImage() to set the format and type of an image. +- Fixed an error in the ilGetInteger() documentation. +- Added some new features to the DDrawTest project that were already present in WindowsTest. +- Added loading functions to the API-specific ilut functions for easier loading. +- Added ilutSetHBitmap() and made ilutGetWinClipboard() utilize it. +- Added ilutOglSetTex(), which doesn't work yet. +- Added saving functions to the API-specific ilut functions. +- Added the IL_USE_KEY_COLOUR #define and ilKeyColour(), which do not actually do anything yet. +- Fixed a problem in several OpenGL functions where it was not using the resized bitmap. +- Fixed a bug in iluSharpen() where it was using iCurImage instead of CurImage and another where it was using a depth of 0. +- Added iluDeleteImage() and iluGenImage(). +- Added iluGetImageInfo(). +- Got the GL_RGB8 and GL_RGBA8 stuff working in the OpenGL functions when ILUT_OPENGL_CONV is enabled. +- Fixed problems in iConvertPal() when converting from IL_PAL_BGR32 or IL_PAL_RGB32 to IL_PAL_BGRA32 and IL_PAL_RGBA32 palette formats. +- Renamed ilutOglBuildMipmaps() to ilutOglBindMipmaps() and created a new ilutOglBuildMipmaps(). + + +2.0.3b +------ + +- Added subimage support to ilCopyImageAttr(). +- Added the IL_ACTIVE_XXX #define's for use with ilGetInteger/v(). +- Added ilCloneCurImage(). +- Modified Windows Test to work with subimages. +- Fixed a problem loading some (very few that I've found...) .pcx images. +- Fixed the Windows Test window width problem. +- Added format and type mode setting. +- Added 4-bit rle .bmp support. +- Updated ilAddAlphaKey(). +- Fixed a bug in ilSaveSgi() where it wasn't changing from bgr(a) to rgb(a). +- Modified the MSVC++ project settings to generate separate debug dlls and libs, so you don't have to change the directories everytime you switch from release -> debug or vice-versa. +- Added iluEnlargeImage(). +- Changed ilSaveTarga() to preserve the current image's palette. +- Made an ilConvertBuffer() function that iConvertImage() now uses. +- Changed ilFlipImage() to use memcpy() instead of a for loop. +- Fixed a problem in ilSetPixels() and made ilSetPixels() and ilCopyPixels() use the new ilConvertBuffer() function. +- Changed ilOverlayImage() to use ilConvertBuffer(). + + + +2.0.0b +------ + +- Added resources to ilu and ilut. +- Got rid of ilVersion and put its functionality in ilGetInteger. I did the same for ilu and ilut, too. +- Moved ilFlipImage and ilSwapColours to ilu. +- Made ilAddAlpha, ilAddAlphaKey and ilRemoveAlpha internal to il. +- Made all of rle.c internal to il. There was no need to make it public. +- Added .pic, .pnm and .sgi validity functions. +- Changed all the *F functions (e.g. ilLoadTargaF) to restore the file stream's previous state before the call. +- Added pattern.c and everything within. +- Added rawdata.c and everything within. +- Changed the functions in raw.c to accept "normal" parameters. +- Changed internal functions to prevent from using ilGetState (which was rather nasty to use) and removed ilGetState. +- Removed dependency on OpenGL. +- Removed using the paletted texture extension in ilut for OpenGL. +- Added ilGetPalette(). +- I don't know how it happened, but I inadvertently left out two very important lines in iLoadJpegInternal() that cleaned-up after libjpeg, so now they're in. +- Changed iLoadTiffInternal() a lot. +- Fixed a possible leak in iLoadPngInternal and streamlined it some. +- Hopefully fixed all problems displaying palette'd images. +- Added ilGetExtension. +- Hopefully finally figured the formula for padding for .bmp files. +- Disabled checking for extensions in all the ilLoadXXX functions so they can be forced to load that specific type of image no matter what. +- Added more support for converting palettes via the IL_CONV_PAL mode. +- Added better registration in register.c. +- Fixed problems with libtiff, but I had to override using memcmp, because that is where it would fail in the libtiff library - Also overrided the warning and error functions of libtiff. +- Got rid of ilSetDoomPal() and made a ilSetSharedPal() function to use by stupid file formats that don't have a palette but are colour-indexed nonetheless. +- Made unified ilLoad and ilSave functions that use enums. +- Changed the image stack size to 1024 (but it can be enlarged...). +- Changed ilut around. Users need to change any ilut code they've used previously. +- Added compression control features to ilHint(). +- Added boolean values to ilGetInteger() and vice-versa. +- Added the iluBitFilter functions. +- Added interpolation to the iluScaleNd() functions. +- Got rid of the unused ilAlphaFunc(). +- Removed ilOverlayImage(). +- Started overriding the error/warning handlers for libjpeg in jpeg.c. +- Moved bitfile functions into the private OpenIL sector. +- Began lbm support. +- Included new Delphi headers and the all-new Linux makefiles. +- Added a unified ilLoadPal() and got rid of the specific palette-loading functions. +- Fixed 1 bpp and 4 bpp .bmp loading. +- Fixed 8-bit rle .bmp loading. +- Got lbm support working, but it only works with one image I have and none of the PSP-generated ones. +- Made all utility.c functions private. Equivalent functionality is in ilGetInteger(). +- Added iluImageParameter() to control filtering in iluScale() and placement in iluEnlargeCanvas(). +- Unified ilCopyPixels1D, ilCopyPixels2D and ilCopyPixels3D into an ilCopyPixels. +- Combined ilCrop2D and ilCrop3D into an ilCrop. +- Changed ilSetError() to handle stack overflows in the error stack more gracefully. +- Used IL_MEM_SPEED_HINT in targa.c, bmp.c and pcx.c to decode quicker if IL_FASTEST is set. +- Got OpenIL* compiling and running under DJGPP again. +- Attempted to do ilutSetWinClipboard() and ilutGetWinClipboard() (but failed miserably!). +- Added 3d mipmap generation in ilu (totally untested). + +- Changed ilTexSubImage() to ilSetData(). +- Moved ilCompareImage() and ilColoursUsed() to ilu. +- Removed ilDefaultStates() from public scope. +- Removed all the extension stuff. +- Changed ilSaveJascPal() to ilSavePal() and added support for saving palettes to ilSave(). +- Changed ilDeleteImages() to use a quicker algorithm (not having to check against the linked list). +- Removed ilSetPixel() due to objections. +- Renamed ilCreateDefaultTex() to ilDefaultImage(). +- Removed ilutGetState(). +- Changed OpenIL* project settings to optimize for size instead of speed. +- Removed ilutOglIsExtensionSupported() from ilut. +- Changed the IL_OPENGL, IL_ALLEGRO and IL_DIRECTX #defines to ILUT_OPENGL, ILUT_ALLEGRO and ILUT_DIRECTX, respectively. +- Mapped ilu and ilut errors to their corresponding OpenIL errors. +- Fixed ilPushAttrib, ilPopAttrib and their ilut counterparts. +- Moved file handling from internal.c/.h to the new files.c/.h. +- Added IL_IMAGE_DEPTH and IL_IMAGE_SIZE_OF_DATA #defines. +- Looked at libjpeg docs and jdatasrc.c to figure how to make it use all the input types OpenIL supports. +- Started 1-bit .pcx support. +- Added iluEmboss() and iluEmbossDark(). +- Made iluScaleColours() work with palette'd images. +- Added the ilFilters class to the C++ wrapper. +- Added an iluNoisify() function. +- Optimized the iluScalexD_() functions a lot. +- Multiplied the image size by a correction factor of 4/3 when using IL_FASTEST with several formats. This is mostly for poor compression schemes that can result in larger compressed images than the uncompressed versions (e.g. RLE). +- Fixed a bug in ilGenImages when an image name is being reused (was NULL after deletion but never recreated). +- Reinstated .ico support. All icons I've passed to this have worked so far. +- Added ilSetPixels(). +- Fixed a severe problem in ilCopyPixels(). +- Created the "3d Test" and the "3d Targa Gen" projects to test 3d images. +- Fixed problems in several functions that would crash when a given parameter was NULL. +- Made ilCopyPixels() and ilSetPixels() heed set origins. +- Commented the hell out of some of the test apps. +- Renamed WindowTest to GLTest. +- Created a Windows Test (Windows-specific code). +- Fixed a buttload of little bugs and similar stuff that were found when using the Windows Test App. +- Fixed a serious bug in ilCopyImage(). +- Fixed a bug in iluSharpen() where the image was sharpened with a flipped version of the image. +- Added IL_COLOR_INDEX -> IL_LUMINANCE conversion in ilConvertImage(). +- Fixed ilConvertImage() with several conversions and optimized it a lot. +- Renamed pattern.c as io.c (loading and saving, along with determining and verifying functions). +- Changed the MSVC++ proejct setting to be a little more friendly. +- Fixed the problem with ilSavePal() sometimes saving 0-length .pal files. +- Created the GdiTest project. +- Finally got around to writing ilSaveTiff(). +- Added the IL_LIB_TIFF_ERROR #define. +- Added ilRegisterMipNum() and ilRegisterNumImages(). +- Added ilutLoadResource(). +- Fixed ilutSetWinClipboard() and ilutGetWinClipboard(). +- Worked some on iluRotate() and got it working. +- Added back ilOverlayImage() (crude but working...) with alpha blending. +- Redid iluColoursUsed() with a hash table. +- Added ilutSetHPal((). +- Made a neat installer with NullSoft's SuperPiMP installer dev kit. +- Fixed a bug in ilSaveJpeg() when saving images with alpha channels (libjpeg doesn't accept alpha channels). +- Started on matrix.c. +- Added iluGammaCorrectCurve(). +- Added preliminary support for Half-Life's model format skins. + + +1.6.0b +------ + +- Decided to up OpenIL to a beta status. +- Fixed a potentially harmful bug if too many images were used in iEnlargeStack(). +- Changed ilBindImage(), ilGenImages() and ilDeleteImages() to be more like their OpenGL counterparts. +- Fixed ilConvertPal(). +- Added ilCompareImage(). +- Added ilSetPixel(). +- Fixed ilSaveBitmap() and ilLoadBitmap(). +- Fixed many small bugs and changed some small things around that weren't noteworthy enough to document, imo. +- Included the first (yet incomplete) documentation. + + +1.5.9a +------ + +- Added the ilIsImage() definition to il.h. I quite obviously had forgotten to when I made the function, so it has just been sitting there in many releases...oh well. +- Looked at the GIMP file associations and noticed PNM, which collectively describes pbm/pgm/ppm, so I decided to change some things in ppmpgm.c, such as renaming it to pnm.c and renaming functions. +- Fixed two pretty major .bmp bugs. One stemmed from the fact that I misread the .bmp documentation and thought it was word-aligned, but it was dword-aligned. The other was the the biColoursUsed member of the .bmp header isn't filled-out correctly half the time, so now it's always calculating a 256-entry palette. + + +1.5.8a +------ + +- Fixed a major bug in ilTexSubImage2D_(). +- Renamed ilTexSubImage2D() and ilTexSubImage2D_() to ilTexSubImage() and ilTexSubImage_(), respectively. +- ilClearImage now uses the correct error code. +- Fixed a bug in ilTexImage_() that sets IL_OUT_OF_MEMORY, even when there is plenty of memory, thanks to ABee. +- Fixed bugs in the ilCopyPixels family that dealt with not calculating the offsets correctly and added error-checking to them to make sure the caller wasn't requesting dimensions too large. +- Replaced all the 4x4 filter matrices with 3x3 filter matrices. +- Added ilColoursUsed(). +- Added iluPixelize(). +- Changed ilColoursUsed() to use a hash table, but it's still pretty damn slow... +- Added ilHint(). +- Added ilutGetHPal(). +- Added ilClearColour() and changed ilClearImage() to use the values passed to it. +- Optimized ilColoursUsed() by using a totally different algorithm (quicksort). +- Fixed ilConvertImage(GL_LUMINANCE) when the source was a bgr(a) image. + + +1.5.7a +------ + +- Added some support for 1-bit .bmp's. +- 16-bit targa files are now converted to 24-bit on-the-fly. +- Fixed a bug in iReadUnmapTga() where it only read 24-bit targas. +- Added iluVersion() and ilutVersion(). +- Added ILUT_OPENGL_CONV to ilut to be enforced in ilutOglFormat() in ilut/opengl.c. +- Started enforcing IL_CONV_PAL (automatically converts palette'd images to unmapped images). +- Added checks for IL_ORIGIN_SET to more image formats. +- Moved ilMirrorImage() and ilNegativeImage() to ilu from il. +- Added iluEnlargeCanvas(). +- Fixed a bug in ilCopyPixels2D() and ilCopyPixels3D() when the destination was not the same size as the source. +- Added iluCropImage2D() and iluCropImage3D(). +- Fixed a stupid bug in iluNegativeImage(). +- Changed a lot of ilu function names from iluxxxImage to iluxxx - the Image part was sorta redundant, as this *is* an image lib. +- Added filter.c and everything within. + + +1.5.2a +------ + +- Started differentiating between SizeOfPlane and SizeOfData somewhat. +- Updated header.c to output the depth. +- Fixed a bug in ilCopyImage_() where it was using iCurImage instead of Image. +- Updated ilMirrorImage() to work with depths of other than just 1. +- Updated ilFlipImage() to work with depths of other than just 1. +- Changed ilCopyPixels() to ilCopyPixels2D() and created 1D and 3D versions. +- Got rid of the now-obsolete IL_IMAGE_1D, IL_IMAGE_2D and IL_IMAGE_3D #define's and removed Target params from ilActiveImage(), ilActiveMipmap() and ilBindImage(). +- Added new scaling functions (iluScaleImage1D and iluScaleImage3D) to ilu. +- Added new rotation function to ilu. +- Renamed ilTexImage2D() to ilTexImage(). +- Fixed where I accidentally left ILUT_USE_ALLEGRO #define'd in ilut.h. + + +1.5.0a +------ + +- Removed ilRealloc()/ilRecalloc() from being global...it's only used in istack.c now. +- Changed the ILTargaSave struct in il.h to use a 255-char array instead of a char pointer for ID, as VB didn't like it, and I also removed IDLen. +- Added ilVersion() and the IL_VERSION #define in il.h. This is to check to see if your executable was compiled with a different version of OpenIL than what is on the user's system. +- Removed ilGetFloat()/ilGetFloatv() from il.h. +- Updated the Cpp Wrapper project by adding an ilRender class. +- Fixed ilSaveBitmap() from unnecessarily swapping the colours. +- Updated ilSwapColours() to work with palettes better. +- Added an option in the OpenIL states to automagically convert palette'd images on loading, which is not used yet. +- Commented the butt out of OpenIL. +- Added image identification to ilLoadImage(). +- Changed comments at the beginning of some exported functions to use //! instead of just //, so if you want to create documentation with DOxygen (http://www.stack.nl/~dimitri/doxygen/download.html) if desired. +- Added ilMirrorImage(). +- Added ilNegativeImage(). +- Changed ilutConvertToAlleg() and ilutConvertToHBitmap() of ilut to be exported. +- Changed iSetInputFile() to use itell instead of ftell. +- Created a new iDefaultEof() function that will work on implementations that don't have one. +- Moved all the default file-reading functions to il.h and exported them. +- Removed all references to fEofProc(). +- Changed ilGenImages() to use ilNewImage(1, 1, 1, 1) instead of ilNewImage(0, 0, 0, 0) to prevent division by 0 errors. +- Added ilSetDefaultFileCallbacks(). +- Added Visual Basic stuff, thanks to Timo. + + +1.4.7a +------ + +- Fixed a potentially fatal error in ilConvertImage if converting from a palette'd image. +- Fixed ReadProc to take 4 parameters instead of just 3...it was causing problems with iread, which takes two size parameters instead of just one. +- Started preliminary support for 1 and 4-bit .bmp's. +- Fixed 8-bit .bmp loading. +- Rewrote iFreeMem() and a little of ilDeleteImages() in istack.c to fix a rare but very harmful bug when an image isn't loaded completely. +- Added support for more palettes in ilConvertPal(). +- Updated png.c to use the new cross-language file-reading. This is the only lib that I could get to use the cross-language stuff for operating on already-opened files. + + +1.4.6a +------ + +- Updated openil.def to include ilSetFileCallbacks, ilRegisterFormat and ilRemoveFormat. +- Changed all the new portable file functions to use the __stdcall convention (ILAPIENTRY) and created default functions that use __stdcall, as the stdio.h file functions use __cdecl. + + +1.4.5a +------ + +- Changed ilut's DllMain(). +- Added support for the .jpeg and .jpe extensions instead of just .jpg. +- Fixed iSeekFile(). +- Added complete support for using your own file routines (so other languages can use the ilLoadxxxF file routines). +- Added register.c and register.h in and appropriate typedefs and function declarations in il.h. +- Removed the "else" in front of all the tests in ilLoadImage and ilSaveImage...they were unnecessary. +- Rewrote ilutOglScreen() to not close the current image. +- Rewrote ilConvertImage() to not close the current image. +- Updated djgpp.mak to use register.c. + + + +1.4.2a +------ + +- Moved all il*.h out of /OpenIL* and into /include/il. +- Changed ABee's e-mail address where relevant. +- Updated the openil.def file, which didn't include the jpeg functions. +- Updated the Delphi headers to use the correct default IL_NO_XXX #define's. +- #define'd _IL_BUILD_LIBRARY in the internal.h files of ilu and ilut. I'm so surprised this warning didn't pop up earlier, but oh well, it's a Microsoft product I'm compiling with. ;-) +- Updated the out of date djgpp.mak (not tested). + + +1.4.1a +------ + +- Changed png.h to png_.h +- Added internal but exported functions to the .def files. +- Better Delphi support from Alexander Blach, plus a lovely test app in the /Delphi/Test folder. +- Changed the readme.txt file some. + + +1.4.0a +------ + +New goodies, mostly thanks to Alexander Blach (ABee). +- Delphi headers in the /Delphi directory created by ABee. +- .Def files in the /Def directory created by ABee. +- .Def files added to the projects. + + +1.3.6a +------ + +Not really much in this release...just trying to make the library more bearable to use. +- Several fixes in the project files +- Changes to the readme. +- Fixed the icons, which got corrupted in previous releases without my knowledge. +- Replaced the #flipCode logo, which had gotten corrupted, too. + + +1.3.5a +------ + +Just bugfixes mostly. +- ilutStartup() doesn't call ilutOglInit() anymore, due to problems with OpenGL not being initialized beforehand. +- If image loading doesn't succeed, a future call to ilDeleteImages should not fail anymore. + + +1.3.4a +------ + +- Changed targa.c in iReadUnmapTga() by commenting-out the line that used GL_UNSIGNED_SHORT_5_5_5_1_EXT. It required glext.h. +- Restructured project files from Lightman. +- Cpp wrapper compiles into a .lib. + + +1.3.3a +------ + +- Added IL_IMAGE_DATA, IL_PALETTE_BPP and IL_PALETTE_NUM_COLS to il.h and used them in states.c. +- Updated the extremely out-of-date readme.txt. +- Changed all the local variables in iConvertImage to static. +- Started on converting from GL_COLOR_INDEX in iConvertImage(). +- In ilConvertPal(), if the dest and src format are the same, it now returns GL_TRUE instead of erroring. +- Modified ilut's MakeGLCompliant() to use il's ilConvertImage(). +- Shortened all source filenames to 8.3 character format for systems without long filenames. +- Moved the globals from istack.c to istack.h. +- Added image validation for targas to tga.c. +- Combined BMPHEAD and BMPINFO together in bmp.h and bmp.c as BMPHEAD. +- Added image validation for bitmaps to bmp.c. +- Created ilSaveJascPal(). +- Added all the IL_NO_* #define's to il.h and commented them out (except for IL_NO_GIF). +- Started on ilSavePcx() - doesn't work yet. +- Fixed ilSaveSgi() to save in rgb(a) format instead of bgr(a) format. +- Added IL_VERSION_1_3_3 to il.h + + +1.3.1a +------ + +- Completely rewrote rle.c and added it back into the project. +- ilRleCompress() added to rle.c. +- Changed targa.c to utilize rle compression. +- Started ilSaveSgi() in sgi.c. +- Changed all the SaveLittle* and SaveBig* functions in endianness.c where I had copied them from LoadLittle* and LoadBig*, respectively, so they were not swapping the right value. +- sgi.c's ilSaveSgi() works, except for saving rle-compressed files. +- Changed .jpg's origin to upper-left. +- Changed .pcx's origin to upper-left. +- Edited bmp.c to read in a pad pixel instead of just a pad byte when the image's width is of an uneven dimension. +- Implemented ilSaveBitmap() in bmp.c in its entirety. + + +1.2.8a +------ + +- Finished the majority of the Cpp Wrapper project. +- Found out how to initialize OpenIL at startup in gcc at http://gcc.gnu.org/ml/gcc-help/1999-11n/msg00029.html, so changed main.c of each lib. +- Actually got Allegro to utilize OpenIL with some minor reworking. This should be automagic in the next version. + + +1.2.7a +------ + +- Got rid of the TARGA struct in targa.h since it wasn't being used and modified function parameters accordingly. +- Added several functions to endianness.c and started using them. I won't be able to read whole structs from files at once anymore so that I can support both little and big endian processors. Oh well, that's the price I pay for portability. =/ I didn't change pal.c, because it doesn't use iread yet...will be changed in the next release. I can't answer for libs I am utilizing, but OpenIL should be fairly portable to big-endian systems now. +- Added support for saving .png files. + + +1.2.6a +------ + +- Added preliminary support for DirectX (ack) in ilut's directx.c (and .h). +- Did everything in mipmap.c from scratch. +- Changed iCurrentImage to iCurImage...just nicer-looking and easier to type. =] +- Changed the Next and Mipmaps data members of ILimage to be of type ILimage...a whole lot easier to use than having to cast GLvoid*. Also added NumNext and NumMips members - not sure if they are necessary though. They may just add bloat to an already large struct. Also added SizeOfPlane to the struct (will help with 3d texture volumes). +- Streamlined ilReadUncompBmp() in bmp.c a lot. +- The targa functions now skip over the image id instead of allocating memory for it, reading it, then immediately freeing the memory. +- Implemented ilTexImage2D and ilTexSubImage2D functions. +- Changed all loading functions and functions that update iCurImage. The snippet of code that did this previously was like this: + Image = ilNewImage(Width, Height, Depth, Bpp); + if (Image == NULL) { + ilSetError(IL_OUT_OF_MEMORY); + return GL_FALSE; + } + ilCloseImage(iCurImage); + ilSetCurImage(Image); +Now the code is like: + if (!ilTexImage2D(Width, Height, Depth, Bpp, GL_RGB, NULL)) { + ilSetError(IL_OUT_OF_MEMORY); + return GL_FALSE; + } +- Fixed .bmp support to correctly skip padding. +- Found out .pcx support is pretty shoddy...I will rewrite it soon. + - Rewrote the .pcx reading function iUncompressPcx from scratch...works perfectly. =] Sometimes it's just best to give something a fresh approach. +- Added .pcx validity test functions. +- Changed .raw functions to take Depth as an parameter. +- Changed from absolute to relative paths for the test .exe's in the MSVC++ project settings. +- Added back in MakeGLCompliant() to opengl.c of ilut. Finally got WindowTest to display images with dimensions that are not powers of 2, as MakeGLCompliant() automagically converts the texture to the appropriate dimensions. The only foreseeable problem is if the texture is greater than 256x256, because the VooDoo series of cards may choke and die. Is there an elegant way around this? Maybe I could introduce a new ilDisable/ilEnable() enum. I'm using glGetIntegerv(GL_MAX_TEXTURE_SIZE, &MaxTexW); as a temporary hack right now. +- Worked some more on iConvertImage() and performed the first test - converting from rgb to luminance, and it works. =] The values I used for converting are based on the NTSC values for television and were obtained from http://www.opengl.org/Coding/KilgardTechniques/oglpitfall/oglpitfall.html, section 6. +- Changed the #define IL_ILLEGAL_PARAM to IL_INVALID_PARAM. Maybe I should just use IL_INVALID_VALUE? +- Added #pragma comment(linker, "/NODEFAULTLIB:libc") to openil\internal.h to get rid of that damn warning. +- Cleaned-up openilut\opengl.c a little bit and got rid of all those erraneous commented-out functions. Also wrapped wglGetProcAddress() in an #ifdef _WIN32/#endif pair. Also flips the texture if the origin is different than the current OpenIL origin to match (will if the user sets it correctly) OpenGL's origin. +- Added ilGetPalBaseType() in utility.c. +- Added support for Dr. Halo palettes (always output with .cut files). +- Added back in png.c and png.h to the project. +- Changed dll.c to main.c and wrapped the DllMain in an #ifdef/#endif pair. +- Made a makefile for Djgpp. It's missing the .c files that require an external library to operate, but they can be added back in easily (not using dos edit!). It has been tested to create appropriate output, but has yet to be tested in an actual program. +- Added an \objs folder for each OpenIL* dir for Djgpp compile. +- Found out IL_PACKSTRUCT needs to come before the name of the struct instead of after...changed it in all files that use IL_PACKSTRUCT. =] +- Fixed an extremely harmful memory problem in sgi.c in iReadRleSgi() where I was malloc'ing only Head->ZSize instead of Head->ZSize * sizeof(GLubyte*). Took me a few hours to find that one...the VC++ debugger didn't help much at all. =/ Rewrote iGetScanLine() to not use iExpandScanLine() and got rid of iExpandScanLine(). +- Started on iff.c, my new image format (oh gawd, not another one =), but then I found out later that .iff is already a graphics format from the Amiga. Need to find a new extension... +- Changed png.c to use libpng's png_set_read_fn(). Added validity-checking functions for png's. + + +1.1.9a +------ + +- Changed the screenshot functions in ilut. +- Changed the WindowTest around some. + + +1.1.8a +------ + +- Added back a few loading formats that were inadvertedly removed in the 1.01a release. +- Worked some on the empty iConvertImage function and wrote an ilConvertImage function. There's a lot more work to do on iConvertImage. +- Replaced false and true with GL_FALSE and GL_TRUE, respectively. +- Added back in .jpg support. +- Added in .tif support with the help of libtiff. +- Added in .col support. +- Improved .ppm and .pgm support considerably - also added .pbm support (btw, psp4 does not output proper binary .pbm files, so I couldn't test it well =/ ). +- ilSaveImage added. +- .pic, .pcd and .cut loading added. +- Changed .pcx to be in rgb order (had it as bgr for the palette). +- Added utility.cpp and functions in it. +- Updated ilu's error strings. +- Updated ilCloseImage to take heed of mipmaps, extra and chained images (none of which are used yet but may be soon enough...). + + +1.0.1a +------ + +Restructured lots of the library so that it now uses an image stack (in imagestack.*). Now images have to be bound before being used. All loading functions now load directly into the stack. + + +0.0.1a - First release +--------------------- + +Released in sorta bad condition with little documentation. diff --git a/libs/DevIL-1.7.8/README b/libs/DevIL-1.7.8/README new file mode 100644 index 00000000..a043a64e --- /dev/null +++ b/libs/DevIL-1.7.8/README @@ -0,0 +1,176 @@ +Developer's Image Library version 1.7.8 Readme, Notes and Quick Use +------------------------------------------------------------------- + + DevIL song: "la la la, a cross-platform image library utilizing a + simple syntax to load, save, convert, manipulate, filter and display + a variety of images with ease, la la la" + + +What is it? +----------- + +DevIL is an Open Source image library whose distribution is done under the +terms of the GNU LGPL license. See the COPYING file for more details. +DevIL offers you a simple way to implement loading, manipulating, filtering, +converting, displaying, saving from/to several different image formats in your +own project. + + +Where can I find it? +-------------------- + +DevIL can be found at http://openil.sourceforge.net + + +How do I build and install the 3 libraries ? +----------------------------------------- + +*nix users should read README.unix +VisualC users should read README.win +Cygwin users should read README.cygwin +MacOSX users should read README.macosx + +PS: *nix stands for GNU/Linux, *BSD, SunOS/Solaris and perhaps some more. + + +More Extensive Documentation +---------------------------- + +This file is only a quick guide to point you to more detailed information on +how to use DevIL. More extensive documentation can currently be found on the +DevIL site at http://openil.sf.net and in the /Docs directory in a normal +install. + + +Why the hell another image library? +----------------------------------- + +I have never seen an image library that can do everything DevIL does. Sure, +various different libraries can do part of what DevIL can do as well or even +better, but I wanted a simple to use library that encompassed all of these +features. I also wanted an extremely portable image library that could be used +from a variety of languages and utilized the OpenGL syntax. + + +Basic Readme +------------ + +Most anything stated in this document applies to DevIL as well as DevILU and +DevILUT, unless otherwise stated. (This file is best viewed with word wrap on.) + + +Errors: +------- + +All errors generated inside DevIL, along with illegal parameters passed to +DevIL functions are caught and passed to ilSetError(), an internal library +function. The calling program can call ilGetError() to get the value of the +error generated. Error types are defined in il.h, using the 0x501 - 0x5FF +range. ilGetError() will return 0 (IL_NO_ERROR) if no error has occurred. + + +Basic Usage: +------ + +This demonstrates loading an image through DevIL for OpenGL. Don't forget to +call ilInit before you before you do anything: + +#include +#include +#include + +... + +ILuint devilError; + + +ilInit(); + +devilError = ilGetError(); + +if (devilError != IL_NO_ERROR) { + printf ("Devil Error (ilInit: %s\n", iluGetErrorString (devilError)); + exit (2); +} + +.... + +ILuint devilID; + + +ilGenImages(1, &devilID); +ilBindImage(devilID); +ilLoadImage("default1.tga"); // Loads into the current bound image +devilError = ilGetError(); + +if (devilError != IL_NO_ERROR) { + printf ("Devil Error (ilLoadImage: %s\n", iluGetErrorString (devilError)); + exit (2); +} + +.... + +ilutRenderer(IL_OPENGL); // Switch the renderer + +.... + +GLuint openglID, openglError; + + +openglID = ilutGLBindTexImage(); // This generates the texture for you +devilError = ilGetError(); + +if (devilError != IL_NO_ERROR) { + printf ("Error: %s\n", iluGetErrorString (devilError)); + exit (2); +} + +if (openglError != GL_NO_ERROR) { + printf ("Opengl Error (ilutGLBindTexImage): %s\n", gluGetErrorString (openglError)); + exit (2); +} + + + +// Make sure to close the image when you are done with it (though DevIL +// automatically deletes them when the program exits): + +glDeleteTextures(1, &openglID); +ilDeleteImages (1, &devilID); + + +More Examples: +--------- + +The TestIL project is included to test features of DevIL. + +DevIL includes a project called GLTest. This is a simple test of DevIL's +capabilities. All it does it load any image and displays it in a window +created by FreeGlut, which is available on http://freeglut.sourceforge.net. It +is also included to let the user have an idea of what the library can really +be used for. + +Several other test projects are included to test support with various display +APIs. The WindowsTest project is a basic image program that only runs in +Windows right now but showcases several of DevIL's features through various +menus. + +If you want more in-depth tutorials, you can find them on +http://openil.sf.net, or they may be in your installation under the /examples +directory. Documents are also available in the /docs directory. + + +Additional Reading +------------------ + +All image formats used in DevIL have corresponding documents on +http://www.wotsit.org, under the Graphics Files section. These documents +proved invaluable for the creation of this library when there was no library +already available for that image format. + + +Legalese +-------- + +All contents of this file are intellectual property of Denton Woods, +copyright 2001-2008. diff --git a/libs/DevIL-1.7.8/README.macosx b/libs/DevIL-1.7.8/README.macosx new file mode 100644 index 00000000..c841dbe0 --- /dev/null +++ b/libs/DevIL-1.7.8/README.macosx @@ -0,0 +1,40 @@ +How do I compile the library ? +---------------------------------- + +Download and install. In the Unix way it will produce a shared library. +Using the project file for the Apple Developer Tools you can get a framework. +However they are without the external libraries which are needed to be installed. +However the packages are somehow out of date. but anyone can setup a new project easily. +DevIL was packaging them along with the distribution but that's was to hard to mantain +for each update of these libraries. + + +Libraries needed to compile DevIL* : +----------------------------------- + +Needs the same libraries as the *nix version. + +Installation: +------------- +All the libraries can be easiliy installed from source, manually or using +some tools like the fink project or the darwinports project. + +to use fink you must set the environment variables. for some libraries you must have +the PATH correctly set up to execute programs installed with the tools. + +tcsh: +setenv LDFLAGS -L/sw/lib +setenv CFLAGS -I/sw/include -L/sw/lib + +sh: +export LDFLAGS=-L/sw/lib +export CFLAGS=-I/sw/includee -L/sw/lib + +same thing with darwinports +tcsh: +setenv LDFLAGS -L/opt/local/lib +setenv CFLAGS -I/opt/local/include -L/opt/local/lib + +sh: +export LDFLAGS=-L/opt/local/lib +export CFLAGS=-I/opt/local/include -L/opt/local/lib diff --git a/libs/DevIL-1.7.8/README.unix b/libs/DevIL-1.7.8/README.unix new file mode 100644 index 00000000..0498b180 --- /dev/null +++ b/libs/DevIL-1.7.8/README.unix @@ -0,0 +1,60 @@ +How do I compile the 3 libraries? +-------------------------------- + +You will need autoconf, automake and libtool. + +Just type: +autoreconf -i +./configure +make +sudo make install + +If you want to use the ILU and ILUT parts of DevIL, you will want to run +./configure --enable-ILU --enable-ILUT + +If you want configure to install in /usr instead of /usr/local, append +--prefix=/usr to the ./configure line. + +It should find automatically what can (or cannot) be built on your system. Libtool, autoconf and +automake will need to be installed. You may need to copy files from your libtool +into the libtools directory and overwrite ltmain.sh if it will not compile with the +included files. + +NB : ./configure --help gives you all compiling options available for the three + libs. This includes enabling/disabling picture formats, ilut apis. + +Enable/Disable: +All features are basically enabled, and a test will be performed +to verify if is possible to compile them in. If they are explicitly enabled +or disabled no test will occour. + +Compiling under Cygwin or MingW in Windows: +------------------------------------------ + +Run the same commands as above. You will need to have the following packages installed: gcc-core, gcc-mingw-core, gcc-g++, autoconf, automake, libtool. + +Config.h and JasPer: +------------------- + +If compiling with JasPer, you may need to modify config.h so that it does not +redefine things that are defined in JasPer's jas_config.h. PACKAGE, PACKAGE_NAME, +etc. are generated for both projects, since they use a similar configuration +program. If there are conflicts, just comment out the ones in DevIL's config.h. + + +Libraries needed to compile DevIL* : +----------------------------------- + +They are all autodetected by the ./configure script. But if you want to include +one of those formats, you have just to install the corresponding lib : + +(libs listed in libraries.txt) + +or in your distro/port ftp/site/whatever_you_want :-) + + +Installation: +------------- + +If #make succeeded, just type #make install, followed by #ldconfig +(as su, of course) diff --git a/libs/DevIL-1.7.8/README.win b/libs/DevIL-1.7.8/README.win new file mode 100644 index 00000000..57e3e90e --- /dev/null +++ b/libs/DevIL-1.7.8/README.win @@ -0,0 +1,44 @@ +Where do I find the project files ? +----------------------------------------- + +MSVC++ projects are in DevIL\projects\vc8 and DevIL\projects\vc9. +If compiling with Cygwin or MinGW, use the instructions in README.unix. + + +The IL_NO_XXX #define's: +------------------------ + +A user can recompile this library without complete image support in it. For +example, if your project does not use .jpg files, you can uncomment +#define IL_NO_JPG at the top of il/il.h, recompile the library, and no .jpg +support will be added, meaning quicker compiles and a smaller library. + + +The ILUT_USE_XXX #define's: +--------------------------- + +To disable support for a specific API, edit IL/ilut.h and comment the +corresponding #define. Per example, to disable OpenGL functions support, + add // in front of the line that reads: + +#define ILUT_USE_OPENGL + + +Libraries needed to compile DevIL* : +----------------------------------- + +Libraries.txt (included with the DevIL distribution) lists all libraries needed +to properly compile DevIL. + +Precompiled versions and sources of all libraries needed to compile DevIL are +available at http://openil.sourceforge.net/libs/LibCompiled.zip and +http://openil.sourceforge.net/libs/LibSrc.zip , respectively. + + +Installation: +------------- + +Just unzip and compile other libs included if needed. + +Please also refer to MSVC++.txt for further instructions if you are using +Microsoft Visual C++. diff --git a/libs/DevIL-1.7.8/TODO b/libs/DevIL-1.7.8/TODO new file mode 100644 index 00000000..0f622382 --- /dev/null +++ b/libs/DevIL-1.7.8/TODO @@ -0,0 +1,249 @@ +DevIL TODO: + +----------- + +Denton: + +Bugs: +- Conversion to IL_ALPHA seems to be crashing (WindowsTest.cpp). +- Conversion to IL_ALPHA can be flipped? + + +By next release: + +- NVTT.dll as a delay-loaded DLL. +- Update docs with next DXT code, new mipmap/cubemap access, new SaveL code. +- Mention Unicode and 64-bit compatibility on website. +- Update DevIL website with file formats (psd-saving, etc.). +- Add Nebula Device to projects page. +- Add VTF Edit to projects page. +- Add http://vrml.cip.ica.uni-stuttgart.de/dune/install.html to projects page. +- Verify all formats are listed in il_io.c Doxygen documentation. +- http://www.fileformat.info/format/drhalo/sample/index.htm - Check these. +- Update Portable Any Map name in manual and code. http://www.bbhscanners.com/support/infinity_WF/faqs/faq_001.html +- Update http://en.wikipedia.org/wiki/Tagged_Image_File_Format name as above. +- Same with MNG +- Update Targa extensions in manual. +- Update license page on the website. + + +Easier: +- Find out what is different in the VTF headers that are 64 bytes. +- Make DXT1 decompression function that does not do alpha. +- Implement ilIsValid calls for ROT. +- Make sure ilFixImage is called everytime something is loaded. +- Add BLP loading of alpha sizes other than 0 and 1 for BLP2 RAW. +- Add BLP loading of mipmaps for all other types (jpeg will be the hardest). +- Find out why BLP2 files do not follow DXTC specs when width or height < 4. + It looks like they are not wasting space with the small mipmaps. + An example is a 2x8 image in DXT5. Their mipmap length claims to be 16, instead of 32. +- Recompile libtiff with extra options (but not jpeg...). +- Clean up ilSetAlpha. +- DxtcReadColor and DxtcReadColors need to expand the colours from 565 to 888 properly. +- Add faces to WindowsTest. +- Add reading other files in directory to WindowsTest, so you can easily view all files in a dir. +- Finish BLP loading (indexed mipmaps, jpeg data). +- dcraw support +- http://en.wikipedia.org/wiki/2xSaI +- Clean up WDP code. +- Get WDP code to do conversions within the WDP library (check to see if type/format set by user). +- Get WDP code to properly do float, short, etc. +- Make DecompressDXT1 and DecompressDXT1a functions separate (.blp files could use this). +- Keep TPL DXT data. +- DecompressDXT1 (and more) do not set an error if returning IL_FALSE (should be an internal error, I think). +- Add ilIsValidFits* functions to il_io.c. +- Add ilIsValidWdp* functions. +- iGetString may not work properly with Unicode strings. +- Look at adding ilIsValid* for mng, iff, wbmp, wal and pxr. +- Added ilSetError error codes to il_files.c. +- Get rid of check for precache. +- If IL_NO_JP2 is defined, lines 306-307 shouldn't just cause the entire thing to fail. We should just skip that entry. +- Change ilConvertBuffer to be able to convert paletted images as well. +- Fix MSVC8 solutions for text files. +- ilSavePnmF needs to set FName if not called by ilSavePnm. +- Make TPL_CMP case in iLoadTplInternal code more modular (also in il_dds.c). +- Get rid of iluSwapColours call in ilutConvertToSDLSurface. +- Use GL/glext.h. +- Update Eclipse projects. +- Add Code::Blocks projects. +- Check to make sure all VTF formats are supported. +- Look at DDSTextureLoader.cpp for new DDS formats. +- http://www.leunen.com/cbuilder/rotbmp.html +- 3d mipmaps and better 2d: http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=236590&fpart=2 + http://zach.in.tu-clausthal.de/teaching/cg2_07/literatur/frame_buffer_objects.html + http://objectmix.com/graphics/745877-glgeneratemipmapext.html +- Make libsquish and NVTT code compress volume textures (do each slice separately). +- Check .dcx code - does it even load multiple images? +- Make ilBlit either error with color indexed images or work with them. +- iluScale: Make ilTexImage or whatever actually use Temp->Data instead of copying. +- Get rid of globals in il_dds.c and ilu_scale2d.c. +- Make ilApplyPal also work for file streams and lumps. +- Make a version of ilApplyPal where a palette buffer and palette type are specified. +- Renormalize FITS and DICOM files (make it an option?). +- Add scaling functions to IL (and wrappers in ILU). +- Fix DXT2 and DXT4 loading. +- Add _ilLoadExt/_ilSaveExt Unicode in il_states.c. +- XCF (Gimp) support + + +More involved: +- ILinfo struct still has number of images... +- Use loaded mipmaps in OpenGL and DirectX. +- JPEG and PNG in .bmp files? +- It looks like ilSetRead/ilSetWrite don't actually do anything. +- Run Valgrind on library - all functions. +- Make iSaveJp2Internal and iSaveExrInternal work with palettes (make ilConvertBuffer work on palettes as well). +- Make .ico/.icns uses Mipmaps field instead for smaller icons (can icns have multiple images?). +- Work on http://en.wikipedia.org/wiki/Apple_Icon_Image page. +- http://mirrored.xentax.com/gfe/index.html (lots of game graphics formats) +- Strife textures +- Starcraft GRP textures - http://web.archive.org/web/20041011165218/http://user.cs.tu-berlin.de/~mickyk/cv.html +- Commenting out lines 729-731 in pngread.c of libpng (1.2.9?) will allow reading of certain malformed Vista PNG-compressed .ico files with extra data at the end of the stream. An example can be found in test/in and was created using Microangelo. +- Add .ico/.icns saving. +- Readd CMAKE support +- Better static lib support in MSVC++ 8/9 +- Median cut quantization +- Lib EXIF support +- APNG support +- Koala support +- Flashpix (.fpx) support +- Multipage PNM files +- Fortran support +- D language support - There exists a program to convert C headers to D. +- Better DirectX 10 support +- Open URL in WindowsTest not working +- Should probably check for errors in iGetWdpHead and etc... +- ilGetAlpha returns malloc'ed memory that cannot be freed by the caller. +- Support for DX10 .dds files - one new format is found in HDRRendering sample in nVidia DX10 SDK. +- More checks for headers of unknown file types +- Set CompSize in ReadData of il_dds.c for DDS_LINEARSIZE flag? +- Look at resize filters in VTFEdit. +- Get rid of globals in il_dds.c. +- TIFF with JPEG encoding +- Bicubic scaling +- Freebasic support +- Multiple images in FITs files (through extensions). +- Reorder loading/saving in il_io.c +- Get il_vtf.c to do less memory allocation. Just use the precache function. +- In il_gif.c, make sure subimages with offsets will not lead to an overflow. +- il_bmp.c / il_dds.c / il_dds-save.c may not be safe for Big Endian for 16-bit data. +- Change how mipmaps are stored (do not use Next pointer in ILimage). +- Check ASCII PPM code for the ability to read data that wraps around to multiple lines. +- Check return on all ilFixImage calls. +- Printing not working from Windows test. +- Can ilConvertImage deal correctly with signed image formats? +- Add function to create cubemaps. +- Request compressed texture data in ilutGLSetTex2D? +- Upload cubemaps directly to OpenGL/D3D. +- Change some calls (such as in il_tiff.c) to ilGetString to non-Unicode. +- Check saving of Luminance (8 bpp/1 Bpp) BMP +- Check compatibility with all the files in the BMP Suite. +- IL_COLOUR_INDEX: must be implemented in iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); +- iluEqualize must be implemented for various Bpc +- Update the state stack in IL. Right now, it only saves part of the states when you push/pop. +- Redo Compress in il_dds-save.c. +- Check 16-bit images being loaded have their lower bits properly set. An example is the il_dds.c entry on 2009-01-15. +- Fix image loading problems listed on http://www.seriema.net/thumbview/index.php?page=compatibility. +- Look at http://en.wikipedia.org/wiki/Comparison_of_graphics_file_formats +- PNG and JPG compression in .bmp files? +- Scan line table for RLE .tga files. +- Allow more formats for saving .tga (does not do IL_ALPHA for instance) - also in iTargaSize. + Make sure iConvertImage is called. Right now, it would not be. +- XBM support. +- Check XPM support for different types: http://en.wikipedia.org/wiki/XPM_(image_format) +- Find test images for all .tpl formats. +- Create new palette types for luminance, luminance-alpha and alpha (.tpl has luminance-alpha) (also change ilutConvertToSDLSurface and maybe others). +- iGetActiveNum needs to be rewritten somehow to allow for mipmaps under a cubemap in an animation chain (extreme example). +- TPL saving +- Test Windows Mobile code. +- OpenMP support: http://stackoverflow.com/questions/326487/multithreaded-image-processing-in-c + http://www.ddj.com/architect/184405586 +- Shear rotation: http://www.codeproject.com/KB/graphics/rotatebyshear.aspx +- Icon Library (.icl) support. +- Test all DDS types. +- New (DX10) DDS types +- Gamecube BMD and BTI support (http://www.amnoid.de/gc/) +- Conversion from half to int is producing artifacts. +- Support for mp3 frames with Unicode strings + + +Lots of work: +- Linux Unicode support is partially broken. +- Write own .exr routines. +- Native WDP support +- Enable descriptive error strings in IL. +- Librsvg +- Give estimates for buffer sizes for ilSaveL. +- MNG saving +- Metadata +- Thread safe version +- Add flag for determining whether DDS data is outdated. +- TIFF saving to file streams and lumps +- Use fseek/ftell 64-bit? +- Check for any external library pointers that are assumed to be 32-bit. +- Possibly make palettes always 768 (or 1024) bytes so that it is not possible to access outside by bad data? +- Add padding options, so that each line could be DWORD-padded, for instance. +- Add dithering. +- Work on making DevIL more stable. There's probably a few places where I don't check the return value of ilNewImage, for instance. +- Add support for callbacks so that users can create progress meters for loading and saving in their applications. We could extend this idea further and allow cancellation of loading/saving images. +- global use of restricted pointers where available (for now only il_bmp.{c,h} uses it) +- iluScaleColours is BUGGED, doesn't handle the image with the correct type! more Bpc (except luminance and paletted one) +- Add a real Layer facility. +- IL_LUMINANCE_ALPHA support must be tested in ilApplyPal(); +- ilApplyPal should work on any type of image, not only IL_BYTE or IL_UNSIGNED_BYTE +- Look at adding FreeType support to ILU. +- Work on the signed/unsigned conversions a bit more (IL_BYTE versus IL_UNSIGNED_BYTE, etc.). A good link for defining signed formats is http://www.sgi.com/software/opengl/advanced98/notes/node31.html . +- Add TWAIN support. +- Add clipboard and printing support in Linux. +- Finish support for regions in ILU. +- Add support for regions in IL. This could be used to save only a specific portion of an image. +- Add support for user-defined filters (possibly of a user-defined size). +- Add more filters. Some sites to look at are http://www.jasonwaltman.com/thesis/introduction.html http://www.dai.ed.ac.uk/CVonline/transf.htm http://www.fortunecity.com/lavendar/kane/39/ffpg.htm and http://www.opengl.org/developers/documentation/Version1.2/1.2specs/convolution_border_modes.txt . The last link describes ways to handle borders for the convolution filters. It might be worthwhile to allow these kinds of options. +- Possibly add support for other colour spaces besides RGB (CMYK, YUV, etc.) +- Implement a scripting "language" with LUA for ILU. This way, people can generate scripts to run a certain set of filters on all images. +- Look at other rescaling algorithms: +http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0guide/Geom-image-manip.doc.html +http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0guide/Geom-image-manip.doc.html#55431 +http://www.npac.syr.edu/projects/nasa/MILOJE/final/node36.html +http://www.ultranet.com/~aramini/design.html +- ilKeyColor ilAddKey... +- Find a way to make the filters (especially the convolution filters) work in three dimensions. +- Make better versions of the DevIL ports of the NeHe tutorials. Several of the tutorials don't call ilInit, for instance. +- Change parameters of iread to use ILsizei. +- Make sure all bugs in bug tracker are squashed. + + +Questions: +- Should IL_CONV_PAL convert to more than RGB? +- Possibly readd VC6 projects? +- Add BeOS support back in? +- Create Dev-C++/MingW/Cygwin .a files for releases? +- Does ilIsValidTga generate an unncessary IL_INVALID_EXTENSION error? +- Why is IL_HALF even used in ilut_directx9.c? +- Fix problems loading .dds files on Big Endian machines (still a problem or not?) +- Should we be calculating DXT endpoints before converting data to 565 format? +- Use Extreme DXT compression code? +- Support half data internally? +- Will ilDetermineType fail if file reading functions are overriden? +- Is ilSaveCHeader fine with Unicode? +- Should ilFlipSurfaceDxtcData and more work on mipmaps/cubemaps as well? +- Should ilImageToDxtcData work on cubemaps? +- Should we seek back to the initial position on filestreams? +- Should we return the number of bytes read in loading lumps? +- Should we be renormalizing float and double data in FITS files? + + +From old TODO: +For 1.7.0 +- fixed OpenGL Loading (breaks old code which inverted the images) +- iluReplaceColour should have a color to describe which color to set. +- ilBindImage must return a result. It may fail! +- ilInit() call iSetImage0 and ilBindTemp. This shouldn't happen and image names must start from 0 +- Rename iGetIntegervImage to ilGetImageIntegerv and make it public + +Matej: +- Make a test suite (IL ok, now ILU tests) +- Make DevIL parts that require external libraries modular +- Make the library include files correct (fix the config.h problem) +- Look into TIFF loading (support for images with greater bpp should be possible) +- Fix examples diff --git a/libs/DevIL-1.7.8/aclocal.m4 b/libs/DevIL-1.7.8/aclocal.m4 new file mode 100644 index 00000000..dcaac379 --- /dev/null +++ b/libs/DevIL-1.7.8/aclocal.m4 @@ -0,0 +1,918 @@ +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 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. + +# 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(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +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'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007 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.10' +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.10.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 AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(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 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# 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 +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 +# 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 + +# 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 + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # 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 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 13 + +# 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.60])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) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_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 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# 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 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 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 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 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_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_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/acx_pthread.m4]) +m4_include([m4/allegro.m4]) +m4_include([m4/ax_check_gl.m4]) +m4_include([m4/ax_check_glu.m4]) +m4_include([m4/ax_check_glut.m4]) +m4_include([m4/ax_lang_compiler_ms.m4]) +m4_include([m4/devil-api_checks.m4]) +m4_include([m4/devil-definitions.m4]) +m4_include([m4/devil-report.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/pkg.m4]) +m4_include([m4/sdl.m4]) diff --git a/libs/DevIL-1.7.8/bin/Makefile.am b/libs/DevIL-1.7.8/bin/Makefile.am new file mode 100644 index 00000000..63f3a258 --- /dev/null +++ b/libs/DevIL-1.7.8/bin/Makefile.am @@ -0,0 +1,104 @@ +all_include = $(srcdir)/../include +devildir = @datadir@/devil +examplesdir = $(devildir)/examples +example_srcdir = ../examples + +AM_CPPFLAGS = -I $(all_include) + +il_library = ../lib/libIL.la +ilu_library = ../lib/libILU.la +ilut_library = ../lib/libILUT.la + +EXTRA_DIST = + +bin_PROGRAMS = +examples_PROGRAMS = + +if BUILD_ILU +bin_PROGRAMS += ilur +endif #BUILD_ILU + +ilur_SOURCES = ../src-ILU/ilur/ilur.c +ilur_LDADD = $(ilu_library) + +if BUILD_EXAMPLES + +examples_PROGRAMS += IL_override IL_read IL_simple + +if BUILD_ILUT + +examples_PROGRAMS += ILUT_cpp_wrapper + +if USE_ALLEGRO +examples_PROGRAMS += ILUT_allegro +endif #USE_ALLEGRO + +if USE_DIRECTX +examples_PROGRAMS += ILUT_d3d ILUT_windows +endif #USE_DIRECTX + +if USE_SDL +examples_PROGRAMS += ILUT_sdl +endif #USE_SDL + +if USE_W32 +examples_PROGRAMS += ILUT_animation +endif #USE_W32 + +if HAVE_GLUT +if USE_X11 +examples_PROGRAMS += ILUT_gl ILUT_volume +endif #USE_X11 +endif #HAVE_GLUT + +endif #BUILD_ILUT + +endif #BUILD_EXAMPLES + +ILUT_allegro_SOURCES = $(example_srcdir)/allegro_example/allegtest.c +ILUT_allegro_CFLAGS = $(alleg_CFLAGS) +ILUT_allegro_LDFLAGS = $(ilut_library) + +ILUT_sdl_SOURCES = $(example_srcdir)/sdl_example/sdl_test.c +ILUT_sdl_CFLAGS = $(SDL_CFLAGS) +ILUT_sdl_LDFLAGS = $(ilut_library) + +ILUT_animation_SOURCES = $(example_srcdir)/animation_example/AnimTest.cpp $(example_srcdir)/animation_example/resource.h $(example_srcdir)/animation_example/AnimTest.rc +#ILUT_animation_CFLAGS = +ILUT_animation_LDFLAGS = $(ilut_library) +EXTRA_DIST += $(example_srcdir)/animation_example/OpenIL.ico + +ILUT_d3d_SOURCES = $(example_srcdir)/direct3d_example/d3dtest.cpp +ILUT_d3d_LDFLAGS = $(ilut_library) + +ILUT_cpp_wrapper_SOURCES = $(example_srcdir)/cpp_wrapper_example/il_wrap.cpp +ILUT_cpp_wrapper_LDFLAGS = $(ilut_library) + +IL_override_SOURCES = $(example_srcdir)/override_example/iotest.c + +ILUT_gl_SOURCES = $(example_srcdir)/opengl_example/gltest.c $(example_srcdir)/opengl_example/gltest.h +ILUT_gl_LDFLAGS = $(ilut_library) + +IL_read_SOURCES = $(example_srcdir)/register_read_example/readtest.c + +IL_simple_SOURCES = $(example_srcdir)/simple_example/simple.c + +if BUILD_ILU +IL_override_LDFLAGS = $(ilu_library) +IL_read_LDFLAGS = $(ilu_library) +IL_simple_LDFLAGS = $(ilu_library) +else #not BUILD_ILU +IL_override_LDFLAGS = $(il_library) +IL_read_LDFLAGS = $(il_library) +IL_simple_LDFLAGS = $(il_library) +endif #not BUILD_ILU + +ILUT_volume_SOURCES = $(example_srcdir)/volume_example/3dtest.h $(example_srcdir)/volume_example/3dtest.c +ILUT_volume_LDFLAGS = $(ilut_library) + +ILUT_windows_SOURCES = $(example_srcdir)/windows_example/BatchConv.cpp $(example_srcdir)/windows_example/WindowsTest.cpp $(example_srcdir)/windows_example/WindowsTest.h $(example_srcdir)/windows_example/resource.h $(example_srcdir)/windows_example/WindowsTest.rc +ILUT_windows_LDFLAGS = $(ilut_library) +EXTRA_DIST += $(example_srcdir)/windows_example/resources/OpenIL.ico + +.rc.o: + $(RC) $(RCFLAGS) $< -o $@ diff --git a/libs/DevIL-1.7.8/bin/Makefile.in b/libs/DevIL-1.7.8/bin/Makefile.in new file mode 100644 index 00000000..422df187 --- /dev/null +++ b/libs/DevIL-1.7.8/bin/Makefile.in @@ -0,0 +1,964 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = $(am__EXEEXT_1) +examples_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ + $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ + $(am__EXEEXT_8) +@BUILD_ILU_TRUE@am__append_1 = ilur +@BUILD_EXAMPLES_TRUE@am__append_2 = IL_override IL_read IL_simple +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@am__append_3 = ILUT_cpp_wrapper +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_ALLEGRO_TRUE@am__append_4 = ILUT_allegro +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_DIRECTX_TRUE@am__append_5 = ILUT_d3d ILUT_windows +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_SDL_TRUE@am__append_6 = ILUT_sdl +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_W32_TRUE@am__append_7 = ILUT_animation +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@HAVE_GLUT_TRUE@@USE_X11_TRUE@am__append_8 = ILUT_gl ILUT_volume +subdir = bin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = +@BUILD_ILU_TRUE@am__EXEEXT_1 = ilur$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(examplesdir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +@BUILD_EXAMPLES_TRUE@am__EXEEXT_2 = IL_override$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@ IL_read$(EXEEXT) IL_simple$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@am__EXEEXT_3 = ILUT_cpp_wrapper$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_ALLEGRO_TRUE@am__EXEEXT_4 = ILUT_allegro$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_DIRECTX_TRUE@am__EXEEXT_5 = ILUT_d3d$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_DIRECTX_TRUE@ ILUT_windows$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_SDL_TRUE@am__EXEEXT_6 = ILUT_sdl$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@USE_W32_TRUE@am__EXEEXT_7 = ILUT_animation$(EXEEXT) +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@HAVE_GLUT_TRUE@@USE_X11_TRUE@am__EXEEXT_8 = ILUT_gl$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@@BUILD_ILUT_TRUE@@HAVE_GLUT_TRUE@@USE_X11_TRUE@ ILUT_volume$(EXEEXT) +examplesPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(examples_PROGRAMS) +am_ILUT_allegro_OBJECTS = ILUT_allegro-allegtest.$(OBJEXT) +ILUT_allegro_OBJECTS = $(am_ILUT_allegro_OBJECTS) +ILUT_allegro_LDADD = $(LDADD) +ILUT_allegro_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ILUT_allegro_CFLAGS) \ + $(CFLAGS) $(ILUT_allegro_LDFLAGS) $(LDFLAGS) -o $@ +am__dirstamp = $(am__leading_dot)dirstamp +am_ILUT_animation_OBJECTS = AnimTest.$(OBJEXT) \ + $(example_srcdir)/animation_example/AnimTest.$(OBJEXT) +ILUT_animation_OBJECTS = $(am_ILUT_animation_OBJECTS) +ILUT_animation_LDADD = $(LDADD) +ILUT_animation_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ILUT_animation_LDFLAGS) $(LDFLAGS) -o $@ +am_ILUT_cpp_wrapper_OBJECTS = il_wrap.$(OBJEXT) +ILUT_cpp_wrapper_OBJECTS = $(am_ILUT_cpp_wrapper_OBJECTS) +ILUT_cpp_wrapper_LDADD = $(LDADD) +ILUT_cpp_wrapper_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ILUT_cpp_wrapper_LDFLAGS) $(LDFLAGS) -o $@ +am_ILUT_d3d_OBJECTS = d3dtest.$(OBJEXT) +ILUT_d3d_OBJECTS = $(am_ILUT_d3d_OBJECTS) +ILUT_d3d_LDADD = $(LDADD) +ILUT_d3d_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ILUT_d3d_LDFLAGS) $(LDFLAGS) -o $@ +am_ILUT_gl_OBJECTS = gltest.$(OBJEXT) +ILUT_gl_OBJECTS = $(am_ILUT_gl_OBJECTS) +ILUT_gl_LDADD = $(LDADD) +ILUT_gl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ILUT_gl_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_ILUT_sdl_OBJECTS = ILUT_sdl-sdl_test.$(OBJEXT) +ILUT_sdl_OBJECTS = $(am_ILUT_sdl_OBJECTS) +ILUT_sdl_LDADD = $(LDADD) +ILUT_sdl_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(ILUT_sdl_CFLAGS) $(CFLAGS) \ + $(ILUT_sdl_LDFLAGS) $(LDFLAGS) -o $@ +am_ILUT_volume_OBJECTS = 3dtest.$(OBJEXT) +ILUT_volume_OBJECTS = $(am_ILUT_volume_OBJECTS) +ILUT_volume_LDADD = $(LDADD) +ILUT_volume_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(ILUT_volume_LDFLAGS) $(LDFLAGS) -o $@ +am_ILUT_windows_OBJECTS = BatchConv.$(OBJEXT) WindowsTest.$(OBJEXT) \ + $(example_srcdir)/windows_example/WindowsTest.$(OBJEXT) +ILUT_windows_OBJECTS = $(am_ILUT_windows_OBJECTS) +ILUT_windows_LDADD = $(LDADD) +ILUT_windows_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(ILUT_windows_LDFLAGS) $(LDFLAGS) -o $@ +am_IL_override_OBJECTS = iotest.$(OBJEXT) +IL_override_OBJECTS = $(am_IL_override_OBJECTS) +IL_override_LDADD = $(LDADD) +IL_override_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(IL_override_LDFLAGS) $(LDFLAGS) -o $@ +am_IL_read_OBJECTS = readtest.$(OBJEXT) +IL_read_OBJECTS = $(am_IL_read_OBJECTS) +IL_read_LDADD = $(LDADD) +IL_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(IL_read_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_IL_simple_OBJECTS = simple.$(OBJEXT) +IL_simple_OBJECTS = $(am_IL_simple_OBJECTS) +IL_simple_LDADD = $(LDADD) +IL_simple_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(IL_simple_LDFLAGS) $(LDFLAGS) -o $@ +am_ilur_OBJECTS = ilur.$(OBJEXT) +ilur_OBJECTS = $(am_ilur_OBJECTS) +ilur_DEPENDENCIES = $(ilu_library) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/IL +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(ILUT_allegro_SOURCES) $(ILUT_animation_SOURCES) \ + $(ILUT_cpp_wrapper_SOURCES) $(ILUT_d3d_SOURCES) \ + $(ILUT_gl_SOURCES) $(ILUT_sdl_SOURCES) $(ILUT_volume_SOURCES) \ + $(ILUT_windows_SOURCES) $(IL_override_SOURCES) \ + $(IL_read_SOURCES) $(IL_simple_SOURCES) $(ilur_SOURCES) +DIST_SOURCES = $(ILUT_allegro_SOURCES) $(ILUT_animation_SOURCES) \ + $(ILUT_cpp_wrapper_SOURCES) $(ILUT_d3d_SOURCES) \ + $(ILUT_gl_SOURCES) $(ILUT_sdl_SOURCES) $(ILUT_volume_SOURCES) \ + $(ILUT_windows_SOURCES) $(IL_override_SOURCES) \ + $(IL_read_SOURCES) $(IL_simple_SOURCES) $(ilur_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all_include = $(srcdir)/../include +devildir = @datadir@/devil +examplesdir = $(devildir)/examples +example_srcdir = ../examples +AM_CPPFLAGS = -I $(all_include) +il_library = ../lib/libIL.la +ilu_library = ../lib/libILU.la +ilut_library = ../lib/libILUT.la +EXTRA_DIST = $(example_srcdir)/animation_example/OpenIL.ico \ + $(example_srcdir)/windows_example/resources/OpenIL.ico +ilur_SOURCES = ../src-ILU/ilur/ilur.c +ilur_LDADD = $(ilu_library) +ILUT_allegro_SOURCES = $(example_srcdir)/allegro_example/allegtest.c +ILUT_allegro_CFLAGS = $(alleg_CFLAGS) +ILUT_allegro_LDFLAGS = $(ilut_library) +ILUT_sdl_SOURCES = $(example_srcdir)/sdl_example/sdl_test.c +ILUT_sdl_CFLAGS = $(SDL_CFLAGS) +ILUT_sdl_LDFLAGS = $(ilut_library) +ILUT_animation_SOURCES = $(example_srcdir)/animation_example/AnimTest.cpp $(example_srcdir)/animation_example/resource.h $(example_srcdir)/animation_example/AnimTest.rc +#ILUT_animation_CFLAGS = +ILUT_animation_LDFLAGS = $(ilut_library) +ILUT_d3d_SOURCES = $(example_srcdir)/direct3d_example/d3dtest.cpp +ILUT_d3d_LDFLAGS = $(ilut_library) +ILUT_cpp_wrapper_SOURCES = $(example_srcdir)/cpp_wrapper_example/il_wrap.cpp +ILUT_cpp_wrapper_LDFLAGS = $(ilut_library) +IL_override_SOURCES = $(example_srcdir)/override_example/iotest.c +ILUT_gl_SOURCES = $(example_srcdir)/opengl_example/gltest.c $(example_srcdir)/opengl_example/gltest.h +ILUT_gl_LDFLAGS = $(ilut_library) +IL_read_SOURCES = $(example_srcdir)/register_read_example/readtest.c +IL_simple_SOURCES = $(example_srcdir)/simple_example/simple.c +@BUILD_ILU_FALSE@IL_override_LDFLAGS = $(il_library) +@BUILD_ILU_TRUE@IL_override_LDFLAGS = $(ilu_library) +@BUILD_ILU_FALSE@IL_read_LDFLAGS = $(il_library) +@BUILD_ILU_TRUE@IL_read_LDFLAGS = $(ilu_library) +@BUILD_ILU_FALSE@IL_simple_LDFLAGS = $(il_library) +@BUILD_ILU_TRUE@IL_simple_LDFLAGS = $(ilu_library) +ILUT_volume_SOURCES = $(example_srcdir)/volume_example/3dtest.h $(example_srcdir)/volume_example/3dtest.c +ILUT_volume_LDFLAGS = $(ilut_library) +ILUT_windows_SOURCES = $(example_srcdir)/windows_example/BatchConv.cpp $(example_srcdir)/windows_example/WindowsTest.cpp $(example_srcdir)/windows_example/WindowsTest.h $(example_srcdir)/windows_example/resource.h $(example_srcdir)/windows_example/WindowsTest.rc +ILUT_windows_LDFLAGS = $(ilut_library) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj .rc +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu bin/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +install-examplesPROGRAMS: $(examples_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(examplesPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(examplesdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(examplesPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(examplesdir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-examplesPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(examples_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(examplesdir)/$$f'"; \ + rm -f "$(DESTDIR)$(examplesdir)/$$f"; \ + done + +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +ILUT_allegro$(EXEEXT): $(ILUT_allegro_OBJECTS) $(ILUT_allegro_DEPENDENCIES) + @rm -f ILUT_allegro$(EXEEXT) + $(ILUT_allegro_LINK) $(ILUT_allegro_OBJECTS) $(ILUT_allegro_LDADD) $(LIBS) +$(example_srcdir)/animation_example/$(am__dirstamp): + @$(MKDIR_P) $(example_srcdir)/animation_example + @: > $(example_srcdir)/animation_example/$(am__dirstamp) +$(example_srcdir)/animation_example/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(example_srcdir)/animation_example/$(DEPDIR) + @: > $(example_srcdir)/animation_example/$(DEPDIR)/$(am__dirstamp) +$(example_srcdir)/animation_example/AnimTest.$(OBJEXT): \ + $(example_srcdir)/animation_example/$(am__dirstamp) \ + $(example_srcdir)/animation_example/$(DEPDIR)/$(am__dirstamp) +ILUT_animation$(EXEEXT): $(ILUT_animation_OBJECTS) $(ILUT_animation_DEPENDENCIES) + @rm -f ILUT_animation$(EXEEXT) + $(ILUT_animation_LINK) $(ILUT_animation_OBJECTS) $(ILUT_animation_LDADD) $(LIBS) +ILUT_cpp_wrapper$(EXEEXT): $(ILUT_cpp_wrapper_OBJECTS) $(ILUT_cpp_wrapper_DEPENDENCIES) + @rm -f ILUT_cpp_wrapper$(EXEEXT) + $(ILUT_cpp_wrapper_LINK) $(ILUT_cpp_wrapper_OBJECTS) $(ILUT_cpp_wrapper_LDADD) $(LIBS) +ILUT_d3d$(EXEEXT): $(ILUT_d3d_OBJECTS) $(ILUT_d3d_DEPENDENCIES) + @rm -f ILUT_d3d$(EXEEXT) + $(ILUT_d3d_LINK) $(ILUT_d3d_OBJECTS) $(ILUT_d3d_LDADD) $(LIBS) +ILUT_gl$(EXEEXT): $(ILUT_gl_OBJECTS) $(ILUT_gl_DEPENDENCIES) + @rm -f ILUT_gl$(EXEEXT) + $(ILUT_gl_LINK) $(ILUT_gl_OBJECTS) $(ILUT_gl_LDADD) $(LIBS) +ILUT_sdl$(EXEEXT): $(ILUT_sdl_OBJECTS) $(ILUT_sdl_DEPENDENCIES) + @rm -f ILUT_sdl$(EXEEXT) + $(ILUT_sdl_LINK) $(ILUT_sdl_OBJECTS) $(ILUT_sdl_LDADD) $(LIBS) +ILUT_volume$(EXEEXT): $(ILUT_volume_OBJECTS) $(ILUT_volume_DEPENDENCIES) + @rm -f ILUT_volume$(EXEEXT) + $(ILUT_volume_LINK) $(ILUT_volume_OBJECTS) $(ILUT_volume_LDADD) $(LIBS) +$(example_srcdir)/windows_example/$(am__dirstamp): + @$(MKDIR_P) $(example_srcdir)/windows_example + @: > $(example_srcdir)/windows_example/$(am__dirstamp) +$(example_srcdir)/windows_example/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(example_srcdir)/windows_example/$(DEPDIR) + @: > $(example_srcdir)/windows_example/$(DEPDIR)/$(am__dirstamp) +$(example_srcdir)/windows_example/WindowsTest.$(OBJEXT): \ + $(example_srcdir)/windows_example/$(am__dirstamp) \ + $(example_srcdir)/windows_example/$(DEPDIR)/$(am__dirstamp) +ILUT_windows$(EXEEXT): $(ILUT_windows_OBJECTS) $(ILUT_windows_DEPENDENCIES) + @rm -f ILUT_windows$(EXEEXT) + $(ILUT_windows_LINK) $(ILUT_windows_OBJECTS) $(ILUT_windows_LDADD) $(LIBS) +IL_override$(EXEEXT): $(IL_override_OBJECTS) $(IL_override_DEPENDENCIES) + @rm -f IL_override$(EXEEXT) + $(IL_override_LINK) $(IL_override_OBJECTS) $(IL_override_LDADD) $(LIBS) +IL_read$(EXEEXT): $(IL_read_OBJECTS) $(IL_read_DEPENDENCIES) + @rm -f IL_read$(EXEEXT) + $(IL_read_LINK) $(IL_read_OBJECTS) $(IL_read_LDADD) $(LIBS) +IL_simple$(EXEEXT): $(IL_simple_OBJECTS) $(IL_simple_DEPENDENCIES) + @rm -f IL_simple$(EXEEXT) + $(IL_simple_LINK) $(IL_simple_OBJECTS) $(IL_simple_LDADD) $(LIBS) +ilur$(EXEEXT): $(ilur_OBJECTS) $(ilur_DEPENDENCIES) + @rm -f ilur$(EXEEXT) + $(LINK) $(ilur_OBJECTS) $(ilur_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f $(example_srcdir)/animation_example/AnimTest.$(OBJEXT) + -rm -f $(example_srcdir)/windows_example/WindowsTest.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3dtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AnimTest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BatchConv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ILUT_allegro-allegtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ILUT_sdl-sdl_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WindowsTest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d3dtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gltest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/il_wrap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ilur.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iotest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@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 $@ $< + +ILUT_allegro-allegtest.o: $(example_srcdir)/allegro_example/allegtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_allegro_CFLAGS) $(CFLAGS) -MT ILUT_allegro-allegtest.o -MD -MP -MF $(DEPDIR)/ILUT_allegro-allegtest.Tpo -c -o ILUT_allegro-allegtest.o `test -f '$(example_srcdir)/allegro_example/allegtest.c' || echo '$(srcdir)/'`$(example_srcdir)/allegro_example/allegtest.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ILUT_allegro-allegtest.Tpo $(DEPDIR)/ILUT_allegro-allegtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/allegro_example/allegtest.c' object='ILUT_allegro-allegtest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_allegro_CFLAGS) $(CFLAGS) -c -o ILUT_allegro-allegtest.o `test -f '$(example_srcdir)/allegro_example/allegtest.c' || echo '$(srcdir)/'`$(example_srcdir)/allegro_example/allegtest.c + +ILUT_allegro-allegtest.obj: $(example_srcdir)/allegro_example/allegtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_allegro_CFLAGS) $(CFLAGS) -MT ILUT_allegro-allegtest.obj -MD -MP -MF $(DEPDIR)/ILUT_allegro-allegtest.Tpo -c -o ILUT_allegro-allegtest.obj `if test -f '$(example_srcdir)/allegro_example/allegtest.c'; then $(CYGPATH_W) '$(example_srcdir)/allegro_example/allegtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/allegro_example/allegtest.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ILUT_allegro-allegtest.Tpo $(DEPDIR)/ILUT_allegro-allegtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/allegro_example/allegtest.c' object='ILUT_allegro-allegtest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_allegro_CFLAGS) $(CFLAGS) -c -o ILUT_allegro-allegtest.obj `if test -f '$(example_srcdir)/allegro_example/allegtest.c'; then $(CYGPATH_W) '$(example_srcdir)/allegro_example/allegtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/allegro_example/allegtest.c'; fi` + +gltest.o: $(example_srcdir)/opengl_example/gltest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltest.o -MD -MP -MF $(DEPDIR)/gltest.Tpo -c -o gltest.o `test -f '$(example_srcdir)/opengl_example/gltest.c' || echo '$(srcdir)/'`$(example_srcdir)/opengl_example/gltest.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltest.Tpo $(DEPDIR)/gltest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/opengl_example/gltest.c' object='gltest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltest.o `test -f '$(example_srcdir)/opengl_example/gltest.c' || echo '$(srcdir)/'`$(example_srcdir)/opengl_example/gltest.c + +gltest.obj: $(example_srcdir)/opengl_example/gltest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gltest.obj -MD -MP -MF $(DEPDIR)/gltest.Tpo -c -o gltest.obj `if test -f '$(example_srcdir)/opengl_example/gltest.c'; then $(CYGPATH_W) '$(example_srcdir)/opengl_example/gltest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/opengl_example/gltest.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/gltest.Tpo $(DEPDIR)/gltest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/opengl_example/gltest.c' object='gltest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gltest.obj `if test -f '$(example_srcdir)/opengl_example/gltest.c'; then $(CYGPATH_W) '$(example_srcdir)/opengl_example/gltest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/opengl_example/gltest.c'; fi` + +ILUT_sdl-sdl_test.o: $(example_srcdir)/sdl_example/sdl_test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_sdl_CFLAGS) $(CFLAGS) -MT ILUT_sdl-sdl_test.o -MD -MP -MF $(DEPDIR)/ILUT_sdl-sdl_test.Tpo -c -o ILUT_sdl-sdl_test.o `test -f '$(example_srcdir)/sdl_example/sdl_test.c' || echo '$(srcdir)/'`$(example_srcdir)/sdl_example/sdl_test.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ILUT_sdl-sdl_test.Tpo $(DEPDIR)/ILUT_sdl-sdl_test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/sdl_example/sdl_test.c' object='ILUT_sdl-sdl_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_sdl_CFLAGS) $(CFLAGS) -c -o ILUT_sdl-sdl_test.o `test -f '$(example_srcdir)/sdl_example/sdl_test.c' || echo '$(srcdir)/'`$(example_srcdir)/sdl_example/sdl_test.c + +ILUT_sdl-sdl_test.obj: $(example_srcdir)/sdl_example/sdl_test.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_sdl_CFLAGS) $(CFLAGS) -MT ILUT_sdl-sdl_test.obj -MD -MP -MF $(DEPDIR)/ILUT_sdl-sdl_test.Tpo -c -o ILUT_sdl-sdl_test.obj `if test -f '$(example_srcdir)/sdl_example/sdl_test.c'; then $(CYGPATH_W) '$(example_srcdir)/sdl_example/sdl_test.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/sdl_example/sdl_test.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ILUT_sdl-sdl_test.Tpo $(DEPDIR)/ILUT_sdl-sdl_test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/sdl_example/sdl_test.c' object='ILUT_sdl-sdl_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ILUT_sdl_CFLAGS) $(CFLAGS) -c -o ILUT_sdl-sdl_test.obj `if test -f '$(example_srcdir)/sdl_example/sdl_test.c'; then $(CYGPATH_W) '$(example_srcdir)/sdl_example/sdl_test.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/sdl_example/sdl_test.c'; fi` + +3dtest.o: $(example_srcdir)/volume_example/3dtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 3dtest.o -MD -MP -MF $(DEPDIR)/3dtest.Tpo -c -o 3dtest.o `test -f '$(example_srcdir)/volume_example/3dtest.c' || echo '$(srcdir)/'`$(example_srcdir)/volume_example/3dtest.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/3dtest.Tpo $(DEPDIR)/3dtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/volume_example/3dtest.c' object='3dtest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 3dtest.o `test -f '$(example_srcdir)/volume_example/3dtest.c' || echo '$(srcdir)/'`$(example_srcdir)/volume_example/3dtest.c + +3dtest.obj: $(example_srcdir)/volume_example/3dtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 3dtest.obj -MD -MP -MF $(DEPDIR)/3dtest.Tpo -c -o 3dtest.obj `if test -f '$(example_srcdir)/volume_example/3dtest.c'; then $(CYGPATH_W) '$(example_srcdir)/volume_example/3dtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/volume_example/3dtest.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/3dtest.Tpo $(DEPDIR)/3dtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/volume_example/3dtest.c' object='3dtest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 3dtest.obj `if test -f '$(example_srcdir)/volume_example/3dtest.c'; then $(CYGPATH_W) '$(example_srcdir)/volume_example/3dtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/volume_example/3dtest.c'; fi` + +iotest.o: $(example_srcdir)/override_example/iotest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iotest.o -MD -MP -MF $(DEPDIR)/iotest.Tpo -c -o iotest.o `test -f '$(example_srcdir)/override_example/iotest.c' || echo '$(srcdir)/'`$(example_srcdir)/override_example/iotest.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iotest.Tpo $(DEPDIR)/iotest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/override_example/iotest.c' object='iotest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iotest.o `test -f '$(example_srcdir)/override_example/iotest.c' || echo '$(srcdir)/'`$(example_srcdir)/override_example/iotest.c + +iotest.obj: $(example_srcdir)/override_example/iotest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT iotest.obj -MD -MP -MF $(DEPDIR)/iotest.Tpo -c -o iotest.obj `if test -f '$(example_srcdir)/override_example/iotest.c'; then $(CYGPATH_W) '$(example_srcdir)/override_example/iotest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/override_example/iotest.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/iotest.Tpo $(DEPDIR)/iotest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/override_example/iotest.c' object='iotest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iotest.obj `if test -f '$(example_srcdir)/override_example/iotest.c'; then $(CYGPATH_W) '$(example_srcdir)/override_example/iotest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/override_example/iotest.c'; fi` + +readtest.o: $(example_srcdir)/register_read_example/readtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT readtest.o -MD -MP -MF $(DEPDIR)/readtest.Tpo -c -o readtest.o `test -f '$(example_srcdir)/register_read_example/readtest.c' || echo '$(srcdir)/'`$(example_srcdir)/register_read_example/readtest.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/readtest.Tpo $(DEPDIR)/readtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/register_read_example/readtest.c' object='readtest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o readtest.o `test -f '$(example_srcdir)/register_read_example/readtest.c' || echo '$(srcdir)/'`$(example_srcdir)/register_read_example/readtest.c + +readtest.obj: $(example_srcdir)/register_read_example/readtest.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT readtest.obj -MD -MP -MF $(DEPDIR)/readtest.Tpo -c -o readtest.obj `if test -f '$(example_srcdir)/register_read_example/readtest.c'; then $(CYGPATH_W) '$(example_srcdir)/register_read_example/readtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/register_read_example/readtest.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/readtest.Tpo $(DEPDIR)/readtest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/register_read_example/readtest.c' object='readtest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o readtest.obj `if test -f '$(example_srcdir)/register_read_example/readtest.c'; then $(CYGPATH_W) '$(example_srcdir)/register_read_example/readtest.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/register_read_example/readtest.c'; fi` + +simple.o: $(example_srcdir)/simple_example/simple.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT simple.o -MD -MP -MF $(DEPDIR)/simple.Tpo -c -o simple.o `test -f '$(example_srcdir)/simple_example/simple.c' || echo '$(srcdir)/'`$(example_srcdir)/simple_example/simple.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/simple.Tpo $(DEPDIR)/simple.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/simple_example/simple.c' object='simple.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o simple.o `test -f '$(example_srcdir)/simple_example/simple.c' || echo '$(srcdir)/'`$(example_srcdir)/simple_example/simple.c + +simple.obj: $(example_srcdir)/simple_example/simple.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT simple.obj -MD -MP -MF $(DEPDIR)/simple.Tpo -c -o simple.obj `if test -f '$(example_srcdir)/simple_example/simple.c'; then $(CYGPATH_W) '$(example_srcdir)/simple_example/simple.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/simple_example/simple.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/simple.Tpo $(DEPDIR)/simple.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(example_srcdir)/simple_example/simple.c' object='simple.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o simple.obj `if test -f '$(example_srcdir)/simple_example/simple.c'; then $(CYGPATH_W) '$(example_srcdir)/simple_example/simple.c'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/simple_example/simple.c'; fi` + +ilur.o: ../src-ILU/ilur/ilur.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ilur.o -MD -MP -MF $(DEPDIR)/ilur.Tpo -c -o ilur.o `test -f '../src-ILU/ilur/ilur.c' || echo '$(srcdir)/'`../src-ILU/ilur/ilur.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ilur.Tpo $(DEPDIR)/ilur.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src-ILU/ilur/ilur.c' object='ilur.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ilur.o `test -f '../src-ILU/ilur/ilur.c' || echo '$(srcdir)/'`../src-ILU/ilur/ilur.c + +ilur.obj: ../src-ILU/ilur/ilur.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ilur.obj -MD -MP -MF $(DEPDIR)/ilur.Tpo -c -o ilur.obj `if test -f '../src-ILU/ilur/ilur.c'; then $(CYGPATH_W) '../src-ILU/ilur/ilur.c'; else $(CYGPATH_W) '$(srcdir)/../src-ILU/ilur/ilur.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ilur.Tpo $(DEPDIR)/ilur.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../src-ILU/ilur/ilur.c' object='ilur.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ilur.obj `if test -f '../src-ILU/ilur/ilur.c'; then $(CYGPATH_W) '../src-ILU/ilur/ilur.c'; else $(CYGPATH_W) '$(srcdir)/../src-ILU/ilur/ilur.c'; fi` + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +AnimTest.o: $(example_srcdir)/animation_example/AnimTest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AnimTest.o -MD -MP -MF $(DEPDIR)/AnimTest.Tpo -c -o AnimTest.o `test -f '$(example_srcdir)/animation_example/AnimTest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/animation_example/AnimTest.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/AnimTest.Tpo $(DEPDIR)/AnimTest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/animation_example/AnimTest.cpp' object='AnimTest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnimTest.o `test -f '$(example_srcdir)/animation_example/AnimTest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/animation_example/AnimTest.cpp + +AnimTest.obj: $(example_srcdir)/animation_example/AnimTest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AnimTest.obj -MD -MP -MF $(DEPDIR)/AnimTest.Tpo -c -o AnimTest.obj `if test -f '$(example_srcdir)/animation_example/AnimTest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/animation_example/AnimTest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/animation_example/AnimTest.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/AnimTest.Tpo $(DEPDIR)/AnimTest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/animation_example/AnimTest.cpp' object='AnimTest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnimTest.obj `if test -f '$(example_srcdir)/animation_example/AnimTest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/animation_example/AnimTest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/animation_example/AnimTest.cpp'; fi` + +il_wrap.o: $(example_srcdir)/cpp_wrapper_example/il_wrap.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT il_wrap.o -MD -MP -MF $(DEPDIR)/il_wrap.Tpo -c -o il_wrap.o `test -f '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp' || echo '$(srcdir)/'`$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/il_wrap.Tpo $(DEPDIR)/il_wrap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp' object='il_wrap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o il_wrap.o `test -f '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp' || echo '$(srcdir)/'`$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp + +il_wrap.obj: $(example_srcdir)/cpp_wrapper_example/il_wrap.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT il_wrap.obj -MD -MP -MF $(DEPDIR)/il_wrap.Tpo -c -o il_wrap.obj `if test -f '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; then $(CYGPATH_W) '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/il_wrap.Tpo $(DEPDIR)/il_wrap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp' object='il_wrap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o il_wrap.obj `if test -f '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; then $(CYGPATH_W) '$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/cpp_wrapper_example/il_wrap.cpp'; fi` + +d3dtest.o: $(example_srcdir)/direct3d_example/d3dtest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT d3dtest.o -MD -MP -MF $(DEPDIR)/d3dtest.Tpo -c -o d3dtest.o `test -f '$(example_srcdir)/direct3d_example/d3dtest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/direct3d_example/d3dtest.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/d3dtest.Tpo $(DEPDIR)/d3dtest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/direct3d_example/d3dtest.cpp' object='d3dtest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o d3dtest.o `test -f '$(example_srcdir)/direct3d_example/d3dtest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/direct3d_example/d3dtest.cpp + +d3dtest.obj: $(example_srcdir)/direct3d_example/d3dtest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT d3dtest.obj -MD -MP -MF $(DEPDIR)/d3dtest.Tpo -c -o d3dtest.obj `if test -f '$(example_srcdir)/direct3d_example/d3dtest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/direct3d_example/d3dtest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/direct3d_example/d3dtest.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/d3dtest.Tpo $(DEPDIR)/d3dtest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/direct3d_example/d3dtest.cpp' object='d3dtest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o d3dtest.obj `if test -f '$(example_srcdir)/direct3d_example/d3dtest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/direct3d_example/d3dtest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/direct3d_example/d3dtest.cpp'; fi` + +BatchConv.o: $(example_srcdir)/windows_example/BatchConv.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BatchConv.o -MD -MP -MF $(DEPDIR)/BatchConv.Tpo -c -o BatchConv.o `test -f '$(example_srcdir)/windows_example/BatchConv.cpp' || echo '$(srcdir)/'`$(example_srcdir)/windows_example/BatchConv.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/BatchConv.Tpo $(DEPDIR)/BatchConv.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/windows_example/BatchConv.cpp' object='BatchConv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BatchConv.o `test -f '$(example_srcdir)/windows_example/BatchConv.cpp' || echo '$(srcdir)/'`$(example_srcdir)/windows_example/BatchConv.cpp + +BatchConv.obj: $(example_srcdir)/windows_example/BatchConv.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BatchConv.obj -MD -MP -MF $(DEPDIR)/BatchConv.Tpo -c -o BatchConv.obj `if test -f '$(example_srcdir)/windows_example/BatchConv.cpp'; then $(CYGPATH_W) '$(example_srcdir)/windows_example/BatchConv.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/windows_example/BatchConv.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/BatchConv.Tpo $(DEPDIR)/BatchConv.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/windows_example/BatchConv.cpp' object='BatchConv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BatchConv.obj `if test -f '$(example_srcdir)/windows_example/BatchConv.cpp'; then $(CYGPATH_W) '$(example_srcdir)/windows_example/BatchConv.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/windows_example/BatchConv.cpp'; fi` + +WindowsTest.o: $(example_srcdir)/windows_example/WindowsTest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT WindowsTest.o -MD -MP -MF $(DEPDIR)/WindowsTest.Tpo -c -o WindowsTest.o `test -f '$(example_srcdir)/windows_example/WindowsTest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/windows_example/WindowsTest.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/WindowsTest.Tpo $(DEPDIR)/WindowsTest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/windows_example/WindowsTest.cpp' object='WindowsTest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o WindowsTest.o `test -f '$(example_srcdir)/windows_example/WindowsTest.cpp' || echo '$(srcdir)/'`$(example_srcdir)/windows_example/WindowsTest.cpp + +WindowsTest.obj: $(example_srcdir)/windows_example/WindowsTest.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT WindowsTest.obj -MD -MP -MF $(DEPDIR)/WindowsTest.Tpo -c -o WindowsTest.obj `if test -f '$(example_srcdir)/windows_example/WindowsTest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/windows_example/WindowsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/windows_example/WindowsTest.cpp'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/WindowsTest.Tpo $(DEPDIR)/WindowsTest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(example_srcdir)/windows_example/WindowsTest.cpp' object='WindowsTest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o WindowsTest.obj `if test -f '$(example_srcdir)/windows_example/WindowsTest.cpp'; then $(CYGPATH_W) '$(example_srcdir)/windows_example/WindowsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/$(example_srcdir)/windows_example/WindowsTest.cpp'; fi` + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(examplesdir)"; 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 -z "$(example_srcdir)/animation_example/$(DEPDIR)/$(am__dirstamp)" || rm -f $(example_srcdir)/animation_example/$(DEPDIR)/$(am__dirstamp) + -test -z "$(example_srcdir)/animation_example/$(am__dirstamp)" || rm -f $(example_srcdir)/animation_example/$(am__dirstamp) + -test -z "$(example_srcdir)/windows_example/$(DEPDIR)/$(am__dirstamp)" || rm -f $(example_srcdir)/windows_example/$(DEPDIR)/$(am__dirstamp) + -test -z "$(example_srcdir)/windows_example/$(am__dirstamp)" || rm -f $(example_srcdir)/windows_example/$(am__dirstamp) + +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-examplesPROGRAMS 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 + +info: info-am + +info-am: + +install-data-am: install-examplesPROGRAMS + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: 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-examplesPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-examplesPROGRAMS 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-examplesPROGRAMS 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 uninstall-examplesPROGRAMS + + +.rc.o: + $(RC) $(RCFLAGS) $< -o $@ +# 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/libs/DevIL-1.7.8/build-aux/compile b/libs/DevIL-1.7.8/build-aux/compile new file mode 100644 index 00000000..1b1d2321 --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/compile @@ -0,0 +1,142 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/config.guess b/libs/DevIL-1.7.8/build-aux/config.guess new file mode 100644 index 00000000..f32079ab --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/config.guess @@ -0,0 +1,1526 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-23' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/config.sub b/libs/DevIL-1.7.8/build-aux/config.sub new file mode 100644 index 00000000..6759825a --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/config.sub @@ -0,0 +1,1658 @@ +#! /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 +# Free Software Foundation, Inc. + +timestamp='2008-01-16' + +# 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 ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/depcomp b/libs/DevIL-1.7.8/build-aux/depcomp new file mode 100644 index 00000000..e5f9736c --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/depcomp @@ -0,0 +1,589 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2007-03-29.01 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 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 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 + +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 $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -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, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/install-sh b/libs/DevIL-1.7.8/build-aux/install-sh new file mode 100644 index 00000000..a5897de6 --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/install-sh @@ -0,0 +1,519 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# 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-end: "$" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/ltmain.sh b/libs/DevIL-1.7.8/build-aux/ltmain.sh new file mode 100644 index 00000000..6d056ecf --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/ltmain.sh @@ -0,0 +1,7880 @@ +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.4 +# Written by Gordon Matzigkeit , 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.4 Debian-2.2.4-0ubuntu4 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="2.2.4 Debian-2.2.4-0ubuntu4" +TIMESTAMP="" +package_revision=1.2976 + +# 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="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/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*) + # 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 () +{ + $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 -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*) + 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*) + 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* ) + 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* ) + 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* ) + $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* ) + 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 arg +# +# 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 variable +# 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 '.lib' 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 + + $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 + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"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*) + $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 + +# 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 +# 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, ...); + +static const char *script_text = +EOF + + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + + cat </dev/null || echo $SHELL` + case $lt_newargv0 in + *.exe | *.EXE) ;; + *) lt_newargv0=$lt_newargv0.exe ;; + esac + ;; + * ) lt_newargv0=$SHELL ;; + esac + fi + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + 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); +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # 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 + # 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*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$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*) + # 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*) + # 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%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + 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*) + # 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*) + 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 + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + 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) + ;; + $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*) + # 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*) + 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*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$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 + ;; + *) + 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 + + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $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) 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/libs/DevIL-1.7.8/build-aux/mdate-sh b/libs/DevIL-1.7.8/build-aux/mdate-sh new file mode 100644 index 00000000..83d27009 --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/mdate-sh @@ -0,0 +1,205 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2007-03-30.02 + +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software +# Foundation, Inc. +# written by Ulrich Drepper , June 1995 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No file. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification time of FILE. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume `unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +else + ls_command='ls -l -d' +fi +# Avoid user/group names that might have spaces, when possible. +if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" +fi + +# A `ls -l' line looks as follows on OS/2. +# drwxrwx--- 0 Aug 11 2001 foo +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# words should be skipped to get the date. + +# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. +set x`$ls_command /` + +# Find which argument is the month. +month= +command= +until test $month +do + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/missing b/libs/DevIL-1.7.8/build-aux/missing new file mode 100644 index 00000000..1c8ff704 --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 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. + +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] + +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 + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$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 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # 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-end: "$" +# End: diff --git a/libs/DevIL-1.7.8/build-aux/texinfo.tex b/libs/DevIL-1.7.8/build-aux/texinfo.tex new file mode 100644 index 00000000..d2b264dd --- /dev/null +++ b/libs/DevIL-1.7.8/build-aux/texinfo.tex @@ -0,0 +1,8962 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2007-12-02.17} +% +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007 Free Software Foundation, Inc. +% +% This texinfo.tex file is free software: you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. +% +% This texinfo.tex file 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, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. (This has been our intent since Texinfo was invented.) +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or +% ftp://tug.org/tex/texinfo.tex +% (and all CTAN mirrors, see http://www.ctan.org). +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexstar=\* +\let\ptext=\t + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\undefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% For @cropmarks command. +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Main output routine. +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. Note that \pagecontents +% does insertions, but you have to call it yourself. +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + % + {% + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +\dimen@=\dp#1\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurence of `\^^M' or `\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarily, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +% +% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% favourite TeX trick. --kasal, 16nov03 + +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as enviroments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At runtime, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Evironment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + out of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +%% Simple single-character @ commands + +% @@ prints an @ +% Kludge this until the fonts are right (grr). +\def\@{{\tt\char64}} + +% This is turned off because it was never documented +% and you can use @w{...} around a quote to suppress ligatures. +%% Define @` and @' to be the same as ` and ' +%% but suppressing ligatures. +%\def\`{{`}} +%\def\'{{'}} + +% Used to generate quoted braces. +\def\mylbrace {{\tt\char123}} +\def\myrbrace {{\tt\char125}} +\let\{=\mylbrace +\let\}=\myrbrace +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \c +\let\dotaccent = \. +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \t +\let\ubaraccent = \b +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ptexi + \else\ifx\temp\jmacro \j + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% + \kern-.15em + \TeX +} + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox + \prevdepth = \dimen1 + \checkinserts +} +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +% Old definition--didn't work. +%\parseargdef\need{\par % +%% This method tries to make TeX break the page naturally +%% if the depth of the box does not fit. +%{\baselineskip=0pt% +%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak +%\prevdepth=-1000pt +%}} + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @include file insert text of that file as input. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable + \def\temp{\input #1 }% + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} + +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\next\centerH + \else + \let\next\centerV + \fi + \next{\hfil \ignorespaces#1\unskip \hfil}% +} +\def\centerH#1{% + {% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break + }% +} +\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} + +% @sp n outputs n lines of vertical space + +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment + +\def\comment{\begingroup \catcode`\^^M=\other% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\commentxxx} +{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} + +\let\c=\comment + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent + \indent + }% + \gdef\noindent{% + \restorefirstparagraphindent + \noindent + }% + \global\everypar = {% + \kern -\parindent + \restorefirstparagraphindent + }% +} + +\gdef\restorefirstparagraphindent{% + \global \let \indent = \ptexindent + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} + + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a \ character. +% FYI, plain.tex uses \\ as a temporary control sequence (why?), but +% this is not advertised and we don't care. Texinfo does not +% otherwise define @\. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + } +} + +% @bullet and @minus need the same treatment as @math, just above. +\def\bullet{$\ptexbullet$} +\def\minus{$-$} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @comma{} is so commas can be inserted into text without messing up +% Texinfo's parsing. +% +\let\comma = , + +% @refill is a no-op. +\let\refill=\relax + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate (before @setfilename). +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% @setfilename is done at the beginning of every texinfo file. +% So open here the files we need to have open while reading the input. +% This makes it possible to make a .fmt file for texinfo. +\def\setfilename{% + \fixbackslash % Turn off hack to swallow `\input texinfo'. + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi % \openindices needs to do some work in any case. + \openindices + \let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + \openin 1 texinfo.cnf + \ifeof 1 \else \input texinfo.cnf \fi + \closein 1 + % + \comment % Ignore the actual filename. +} + +% Called from \setfilename. +% +\def\openindices{% + \newindex{cp}% + \newcodeindex{fn}% + \newcodeindex{vr}% + \newcodeindex{tp}% + \newcodeindex{ky}% + \newcodeindex{pg}% +} + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as \undefined, +% borrowed from ifpdf.sty. +\ifx\pdfoutput\undefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html +% (and related messages, the final outcome is that it is up to the TeX +% user to double the backslashes and otherwise make the string valid, so +% that's what we do). + +% double active backslashes. +% +{\catcode`\@=0 \catcode`\\=\active + @gdef@activebackslashdouble{% + @catcode`@\=@active + @let\=@doublebackslash} +} + +% To handle parens, we must adopt a different approach, since parens are +% not active characters. hyperref.dtx (which has the same problem as +% us) handles it with this amazing macro to replace tokens, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. +% +% #1 is the tokens to replace. +% #2 is the replacement. +% #3 is the control sequence with the string. +% +\def\HyPsdSubst#1#2#3{% + \def\HyPsdReplace##1#1##2\END{% + ##1% + \ifx\\##2\\% + \else + #2% + \HyReturnAfterFi{% + \HyPsdReplace##2\END + }% + \fi + }% + \xdef#3{\expandafter\HyPsdReplace#3#1\END}% +} +\long\def\HyReturnAfterFi#1\fi{\fi#1} + +% #1 is a control sequence in which to do the replacements. +\def\backslashparens#1{% + \xdef#1{#1}% redefine it as its expansion; the definition is simply + % \lastnode when called from \setref -> \pdfmkdest. + \HyPsdSubst{(}{\realbackslash(}{#1}% + \HyPsdSubst{)}{\realbackslash)}{#1}% +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros based on pdfcolor.tex. + \def\cmykDarkRed{0.28 1 1 0.35} + \def\cmykBlack{0 0 0 1} + % + \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\cmykBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % + % without \immediate, pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \imagewidth \fi + \ifdim \wd2 >0pt height \imageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \activebackslashdouble + \makevalueexpandable + \def\pdfdestname{#1}% + \backslashparens\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\cmykDarkRed} + \def\linkcolor{\cmykDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \def\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + % Doubled backslashes in the name. + {\activebackslashdouble \xdef\pdfoutlinedest{#3}% + \backslashparens\pdfoutlinedest}% + \fi + % + % Also double the backslashes in the display string. + {\activebackslashdouble \xdef\pdfoutlinetext{#1}% + \backslashparens\pdfoutlinetext}% + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Thanh's hack / proper braces in bookmarks + \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace + \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace + % + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % xx to do this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Right + % now, I guess we'll just let the pdf reader have its way. + \indexnofonts + \setupdatafile + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \ifx\p\space\else\addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \fi + \nextsp} + \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + + +\message{fonts,} + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} +\let\li = \sf % Sometimes we call it \li, not \sf. + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% Default leading. +\newdimen\textleading \textleading = 13.2pt + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\undefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named #2, adding on the +% specified font prefix (normally `cm'). +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% emacs-page end of cmaps + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\undefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} %where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +% reset the current fonts +\textfonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +% reduce space between paragraphs +\divide\parskip by 2 + +% reset the current fonts +\textfonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xword{10} +\def\xiword{11} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + \wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. Since +% texinfo doesn't allow for producing subscripts and superscripts except +% in the main text, we don't bother to reset \scriptfont and +% \scriptscriptfont (which would also require loading a lot more fonts). +% +\def\resetmathfonts{% + \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy + \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf + \textfont\ttfam=\tentt \textfont\sffam=\tensf +} + +% The font-changing commands redefine the meanings of \tenSTYLE, instead +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used in +% the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% +\def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% + \resetmathfonts \setleading{\textleading}} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{25pt}} +\def\titlefont#1{{\titlefonts\rm #1}} +\def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} +\def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{16pt}} +\def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallerfonts{% + \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl + \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc + \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy + \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% +% I wish the USA used A4 paper. +% --karl, 24jan03. + + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + +% Define these so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +%% Add scribe-like font environments, plus @l for inline lisp (usually sans +%% serif) and @ii for TeX italic + +% \smartitalic{ARG} outputs arg in italics, followed by an italic correction +% unless the following character is such as not to need one. +\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else + \ptexslash\fi\fi\fi} +\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} +\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} + +% like \smartslanted except unconditionally uses \ttsl. +% @var is set to this for defun arguments. +\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} + +% like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\var=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% @b, explicit bold. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} +\def\samp#1{`\tclose{#1}'\null} +\setfont\keyrm\rmshape{8}{1000}{OT1} +\font\keysy=cmsy9 +\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% + \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% + \vbox{\hrule\kern-0.4pt + \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% + \kern-0.4pt\hrule}% + \kern-.06em\raise0.4pt\hbox{\angleright}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} +% The old definition, with no lozenge: +%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @file, @option are the same as @samp. +\let\file=\samp +\let\option=\samp + +% @code is a modification of @t, +% which makes spaces the same size as normal in the surrounding text. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. + +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. +% -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + % + \global\def\code{\begingroup + \catcode\rquoteChar=\active \catcode\lquoteChar=\active + \let'\codequoteright \let`\codequoteleft + % + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\realdash + \let_\realunder + \fi + \codex + } +} + +\def\realdash{-} +\def\codedash{-\discretionary{}{}{}} +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} +\def\codex #1{\tclose{#1}\endgroup} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \fi\fi +} + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle option `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct.' +\kbdinputstyle distinct + +\def\xkey{\key} +\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% +\ifx\one\xkey\ifx\threex\three \key{#2}% +\else{\tclose{\kbdfont\look}}\fi +\else{\tclose{\kbdfont\look}}\fi} + +% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. +\let\indicateurl=\code +\let\env=\code +\let\command=\code + +% @uref (abbreviation for `urlref') takes an optional (comma-separated) +% second argument specifying the text to display and an optional third +% arg as text to display instead of (rather than in addition to) the url +% itself. First (mandatory) arg is the url. Perhaps eventually put in +% a hypertex \special here. +% +\def\uref#1{\douref #1,,,\finish} +\def\douref#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \code{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} + +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Hacks for glyphs from the EC fonts similar to \euro. We don't +% use \let for the aliases, because sometimes we redefine the original +% macro, and the alias should reflect the redefinition. +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +\def\ecfont{% + % We can't distinguish serif/sanserif and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\undefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +%%% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines + \let\tt=\authortt} + +\parseargdef\title{% + \checkenv\titlepage + \leftline{\titlefonts\rm #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\authorfont \leftline{#1}}% + \fi +} + + +%%% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\def\headings #1 {\csname HEADINGS#1\endcsname} + +\def\HEADINGSoff{% +\global\evenheadline={\hfil} \global\evenfootline={\hfil} +\global\oddheadline={\hfil} \global\oddfootline={\hfil}} +\HEADINGSoff +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\undefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + \def\itemcontents{#1}% + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a . + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group +% of an alignment entry. Note that \everycr resets \everytab. +\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we encounter the problem it was intended to solve again. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% + \global\colcount=0 % Reset the column counter. + % Check for saved footnotes, etc. + \checkinserts + % Keeps underfull box messages off when table breaks over pages. + %\filbreak + % Maybe so, but it also creates really weird page breaks when the + % table breaks over pages. Wouldn't \vfil be better? Wait until the + % problem manifests itself, so it can be fixed for real --karl. + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +%% Test to see if parskip is larger than space between lines of +%% table. If not, do nothing. +%% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller + %% than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller + %% than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\- = \active \catcode`\_ = \active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\realdash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get special treatment of `@end ifset,' call \makeond and the redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named foo. +% It automatically defines \fooindex such that +% \fooindex ...rest of line... puts an entry in the index foo. +% It also defines \fooindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is foo. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 % Open the file + \fi + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. + \expandafter \ifx\csname donesynindex#2\endcsname \undefined + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname + \expandafter\let\csname\donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all \fooindex macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it is "foo", the name of the index. + +% \doindex just uses \parsearg; it calls \doind for the actual work. +% This is because \doind is more useful to call from other macros. + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} +\def\singleindexer #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} +\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} + +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % + % Need these in case \tex is in effect and \{ is a \delimiter again. + % But can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. + \let\{ = \mylbrace + \let\} = \myrbrace + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control% words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\L + \definedummyword\OE + \definedummyword\O + \definedummyword\aa + \definedummyword\ae + \definedummyword\l + \definedummyword\oe + \definedummyword\o + \definedummyword\ss + \definedummyword\exclamdown + \definedummyword\questiondown + \definedummyword\ordf + \definedummyword\ordm + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\expansion + \definedummyword\minus + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable +} + +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sc + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\acronym + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % Hopefully, all control words can become @asis. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + % how to handle braces? + \def\_{\normalunderscore}% + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\aa{aa}% + \def\ae{ae}% + \def\l{l}% + \def\oe{oe}% + \def\o{o}% + \def\ss{ss}% + \def\exclamdown{!}% + \def\questiondown{?}% + \def\ordf{a}% + \def\ordm{o}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\registeredsymbol{R}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\expansion{==>}% + \def\minus{-}% + \def\pounds{pounds}% + \def\point{.}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\result{=>}% + \def\textdegree{degrees}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist +} + +\let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% Workhorse for all \fooindexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Write the entry in \toks0 to the index file: +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{% +\ifhmode + #1% +\else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi +} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 + \openin 1 \jobname.#1s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \else + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \temp + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\backslashcurfont}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns + \input \jobname.#1s + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +\def\initial#1{{% + % Some minor font changes for the special characters. + \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt + % + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + \nobreak + \vskip 0pt plus 3\baselineskip + \penalty 0 + \vskip 0pt plus -3\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip +}} + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +% A straightforward implementation would start like this: +% \def\entry#1#2{... +% But this frozes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % Do not fill out the last line with white space. + \parfillskip = 0in + % + % No extra space above this paragraph. + \parskip = 0in + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % \hangindent is only relevant when the entry text and page number + % don't both fit on one line. In that case, bob suggests starting the + % dots pretty far over on the line. Unfortunately, a large + % indentation looks wrong when the entry text itself is broken across + % lines. So we use a small indentation and put up with long leaders. + % + % \hangafter is reset to 1 (which is the value we want) at the start + % of each paragraph, so we need not do anything with that. + \hangindent = 2em + % + % When the entry text needs to be broken, just fill out the first line + % with blank space. + \rightskip = 0pt plus1fil + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus1pt + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. +} +\def\finishentry#1{% + % #1 is the page number. + % + % The following is kludged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % + \else + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ifpdf + \pdfgettoks#1.% + \ \the\toksA + \else + \ #1% + \fi + \fi + \par + \endgroup +} + +% Like plain.tex's \dotfill, except uses up at least 1 em. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + #2 + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 + +\newbox\partialpage +\newdimen\doublecolumnhsize + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + }% + \eject % run that output routine to set \partialpage + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) + \vsize = 2\vsize +} + +% The double-column output routine for all double-column pages except +% the last. +% +\def\doublecolumnout{% + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% +} +% +% All done with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). + \pagegoal = \vsize +} +% +% Called at the end of the double column material. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 % target to split to + %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht3>\dimen@ + \global\advance\dimen@ by 1pt + \repeat + }% + %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + % + \pagesofar +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achive this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unmlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unmlevel + \chardef\unmlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unmlevel + \def\headtype{U}% + \else + \chardef\unmlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + \message{\putwordChapter\space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + \def\appendixnum{\putwordAppendix\space \appendixletter}% + \message{\appendixnum}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + % Well, we could do the following in a group, but that would break + % an assumption that \chapmacro is called at the outermost level. + % Thus we are safer this way: --kasal, 24feb04 + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +% NOTE on use of \vbox for chapter headings, section headings, and such: +% 1) We use \vbox rather than the earlier \line to permit +% overlong headings to fold. +% 2) \hyphenpenalty is set to 10000 because hyphenation in a +% heading is obnoxious; this forbids it. +% 3) Likewise, headings look best if no \parindent is used, and +% if justification is not attempted. Hence \raggedright. + + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +%%% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +%%% Define plain chapter starts, and page on/off switching for it +% Parameter controlling skip before chapter headings (if needed) + +\newskip\chapheadingskip + +\def\chapbreak{\dobreak \chapheadingskip {-4000}} +\def\chappager{\par\vfill\supereject} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% + \hbox to 0pt{}% + \chappager + \endgroup + \fi +} + +\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yomitfromtockeyword{Yomitfromtoc} +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rm + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% +\def\unnchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\nobreak +} +\def\chfopen #1#2{\chapoddpage {\chapfonts +\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% +\par\penalty 5000 % +} +\def\centerchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt + \hfill {\rm #1}\hfill}}\bigskip \par\nobreak +} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rm + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) + \vskip-\parskip + % + % This is purely so the last item on the list is a known \penalty > + % 10000. This is so \startdefun can avoid allowing breakpoints after + % section headings. Otherwise, it would insert a valid breakpoint between: + % + % @section sec-whatever + % @deffn def-whatever + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} +% +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, it should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @tex ... @end tex escapes into raw Tex temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain tex @ character. + +\envdef\tex{% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \escapechar=`\\ + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\*=\ptexstar + \let\t=\ptext + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +\let\afterenvbreak = \aboveenvbreak + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing = t% + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of \def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\def\nonfillstart{% + \aboveenvbreak + \hfuzz = 12pt % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + \parindent = 0pt + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it by one command: +\def\makedispenv #1#2{ + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two synonyms: +\def\maketwodispenvs #1#2#3{ + \makedispenv{#1}{#3} + \makedispenv{#2}{#3} +} + +% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvs {lisp}{example}{% + \nonfillstart + \tt\quoteexpand + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenv {display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenv{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\envdef\quotation{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \advance\rightskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\undefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + + +% LaTeX-like @verbatim...@end verbatim and @verb{...} +% If we want to allow any as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% [Knuth] pp. 380,381,391 +% Disable Spanish ligatures ?` and !` of \tt font +\begingroup + \catcode`\`=\active\gdef`{\relax\lq} +\endgroup +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \catcode`\`=\active + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +\def\starttabbox{\setbox0=\hbox\bgroup} + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else \char'22 \fi + \else \char'22 \fi +} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen0=\wd0 % the width so far, or since the previous tab + \divide\dimen0 by\tabw + \multiply\dimen0 by\tabw % compute previous multiple of \tabw + \advance\dimen0 by\tabw % advance to next multiple of \tabw + \wd0=\dimen0 \box0 \starttabbox + }% + } + \catcode`\'=\active + \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% + % + \catcode`\`=\active + \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% + % + \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + % Easiest (and conventionally used) font for verbatim + \tt + \def\par{\leavevmode\egroup\box0\endgraf}% + \catcode`\`=\active + \tabexpand + \quoteexpand + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is very desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a minor refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remainnig is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +%%% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +%%% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +%%% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +%%% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +%%% Type: +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % How we'll format the type name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % (plain.tex says that \dimen1 should be used only as global.) + \parshape 2 0in \dimen0 \defargsindent \dimen2 + % + % Put the type name to the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% return value type + \ifx\temp\empty\else \tclose{\temp} \fi + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. + \let\var=\ttslanted + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\undefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +\def\scanmacro#1{% + \begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % ... and \example + \spaceisspace + % + % Append \endinput to make sure that TeX does not see the ending newline. + % I've verified that it is necessary both for e-TeX and for ordinary TeX + % --kasal, 29nov03 + \scantokens{#1\endinput}% + \endgroup +} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% + \temp +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \. + +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. + +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. + +\def\scanctxt{% + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\@=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% + \scanctxt + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% + \scanctxt + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +\def\macroargctxt{% + \scanctxt + \catcode`\\=\other +} + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. + +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0% + \else + \expandafter\parsemargdef \argl;% + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\definedummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\definedummyword \noexpand#1% + \fi +} + +% This makes use of the obscure feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} + +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.blah for each blah +% in the params list, to be ##N where N is the position in that list. +% That gets used by \mbodybackslash (above). + +% We need to get `macro parameter char #' into several definitions. +% The technique used is stolen from LaTeX: let \hash be something +% unexpandable, insert that wherever you need a #, and then redefine +% it to # just before using the token list produced. +% +% The same technique is used to protect \eatspaces till just before +% the macro is used. + +\def\parsemargdef#1;{\paramno=0\def\paramlist{}% + \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1% + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +% These two commands read recursive and nonrecursive macro bodies. +% (They're different since rec and nonrec macros end differently.) + +\long\def\parsemacbody#1@end macro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\long\def\parsermacbody#1@end rmacro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% + +% This defines the macro itself. There are six cases: recursive and +% nonrecursive macros of zero, one, and many arguments. +% Much magic with \expandafter here. +% \xdef is used so that macro definitions will survive the file +% they're defined in; @include reads the file inside a group. +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\temp}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \fi + \else + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % many + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \fi + \fi} + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + +% \braceorline decides whether the next nonwhitespace character is a +% {. If so it reads up to the closing }, if not, it reads the whole +% line. Whatever was read is then fed to the next control sequence +% as an argument (by \parsebrace or \parsearg) +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Just make them active and then expand them all to nothing. +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + }% + \fi +} + +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} +\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} +\def\ref#1{\xrefX[#1,,,,,,,]} +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + \def\printedmanual{\ignorespaces #5}% + \def\printedrefname{\ignorespaces #3}% + \setbox1=\hbox{\printedmanual\unskip}% + \setbox0=\hbox{\printedrefname\unskip}% + \ifdim \wd0 = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax + % Use the node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Use the actual chapter/section title appear inside + % the square brackets. Use the real section title if we have it. + \ifdim \wd1 > 0pt + % It is in another manual, so we don't have it. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + \leavevmode + \getfilename{#4}% + {\indexnofonts + \turnoffactive + % See comments at \activebackslashdouble. + {\activebackslashdouble \xdef\pdfxrefdest{#1}% + \backslashparens\pdfxrefdest}% + % + \ifnum\filenamelength>0 + \startlink attr{/Border [0 0 0]}% + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + \startlink attr{/Border [0 0 0]}% + goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% + \setcolor{\linkcolor}% + \fi + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd0 = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % if the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd1 > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not + % insert empty discretionaries after hyphens, which means that it will + % not find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, this + % is a loss. Therefore, we give the text of the node name again, so it + % is as if TeX is seeing it for the first time. + \ifdim \wd1 > 0pt + \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + \else + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via a macro so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi + \fi + \endlink +\endgroup} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% +\def\refx#1#2{% + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + \message{\linenumber Undefined cross reference `#1'.}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. +% +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. + {% + \count1=128 + \def\loop{% + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi + }% + }% + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarily, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. + +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\undefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing this stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \nobreak\bigskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \line\bgroup + \fi + % + % Output the image. + \ifpdf + \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \fi + % + \ifimagevmode \egroup \bigbreak \fi % space after the image +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% @documentlanguage is usually given very early, just after +% @setfilename. If done too late, it may not override everything +% properly. Single argument is the language (de) or locale (de_DE) +% abbreviation. It would be nice if we could set up a hyphenation file. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else + \input txi-#1.tex + \fi + \closein 1 + \endgroup +\endgroup} +} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\def\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \input txi-#1.tex + \fi + \closein 1 +} +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? In the current directory +should work if nowhere else does.} + +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{~} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} + \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} + \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be so finicky about underfull hboxes, either. +\hbadness = 2000 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other +\catcode`\~=\other +\catcode`\^=\other +\catcode`\_=\other +\catcode`\|=\other +\catcode`\<=\other +\catcode`\>=\other +\catcode`\+=\other +\catcode`\$=\other +\def\normaldoublequote{"} +\def\normaltilde{~} +\def\normalcaret{^} +\def\normalunderscore{_} +\def\normalverticalbar{|} +\def\normalless{<} +\def\normalgreater{>} +\def\normalplus{+} +\def\normaldollar{$}%$ font-lock fix + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Turn off all special characters except @ +% (and those which the user can use as if they were ordinary). +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. + +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active +\def~{{\tt\char126}} +\chardef\hat=`\^ +\catcode`\^=\active +\def^{{\tt \hat}} + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ +% Subroutine for the previous macro. +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + +\catcode`\|=\active +\def|{{\tt\char124}} +\chardef \less=`\< +\catcode`\<=\active +\def<{{\tt \less}} +\chardef \gtr=`\> +\catcode`\>=\active +\def>{{\tt \gtr}} +\catcode`\+=\active +\def+{{\tt \char 43}} +\catcode`\$=\active +\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have \everyjob (or @setfilename) turn them on. +% \otherifyactive is called near the end of this file. +\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active +@def@normalbackslash{{@tt@backslashcurfont}} +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +@def@normalturnoffactive{% + @let\=@normalbackslash + @let"=@normaldoublequote + @let~=@normaltilde + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let<=@normalless + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix + @unsepspaces +} + +% Make _ and + \other characters, temporarily. +% This is canceled by @fixbackslash. +@otherifyactive + +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% +@gdef@eatinput input texinfo{@fixbackslash} +@global@let\ = @eatinput + +% On the other hand, perhaps the file did not have a `\input texinfo'. Then +% the first `\' in the file would cause an error. This macro tries to fix +% that, assuming it is called before the first `\' could plausibly occur. +% Also turn back on active characters that might appear in the input +% file name, in case not using a pre-dumped format. +% +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active + @catcode`@_=@active +} + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These look ok in all fonts, so just make them not special. +@catcode`@& = @other +@catcode`@# = @other +@catcode`@% = @other + + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/libs/DevIL-1.7.8/configure b/libs/DevIL-1.7.8/configure new file mode 100644 index 00000000..2d0de034 --- /dev/null +++ b/libs/DevIL-1.7.8/configure @@ -0,0 +1,28880 @@ +#! /bin/sh +# From configure.ac Revision: 1.48 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for DevIL 1.7.8. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 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=: + # 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 + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +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 + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +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 + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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 + + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='DevIL' +PACKAGE_TARNAME='devil' +PACKAGE_VERSION='1.7.8' +PACKAGE_STRING='DevIL 1.7.8' +PACKAGE_BUGREPORT='bubla@users.sourceforge.net' + +ac_unique_file="src-IL/src/il_main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +LIBTOOL +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +SED +GREP +EGREP +FGREP +LD +DUMPBIN +ac_ct_DUMPBIN +NM +LN_S +AR +STRIP +RANLIB +lt_ECHO +DSYMUTIL +NMEDIT +LIPO +OTOOL +OTOOL64 +CPP +AS +DLLTOOL +OBJDUMP +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +DEVIL_LTVERSION +CXX +CXXFLAGS +ac_ct_CXX +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +BUILD_EXAMPLES_TRUE +BUILD_EXAMPLES_FALSE +BUILD_IL_TRUE +BUILD_IL_FALSE +BUILD_ILU_TRUE +BUILD_ILU_FALSE +BUILD_ILUT_TRUE +BUILD_ILUT_FALSE +PKG_CONFIG +OPENEXR_CFLAGS +OPENEXR_LIBS +ALLEGRO_CONFIG +allegro_CFLAGS +allegro_LIBS +XMKMF +acx_pthread_config +PTHREAD_CC +PTHREAD_LIBS +PTHREAD_CFLAGS +GL_CFLAGS +GL_LIBS +GLU_CFLAGS +GLU_LIBS +X_CFLAGS +X_PRE_LIBS +X_LIBS +X_EXTRA_LIBS +GLUT_CFLAGS +GLUT_LIBS +SDL_CONFIG +SDL_CFLAGS +SDL_LIBS +USE_ALLEGRO_TRUE +USE_ALLEGRO_FALSE +USE_DIRECTX8_TRUE +USE_DIRECTX8_FALSE +USE_DIRECTX9_TRUE +USE_DIRECTX9_FALSE +USE_DIRECTX_TRUE +USE_DIRECTX_FALSE +USE_OPENGL_TRUE +USE_OPENGL_FALSE +HAVE_GLUT_TRUE +HAVE_GLUT_FALSE +USE_SDL_TRUE +USE_SDL_FALSE +USE_W32_TRUE +USE_W32_FALSE +USE_X11_TRUE +USE_X11_FALSE +PLATFORM +WINDOWS_BUILD_TRUE +WINDOWS_BUILD_FALSE +GENERAL_CFLAGS +IL_CFLAGS +IL_LIBS +ILU_CFLAGS +ILU_LIBS +ILUT_CFLAGS +ILUT_LIBS +LIBILUT_WIN32LIBPATH +SUPPORTED_FORMATS +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +CXX +CXXFLAGS +CCC +CXXCPP +PKG_CONFIG +OPENEXR_CFLAGS +OPENEXR_LIBS +XMKMF' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +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 + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + 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 DevIL 1.7.8 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/devil] + --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 + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR + +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 DevIL 1.7.8:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --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-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-debug Compile a debug version of the library + --disable-release Compile a debug version of the library, default + enabled if not building debug version + --disable-asm Use assembler routines if possible, default enable + if not building debug version + --enable-ILU=yes/no Build ILU part of DevIL. Default set to no + --enable-ILUT=yes/no Build ILUT part of DevIL. Default set to no. ILU + will be built along whether you want it or not since + ILUT depends upon it. + --enable-altivec Doesn't compile Altivec support. Overrides general + enable of ASM + --enable-sse Doesn't compile SSE support. Overrides general + enable of ASM + --enable-sse2 Doesn't compile SSE2 support. Overrides general + enable of ASM + --enable-sse3 Doesn't compile SSE3 support. Overrides general + enable of ASM + --enable-x86 Compile with x86 support + --enable-x86_64 Compile with x86_64 support + --enable-ppc Compile with ppc support + --enable-warning Compile breaks on warnings + --enable-game-formats=yes/no + Enable support for various game formats. Some people + may consider that redundant. (default=yes) + --enable-blp Compile blp support. BLP is the texture format for + Blizzard games. (default=yes) + --enable-bmp Compile bmp support. BMP is a standard Windows + bitmap. (default=yes) + --enable-dcx Compile dcx support. DCX is a multi-page PCX file. + (default=yes) + --enable-dds Compile dds support. DDS (DirectDraw Surface) is + used by DirectX to load images (usually DXTC). + (default=yes) + --enable-dicom Compile dicom support. DICOM (Digital Imaging and + Communications in Medicine) is used extensively in + medical imaging. (default=yes) + --enable-doom Compile doom support. WAD is the format for graphics + in the original DooM I/II. (default=yes) + --enable-exr Compile exr support. EXR is a HDR image file format + standardized by Industrial Light and Magic. OpenEXR + powered (default=yes) + --enable-fits Compile fits support. FITS (Flexible Image Transport + System) is used for storing scientific images and is + used extensively in astronomy. (default=yes) + --enable-gif Compile gif support. GIF is lossy and proprietary + format used mainly to make animations (default=yes) + --enable-hdr Compile hdr support. HDR is the Radiance High + Dynamic Range format, using more bits per channel + than normal. (default=yes) + --enable-icns Compile icns support. ICNS is the icon format for + the Mac OS X operation system. (default=yes) + --enable-icon Compile icon support. ICO is the icon format for the + Windows operating system. (default=yes) + --enable-iff Compile iff support. IFF (Interchange File Format) + is used to transfer images between software from + different companies. (default=yes) + --enable-ilbm Compile ilbm support. ILBM (Amiga Interleaved BitMap + Format). (default=yes) + --enable-iwi Compile iwi support. IWI is the Infinity Ward Image + format used in the Call of Duty games. (default=yes) + --enable-jpeg Compile jpeg support. JPEG is most common lossy + format. libjpeg powered (default=yes) + --enable-jp2 Compile jp2 support. JP2 (JPEG 2000) is a better, + but not so widespread, alternative to JPEG. JasPer + powered (default=yes) + --enable-lcms Compile lcms support. (default=yes) + --enable-lif Compile lif support. LIF is the image format of the + game Homeworld. (default=yes) + --enable-mdl Compile mdl support. MDL is the format for models in + the game Half-Life. (default=yes) + --enable-mng Compile mng support. MNG is basically the animated + version of PNG but is not widespread. (default=yes) + --enable-mp3 Compile mp3 support. MP3 (MPEG-1 Audio Layer 3) + sometimes have images in them, such as cover art. + (default=yes) + --enable-pcx Compile pcx support. PCX is one of the first widely + accepted DOS imaging standards (default=yes) + --enable-pcd Compile pcd support. PCD is the Kodak PhotoCD + format. (default=yes) + --enable-pic Compile pic support. PIC is used by SoftImage + software. (default=yes) + --enable-pix Compile pix support. (default=yes) + --enable-png Compile png support. PNG is a smart, loseless and + even open format. libpng powered. (default=yes) + --enable-pnm Compile pnm support. PNM (Portable aNy Map format) + is considered the least-common-denominator for + converting pixmap, graymap, or bitmap files between + different platforms. (default=yes) + --enable-psd Compile psd support. PSD is the PhotoShop native + file format. (default=yes) + --enable-psp Compile psp support. PSP is the Paint Shop Pro + native file format. (default=yes) + --enable-pxr Compile pxr support. PXR is used by Pixar. + (default=yes) + --enable-raw Compile raw support. RAW is simply raw data. + (default=yes) + --enable-rot Compile rot support. ROT is the image format for the + game Homeworld 2. (default=yes) + --enable-sgi Compile sgi support. SGI is the native raster + graphics file format for Silicon Graphics + workstations (default=yes) + --enable-sun Compile sun support. SUN is the image format used on + Sun's operating systems. (default=yes) + --enable-texture Compile texture support. TEXTURE is the format used + in Medieval II: Total War (similar to DDS). + (default=yes) + --enable-tga Compile tga support. TGA (aka TARGA file format) has + been used mainly in games. It is open and simple. + (default=yes) + --enable-tiff Compile tiff support. TIFF is a lossless format + supporting greater color depths. libtiff powered + (default=yes) + --enable-tpl Compile tpl support. TPL is the format used by many + GameCube and Wii games. (default=yes) + --enable-utx Compile utx support. UTX is the format used in the + Unreal Tournament game series. (default=yes) + --enable-vtf Compile vtf support. VTF (Valve Texture Format) is + used by games based on Valve's Source engine. + (default=yes) + --enable-wal Compile wal support. WAL is the image format used + for the game Quake 2. (default=yes) + --enable-wbmp Compile wbmp support. WBMP (Wireless Application + Protocol Bitmap) is a monochrome graphics file + format optimized for mobile computing devices + (default=yes) + --enable-wdp Compile wdp support. WDP is Microsoft's successor to + JPEG, able to store many different image types + either lossy or losslessly, also known as HD Photo. + (default=yes) + --enable-xpm Compile xpm support. XPM (X PixMap) is an + ASCII-based image used in X Windows. (default=yes) + --enable-allegro Compiles allegro support for ILUT (default=yes) + --disable-allegrotest Do not try to compile and run a test LIBallegro program + --enable-directx8 Compiles directx8 support for ILUT (default=yes) + --enable-directx9 Compiles directx9 support for ILUT (default=yes) + --enable-opengl Compiles opengl support for ILUT (default=yes) + --enable-sdl Compiles sdl support for ILUT (default=yes) + --disable-sdltest Do not try to compile and run a test SDL program + --enable-w32 Compiles w32 support for ILUT (default=yes) + --enable-x11 Compiles x11 support for ILUT (default=yes) + --enable-shm Compiles shm support for ILUT (default=yes) + --enable-render Compiles render support for ILUT (default=yes) + +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-examples=yes/no Whether to build and install examples as well. + Default is without examples + --with-zlib=yes/no Do wou want to use zlib? + --with-squish=yes/no Do you want to use the squish library if possible? + (enables HW accelerated DXT compression, + default="yes") + --with-nvtt=yes/no Do you want to use the Nvidia texture tools if + possible? (enables GPU accelerated image + manipulation, default="yes") + --with-allegro-prefix=PFX Prefix where liballegro is installed (optional) + --with-allegro-exec-prefix=PFX Exec prefix where liballegro is installed (optional) + --with-x use the X Window System + --with-sdl-prefix=PFX Prefix where SDL is installed (optional) + --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) + +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 C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + OPENEXR_CFLAGS + C compiler flags for OPENEXR, overriding pkg-config + OPENEXR_LIBS + linker flags for OPENEXR, overriding pkg-config + XMKMF Path to xmkmf, Makefile generator for X Window System + +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" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 + 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 +DevIL configure 1.7.8 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +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 DevIL $as_me 1.7.8, which was +generated by GNU Autoconf 2.61. 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=. + 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: 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 + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + 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'; { (exit 1); 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 + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $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,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_config_headers="$ac_config_headers include/IL/config.h" + + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} + { (exit 1); exit 1; }; } +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. + + +case `pwd` in + *\ * | *\ *) + { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.4' +macro_revision='1.2976' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_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 && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +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 + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.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 + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#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" + 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +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 + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + # Extract the first word of "sed gsed" to use in msg output +if test -z "$SED"; then +set dummy sed gsed; ac_prog_name=$2 +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +SED="$ac_cv_path_SED" +if test -z "$SED"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_SED=$SED +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +echo "${ECHO_T}$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for fgrep" >&5 +echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + # Extract the first word of "fgrep" to use in msg output +if test -z "$FGREP"; then +set dummy fgrep; ac_prog_name=$2 +if test "${ac_cv_path_FGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + 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 + ac_count=`expr $ac_count + 1` + 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 + + +fi + +FGREP="$ac_cv_path_FGREP" +if test -z "$FGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_FGREP=$FGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +echo "${ECHO_T}$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. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +echo "${ECHO_T}$DUMPBIN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +echo "${ECHO_T}$ac_ct_DUMPBIN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 + + + + + + +{ echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:3883: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:3886: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:3889: 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 +{ echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +echo "${ECHO_T}$lt_cv_nm_interface" >&6; } + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + 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 + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $xsi_shell" >&5 +echo "${ECHO_T}$xsi_shell" >&6; } + + +{ echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +echo "${ECHO_T}$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 + + + + + + + + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +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 + ;; + +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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + 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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_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:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -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 + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + + +# 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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5000 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*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" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $NMEDIT" >&5 +echo "${ECHO_T}$NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $LIPO" >&5 +echo "${ECHO_T}$LIPO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +echo "${ECHO_T}$ac_ct_LIPO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $OTOOL" >&5 +echo "${ECHO_T}$OTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +echo "${ECHO_T}$ac_ct_OTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $OTOOL64" >&5 +echo "${ECHO_T}$OTOOL64" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +echo "${ECHO_T}$ac_ct_OTOOL64" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } + { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_ld_exported_symbols_list=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; 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 + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +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 + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_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 + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# 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' + + { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + 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:6851: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:6855: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + 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*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + 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*) + # 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 + icc* | ecc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + 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 +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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:7175: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7179: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$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\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + 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:7280: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7284: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + 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:7335: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7339: \$? = $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 +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + 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*) + # 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*) + # _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' ;; + 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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $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 + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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*) + # 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" + if test "$GCC" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_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 ${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 >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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' + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $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 + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$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. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + 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*) + # 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + 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_name_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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-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 +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$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*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* 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 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* 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 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-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" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10096 "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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10196 "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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + + { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + + { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + + + + +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: + + +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 + + + + + + + +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +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 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + + 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. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking 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 + + +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 + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +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='devil' + VERSION='1.7.8' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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" + +# 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 -' + + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + +DEVIL_LTVERSION=2:0:1 + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +else + enable_debug="no" +fi + + +# Check whether --enable-release was given. +if test "${enable_release+set}" = set; then + enableval=$enable_release; +else + enable_release="yes" + test "x$enable_debug" = "xyes" && enable_release="no" +fi + + +# Check whether --enable-asm was given. +if test "${enable_asm+set}" = set; then + enableval=$enable_asm; +else + enable_asm="yes" + test "x$enable_debug" = "xyes" && enable_asm="no" +fi + + +if test "x$enable_release" = "xyes"; then + if test "x$CFLAGS" = "x"; then + CFLAGS="-O3" +fi + + if test "x$CXXFLAGS" = "x"; then + CXXFLAGS="-O3" +fi + +elif test "x$enable_debug" = "xyes"; then + CFLAGS="-DNOINLINE -Wall -g -O0" + CXXFLAGS="-DNOINLINE -Wall -g -O0" + +cat >>confdefs.h <<\_ACEOF +#define DEBUG +_ACEOF + +fi + + +SUPPORTED_FORMATS="" +SUPPORTED_API="" +SUPPORTED_EXTENSION="" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_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 && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +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 + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +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 + + +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 "x$CC" != xcc; then + { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } +fi +set dummy $CC; ac_cc=`echo $2 | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define NO_MINUS_C_MINUS_O 1 +_ACEOF + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +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_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + _lt_caught_CXX_error=yes +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 + +else + _lt_caught_CXX_error=yes +fi + + + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$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. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +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* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + 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_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + 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. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${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 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "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_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + if test "$GCC" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="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_CXX="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}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="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 + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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 + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=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. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | 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."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + prelink_cmds_CXX='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`"' + old_archive_cmds_CXX='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' + archive_cmds_CXX='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' + archive_expsym_cmds_CXX='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 + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "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 + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='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 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${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_CXX=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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + ld_shlibs_CXX=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. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "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 + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## 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... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +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. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +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 + postdeps_CXX='-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 + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-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_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + 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_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-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_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc* ) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:14493: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14497: \$? = $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_CXX=yes + fi + fi + $RM conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_static_works_CXX=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_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + 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:14592: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14596: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + 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:14644: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14648: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + 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 + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + 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*) + # 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_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_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + 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_name_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 +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = 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 + + + + + + + + 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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + + + +# Check whether --with-examples was given. +if test "${with_examples+set}" = set; then + withval=$with_examples; +else + with_examples="no" +fi + + if test "x$with_examples" = "xyes"; then + BUILD_EXAMPLES_TRUE= + BUILD_EXAMPLES_FALSE='#' +else + BUILD_EXAMPLES_TRUE='#' + BUILD_EXAMPLES_FALSE= +fi + + +enable_IL="yes" + if test "x$enable_IL" = "xyes"; then + BUILD_IL_TRUE= + BUILD_IL_FALSE='#' +else + BUILD_IL_TRUE='#' + BUILD_IL_FALSE= +fi + + +# Check whether --enable-ILU was given. +if test "${enable_ILU+set}" = set; then + enableval=$enable_ILU; +else + enable_ILU="no" +fi + + +# Check whether --enable-ILUT was given. +if test "${enable_ILUT+set}" = set; then + enableval=$enable_ILUT; +else + enable_ILUT="no" +fi + + if test "x$enable_ILU" = "xyes" -o "x$enable_ILUT" = "xyes"; then + BUILD_ILU_TRUE= + BUILD_ILU_FALSE='#' +else + BUILD_ILU_TRUE='#' + BUILD_ILU_FALSE= +fi + + if test "x$enable_ILUT" = "xyes"; then + BUILD_ILUT_TRUE= + BUILD_ILUT_FALSE='#' +else + BUILD_ILUT_TRUE='#' + BUILD_ILUT_FALSE= +fi + + +if test "x$enable_ILU" = "xyes" -o "x$enable_ILUT" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define ILU_ENABLED +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking restrict keyword" >&5 +echo $ECHO_N "checking restrict keyword... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +void foo(void * restrict test){} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define RESTRICT_KEYWORD +_ACEOF + + restrict_keyword="found" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test "x$restrict_keyword" = "xfound"; then + TMP_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline" + { echo "$as_me:$LINENO: checking restrict gnu99 keyword" >&5 +echo $ECHO_N "checking restrict gnu99 keyword... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +void foo(void * restrict test){} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define RESTRICT_KEYWORD 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + CFLAGS="$TMP_CFLAGS" + GENERAL_CFLAGS="$GENERAL_CFLAGS -std=gnu99 -fgnu89-inline" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + CFLAGS="$TMP_CFLAGS" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + + + +# Check whether --enable-altivec was given. +if test "${enable_altivec+set}" = set; then + enableval=$enable_altivec; use_Altivec=$enable_altivec + test "x$enable_altivec" = "xyes" && enable_asm="yes" +else + use_Altivec=test +fi + + { echo "$as_me:$LINENO: checking Altivec" >&5 +echo $ECHO_N "checking Altivec... $ECHO_C" >&6; } + if test "$use_Altivec" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ALTIVEC_GCC 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM 1 +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -faltivec -maltivec" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"Altivec " +elif test "$use_Altivec" = "test" -a "x$enable_asm" = "xyes"; then + CFLAGS_TMP=$CFLAGS + CFLAGS="$CFLAGS -faltivec -maltivec" + cat >conftest.$ac_ext <<_ACEOF + + int main() + {vector int vec;vec=vec_splat_u32(0);;return 0;} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define ALTIVEC_GCC +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -faltivec -maltivec" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"Altivec " +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$CFLAGS_TMP" +else + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } +fi + + +# Check whether --enable-sse was given. +if test "${enable_sse+set}" = set; then + enableval=$enable_sse; use_SSE=$enable_sse + test "x$enable_sse" = "xyes" && enable_asm="yes" +else + use_SSE=test +fi + + { echo "$as_me:$LINENO: checking SSE" >&5 +echo $ECHO_N "checking SSE... $ECHO_C" >&6; } + if test "$use_SSE" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define SSE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM 1 +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE " +elif test "$use_SSE" = "test" -a "x$enable_asm" = "xyes"; then + CFLAGS_TMP=$CFLAGS + CFLAGS="$CFLAGS -msse" + cat >conftest.$ac_ext <<_ACEOF +#include + int main() + {__m128 v;v=_mm_sub_ss(v,v);;return 0;} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define SSE +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE " +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$CFLAGS_TMP" +else + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } +fi + + +# Check whether --enable-sse2 was given. +if test "${enable_sse2+set}" = set; then + enableval=$enable_sse2; use_SSE2=$enable_sse2 + test "x$enable_sse2" = "xyes" && enable_asm="yes" +else + use_SSE2=test +fi + + { echo "$as_me:$LINENO: checking SSE2" >&5 +echo $ECHO_N "checking SSE2... $ECHO_C" >&6; } + if test "$use_SSE2" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define SSE2 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM 1 +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse2" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE2 " +elif test "$use_SSE2" = "test" -a "x$enable_asm" = "xyes"; then + CFLAGS_TMP=$CFLAGS + CFLAGS="$CFLAGS -msse2" + cat >conftest.$ac_ext <<_ACEOF +#include + int main() + {__m128i v;v=_mm_add_epi32(v,v);;return 0;} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define SSE2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse2" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE2 " +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$CFLAGS_TMP" +else + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } +fi + + +# Check whether --enable-sse3 was given. +if test "${enable_sse3+set}" = set; then + enableval=$enable_sse3; use_SSE3=$enable_sse3 + test "x$enable_sse3" = "xyes" && enable_asm="yes" +else + use_SSE3=test +fi + + { echo "$as_me:$LINENO: checking SSE3" >&5 +echo $ECHO_N "checking SSE3... $ECHO_C" >&6; } + if test "$use_SSE3" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define SSE3 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM 1 +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse3" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE3 " +elif test "$use_SSE3" = "test" -a "x$enable_asm" = "xyes"; then + CFLAGS_TMP=$CFLAGS + CFLAGS="$CFLAGS -msse3" + cat >conftest.$ac_ext <<_ACEOF +#include + int main() + {__m128d v;v=_mm_addsub_pd(v,v);;return 0;} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define SSE3 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define VECTORMEM +_ACEOF + + GENERAL_CFLAGS="$GENERAL_CFLAGS -msse3" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"SSE3 " +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$CFLAGS_TMP" +else + { echo "$as_me:$LINENO: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6; } +fi + + +if test "x$enable_asm" = "xyes"; then + # Check whether --enable-x86 was given. +if test "${enable_x86+set}" = set; then + enableval=$enable_x86; use_x86=$enable_x86 +else + use_x86=test +fi + + { echo "$as_me:$LINENO: checking x86" >&5 +echo $ECHO_N "checking x86... $ECHO_C" >&6; } + if test "$use_x86" = "yes"; then + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"X86_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_X86_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +elif test "$use_x86" = "no"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + case $host_cpu in + i[3456]86*) SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"X86_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_X86_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ;; + *) { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; +esac + +fi + + # Check whether --enable-x86_64 was given. +if test "${enable_x86_64+set}" = set; then + enableval=$enable_x86_64; use_x86_64=$enable_x86_64 +else + use_x86_64=test +fi + + { echo "$as_me:$LINENO: checking x86_64" >&5 +echo $ECHO_N "checking x86_64... $ECHO_C" >&6; } + if test "$use_x86_64" = "yes"; then + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"X86_64_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_X86_64_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +elif test "$use_x86_64" = "no"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + case $host_cpu in + x86_64*) SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"X86_64_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_X86_64_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ;; + *) { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; +esac + +fi + + # Check whether --enable-ppc was given. +if test "${enable_ppc+set}" = set; then + enableval=$enable_ppc; use_ppc=$enable_ppc +else + use_ppc=test +fi + + { echo "$as_me:$LINENO: checking ppc" >&5 +echo $ECHO_N "checking ppc... $ECHO_C" >&6; } + if test "$use_ppc" = "yes"; then + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"PPC_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_PCC_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +elif test "$use_ppc" = "no"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + case $host_cpu in + powerpc*) SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"PPC_ASM " + +cat >>confdefs.h <<\_ACEOF +#define GCC_PCC_ASM +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ;; + *) { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; +esac + +fi + + if test -n "$SUPPORTED_EXTENSION"; then + +cat >>confdefs.h <<\_ACEOF +#define IL_INLINE_ASM 1 +_ACEOF + +fi + +fi + + +# Check whether --enable-warning was given. +if test "${enable_warning+set}" = set; then + enableval=$enable_warning; build_warning="$enable_warning" +else + build_warning="no" +fi + + +if test "$build_warning" = "yes"; then + GENERAL_CFLAGS="$GENERAL_CFLAGS -Wall -Werror" +fi + + +{ echo "$as_me:$LINENO: checking for valloc" >&5 +echo $ECHO_N "checking for valloc... $ECHO_C" >&6; } +if test "${ac_cv_func_valloc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define valloc to an innocuous variant, in case declares valloc. + For example, HP-UX 11i declares gettimeofday. */ +#define valloc innocuous_valloc + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char valloc (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef valloc + +/* 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 valloc (); +/* 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_valloc || defined __stub___valloc +choke me +#endif + +int +main () +{ +return valloc (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_valloc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_valloc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_valloc" >&5 +echo "${ECHO_T}$ac_cv_func_valloc" >&6; } +if test $ac_cv_func_valloc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define VALLOC 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for posix_memalign" >&5 +echo $ECHO_N "checking for posix_memalign... $ECHO_C" >&6; } +if test "${ac_cv_func_posix_memalign+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define posix_memalign to an innocuous variant, in case declares posix_memalign. + For example, HP-UX 11i declares gettimeofday. */ +#define posix_memalign innocuous_posix_memalign + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char posix_memalign (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef posix_memalign + +/* 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 posix_memalign (); +/* 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_posix_memalign || defined __stub___posix_memalign +choke me +#endif + +int +main () +{ +return posix_memalign (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_posix_memalign=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_posix_memalign=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_posix_memalign" >&5 +echo "${ECHO_T}$ac_cv_func_posix_memalign" >&6; } +if test $ac_cv_func_posix_memalign = yes; then + +cat >>confdefs.h <<\_ACEOF +#define POSIX_MEMALIGN 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking for memalign" >&5 +echo $ECHO_N "checking for memalign... $ECHO_C" >&6; } +if test "${ac_cv_func_memalign+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define memalign to an innocuous variant, in case declares memalign. + For example, HP-UX 11i declares gettimeofday. */ +#define memalign innocuous_memalign + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char memalign (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef memalign + +/* 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 memalign (); +/* 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_memalign || defined __stub___memalign +choke me +#endif + +int +main () +{ +return memalign (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_memalign=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_memalign=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_memalign" >&5 +echo "${ECHO_T}$ac_cv_func_memalign" >&6; } +if test $ac_cv_func_memalign = yes; then + +cat >>confdefs.h <<\_ACEOF +#define MEMALIGN 1 +_ACEOF + +fi + + +if test "${ac_cv_header_mm_malloc_h+set}" = set; then + { echo "$as_me:$LINENO: checking for mm_malloc.h" >&5 +echo $ECHO_N "checking for mm_malloc.h... $ECHO_C" >&6; } +if test "${ac_cv_header_mm_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_mm_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_mm_malloc_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking mm_malloc.h usability" >&5 +echo $ECHO_N "checking mm_malloc.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking mm_malloc.h presence" >&5 +echo $ECHO_N "checking mm_malloc.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mm_malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mm_malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mm_malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mm_malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mm_malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mm_malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mm_malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mm_malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mm_malloc.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for mm_malloc.h" >&5 +echo $ECHO_N "checking for mm_malloc.h... $ECHO_C" >&6; } +if test "${ac_cv_header_mm_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_mm_malloc_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_mm_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_mm_malloc_h" >&6; } + +fi +if test $ac_cv_header_mm_malloc_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define MM_MALLOC 1 +_ACEOF + +fi + + + + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then + withval=$with_zlib; +else + enable_zlib="yes" +fi + + +if test "x$enable_zlib" = "xyes"; then + if test "${ac_cv_header_zlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } + +fi +if test $ac_cv_header_zlib_h = yes; then + use_z="yes" +else + use_z="no" +fi + + + if test "$enable_zlib" = "yes"; then + +{ echo "$as_me:$LINENO: checking for main in -lz" >&5 +echo $ECHO_N "checking for main in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5 +echo "${ECHO_T}$ac_cv_lib_z_main" >&6; } +if test $ac_cv_lib_z_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +fi + +fi + + + +{ echo "$as_me:$LINENO: checking for main in -lm" >&5 +echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } +if test $ac_cv_lib_m_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +# Check whether --enable-game-formats was given. +if test "${enable_game_formats+set}" = set; then + enableval=$enable_game_formats; +else + enable_game_formats="yes" +fi + +if test "x$enable_game_formats" = "xno"; then + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_GAMES +_ACEOF + +fi + + +# Check whether --enable-blp was given. +if test "${enable_blp+set}" = set; then + enableval=$enable_blp; +else + enable_blp="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for blp format" >&5 +echo $ECHO_N "checking whether we would like to have support for blp format... $ECHO_C" >&6; } + if test "x$enable_blp" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_BLP +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS BLP" +fi + + lib_test_result="" +# Check whether --enable-bmp was given. +if test "${enable_bmp+set}" = set; then + enableval=$enable_bmp; +else + enable_bmp="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for bmp format" >&5 +echo $ECHO_N "checking whether we would like to have support for bmp format... $ECHO_C" >&6; } + if test "x$enable_bmp" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_BMP +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS BMP" +fi + + lib_test_result="" +# Check whether --enable-dcx was given. +if test "${enable_dcx+set}" = set; then + enableval=$enable_dcx; +else + enable_dcx="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for dcx format" >&5 +echo $ECHO_N "checking whether we would like to have support for dcx format... $ECHO_C" >&6; } + if test "x$enable_dcx" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_DCX +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS DCX" +fi + + lib_test_result="" +# Check whether --enable-dds was given. +if test "${enable_dds+set}" = set; then + enableval=$enable_dds; +else + enable_dds="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for dds format" >&5 +echo $ECHO_N "checking whether we would like to have support for dds format... $ECHO_C" >&6; } + if test "x$enable_dds" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_DDS +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS DDS" +fi + + lib_test_result="" +# Check whether --enable-dicom was given. +if test "${enable_dicom+set}" = set; then + enableval=$enable_dicom; +else + enable_dicom="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for dicom format" >&5 +echo $ECHO_N "checking whether we would like to have support for dicom format... $ECHO_C" >&6; } + if test "x$enable_dicom" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_DICOM +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS DICOM" +fi + + lib_test_result="" +# Check whether --enable-doom was given. +if test "${enable_doom+set}" = set; then + enableval=$enable_doom; +else + enable_doom="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for doom format" >&5 +echo $ECHO_N "checking whether we would like to have support for doom format... $ECHO_C" >&6; } + if test "x$enable_doom" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_WAD +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS WAD" +fi + + lib_test_result="" + + +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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { 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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$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 + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi +# Check whether --enable-exr was given. +if test "${enable_exr+set}" = set; then + enableval=$enable_exr; +else + enable_exr="yes" +fi + + if test 4 -eq 4 -a "x$enable_exr" = "xyes"; then + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for OPENEXR" >&5 +echo $ECHO_N "checking for OPENEXR... $ECHO_C" >&6; } + +if test -n "$OPENEXR_CFLAGS"; then + pkg_cv_OPENEXR_CFLAGS="$OPENEXR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"OpenEXR\"") >&5 + ($PKG_CONFIG --exists --print-errors "OpenEXR") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_OPENEXR_CFLAGS=`$PKG_CONFIG --cflags "OpenEXR" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$OPENEXR_LIBS"; then + pkg_cv_OPENEXR_LIBS="$OPENEXR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"OpenEXR\"") >&5 + ($PKG_CONFIG --exists --print-errors "OpenEXR") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_OPENEXR_LIBS=`$PKG_CONFIG --libs "OpenEXR" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +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 + OPENEXR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "OpenEXR" 2>&1` + else + OPENEXR_PKG_ERRORS=`$PKG_CONFIG --print-errors "OpenEXR" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$OPENEXR_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + have_openexr="no" +elif test $pkg_failed = untried; then + have_openexr="no" +else + OPENEXR_CFLAGS=$pkg_cv_OPENEXR_CFLAGS + OPENEXR_LIBS=$pkg_cv_OPENEXR_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + have_openexr="yes" +fi + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} OpenEXR" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} OpenEXR" +fi + + IL_LIBS="$OPENEXR_LIBS $IL_LIBS" + IL_CFLAGS="$OPENEXR_CFLAGS $IL_CFLAGS" + lib_test_result="$have_openexr" +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for exr format" >&5 +echo $ECHO_N "checking whether we would like to have support for exr format... $ECHO_C" >&6; } + if test "x$enable_exr" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_EXR +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS EXR" +fi + + lib_test_result="" +# Check whether --enable-fits was given. +if test "${enable_fits+set}" = set; then + enableval=$enable_fits; +else + enable_fits="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for fits format" >&5 +echo $ECHO_N "checking whether we would like to have support for fits format... $ECHO_C" >&6; } + if test "x$enable_fits" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_FITS +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS FITS" +fi + + lib_test_result="" +# Check whether --enable-gif was given. +if test "${enable_gif+set}" = set; then + enableval=$enable_gif; +else + enable_gif="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for gif format" >&5 +echo $ECHO_N "checking whether we would like to have support for gif format... $ECHO_C" >&6; } + if test "x$enable_gif" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_GIF +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS GIF" +fi + + lib_test_result="" +# Check whether --enable-hdr was given. +if test "${enable_hdr+set}" = set; then + enableval=$enable_hdr; +else + enable_hdr="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for hdr format" >&5 +echo $ECHO_N "checking whether we would like to have support for hdr format... $ECHO_C" >&6; } + if test "x$enable_hdr" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_HDR +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS HDR" +fi + + lib_test_result="" +# Check whether --enable-icns was given. +if test "${enable_icns+set}" = set; then + enableval=$enable_icns; +else + enable_icns="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for icns format" >&5 +echo $ECHO_N "checking whether we would like to have support for icns format... $ECHO_C" >&6; } + if test "x$enable_icns" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_ICNS +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS ICNS" +fi + + lib_test_result="" +# Check whether --enable-icon was given. +if test "${enable_icon+set}" = set; then + enableval=$enable_icon; +else + enable_icon="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for icon format" >&5 +echo $ECHO_N "checking whether we would like to have support for icon format... $ECHO_C" >&6; } + if test "x$enable_icon" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_ICON +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS ICON" +fi + + lib_test_result="" +# Check whether --enable-iff was given. +if test "${enable_iff+set}" = set; then + enableval=$enable_iff; +else + enable_iff="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for iff format" >&5 +echo $ECHO_N "checking whether we would like to have support for iff format... $ECHO_C" >&6; } + if test "x$enable_iff" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_IFF +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS IFF" +fi + + lib_test_result="" +# Check whether --enable-ilbm was given. +if test "${enable_ilbm+set}" = set; then + enableval=$enable_ilbm; +else + enable_ilbm="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for ilbm format" >&5 +echo $ECHO_N "checking whether we would like to have support for ilbm format... $ECHO_C" >&6; } + if test "x$enable_ilbm" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_ILBM +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS ILBM" +fi + + lib_test_result="" +# Check whether --enable-iwi was given. +if test "${enable_iwi+set}" = set; then + enableval=$enable_iwi; +else + enable_iwi="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for iwi format" >&5 +echo $ECHO_N "checking whether we would like to have support for iwi format... $ECHO_C" >&6; } + if test "x$enable_iwi" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_IWI +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS IWI" +fi + + lib_test_result="" +# Check whether --enable-jpeg was given. +if test "${enable_jpeg+set}" = set; then + enableval=$enable_jpeg; +else + enable_jpeg="yes" +fi + + if test 4 -eq 4 -a "x$enable_jpeg" = "xyes"; then + if test "${ac_cv_header_jpeglib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jpeglib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; } + +fi +if test $ac_cv_header_jpeglib_h = yes; then + { echo "$as_me:$LINENO: checking for main in -ljpeg" >&5 +echo $ECHO_N "checking for main in -ljpeg... $ECHO_C" >&6; } +if test "${ac_cv_lib_jpeg_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_jpeg_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jpeg_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_main" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_main" >&6; } +if test $ac_cv_lib_jpeg_main = yes; then + IL_LIBS="-ljpeg $IL_LIBS" + have_jpeg="yes" +else + have_jpeg="no" +fi + +else + have_jpeg="no" +fi + + + +cat >>confdefs.h <<\_ACEOF +#define IL_USE_JPEGLIB_UNMODIFIED 1 +_ACEOF + + lib_test_result="$have_jpeg" + if test "x$lib_test_result" = "xyes"; then + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libjpeg" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libjpeg" +fi + +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for jpeg format" >&5 +echo $ECHO_N "checking whether we would like to have support for jpeg format... $ECHO_C" >&6; } + if test "x$enable_jpeg" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_JPG +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS JPG" +fi + + lib_test_result="" +# Check whether --enable-jp2 was given. +if test "${enable_jp2+set}" = set; then + enableval=$enable_jp2; +else + enable_jp2="yes" +fi + + if test 4 -eq 4 -a "x$enable_jp2" = "xyes"; then + if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + { echo "$as_me:$LINENO: checking for jasper/jasper.h" >&5 +echo $ECHO_N "checking for jasper/jasper.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jasper_jasper_h" >&5 +echo "${ECHO_T}$ac_cv_header_jasper_jasper_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking jasper/jasper.h usability" >&5 +echo $ECHO_N "checking jasper/jasper.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking jasper/jasper.h presence" >&5 +echo $ECHO_N "checking jasper/jasper.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jasper/jasper.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jasper/jasper.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jasper/jasper.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jasper/jasper.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jasper/jasper.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jasper/jasper.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jasper/jasper.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jasper/jasper.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for jasper/jasper.h" >&5 +echo $ECHO_N "checking for jasper/jasper.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jasper_jasper_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jasper_jasper_h" >&5 +echo "${ECHO_T}$ac_cv_header_jasper_jasper_h" >&6; } + +fi +if test $ac_cv_header_jasper_jasper_h = yes; then + { echo "$as_me:$LINENO: checking for main in -ljasper" >&5 +echo $ECHO_N "checking for main in -ljasper... $ECHO_C" >&6; } +if test "${ac_cv_lib_jasper_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljasper $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_jasper_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jasper_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jasper_main" >&5 +echo "${ECHO_T}$ac_cv_lib_jasper_main" >&6; } +if test $ac_cv_lib_jasper_main = yes; then + IL_LIBS="-ljasper $IL_LIBS" + have_jasper="yes" +else + have_jasper="no" +fi + +else + have_jasper="no" +fi + + + if test "x$have_jasper" != "xyes"; then + if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + { echo "$as_me:$LINENO: checking for jasper/jasper.h" >&5 +echo $ECHO_N "checking for jasper/jasper.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jasper_jasper_h" >&5 +echo "${ECHO_T}$ac_cv_header_jasper_jasper_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking jasper/jasper.h usability" >&5 +echo $ECHO_N "checking jasper/jasper.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking jasper/jasper.h presence" >&5 +echo $ECHO_N "checking jasper/jasper.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jasper/jasper.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jasper/jasper.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jasper/jasper.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jasper/jasper.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jasper/jasper.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jasper/jasper.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jasper/jasper.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jasper/jasper.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jasper/jasper.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for jasper/jasper.h" >&5 +echo $ECHO_N "checking for jasper/jasper.h... $ECHO_C" >&6; } +if test "${ac_cv_header_jasper_jasper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jasper_jasper_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_jasper_jasper_h" >&5 +echo "${ECHO_T}$ac_cv_header_jasper_jasper_h" >&6; } + +fi +if test $ac_cv_header_jasper_jasper_h = yes; then + { echo "$as_me:$LINENO: checking for main in -ljp2" >&5 +echo $ECHO_N "checking for main in -ljp2... $ECHO_C" >&6; } +if test "${ac_cv_lib_jp2_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljp2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_jp2_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_jp2_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_jp2_main" >&5 +echo "${ECHO_T}$ac_cv_lib_jp2_main" >&6; } +if test $ac_cv_lib_jp2_main = yes; then + IL_LIBS="-ljp2 $IL_LIBS" + have_jp2="yes" +else + have_jp2="no" +fi + +else + have_jp2="no" +fi + + + lib_test_result="$have_jp2" +else + lib_test_result="yes" +fi + + if test "x$lib_test_result" = "xyes"; then + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} JasPer" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} JasPer" +fi + +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for jp2 format" >&5 +echo $ECHO_N "checking whether we would like to have support for jp2 format... $ECHO_C" >&6; } + if test "x$enable_jp2" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_JP2 +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS JP2" +fi + + lib_test_result="" +# Check whether --enable-lcms was given. +if test "${enable_lcms+set}" = set; then + enableval=$enable_lcms; +else + enable_lcms="yes" +fi + + if test 4 -eq 4 -a "x$enable_lcms" = "xyes"; then + { echo "$as_me:$LINENO: checking for main in -llcms" >&5 +echo $ECHO_N "checking for main in -llcms... $ECHO_C" >&6; } +if test "${ac_cv_lib_lcms_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-llcms $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lcms_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_lcms_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lcms_main" >&5 +echo "${ECHO_T}$ac_cv_lib_lcms_main" >&6; } +if test $ac_cv_lib_lcms_main = yes; then + have_lcms_lib="yes" + IL_LIBS="-llcms $IL_LIBS" +fi + +if test "${ac_cv_header_lcms_lcms_h+set}" = set; then + { echo "$as_me:$LINENO: checking for lcms/lcms.h" >&5 +echo $ECHO_N "checking for lcms/lcms.h... $ECHO_C" >&6; } +if test "${ac_cv_header_lcms_lcms_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_lcms_lcms_h" >&5 +echo "${ECHO_T}$ac_cv_header_lcms_lcms_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking lcms/lcms.h usability" >&5 +echo $ECHO_N "checking lcms/lcms.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking lcms/lcms.h presence" >&5 +echo $ECHO_N "checking lcms/lcms.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: lcms/lcms.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: lcms/lcms.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: lcms/lcms.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: lcms/lcms.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: lcms/lcms.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: lcms/lcms.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: lcms/lcms.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms/lcms.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: lcms/lcms.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for lcms/lcms.h" >&5 +echo $ECHO_N "checking for lcms/lcms.h... $ECHO_C" >&6; } +if test "${ac_cv_header_lcms_lcms_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_lcms_lcms_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_lcms_lcms_h" >&5 +echo "${ECHO_T}$ac_cv_header_lcms_lcms_h" >&6; } + +fi +if test $ac_cv_header_lcms_lcms_h = yes; then + have_lcms_h="yes" +fi + + +if test "${ac_cv_header_lcms_h+set}" = set; then + { echo "$as_me:$LINENO: checking for lcms.h" >&5 +echo $ECHO_N "checking for lcms.h... $ECHO_C" >&6; } +if test "${ac_cv_header_lcms_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_lcms_h" >&5 +echo "${ECHO_T}$ac_cv_header_lcms_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking lcms.h usability" >&5 +echo $ECHO_N "checking lcms.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking lcms.h presence" >&5 +echo $ECHO_N "checking lcms.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: lcms.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: lcms.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: lcms.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: lcms.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: lcms.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: lcms.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: lcms.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: lcms.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: lcms.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: lcms.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: lcms.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for lcms.h" >&5 +echo $ECHO_N "checking for lcms.h... $ECHO_C" >&6; } +if test "${ac_cv_header_lcms_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_lcms_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_lcms_h" >&5 +echo "${ECHO_T}$ac_cv_header_lcms_h" >&6; } + +fi +if test $ac_cv_header_lcms_h = yes; then + have_lcms_h="yes" + lcms_nodirinclude="yes" +fi + + +if test "x$lcms_nodirinclude" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define LCMS_NODIRINCLUDE 1 +_ACEOF + +fi + +if test "x$have_lcms_lib" = "xyes" -a "x$have_lcms_h" = "xyes"; then + have_lcms="yes" + IL_LIBS_REQUIRED="$IL_LIBS_REQUIRED lcms" + lib_test_result="yes" +else + lib_test_result="no" +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for lcms format" >&5 +echo $ECHO_N "checking whether we would like to have support for lcms format... $ECHO_C" >&6; } + if test "x$enable_lcms" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_LCMS +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS LCMS" +fi + + lib_test_result="" +# Check whether --enable-lif was given. +if test "${enable_lif+set}" = set; then + enableval=$enable_lif; +else + enable_lif="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for lif format" >&5 +echo $ECHO_N "checking whether we would like to have support for lif format... $ECHO_C" >&6; } + if test "x$enable_lif" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_LIF +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS LIF" +fi + + lib_test_result="" +# Check whether --enable-mdl was given. +if test "${enable_mdl+set}" = set; then + enableval=$enable_mdl; +else + enable_mdl="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for mdl format" >&5 +echo $ECHO_N "checking whether we would like to have support for mdl format... $ECHO_C" >&6; } + if test "x$enable_mdl" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_MDL +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS MDL" +fi + + lib_test_result="" +# Check whether --enable-mng was given. +if test "${enable_mng+set}" = set; then + enableval=$enable_mng; +else + enable_mng="yes" +fi + + if test 4 -eq 4 -a "x$enable_mng" = "xyes"; then + if test "${ac_cv_header_libmng_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libmng.h" >&5 +echo $ECHO_N "checking for libmng.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libmng_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libmng_h" >&5 +echo "${ECHO_T}$ac_cv_header_libmng_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libmng.h usability" >&5 +echo $ECHO_N "checking libmng.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libmng.h presence" >&5 +echo $ECHO_N "checking libmng.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libmng.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libmng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libmng.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libmng.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libmng.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libmng.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libmng.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libmng.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libmng.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libmng.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libmng.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for libmng.h" >&5 +echo $ECHO_N "checking for libmng.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libmng_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_libmng_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libmng_h" >&5 +echo "${ECHO_T}$ac_cv_header_libmng_h" >&6; } + +fi +if test $ac_cv_header_libmng_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lmng" >&5 +echo $ECHO_N "checking for main in -lmng... $ECHO_C" >&6; } +if test "${ac_cv_lib_mng_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmng $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_mng_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mng_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_mng_main" >&5 +echo "${ECHO_T}$ac_cv_lib_mng_main" >&6; } +if test $ac_cv_lib_mng_main = yes; then + IL_LIBS="-lmng $IL_LIBS" + have_mng="yes" +else + have_mng="no" +fi + +else + have_mng="no" +fi + + + lib_test_result="$have_mng" + if test "x$lib_test_result" = "xyes"; then + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libmng" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libmng" +fi + +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for mng format" >&5 +echo $ECHO_N "checking whether we would like to have support for mng format... $ECHO_C" >&6; } + if test "x$enable_mng" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_MNG +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS MNG" +fi + + lib_test_result="" +# Check whether --enable-mp3 was given. +if test "${enable_mp3+set}" = set; then + enableval=$enable_mp3; +else + enable_mp3="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for mp3 format" >&5 +echo $ECHO_N "checking whether we would like to have support for mp3 format... $ECHO_C" >&6; } + if test "x$enable_mp3" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_MP3 +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS MP3" +fi + + lib_test_result="" +# Check whether --enable-pcx was given. +if test "${enable_pcx+set}" = set; then + enableval=$enable_pcx; +else + enable_pcx="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pcx format" >&5 +echo $ECHO_N "checking whether we would like to have support for pcx format... $ECHO_C" >&6; } + if test "x$enable_pcx" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PCX +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PCX" +fi + + lib_test_result="" +# Check whether --enable-pcd was given. +if test "${enable_pcd+set}" = set; then + enableval=$enable_pcd; +else + enable_pcd="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pcd format" >&5 +echo $ECHO_N "checking whether we would like to have support for pcd format... $ECHO_C" >&6; } + if test "x$enable_pcd" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PCD +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PCD" +fi + + lib_test_result="" +# Check whether --enable-pic was given. +if test "${enable_pic+set}" = set; then + enableval=$enable_pic; +else + enable_pic="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pic format" >&5 +echo $ECHO_N "checking whether we would like to have support for pic format... $ECHO_C" >&6; } + if test "x$enable_pic" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PIC +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PIC" +fi + + lib_test_result="" +# Check whether --enable-pix was given. +if test "${enable_pix+set}" = set; then + enableval=$enable_pix; +else + enable_pix="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pix format" >&5 +echo $ECHO_N "checking whether we would like to have support for pix format... $ECHO_C" >&6; } + if test "x$enable_pix" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PIX +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PIX" +fi + + lib_test_result="" +# Check whether --enable-png was given. +if test "${enable_png+set}" = set; then + enableval=$enable_png; +else + enable_png="yes" +fi + + if test 4 -eq 4 -a "x$enable_png" = "xyes"; then + if test "${ac_cv_header_png_h+set}" = set; then + { echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking png.h usability" >&5 +echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking png.h presence" >&5 +echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_png_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } + +fi +if test $ac_cv_header_png_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lpng12" >&5 +echo $ECHO_N "checking for main in -lpng12... $ECHO_C" >&6; } +if test "${ac_cv_lib_png12_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng12 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_png12_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png12_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png12_main" >&5 +echo "${ECHO_T}$ac_cv_lib_png12_main" >&6; } +if test $ac_cv_lib_png12_main = yes; then + IL_LIBS="-lpng12 $IL_LIBS" + have_png12="yes" +else + have_png12="no" +fi + +else + have_png12="no" +fi + + + if test "x$have_png12" = "xno"; then + if test "${ac_cv_header_png_h+set}" = set; then + { echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking png.h usability" >&5 +echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking png.h presence" >&5 +echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6; } +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_png_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6; } + +fi +if test $ac_cv_header_png_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lpng" >&5 +echo $ECHO_N "checking for main in -lpng... $ECHO_C" >&6; } +if test "${ac_cv_lib_png_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_png_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5 +echo "${ECHO_T}$ac_cv_lib_png_main" >&6; } +if test $ac_cv_lib_png_main = yes; then + IL_LIBS="-lpng $IL_LIBS" + have_png="yes" +else + have_png="no" +fi + +else + have_png="no" +fi + + + lib_test_result="$have_png" +else + lib_test_result="$have_png12" +fi + + if test "x$lib_test_result" = "xyes"; then + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libpng" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libpng" +fi + +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for png format" >&5 +echo $ECHO_N "checking whether we would like to have support for png format... $ECHO_C" >&6; } + if test "x$enable_png" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PNG +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PNG" +fi + + lib_test_result="" +# Check whether --enable-pnm was given. +if test "${enable_pnm+set}" = set; then + enableval=$enable_pnm; +else + enable_pnm="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pnm format" >&5 +echo $ECHO_N "checking whether we would like to have support for pnm format... $ECHO_C" >&6; } + if test "x$enable_pnm" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PNM +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PNM" +fi + + lib_test_result="" +# Check whether --enable-psd was given. +if test "${enable_psd+set}" = set; then + enableval=$enable_psd; +else + enable_psd="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for psd format" >&5 +echo $ECHO_N "checking whether we would like to have support for psd format... $ECHO_C" >&6; } + if test "x$enable_psd" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PSD +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PSD" +fi + + lib_test_result="" +# Check whether --enable-psp was given. +if test "${enable_psp+set}" = set; then + enableval=$enable_psp; +else + enable_psp="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for psp format" >&5 +echo $ECHO_N "checking whether we would like to have support for psp format... $ECHO_C" >&6; } + if test "x$enable_psp" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PSP +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PSP" +fi + + lib_test_result="" +# Check whether --enable-pxr was given. +if test "${enable_pxr+set}" = set; then + enableval=$enable_pxr; +else + enable_pxr="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for pxr format" >&5 +echo $ECHO_N "checking whether we would like to have support for pxr format... $ECHO_C" >&6; } + if test "x$enable_pxr" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_PXR +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS PXR" +fi + + lib_test_result="" +# Check whether --enable-raw was given. +if test "${enable_raw+set}" = set; then + enableval=$enable_raw; +else + enable_raw="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for raw format" >&5 +echo $ECHO_N "checking whether we would like to have support for raw format... $ECHO_C" >&6; } + if test "x$enable_raw" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_RAW +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS RAW" +fi + + lib_test_result="" +# Check whether --enable-rot was given. +if test "${enable_rot+set}" = set; then + enableval=$enable_rot; +else + enable_rot="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for rot format" >&5 +echo $ECHO_N "checking whether we would like to have support for rot format... $ECHO_C" >&6; } + if test "x$enable_rot" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_ROT +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS ROT" +fi + + lib_test_result="" +# Check whether --enable-sgi was given. +if test "${enable_sgi+set}" = set; then + enableval=$enable_sgi; +else + enable_sgi="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for sgi format" >&5 +echo $ECHO_N "checking whether we would like to have support for sgi format... $ECHO_C" >&6; } + if test "x$enable_sgi" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_SGI +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS SGI" +fi + + lib_test_result="" +# Check whether --enable-sun was given. +if test "${enable_sun+set}" = set; then + enableval=$enable_sun; +else + enable_sun="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for sun format" >&5 +echo $ECHO_N "checking whether we would like to have support for sun format... $ECHO_C" >&6; } + if test "x$enable_sun" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_SUN +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS SUN" +fi + + lib_test_result="" +# Check whether --enable-texture was given. +if test "${enable_texture+set}" = set; then + enableval=$enable_texture; +else + enable_texture="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for texture format" >&5 +echo $ECHO_N "checking whether we would like to have support for texture format... $ECHO_C" >&6; } + if test "x$enable_texture" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_TEXTURE +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS TEXTURE" +fi + + lib_test_result="" +# Check whether --enable-tga was given. +if test "${enable_tga+set}" = set; then + enableval=$enable_tga; +else + enable_tga="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for tga format" >&5 +echo $ECHO_N "checking whether we would like to have support for tga format... $ECHO_C" >&6; } + if test "x$enable_tga" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_TGA +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS TGA" +fi + + lib_test_result="" +# Check whether --enable-tiff was given. +if test "${enable_tiff+set}" = set; then + enableval=$enable_tiff; +else + enable_tiff="yes" +fi + + if test 4 -eq 4 -a "x$enable_tiff" = "xyes"; then + if test "${ac_cv_header_tiffio_h+set}" = set; then + { echo "$as_me:$LINENO: checking for tiffio.h" >&5 +echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; } +if test "${ac_cv_header_tiffio_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 +echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5 +echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5 +echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for tiffio.h" >&5 +echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; } +if test "${ac_cv_header_tiffio_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_tiffio_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5 +echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; } + +fi +if test $ac_cv_header_tiffio_h = yes; then + { echo "$as_me:$LINENO: checking for main in -ltiff" >&5 +echo $ECHO_N "checking for main in -ltiff... $ECHO_C" >&6; } +if test "${ac_cv_lib_tiff_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltiff $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_tiff_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_tiff_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_main" >&5 +echo "${ECHO_T}$ac_cv_lib_tiff_main" >&6; } +if test $ac_cv_lib_tiff_main = yes; then + IL_LIBS="-ltiff $IL_LIBS" + have_tiff="yes" +else + have_tiff="no" +fi + +else + have_tiff="no" +fi + + + lib_test_result="$have_tiff" + if test "x$lib_test_result" = "xyes"; then + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libtiff" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libtiff" +fi + +fi + +fi + + { echo "$as_me:$LINENO: checking whether we would like to have support for tiff format" >&5 +echo $ECHO_N "checking whether we would like to have support for tiff format... $ECHO_C" >&6; } + if test "x$enable_tiff" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_TIF +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS TIF" +fi + + lib_test_result="" +# Check whether --enable-tpl was given. +if test "${enable_tpl+set}" = set; then + enableval=$enable_tpl; +else + enable_tpl="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for tpl format" >&5 +echo $ECHO_N "checking whether we would like to have support for tpl format... $ECHO_C" >&6; } + if test "x$enable_tpl" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_TPL +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS TPL" +fi + + lib_test_result="" +# Check whether --enable-utx was given. +if test "${enable_utx+set}" = set; then + enableval=$enable_utx; +else + enable_utx="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for utx format" >&5 +echo $ECHO_N "checking whether we would like to have support for utx format... $ECHO_C" >&6; } + if test "x$enable_utx" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_UTX +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS UTX" +fi + + lib_test_result="" +# Check whether --enable-vtf was given. +if test "${enable_vtf+set}" = set; then + enableval=$enable_vtf; +else + enable_vtf="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for vtf format" >&5 +echo $ECHO_N "checking whether we would like to have support for vtf format... $ECHO_C" >&6; } + if test "x$enable_vtf" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_VTF +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS VTF" +fi + + lib_test_result="" +# Check whether --enable-wal was given. +if test "${enable_wal+set}" = set; then + enableval=$enable_wal; +else + enable_wal="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for wal format" >&5 +echo $ECHO_N "checking whether we would like to have support for wal format... $ECHO_C" >&6; } + if test "x$enable_wal" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_WAL +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS WAL" +fi + + lib_test_result="" +# Check whether --enable-wbmp was given. +if test "${enable_wbmp+set}" = set; then + enableval=$enable_wbmp; +else + enable_wbmp="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for wbmp format" >&5 +echo $ECHO_N "checking whether we would like to have support for wbmp format... $ECHO_C" >&6; } + if test "x$enable_wbmp" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_WBMP +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS WBMP" +fi + + lib_test_result="" +# Check whether --enable-wdp was given. +if test "${enable_wdp+set}" = set; then + enableval=$enable_wdp; +else + enable_wdp="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for wdp format" >&5 +echo $ECHO_N "checking whether we would like to have support for wdp format... $ECHO_C" >&6; } + if test "x$enable_wdp" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_WDP +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS WDP" +fi + + lib_test_result="" +# Check whether --enable-xpm was given. +if test "${enable_xpm+set}" = set; then + enableval=$enable_xpm; +else + enable_xpm="yes" +fi + + + { echo "$as_me:$LINENO: checking whether we would like to have support for xpm format" >&5 +echo $ECHO_N "checking whether we would like to have support for xpm format... $ECHO_C" >&6; } + if test "x$enable_xpm" = "xno" -o "x$lib_test_result" = "xno"; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define IL_NO_XPM +_ACEOF + +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SUPPORTED_FORMATS="$SUPPORTED_FORMATS XPM" +fi + + lib_test_result="" + + +# Check whether --with-libsquish was given. +if test "${with_libsquish+set}" = set; then + withval=$with_libsquish; +else + with_libsquish="yes" +fi + +if test "x$with_libsquish" = "xyes"; then + if test "${ac_cv_header_squish_h+set}" = set; then + { echo "$as_me:$LINENO: checking for squish.h" >&5 +echo $ECHO_N "checking for squish.h... $ECHO_C" >&6; } +if test "${ac_cv_header_squish_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_squish_h" >&5 +echo "${ECHO_T}$ac_cv_header_squish_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking squish.h usability" >&5 +echo $ECHO_N "checking squish.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking squish.h presence" >&5 +echo $ECHO_N "checking squish.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: squish.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: squish.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: squish.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: squish.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: squish.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: squish.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: squish.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: squish.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: squish.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: squish.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: squish.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for squish.h" >&5 +echo $ECHO_N "checking for squish.h... $ECHO_C" >&6; } +if test "${ac_cv_header_squish_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_squish_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_squish_h" >&5 +echo "${ECHO_T}$ac_cv_header_squish_h" >&6; } + +fi +if test $ac_cv_header_squish_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lsquish" >&5 +echo $ECHO_N "checking for main in -lsquish... $ECHO_C" >&6; } +if test "${ac_cv_lib_squish_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsquish $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_squish_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_squish_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_squish_main" >&5 +echo "${ECHO_T}$ac_cv_lib_squish_main" >&6; } +if test $ac_cv_lib_squish_main = yes; then + IL_LIBS="-lsquish $IL_LIBS" + have_squish="yes" +else + have_squish="no" +fi + +else + have_squish="no" +fi + + + lib_test_result="$have_squish" + if test "x$lib_test_result" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define IL_USE_DXTC_SQUISH 1 +_ACEOF + + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libsquish" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libsquish" +fi + +fi + +fi + + + +# Check whether --with-nvtt was given. +if test "${with_nvtt+set}" = set; then + withval=$with_nvtt; +else + with_nvtt="yes" +fi + +if test "x$with_nvtt" = "xyes"; then + if test "${ac_cv_header_nvtt_nvtt_h+set}" = set; then + { echo "$as_me:$LINENO: checking for nvtt/nvtt.h" >&5 +echo $ECHO_N "checking for nvtt/nvtt.h... $ECHO_C" >&6; } +if test "${ac_cv_header_nvtt_nvtt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_nvtt_nvtt_h" >&5 +echo "${ECHO_T}$ac_cv_header_nvtt_nvtt_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking nvtt/nvtt.h usability" >&5 +echo $ECHO_N "checking nvtt/nvtt.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking nvtt/nvtt.h presence" >&5 +echo $ECHO_N "checking nvtt/nvtt.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: nvtt/nvtt.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: nvtt/nvtt.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for nvtt/nvtt.h" >&5 +echo $ECHO_N "checking for nvtt/nvtt.h... $ECHO_C" >&6; } +if test "${ac_cv_header_nvtt_nvtt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_nvtt_nvtt_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_nvtt_nvtt_h" >&5 +echo "${ECHO_T}$ac_cv_header_nvtt_nvtt_h" >&6; } + +fi +if test $ac_cv_header_nvtt_nvtt_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lnvtt" >&5 +echo $ECHO_N "checking for main in -lnvtt... $ECHO_C" >&6; } +if test "${ac_cv_lib_nvtt_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnvtt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nvtt_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nvtt_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nvtt_main" >&5 +echo "${ECHO_T}$ac_cv_lib_nvtt_main" >&6; } +if test $ac_cv_lib_nvtt_main = yes; then + IL_LIBS="-lnvtt $IL_LIBS" + have_nvtt="yes" +else + have_nvtt="no" +fi + +else + have_nvtt="no" +fi + + + lib_test_result="$have_nvtt" + if test "x$lib_test_result" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define IL_USE_DXTC_NVIDIA 1 +_ACEOF + + if test "x$enable_modules" = "xyes"; then + IL_LIBS_OPTIONAL="${IL_LIBS_OPTIONAL} libnvtt-nvidia_texture_tools" +else + IL_LIBS_REQUIRED="${IL_LIBS_REQUIRED} libnvtt-nvidia_texture_tools" +fi + +fi + +fi + + +{ echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 +echo "$as_me: error: Cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi + +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&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 + +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + acx_pthread_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 +echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } + ;; + + -*) + { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 +echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_acx_pthread_config+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$acx_pthread_config"; then + ac_cv_prog_acx_pthread_config="$acx_pthread_config" # 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_acx_pthread_config="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" +fi +fi +acx_pthread_config=$ac_cv_prog_acx_pthread_config +if test -n "$acx_pthread_config"; then + { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 +echo "${ECHO_T}$acx_pthread_config" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 +echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + acx_pthread_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 +echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int attr=$attr; return attr; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + attr_name=$attr; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + { echo "$as_me:$LINENO: result: $attr_name" >&5 +echo "${ECHO_T}$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 +echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + { echo "$as_me:$LINENO: result: ${flag}" >&5 +echo "${ECHO_T}${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + for ac_prog in xlc_r cc_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_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_PTHREAD_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 +echo "${ECHO_T}$PTHREAD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" + + else + PTHREAD_CC=$CC + fi +else + PTHREAD_CC="$CC" +fi + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD 1 +_ACEOF + + : +else + acx_pthread_ok=no + +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 + + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + ac_xsave_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + X_LIBS="$X_LIBS -R$x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + X_LIBS="$X_LIBS -R $x_libraries" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_c_werror_flag=$ac_xsave_c_werror_flag + LIBS=$ac_xsave_LIBS + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 XOpenDisplay (); +int +main () +{ +return XOpenDisplay (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* 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 gethostbyname (); +/* 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_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the name server (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* 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 connect (); +/* 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_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + { echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6; } +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* 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 remove (); +/* 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_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6; } + + if test $ac_cv_func_remove = no; then + { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat + +/* 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 shmat (); +/* 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_shmat || defined __stub___shmat +choke me +#endif + +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6; } + + if test $ac_cv_func_shmat = no; then + { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 shmat (); +int +main () +{ +return shmat (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any 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 IceConnectionNumber (); +int +main () +{ +return IceConnectionNumber (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + +if test "x$enable_ILUT" = "xyes"; then + # Check whether --enable-allegro was given. +if test "${enable_allegro+set}" = set; then + enableval=$enable_allegro; +else + enable_allegro="yes" +fi + +if test "x$enable_allegro" = "xyes"; then + if test "${ac_cv_header_allegro_h+set}" = set; then + { echo "$as_me:$LINENO: checking for allegro.h" >&5 +echo $ECHO_N "checking for allegro.h... $ECHO_C" >&6; } +if test "${ac_cv_header_allegro_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_allegro_h" >&5 +echo "${ECHO_T}$ac_cv_header_allegro_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking allegro.h usability" >&5 +echo $ECHO_N "checking allegro.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking allegro.h presence" >&5 +echo $ECHO_N "checking allegro.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: allegro.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: allegro.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: allegro.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: allegro.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: allegro.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: allegro.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: allegro.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: allegro.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: allegro.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: allegro.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: allegro.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for allegro.h" >&5 +echo $ECHO_N "checking for allegro.h... $ECHO_C" >&6; } +if test "${ac_cv_header_allegro_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_allegro_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_allegro_h" >&5 +echo "${ECHO_T}$ac_cv_header_allegro_h" >&6; } + +fi +if test $ac_cv_header_allegro_h = yes; then + { echo "$as_me:$LINENO: checking for main in -lalleg" >&5 +echo $ECHO_N "checking for main in -lalleg... $ECHO_C" >&6; } +if test "${ac_cv_lib_alleg_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lalleg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_alleg_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_alleg_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_alleg_main" >&5 +echo "${ECHO_T}$ac_cv_lib_alleg_main" >&6; } +if test $ac_cv_lib_alleg_main = yes; then + use_allegro="yes" + ILUT_LIBS="-lalleg $ILUT_LIBS" +fi + + { echo "$as_me:$LINENO: checking for main in -lallegro_unsharable" >&5 +echo $ECHO_N "checking for main in -lallegro_unsharable... $ECHO_C" >&6; } +if test "${ac_cv_lib_allegro_unsharable_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lallegro_unsharable $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_allegro_unsharable_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_allegro_unsharable_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_allegro_unsharable_main" >&5 +echo "${ECHO_T}$ac_cv_lib_allegro_unsharable_main" >&6; } +if test $ac_cv_lib_allegro_unsharable_main = yes; then + ILUT_LIBS="-lalleg_unsharable $ILUT_LIBS" +fi + + { echo "$as_me:$LINENO: checking for main in -lalleg42" >&5 +echo $ECHO_N "checking for main in -lalleg42... $ECHO_C" >&6; } +if test "${ac_cv_lib_alleg42_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lalleg42 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_alleg42_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_alleg42_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_alleg42_main" >&5 +echo "${ECHO_T}$ac_cv_lib_alleg42_main" >&6; } +if test $ac_cv_lib_alleg42_main = yes; then + use_allegro="yes" + ILUT_LIBS="-lalleg42 $ILUT_LIBS" +fi + +fi + + +if test "x$use_allegro" != "xyes"; then + + +# Check whether --with-allegro-prefix was given. +if test "${with_allegro_prefix+set}" = set; then + withval=$with_allegro_prefix; ALLEGRO_CONFIG_prefix="$withval" +else + ALLEGRO_CONFIG_prefix="" +fi + + +# Check whether --with-allegro-exec-prefix was given. +if test "${with_allegro_exec_prefix+set}" = set; then + withval=$with_allegro_exec_prefix; ALLEGRO_CONFIG_exec_prefix="$withval" +else + ALLEGRO_CONFIG_exec_prefix="" +fi + +# Check whether --enable-allegrotest was given. +if test "${enable_allegrotest+set}" = set; then + enableval=$enable_allegrotest; +else + enable_allegrotest=yes +fi + + + if test x$ALLEGRO_CONFIG_exec_prefix != x ; then + ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --exec-prefix=$ALLEGRO_CONFIG_exec_prefix" + if test x${ALLEGRO_CONFIG+set} != xset ; then + ALLEGRO_CONFIG=$ALLEGRO_CONFIG_exec_prefix/bin/allegro-config + fi + fi + if test x$ALLEGRO_CONFIG_prefix != x ; then + ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --prefix=$ALLEGRO_CONFIG_prefix" + if test x${ALLEGRO_CONFIG+set} != xset ; then + ALLEGRO_CONFIG=$ALLEGRO_CONFIG_prefix/bin/allegro-config + fi + fi + + # Extract the first word of "allegro-config", so it can be a program name with args. +set dummy allegro-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ALLEGRO_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ALLEGRO_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ALLEGRO_CONFIG="$ALLEGRO_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_ALLEGRO_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ALLEGRO_CONFIG" && ac_cv_path_ALLEGRO_CONFIG="no" + ;; +esac +fi +ALLEGRO_CONFIG=$ac_cv_path_ALLEGRO_CONFIG +if test -n "$ALLEGRO_CONFIG"; then + { echo "$as_me:$LINENO: result: $ALLEGRO_CONFIG" >&5 +echo "${ECHO_T}$ALLEGRO_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + min_allegro_version=4.2.0 + { echo "$as_me:$LINENO: checking for Allegro - version >= $min_allegro_version" >&5 +echo $ECHO_N "checking for Allegro - version >= $min_allegro_version... $ECHO_C" >&6; } + no_allegro="" + if test "$ALLEGRO_CONFIG" = "no" ; then + no_allegro=yes + else + allegro_CFLAGS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --cflags` + allegro_LIBS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --libs` + ALLEGRO_CONFIG_major_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + ALLEGRO_CONFIG_minor_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + ALLEGRO_CONFIG_micro_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_allegrotest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $allegro_CFLAGS" + LIBS="$allegro_LIBS $LIBS" + rm -f conf.allegrotest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include + +int +main() +{ + int allegro_major_version, allegro_minor_version, allegro_micro_version; + int major, minor, micro; + char *tmp_version; + int tmp_int_version; + + system("touch conf.allegrotest"); + + /* Capture allegro-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_allegro_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from allegro-config\n", "$min_allegro_version"); + free(tmp_version); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + allegro_major_version = ALLEGRO_VERSION; + allegro_minor_version = ALLEGRO_SUB_VERSION; + allegro_micro_version = ALLEGRO_WIP_VERSION; + + /* Compare allegro-config output to the Allegro headers */ + if ((allegro_major_version != $ALLEGRO_CONFIG_major_version) || + (allegro_minor_version != $ALLEGRO_CONFIG_minor_version)) + + { + printf("*** Allegro header files (version %d.%d.%d) do not match\n", + allegro_major_version, allegro_minor_version, allegro_micro_version); + printf("*** allegro-config (version %d.%d.%d)\n", + $ALLEGRO_CONFIG_major_version, $ALLEGRO_CONFIG_minor_version, $ALLEGRO_CONFIG_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + /* TODO: + * This doesnt work! + */ + /* ALLEGRO_TEST_VERSION; */ + + /* Test that the library is greater than our minimum version */ + if (($ALLEGRO_CONFIG_major_version > major) || + (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version > minor)) || + (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version == minor) && + ($ALLEGRO_CONFIG_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of Allegro (%d.%d.%d) was found.\n", + allegro_major_version, allegro_minor_version, allegro_micro_version); + printf("*** You need a version of Allegro newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** Allegro is always available from http://alleg.sf.net.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the allegro-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of Allegro, but you can also set the ALLEGRO_CONFIG environment to point to the\n"); + printf("*** correct copy of allegro-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} END_OF_MAIN() + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_allegro=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_allegro" = x ; then + { echo "$as_me:$LINENO: result: yes (version $ALLEGRO_CONFIG_major_version.$ALLEGRO_CONFIG_minor_version.$ALLEGRO_CONFIG_micro_version)" >&5 +echo "${ECHO_T}yes (version $ALLEGRO_CONFIG_major_version.$ALLEGRO_CONFIG_minor_version.$ALLEGRO_CONFIG_micro_version)" >&6; } + use_allegro="yes" + ILUT_LIBS="$allegro_LIBS $ILUT_LIBS" + ILUT_CFLAGS="$allegro_CFLAGS $ILUT_CFLAGS" + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + if test "$ALLEGRO_CONFIG" = "no" ; then + echo "*** The allegro-config script installed by Allegro could not be found" + echo "*** If Allegro was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ALLEGRO_CONFIG environment variable to the" + echo "*** full path to allegro-config." + else + if test -f conf.allegrotest ; then + : + else + echo "*** Could not run Allegro test program, checking why..." + CFLAGS="$CFLAGS $allegro_CFLAGS" + LIBS="$LIBS $allegro_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + ALLEGRO_TEST_VERSION; return 0; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding Allegro or finding the wrong" + echo "*** version of Allegro. If it is not finding Allegro, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means Allegro was incorrectly installed" + echo "*** or that you have moved Allegro since it was installed. In the latter case, you" + echo "*** may want to edit the allegro-config script: $ALLEGRO_CONFIG" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + allegro_CFLAGS="" + allegro_LIBS="" + use_allegro="no" + fi + + + rm -f conf.allegrotest + +fi + +fi + +if test "x$use_allegro" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_ALLEGRO +_ACEOF + + SUPPORTED_API="$SUPPORTED_API Allegro" +fi + + # Check whether --enable-directx8 was given. +if test "${enable_directx8+set}" = set; then + enableval=$enable_directx8; +else + enable_directx8="yes" +fi + +if test "x$enable_directx8" = "xyes"; then + if test "${ac_cv_header_d3d8_h+set}" = set; then + { echo "$as_me:$LINENO: checking for d3d8.h" >&5 +echo $ECHO_N "checking for d3d8.h... $ECHO_C" >&6; } +if test "${ac_cv_header_d3d8_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_d3d8_h" >&5 +echo "${ECHO_T}$ac_cv_header_d3d8_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking d3d8.h usability" >&5 +echo $ECHO_N "checking d3d8.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking d3d8.h presence" >&5 +echo $ECHO_N "checking d3d8.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: d3d8.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: d3d8.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: d3d8.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: d3d8.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: d3d8.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: d3d8.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: d3d8.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: d3d8.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: d3d8.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d8.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: d3d8.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for d3d8.h" >&5 +echo $ECHO_N "checking for d3d8.h... $ECHO_C" >&6; } +if test "${ac_cv_header_d3d8_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_d3d8_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_d3d8_h" >&5 +echo "${ECHO_T}$ac_cv_header_d3d8_h" >&6; } + +fi +if test $ac_cv_header_d3d8_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_DIRECTX8 +_ACEOF + + use_directx8="yes" + SUPPORTED_API="$SUPPORTED_API DirectX8" +fi + + +fi + + # Check whether --enable-directx9 was given. +if test "${enable_directx9+set}" = set; then + enableval=$enable_directx9; +else + enable_directx9="yes" +fi + +if test "x$enable_directx9" = "xyes"; then + if test "${ac_cv_header_d3d9_h+set}" = set; then + { echo "$as_me:$LINENO: checking for d3d9.h" >&5 +echo $ECHO_N "checking for d3d9.h... $ECHO_C" >&6; } +if test "${ac_cv_header_d3d9_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_d3d9_h" >&5 +echo "${ECHO_T}$ac_cv_header_d3d9_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking d3d9.h usability" >&5 +echo $ECHO_N "checking d3d9.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking d3d9.h presence" >&5 +echo $ECHO_N "checking d3d9.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: d3d9.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: d3d9.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: d3d9.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: d3d9.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: d3d9.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: d3d9.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: d3d9.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: d3d9.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: d3d9.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: d3d9.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: d3d9.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for d3d9.h" >&5 +echo $ECHO_N "checking for d3d9.h... $ECHO_C" >&6; } +if test "${ac_cv_header_d3d9_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_d3d9_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_d3d9_h" >&5 +echo "${ECHO_T}$ac_cv_header_d3d9_h" >&6; } + +fi +if test $ac_cv_header_d3d9_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_DIRECTX9 +_ACEOF + + use_directx9="yes" + SUPPORTED_API="$SUPPORTED_API DirectX9" +fi + + +fi + + # Check whether --enable-opengl was given. +if test "${enable_opengl+set}" = set; then + enableval=$enable_opengl; +else + enable_opengl="yes" +fi + + if test "x$enable_opengl" = "xyes"; then + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ echo "$as_me:$LINENO: checking whether we are using the Microsoft C compiler" >&5 +echo $ECHO_N "checking whether we are using the Microsoft C compiler... $ECHO_C" >&6; } +if test "${ax_cv_c_compiler_ms+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef _MSC_VER + choke me +#endif + + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ax_compiler_ms=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ax_compiler_ms=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ax_cv_c_compiler_ms=$ax_compiler_ms + +fi +{ echo "$as_me:$LINENO: result: $ax_cv_c_compiler_ms" >&5 +echo "${ECHO_T}$ax_cv_c_compiler_ms" >&6; } +if test X$ax_compiler_ms = Xno; then + GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm" +fi + + +# +# Use x_includes and x_libraries if they have been set (presumably by +# AC_PATH_X). +# +if test "X$no_x" != "Xyes"; then + if test -n "$x_includes"; then + GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}" +fi + + if test -n "$x_libraries"; then + GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}" +fi + +fi + + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" + + +for ac_header in GL/gl.h OpenGL/gl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + + +for ac_header in windows.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +{ echo "$as_me:$LINENO: checking for OpenGL library" >&5 +echo $ECHO_N "checking for OpenGL library... $ECHO_C" >&6; } +if test "${ax_cv_check_gl_libgl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ax_cv_check_gl_libgl="no" +case $host_cpu in + x86_64) ax_check_gl_libdir=lib64 ;; + *) ax_check_gl_libdir=lib ;; +esac +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lopengl32 -lGL" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_gl_libgl="${ax_try_lib}"; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +done + +if test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes; then + LIBS='-framework OpenGL' +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_gl_libgl="$LIBS" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS} +fi +{ echo "$as_me:$LINENO: result: $ax_cv_check_gl_libgl" >&5 +echo "${ECHO_T}$ax_cv_check_gl_libgl" >&6; } + +if test "X$ax_cv_check_gl_libgl" = Xno; then + no_gl=yes; GL_CFLAGS=""; GL_LIBS="" +else + GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}" +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 + + + + + GLU_CFLAGS="${GL_CFLAGS}" + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" + + +for ac_header in GL/glu.h OpenGL/glu.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + + + +{ echo "$as_me:$LINENO: checking for OpenGL Utility library" >&5 +echo $ECHO_N "checking for OpenGL Utility library... $ECHO_C" >&6; } +if test "${ax_cv_check_glu_libglu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ax_cv_check_glu_libglu="no" +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" + +# +# First, check for the possibility that everything we need is already in +# GL_LIBS. +# +LIBS="${GL_LIBS} ${ax_save_LIBS}" +# +# libGLU typically links with libstdc++ on POSIX platforms. +# However, setting the language to C++ means that test program +# source is named "conftest.cc"; and Microsoft cl doesn't know what +# to do with such a file. +# +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test X$ax_compiler_ms = Xyes; then + 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 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif +int +main () +{ +gluBeginCurve(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_glu_libglu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="" +ax_check_libs="-lglu32 -lGLU" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif +int +main () +{ +gluBeginCurve(0) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_glu_libglu="${ax_try_lib}"; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +done + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test X$ax_compiler_ms = Xyes; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + +ac_ext=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 + + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS} +fi +{ echo "$as_me:$LINENO: result: $ax_cv_check_glu_libglu" >&5 +echo "${ECHO_T}$ax_cv_check_glu_libglu" >&6; } +if test "X$ax_cv_check_glu_libglu" = Xno; then + no_glu=yes; GLU_CFLAGS=""; GLU_LIBS="" +else + if test "X$ax_cv_check_glu_libglu" = Xyes; then + GLU_LIBS="$GL_LIBS" +else + GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}" +fi + +fi + + + + +# +# Some versions of Mac OS X include a broken interpretation of the GLU +# tesselation callback function signature. +# +if test "X$ax_cv_check_glu_libglu" != Xno; then + { echo "$as_me:$LINENO: checking for varargs GLU tesselator callback function type" >&5 +echo $ECHO_N "checking for varargs GLU tesselator callback function type... $ECHO_C" >&6; } +if test "${ax_cv_varargs_glu_tesscb+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ax_cv_varargs_glu_tesscb=no +ax_save_CFLAGS="$CFLAGS" +CFLAGS="$GL_CFLAGS $CFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# ifdef HAVE_GL_GLU_H +# include +# else +# include +# endif +int +main () +{ +GLvoid (*func)(...); gluTessCallback(0, 0, func) + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ax_cv_varargs_glu_tesscb=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$ax_save_CFLAGS" +fi +{ echo "$as_me:$LINENO: result: $ax_cv_varargs_glu_tesscb" >&5 +echo "${ECHO_T}$ax_cv_varargs_glu_tesscb" >&6; } +if test X$ax_cv_varargs_glu_tesscb = Xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VARARGS_GLU_TESSCB 1 +_ACEOF + +fi + +fi + + + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" + + +for ac_header in GL/glut.h GLUT/glut.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + +GLUT_CFLAGS=${GLU_CFLAGS} +GLUT_LIBS=${GLU_LIBS} + + + +# +# If X is present, assume GLUT depends on it. +# +if test X$no_x != Xyes; then + GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}" +fi + + +{ echo "$as_me:$LINENO: checking for GLUT library" >&5 +echo $ECHO_N "checking for GLUT library... $ECHO_C" >&6; } +if test "${ax_cv_check_glut_libglut+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ax_cv_check_glut_libglut="no" +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 + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lglut32 -lglut" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + + LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif +int +main () +{ +glutMainLoop() + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_glut_libglut="${ax_try_lib}"; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +done + +if test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes; then + LIBS='-framework GLUT' +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif +int +main () +{ +glutMainLoop() + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ax_cv_check_glut_libglut="$LIBS" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + + +CPPFLAGS="${ax_save_CPPFLAGS}" +LIBS="${ax_save_LIBS}" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ax_cv_check_glut_libglut" >&5 +echo "${ECHO_T}$ax_cv_check_glut_libglut" >&6; } + +if test "X$ax_cv_check_glut_libglut" = Xno; then + no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS="" +else + GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}" +fi + + + + + + if test "x$no_gl" != "xyes" -a "x$no_glu" != "xyes"; then + use_ogl="yes" + ILUT_LIBS="$GLU_LIBS $GL_LIBS $ILUT_LIBS" + if test "x$no_glut" != "xyes"; then + have_glut="yes" + ILUT_LIBS="$GLUT_LIBS $ILUT_LIBS" +fi + + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_OPENGL 1 +_ACEOF + + SUPPORTED_API="$SUPPORTED_API OpenGL" +fi + +fi + + # Check whether --enable-sdl was given. +if test "${enable_sdl+set}" = set; then + enableval=$enable_sdl; +else + enable_sdl="yes" +fi + + if test "x$enable_sdl" = "xyes"; then + +# Check whether --with-sdl-prefix was given. +if test "${with_sdl_prefix+set}" = set; then + withval=$with_sdl_prefix; sdl_prefix="$withval" +else + sdl_prefix="" +fi + + +# Check whether --with-sdl-exec-prefix was given. +if test "${with_sdl_exec_prefix+set}" = set; then + withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" +else + sdl_exec_prefix="" +fi + +# Check whether --enable-sdltest was given. +if test "${enable_sdltest+set}" = set; then + enableval=$enable_sdltest; +else + enable_sdltest=yes +fi + + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + # Extract the first word of "sdl-config", so it can be a program name with args. +set dummy sdl-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SDL_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SDL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SDL_CONFIG="$SDL_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_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" + ;; +esac +fi +SDL_CONFIG=$ac_cv_path_SDL_CONFIG +if test -n "$SDL_CONFIG"; then + { echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 +echo "${ECHO_T}$SDL_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + min_sdl_version=1.2.5 + { echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 +echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6; } + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + rm -f conf.sdltest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_sdl=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + use_sdl="yes" + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main + +int +main () +{ + return 0; + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + use_sdl="no" + fi + + + rm -f conf.sdltest + +fi + + if test "x$use_sdl" = "xyes"; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_SDL +_ACEOF + + ILUT_CFLAGS="$SDL_CFLAGS $ILUT_CFLAGS" + ILUT_LIBS="$SDL_LIBS $ILUT_LIBS" + SUPPORTED_API="$SUPPORTED_API SDL" +fi + + # Check whether --enable-w32 was given. +if test "${enable_w32+set}" = set; then + enableval=$enable_w32; +else + enable_w32="yes" +fi + + if test "x$enable_w32" = "xyes"; then + { echo "$as_me:$LINENO: checking for main in -lgdi32" >&5 +echo $ECHO_N "checking for main in -lgdi32... $ECHO_C" >&6; } +if test "${ac_cv_lib_gdi32_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdi32 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gdi32_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gdi32_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gdi32_main" >&5 +echo "${ECHO_T}$ac_cv_lib_gdi32_main" >&6; } +if test $ac_cv_lib_gdi32_main = yes; then + ILUT_LIBS="-lgdi32 $ILUT_LIBS" + use_w32="yes" + SUPPORTED_API="$SUPPORTED_API w32" +fi + +fi + + # Check whether --enable-x11 was given. +if test "${enable_x11+set}" = set; then + enableval=$enable_x11; +else + enable_x11="yes" +fi + + if test "x$enable_x11" = "xyes"; then + if test "${ac_cv_header_X11_Xlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5 +echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_X11_Xlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking X11/Xlib.h usability" >&5 +echo $ECHO_N "checking X11/Xlib.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking X11/Xlib.h presence" >&5 +echo $ECHO_N "checking X11/Xlib.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: X11/Xlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: X11/Xlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: X11/Xlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: X11/Xlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to bubla@users.sourceforge.net ## +## ------------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5 +echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_X11_Xlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_X11_Xlib_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; } + +fi +if test $ac_cv_header_X11_Xlib_h = yes; then + use_x11="yes" +else + use_x11="no" +fi + + + { echo "$as_me:$LINENO: checking for main in -lX11" >&5 +echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6; } +if test "${ac_cv_lib_X11_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_X11_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_X11_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_main" >&6; } +if test $ac_cv_lib_X11_main = yes; then + ILUT_LIBS="-lX11 $ILUT_LIBS" +else + use_x11="no" +fi + +fi + + # Check whether --enable-shm was given. +if test "${enable_shm+set}" = set; then + enableval=$enable_shm; +else + enable_shm="yes" +fi + + if test "x$enable_shm" = "xyes"; then + { echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5 +echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6; } +if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_X11_extensions_XShm_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_X11_extensions_XShm_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6; } +if test $ac_cv_header_X11_extensions_XShm_h = yes; then + use_xshm="yes" +else + use_xshm="no" +fi + + + { echo "$as_me:$LINENO: checking for main in -lXext" >&5 +echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xext_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xext_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xext_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 +echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } +if test $ac_cv_lib_Xext_main = yes; then + use_shm="yes" + ILUT_LIBS="-lXext $ILUT_LIBS" +else + use_shm="no" +fi + +fi + + # Check whether --enable-render was given. +if test "${enable_render+set}" = set; then + enableval=$enable_render; +else + enable_render="yes" +fi + + if test "x$enable_render" = "xyes"; then + { echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 +echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6; } +if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_X11_extensions_Xrender_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_X11_extensions_Xrender_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6; } +if test $ac_cv_header_X11_extensions_Xrender_h = yes; then + use_xrender="yes" +else + use_xrender="no" +fi + + + { echo "$as_me:$LINENO: checking for main in -lXrender" >&5 +echo $ECHO_N "checking for main in -lXrender... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xrender_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXrender $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xrender_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xrender_main=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_main" >&5 +echo "${ECHO_T}$ac_cv_lib_Xrender_main" >&6; } +if test $ac_cv_lib_Xrender_main = yes; then + use_render="yes" + ILUT_LIBS="-lXrender $ILUT_LIBS" +else + use_render="no" +fi + +fi + + + if test "x$use_x11" != "xno"; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_X11 1 +_ACEOF + + SUPPORTED_API="$SUPPORTED_API X11" +fi + + if test "$use_xshm" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_XSHM +_ACEOF + + SUPPORTED_API="$SUPPORTED_API XShm" +fi + + if test "$use_xrender" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ILUT_USE_XRENDER +_ACEOF + + SUPPORTED_API="$SUPPORTED_API XRender" +fi + +fi + + + +if test "x$enable_ILU" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILU_override ILU_read ILU_simple" +fi + + +if test "x$enable_ILUT" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_cpp_wrapper" +fi + + + if test "x$use_allegro" = "xyes"; then + USE_ALLEGRO_TRUE= + USE_ALLEGRO_FALSE='#' +else + USE_ALLEGRO_TRUE='#' + USE_ALLEGRO_FALSE= +fi + +if test "x$use_allegro" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_allegro" +fi + + + if test "x$use_directx8" = "xyes"; then + USE_DIRECTX8_TRUE= + USE_DIRECTX8_FALSE='#' +else + USE_DIRECTX8_TRUE='#' + USE_DIRECTX8_FALSE= +fi + + + if test "x$use_directx9" = "xyes"; then + USE_DIRECTX9_TRUE= + USE_DIRECTX9_FALSE='#' +else + USE_DIRECTX9_TRUE='#' + USE_DIRECTX9_FALSE= +fi + + + if test "x$use_directx8" = "xyes" -o "x$use_directx9" = "xyes"; then + USE_DIRECTX_TRUE= + USE_DIRECTX_FALSE='#' +else + USE_DIRECTX_TRUE='#' + USE_DIRECTX_FALSE= +fi + +if test "x$use_directx8" = "xyes" -o "x$use_directx9" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_d3d ILUT_windows" +fi + + + if test "x$use_ogl" = "xyes"; then + USE_OPENGL_TRUE= + USE_OPENGL_FALSE='#' +else + USE_OPENGL_TRUE='#' + USE_OPENGL_FALSE= +fi + + + if test "x$have_glut" = "xyes"; then + HAVE_GLUT_TRUE= + HAVE_GLUT_FALSE='#' +else + HAVE_GLUT_TRUE='#' + HAVE_GLUT_FALSE= +fi + + + if test "x$use_sdl" = "xyes"; then + USE_SDL_TRUE= + USE_SDL_FALSE='#' +else + USE_SDL_TRUE='#' + USE_SDL_FALSE= +fi + +if test "x$use_sdl" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_sdl" +fi + + + if test "x$use_w32" = "xyes"; then + USE_W32_TRUE= + USE_W32_FALSE='#' +else + USE_W32_TRUE='#' + USE_W32_FALSE= +fi + +if test "x$use_w32" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_animation" +fi + + + if test "x$use_x11" = "xyes"; then + USE_X11_TRUE= + USE_X11_FALSE='#' +else + USE_X11_TRUE='#' + USE_X11_FALSE= +fi + +#this is instedad AM_COND_IF([USE_OPENGL && USE_X11]) +if test "x$have_glut" = "xyes" -a "x$use_x11" = "xyes"; then + EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_gl ILUT_volume" +fi + + +case $host in + *mingw32*) PLATFORM="MINGW32" ;; + *cygwin*) GENERAL_CFLAGS="$GENERAL_CFLAGS -mno-cygwin" + LIBILUT_WIN32LIBPATH="-L/usr/lib/w32api" + PLATFORM="CYGWIN" ;; + *darwin*) +cat >>confdefs.h <<\_ACEOF +#define MAX_OS_X +_ACEOF + + PLATFORM="OSX" ;; +esac + + + + if test "x$PLATFORM" = "xMINGW32" -o "x$PLATFORM" = "xCYGWIN"; then + WINDOWS_BUILD_TRUE= + WINDOWS_BUILD_FALSE='#' +else + WINDOWS_BUILD_TRUE='#' + WINDOWS_BUILD_FALSE= +fi + + + + + + + + + + + + +ac_config_files="$ac_config_files Makefile lib/Makefile bin/Makefile test/Makefile docs/Makefile data/Makefile data/IL.pc data/ILU.pc data/ILUT.pc test/format_test/format_checks.sh" + +# src-IL/Makefile src-IL/src/Makefile src-IL/include/Makefile src-ILU/Makefile src-ILU/src/Makefile src-ILU/include/Makefile src-ILUT/Makefile src-ILUT/src/Makefile src-ILUT/include/Makefile include/Makefile include/IL/Makefile +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_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 + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +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= +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=`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. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_EXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_EXAMPLES\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_IL_TRUE}" && test -z "${BUILD_IL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_IL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_IL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_ILU_TRUE}" && test -z "${BUILD_ILU_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_ILU\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_ILU\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_ILUT_TRUE}" && test -z "${BUILD_ILUT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_ILUT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"BUILD_ILUT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_ALLEGRO_TRUE}" && test -z "${USE_ALLEGRO_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_ALLEGRO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_ALLEGRO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_DIRECTX8_TRUE}" && test -z "${USE_DIRECTX8_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_DIRECTX8\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_DIRECTX8\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_DIRECTX9_TRUE}" && test -z "${USE_DIRECTX9_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_DIRECTX9\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_DIRECTX9\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_DIRECTX_TRUE}" && test -z "${USE_DIRECTX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_DIRECTX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_DIRECTX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_OPENGL_TRUE}" && test -z "${USE_OPENGL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_OPENGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_OPENGL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_GLUT_TRUE}" && test -z "${HAVE_GLUT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_GLUT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_GLUT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_SDL_TRUE}" && test -z "${USE_SDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_W32_TRUE}" && test -z "${USE_W32_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_W32\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_W32\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_X11_TRUE}" && test -z "${USE_X11_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_X11\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_X11\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${WINDOWS_BUILD_TRUE}" && test -z "${WINDOWS_BUILD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"WINDOWS_BUILD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"WINDOWS_BUILD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be 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=: + # 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 + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +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.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. 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" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +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 +fi +echo >conf$$.file +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 +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=: +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 + +# 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 DevIL $as_me 1.7.8, which was +generated by GNU Autoconf 2.61. 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 + +cat >>$CONFIG_STATUS <<_ACEOF +# 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_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +DevIL config.status 1.7.8 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 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' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + 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 ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + 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 +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "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"`' +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"`' +compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' +predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' +postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $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 \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_flag_spec_ld_CXX \ +hardcode_libdir_separator_CXX \ +fix_srcfile_path_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; 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 \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX; 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' + + + + + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/IL/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/IL/config.h" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/IL.pc") CONFIG_FILES="$CONFIG_FILES data/IL.pc" ;; + "data/ILU.pc") CONFIG_FILES="$CONFIG_FILES data/ILU.pc" ;; + "data/ILUT.pc") CONFIG_FILES="$CONFIG_FILES data/ILUT.pc" ;; + "test/format_test/format_checks.sh") CONFIG_FILES="$CONFIG_FILES test/format_test/format_checks.sh" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason 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= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +FGREP!$FGREP$ac_delim +LD!$LD$ac_delim +DUMPBIN!$DUMPBIN$ac_delim +ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim +NM!$NM$ac_delim +LN_S!$LN_S$ac_delim +AR!$AR$ac_delim +STRIP!$STRIP$ac_delim +RANLIB!$RANLIB$ac_delim +lt_ECHO!$lt_ECHO$ac_delim +DSYMUTIL!$DSYMUTIL$ac_delim +NMEDIT!$NMEDIT$ac_delim +LIPO!$LIPO$ac_delim +OTOOL!$OTOOL$ac_delim +OTOOL64!$OTOOL64$ac_delim +CPP!$CPP$ac_delim +AS!$AS$ac_delim +DLLTOOL!$DLLTOOL$ac_delim +OBJDUMP!$OBJDUMP$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +DEPDIR!$DEPDIR$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +DEVIL_LTVERSION!$DEVIL_LTVERSION$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +BUILD_EXAMPLES_TRUE!$BUILD_EXAMPLES_TRUE$ac_delim +BUILD_EXAMPLES_FALSE!$BUILD_EXAMPLES_FALSE$ac_delim +BUILD_IL_TRUE!$BUILD_IL_TRUE$ac_delim +BUILD_IL_FALSE!$BUILD_IL_FALSE$ac_delim +BUILD_ILU_TRUE!$BUILD_ILU_TRUE$ac_delim +BUILD_ILU_FALSE!$BUILD_ILU_FALSE$ac_delim +BUILD_ILUT_TRUE!$BUILD_ILUT_TRUE$ac_delim +BUILD_ILUT_FALSE!$BUILD_ILUT_FALSE$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +OPENEXR_CFLAGS!$OPENEXR_CFLAGS$ac_delim +OPENEXR_LIBS!$OPENEXR_LIBS$ac_delim +ALLEGRO_CONFIG!$ALLEGRO_CONFIG$ac_delim +allegro_CFLAGS!$allegro_CFLAGS$ac_delim +allegro_LIBS!$allegro_LIBS$ac_delim +XMKMF!$XMKMF$ac_delim +acx_pthread_config!$acx_pthread_config$ac_delim +PTHREAD_CC!$PTHREAD_CC$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim +GL_CFLAGS!$GL_CFLAGS$ac_delim +GL_LIBS!$GL_LIBS$ac_delim +GLU_CFLAGS!$GLU_CFLAGS$ac_delim +GLU_LIBS!$GLU_LIBS$ac_delim +X_CFLAGS!$X_CFLAGS$ac_delim +X_PRE_LIBS!$X_PRE_LIBS$ac_delim +X_LIBS!$X_LIBS$ac_delim +X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim +GLUT_CFLAGS!$GLUT_CFLAGS$ac_delim +GLUT_LIBS!$GLUT_LIBS$ac_delim +SDL_CONFIG!$SDL_CONFIG$ac_delim +SDL_CFLAGS!$SDL_CFLAGS$ac_delim +SDL_LIBS!$SDL_LIBS$ac_delim +USE_ALLEGRO_TRUE!$USE_ALLEGRO_TRUE$ac_delim +USE_ALLEGRO_FALSE!$USE_ALLEGRO_FALSE$ac_delim +USE_DIRECTX8_TRUE!$USE_DIRECTX8_TRUE$ac_delim +USE_DIRECTX8_FALSE!$USE_DIRECTX8_FALSE$ac_delim +USE_DIRECTX9_TRUE!$USE_DIRECTX9_TRUE$ac_delim +USE_DIRECTX9_FALSE!$USE_DIRECTX9_FALSE$ac_delim +USE_DIRECTX_TRUE!$USE_DIRECTX_TRUE$ac_delim +USE_DIRECTX_FALSE!$USE_DIRECTX_FALSE$ac_delim +USE_OPENGL_TRUE!$USE_OPENGL_TRUE$ac_delim +USE_OPENGL_FALSE!$USE_OPENGL_FALSE$ac_delim +HAVE_GLUT_TRUE!$HAVE_GLUT_TRUE$ac_delim +HAVE_GLUT_FALSE!$HAVE_GLUT_FALSE$ac_delim +USE_SDL_TRUE!$USE_SDL_TRUE$ac_delim +USE_SDL_FALSE!$USE_SDL_FALSE$ac_delim +USE_W32_TRUE!$USE_W32_TRUE$ac_delim +USE_W32_FALSE!$USE_W32_FALSE$ac_delim +USE_X11_TRUE!$USE_X11_TRUE$ac_delim +USE_X11_FALSE!$USE_X11_FALSE$ac_delim +PLATFORM!$PLATFORM$ac_delim +WINDOWS_BUILD_TRUE!$WINDOWS_BUILD_TRUE$ac_delim +WINDOWS_BUILD_FALSE!$WINDOWS_BUILD_FALSE$ac_delim +GENERAL_CFLAGS!$GENERAL_CFLAGS$ac_delim +IL_CFLAGS!$IL_CFLAGS$ac_delim +IL_LIBS!$IL_LIBS$ac_delim +ILU_CFLAGS!$ILU_CFLAGS$ac_delim +ILU_LIBS!$ILU_LIBS$ac_delim +ILUT_CFLAGS!$ILUT_CFLAGS$ac_delim +ILUT_LIBS!$ILUT_LIBS$ac_delim +LIBILUT_WIN32LIBPATH!$LIBILUT_WIN32LIBPATH$ac_delim +SUPPORTED_FORMATS!$SUPPORTED_FORMATS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[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="$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 || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$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 "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + 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 || +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" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`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 +# 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= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + 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 + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;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 +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +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 "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then 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. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# 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 || +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) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 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="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# Assembler program. +AS=$AS + +# DLL creation program. +DLLTOOL=$DLLTOOL + +# Object dumper program. +OBJDUMP=$OBJDUMP + + +# 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 + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### 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" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using 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_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # 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 || +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 || +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 + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`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 || +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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} +if test "x$enable_IL" = "xyes"; then + { echo "$as_me:$LINENO: \| IL library Supported formats \|" >&5 +echo "$as_me: \| IL library Supported formats \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: $SUPPORTED_FORMATS" >&5 +echo "$as_me: $SUPPORTED_FORMATS" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} + { echo "$as_me:$LINENO: \| IL library External libraries \|" >&5 +echo "$as_me: \| IL library External libraries \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: Required libs: $IL_LIBS_REQUIRED" >&5 +echo "$as_me: Required libs: $IL_LIBS_REQUIRED" >&6;} + if test "x$enable_modules" = "xyes"; then + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: Optional libs: $IL_LIBS_OPTIONAL" >&5 +echo "$as_me: Optional libs: $IL_LIBS_OPTIONAL" >&6;} +fi + +else + { echo "$as_me:$LINENO: \| IL disabled (huh? good luck!) \|" >&5 +echo "$as_me: \| IL disabled (huh? good luck!) \|" >&6;} +fi + +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} +if test "x$enable_ILU" = "xyes"; then + { echo "$as_me:$LINENO: \| ILU part enabled \|" >&5 +echo "$as_me: \| ILU part enabled \|" >&6;} +else + { echo "$as_me:$LINENO: \| ILU part disabled \|" >&5 +echo "$as_me: \| ILU part disabled \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: Pass --enable-ILU option to the configure script if you want to build ILU" >&5 +echo "$as_me: Pass --enable-ILU option to the configure script if you want to build ILU" >&6;} +fi + +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} +if test "x$enable_ILUT" = "xyes"; then + { echo "$as_me:$LINENO: \| ILUT library Supported APIs \|" >&5 +echo "$as_me: \| ILUT library Supported APIs \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: $SUPPORTED_API" >&5 +echo "$as_me: $SUPPORTED_API" >&6;} +else + { echo "$as_me:$LINENO: \| ILUT part disabled \|" >&5 +echo "$as_me: \| ILUT part disabled \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: Pass --enable-ILUT option to the configure script if you want to build ILUT" >&5 +echo "$as_me: Pass --enable-ILUT option to the configure script if you want to build ILUT" >&6;} +fi + +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} + { echo "$as_me:$LINENO: \| Detected Machine Extensions \|" >&5 +echo "$as_me: \| Detected Machine Extensions \|" >&6;} +{ echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} +{ echo "$as_me:$LINENO: $SUPPORTED_EXTENSION" >&5 +echo "$as_me: $SUPPORTED_EXTENSION" >&6;} +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} +if test "x$with_examples" = "xyes"; then + { echo "$as_me:$LINENO: \| Building examples \|" >&5 +echo "$as_me: \| Building examples \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: $EXAMPLES_TO_BUILD" >&5 +echo "$as_me: $EXAMPLES_TO_BUILD" >&6;} + if test "x$build" != "x$host"; then + { echo "$as_me:$LINENO: Note: You may get some errors when cross-compiling when using OpenEXR, Allegro and/or SDL. So if you are cross-compiling and getting these errors (very likely if you use MingW), just pass --disable-exr, --disable-allegro or --disable-sdl to the configure script." >&5 +echo "$as_me: Note: You may get some errors when cross-compiling when using OpenEXR, Allegro and/or SDL. So if you are cross-compiling and getting these errors (very likely if you use MingW), just pass --disable-exr, --disable-allegro or --disable-sdl to the configure script." >&6;} +fi + +else + { echo "$as_me:$LINENO: \| Not building any examples \|" >&5 +echo "$as_me: \| Not building any examples \|" >&6;} + { echo "$as_me:$LINENO: +----------------------------------------+-------+" >&5 +echo "$as_me: +----------------------------------------+-------+" >&6;} + { echo "$as_me:$LINENO: Pass --with-examples option to the configure script if you want to build examples." >&5 +echo "$as_me: Pass --with-examples option to the configure script if you want to build examples." >&6;} +fi + +{ echo "$as_me:$LINENO: +----------------------------------------+" >&5 +echo "$as_me: +----------------------------------------+" >&6;} diff --git a/libs/DevIL-1.7.8/configure.ac b/libs/DevIL-1.7.8/configure.ac new file mode 100644 index 00000000..86917084 --- /dev/null +++ b/libs/DevIL-1.7.8/configure.ac @@ -0,0 +1,466 @@ +dnl +dnl Autoconf script for DevIL Library +dnl Originally written by Meloni Dario +dnl rewritten by MatÄ›j Týč +dnl + +dnl +dnl configure.ac initialization +dnl we use some macros that are in m4 directory +dnl +AC_INIT([DevIL], + 1.7.8, + [bubla@users.sourceforge.net]) +dnl Minimum Autoconf version +AC_PREREQ(2.52) +dnl What header will be generated by configure script +AC_CONFIG_HEADERS([include/IL/config.h]) +dnl Where are some sources? +AC_CONFIG_SRCDIR([src-IL/src/il_main.c]) +dnl Where are other macro definitions? +AC_CONFIG_MACRO_DIR([m4]) +dnl Where to put various auxiliary files +AC_CONFIG_AUX_DIR([build-aux]) +dnl Libtool init with message that we want to build DLLs +dnl LT_INIT([win32-dll]) +dnl LT_PROG_RC +dnl THE ABOVE IS LIBTOOL INIT IS THE GOOD ONE, BUT MAYBE TOO UP-TO-DATE FOR MOST PEOPLE +AC_PROG_LIBTOOL +AC_LIBTOOL_WIN32_DLL +dnl Automake init with all warnings reported +AM_INIT_AUTOMAKE([-Wall]) + +dnl +dnl Note that the libtool version has nothing to do +dnl with the actual DevIL version, it is a version number +dnl describing the interface version (see libtool doc) +dnl wich only changes when the interface changes +dnl +dnl format is :: +dnl If nothing notable changes, increment revision +dnl current is an interface number +dnl library supports interfaces from current - age to current +dnl +DEVIL_LTVERSION=2:0:1 +AC_SUBST([DEVIL_LTVERSION]) + +dnl +dnl Test build options +dnl +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Compile a debug version of the library])], + [], + [enable_debug="no"]) + +AC_ARG_ENABLE([release], + [AS_HELP_STRING([--disable-release], + [Compile a debug version of the library, default enabled if not building debug version])], + [], + [enable_release="yes" + test "x$enable_debug" = "xyes" && enable_release="no"]) + +AC_ARG_ENABLE([asm], + [AS_HELP_STRING([--disable-asm], + [Use assembler routines if possible, default enable if not building debug version])], + [], + [enable_asm="yes" + test "x$enable_debug" = "xyes" && enable_asm="no"]) + +dnl Set right flags regarding whether we explicitly debug or release +AS_IF([test "x$enable_release" = "xyes"], + [AS_IF([test "x$CFLAGS" = "x"], + [CFLAGS="-O3"]) + AS_IF([test "x$CXXFLAGS" = "x"], + [CXXFLAGS="-O3"]) ], + [test "x$enable_debug" = "xyes"], + [CFLAGS="-DNOINLINE -Wall -g -O0" + CXXFLAGS="-DNOINLINE -Wall -g -O0" + AC_DEFINE([DEBUG], + [], + ["Enable debug code features"]) ]) + +dnl +dnl Basic conf +dnl +SUPPORTED_FORMATS="" +SUPPORTED_API="" +SUPPORTED_EXTENSION="" +AC_REVISION([$Revision: 1.48 $]) +dnl AC_PREFIX_DEFAULT(/usr/local) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +dnl AC_LANG([C++]) +AC_LANG([C]) +AM_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_MAKE_SET +AC_C_BIGENDIAN + +dnl checks for X are to be done later... +dnl AC_PATH_XTRA + +dnl Settling whether the user will want to build examples or not +AC_ARG_WITH([examples], + [AS_HELP_STRING([--with-examples[[=yes/no]]], + [Whether to build and install examples as well. Default is without examples])], + [], + [with_examples="no"]) +AM_CONDITIONAL([BUILD_EXAMPLES], + [test "x$with_examples" = "xyes"]) + +dnl Do we want monolithic library (DevIL instead of IL, ILU, ILUT). Useful probably only on Windows... Discouraged. +dnl Whether to build IL. You have to anyway :-) +dnl AC_ARG_ENABLE([IL], +dnl [AS_HELP_STRING([--enable-IL[[=yes/no]]], +dnl [Build IL part of DevIL. You that. Default set to yes])], +dnl [], +dnl [enable_IL="yes"]) +enable_IL="yes" +AM_CONDITIONAL([BUILD_IL], + [test "x$enable_IL" = "xyes"]) + +dnl Whether to build ILU... +AC_ARG_ENABLE([ILU], + [AS_HELP_STRING([--enable-ILU[[=yes/no]]], + [Build ILU part of DevIL. Default set to no])], + [], + [enable_ILU="no"]) + +dnl Whether to build ILUT... +AC_ARG_ENABLE([ILUT], + [AS_HELP_STRING([--enable-ILUT[[=yes/no]]], + [Build ILUT part of DevIL. Default set to no. ILU will be built along whether you want it or not since ILUT depends upon it.])], + [], + [enable_ILUT="no"]) +dnl We have to build ILU if we want ILUT as well... +AM_CONDITIONAL([BUILD_ILU], + [test "x$enable_ILU" = "xyes" -o "x$enable_ILUT" = "xyes"]) +AM_CONDITIONAL([BUILD_ILUT], + [test "x$enable_ILUT" = "xyes"]) + +dnl +dnl We want to build ILU, so let's tell it (useful for examples/tests) +dnl while iluErrorString is still in ILU +dnl +AS_IF([test "x$enable_ILU" = "xyes" -o "x$enable_ILUT" = "xyes"], + [AC_DEFINE([ILU_ENABLED],, + [Define if you want to build ILU part of DevIL (used in DevIL examples/tests)]) ]) + +dnl Test for restrict c/c++ keyword +DEVIL_CHECK_RESTRICT + +dnl checking if the -std=gnu99 flag is required +AS_IF([test "x$restrict_keyword" = "xfound"], + [DEVIL_CHECK_RESTRICT_GNU99]) + +dnl must add AC_CACHE_CHECK support where possible + +dnl AM_MAINTAINER_MODE + +dnl Now the phase of testing of extensions... +TEST_EXT([Altivec], + [-faltivec -maltivec], + [vector int vec;vec=vec_splat_u32(0);], + [ALTIVEC_GCC], + [], + [altivec]) + +TEST_EXT([SSE], + [-msse], + [__m128 v;v=_mm_sub_ss(v,v);], + [SSE], + [#include ], + [sse]) + +TEST_EXT([SSE2], + [-msse2], + [__m128i v;v=_mm_add_epi32(v,v);], + [SSE2], + [#include ], + [sse2]) + +TEST_EXT([SSE3], + [-msse3], + [__m128d v;v=_mm_addsub_pd(v,v);], + [SSE3], + [#include ], + [sse3]) + +dnl Do we want to use ASM routines? +AS_IF([test "x$enable_asm" = "xyes"], + [TEST_ASM([i[[3456]]86*], + [X86_ASM], + [GCC_X86_ASM], + [x86]) + TEST_ASM([x86_64*], + [X86_64_ASM], + [GCC_X86_64_ASM], + [x86_64]) + TEST_ASM([powerpc*], + [PPC_ASM], + [GCC_PCC_ASM], + [ppc]) + AS_IF([test -n "$SUPPORTED_EXTENSION"], + [AC_DEFINE([IL_INLINE_ASM], + [1], + [Define if you can support at least some ASM]) ]) ]) + +dnl +dnl Test warning build options +dnl +AC_ARG_ENABLE([warning], + [AC_HELP_STRING([--enable-warning], + [Compile breaks on warnings])], + [build_warning="$enable_warning"], + [build_warning="no"]) + +AS_IF([test "$build_warning" = "yes"], + [ADD_CFLAGS([-Wall -Werror])], + []) + +dnl +dnl Memory alignment functions +dnl +AC_CHECK_FUNC([valloc], + [AC_DEFINE([VALLOC], + [1], + [define if you have valloc memory allocation]) ]) +AC_CHECK_FUNC([posix_memalign], + [AC_DEFINE([POSIX_MEMALIGN], + [1], + [define if you have posix_memalign memory allocation]) ]) + +AC_CHECK_FUNC([memalign], + [AC_DEFINE([MEMALIGN], + [1], + [define if you have memalign memory allocation]) ]) + +AC_CHECK_HEADER([mm_malloc.h], + [AC_DEFINE([MM_MALLOC], + [1], + [define if you have mm_malloc.h header]) ]) + +dnl +dnl Libraries development checking +dnl +AC_ARG_WITH([zlib], + [AC_HELP_STRING([--with-zlib[[=yes/no]]], + [Do wou want to use zlib?])], + [], + [enable_zlib="yes"]) + +AS_IF([test "x$enable_zlib" = "xyes"], + [AC_CHECK_HEADER([zlib.h], + [use_z="yes"], + [use_z="no"]) + AS_IF([test "$enable_zlib" = "yes"], + [AC_CHECK_LIB([z], + [main]) ]) ]) + +dnl +dnl We need to link in math stuff, maybe we have to do it manually here... +dnl +AC_CHECK_LIB([m], + [main]) + +dnl +dnl DevIL now supports a lot of game image formats. +dnl Some people may not like it, so let's give'em a choice! +dnl +AC_ARG_ENABLE([game-formats], + [AS_HELP_STRING([--enable-game-formats[[=yes/no]]], + [Enable support for various game formats. Some people may consider that redundant. (default=yes)]) ], + [], + [enable_game_formats="yes"]) +AS_IF([test "x$enable_game_formats" = "xno"], + [AC_DEFINE([IL_NO_GAMES],, + [Define if you want to disable support for various game formats]) ]) + +dnl +dnl Ask here whether the user wants to support a format, optionally do some tests whether it can be supported +dnl +TEST_FORMAT([blp], [BLP], [BLP is the texture format for Blizzard games.]) +TEST_FORMAT([bmp], [BMP], [BMP is a standard Windows bitmap.]) +TEST_FORMAT([dcx], [DCX], [DCX is a multi-page PCX file.]) +TEST_FORMAT([dds], [DDS], [DDS (DirectDraw Surface) is used by DirectX to load images (usually DXTC).]) +TEST_FORMAT([dicom], [DICOM], [DICOM (Digital Imaging and Communications in Medicine) is used extensively in medical imaging.]) +TEST_FORMAT([doom],[WAD], [WAD is the format for graphics in the original DooM I/II.]) +TEST_FORMAT([exr], [EXR], [EXR is a HDR image file format standardized by Industrial Light and Magic. OpenEXR powered], [SETTLE_OPENEXR]) +TEST_FORMAT([fits], [FITS], [FITS (Flexible Image Transport System) is used for storing scientific images and is used extensively in astronomy.]) +TEST_FORMAT([gif], [GIF], [GIF is lossy and proprietary format used mainly to make animations]) +TEST_FORMAT([hdr], [HDR], [HDR is the Radiance High Dynamic Range format, using more bits per channel than normal.]) +TEST_FORMAT([icns],[ICNS], [ICNS is the icon format for the Mac OS X operation system.]) +TEST_FORMAT([icon],[ICON], [ICO is the icon format for the Windows operating system.]) +TEST_FORMAT([iff], [IFF], [IFF (Interchange File Format) is used to transfer images between software from different companies.]) +TEST_FORMAT([ilbm], [ILBM], [ILBM (Amiga Interleaved BitMap Format).]) +TEST_FORMAT([iwi], [IWI], [IWI is the Infinity Ward Image format used in the Call of Duty games.]) +TEST_FORMAT([jpeg],[JPG], [JPEG is most common lossy format. libjpeg powered], [SETTLE_JPEG]) +TEST_FORMAT([jp2], [JP2], [JP2 (JPEG 2000) is a better, but not so widespread, alternative to JPEG. JasPer powered], [SETTLE_JASPER]) +TEST_FORMAT([lcms],[LCMS], [],[SETTLE_LCMS]) +TEST_FORMAT([lif], [LIF], [LIF is the image format of the game Homeworld.]) +TEST_FORMAT([mdl], [MDL], [MDL is the format for models in the game Half-Life.]) +TEST_FORMAT([mng], [MNG], [MNG is basically the animated version of PNG but is not widespread.], [SETTLE_MNG]) +TEST_FORMAT([mp3], [MP3], [MP3 (MPEG-1 Audio Layer 3) sometimes have images in them, such as cover art.]) +TEST_FORMAT([pcx], [PCX], [PCX is one of the first widely accepted DOS imaging standards]) +TEST_FORMAT([pcd], [PCD], [PCD is the Kodak PhotoCD format.]) +TEST_FORMAT([pic], [PIC], [PIC is used by SoftImage software.]) +TEST_FORMAT([pix], [PIX], []) +TEST_FORMAT([png], [PNG], [PNG is a smart, loseless and even open format. libpng powered.], [SETTLE_PNG]) +TEST_FORMAT([pnm], [PNM], [PNM (Portable aNy Map format) is considered the least-common-denominator for converting pixmap, graymap, or bitmap files between different platforms.]) +TEST_FORMAT([psd], [PSD], [PSD is the PhotoShop native file format.]) +TEST_FORMAT([psp], [PSP], [PSP is the Paint Shop Pro native file format.]) +TEST_FORMAT([pxr], [PXR], [PXR is used by Pixar.]) +TEST_FORMAT([raw], [RAW], [RAW is simply raw data.]) +TEST_FORMAT([rot], [ROT], [ROT is the image format for the game Homeworld 2.]) +TEST_FORMAT([sgi], [SGI], [SGI is the native raster graphics file format for Silicon Graphics workstations]) +TEST_FORMAT([sun], [SUN], [SUN is the image format used on Sun's operating systems.]) +TEST_FORMAT([texture], [TEXTURE], [TEXTURE is the format used in Medieval II: Total War (similar to DDS).]) +TEST_FORMAT([tga], [TGA], [TGA (aka TARGA file format) has been used mainly in games. It is open and simple.]) +TEST_FORMAT([tiff],[TIF], [TIFF is a lossless format supporting greater color depths. libtiff powered], [SETTLE_TIFF]) +TEST_FORMAT([tpl], [TPL], [TPL is the format used by many GameCube and Wii games.]) +TEST_FORMAT([utx], [UTX], [UTX is the format used in the Unreal Tournament game series.]) +TEST_FORMAT([vtf], [VTF], [VTF (Valve Texture Format) is used by games based on Valve's Source engine.]) +TEST_FORMAT([wal], [WAL], [WAL is the image format used for the game Quake 2.]) +TEST_FORMAT([wbmp], [WBMP], [WBMP (Wireless Application Protocol Bitmap) is a monochrome graphics file format optimized for mobile computing devices]) +TEST_FORMAT([wdp], [WDP], [WDP is Microsoft's successor to JPEG, able to store many different image types either lossy or losslessly, also known as HD Photo.]) +TEST_FORMAT([xpm], [XPM], [XPM (X PixMap) is an ASCII-based image used in X Windows.]) + +dnl +dnl Give users chance to disable check for these two libraries that can't be disabled +dnl by any other means... +dnl +AC_ARG_WITH([libsquish], + [AS_HELP_STRING([--with-squish[[=yes/no]]], + [Do you want to use the squish library if possible? (enables HW accelerated DXT compression, default="yes")]) ], + [], + [with_libsquish="yes"]) +AS_IF([test "x$with_libsquish" = "xyes"], + [DEVIL_CHECK_LIBSQUISH]) + +AC_ARG_WITH([nvtt], + [AS_HELP_STRING([--with-nvtt[[=yes/no]]], + [Do you want to use the Nvidia texture tools if possible? (enables GPU accelerated image manipulation, default="yes")]) ], + [], + [with_nvtt="yes"]) +AS_IF([test "x$with_nvtt" = "xyes"], + [DEVIL_CHECK_NVIDIA_TEXTOOLS]) + +dnl +dnl ILUT APIs library checking +dnl +AS_IF([test "x$enable_ILUT" = "xyes"], + [SETTLE_ALLEGRO + SETTLE_DX8 + SETTLE_DX9 + SETTLE_OPENGL + SETTLE_SDL + SETTLE_W32 + SETTLE_X11]) + +dnl +dnl AM_COND_IF([condition],[do-if-true]) has to be kept in sync with examples/Makefile.am +dnl The AM_COND_IF seems to be too new at the moment, let's wait a little bit till things settle... +dnl + +dnl AM_COND_IF([BUILD_ILU], +AS_IF([test "x$enable_ILU" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILU_override ILU_read ILU_simple"]) + +dnl AM_COND_IF([BUILD_ILUT], +AS_IF([test "x$enable_ILUT" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_cpp_wrapper"]) + +AM_CONDITIONAL([USE_ALLEGRO], + [test "x$use_allegro" = "xyes"]) +dnl AM_COND_IF([USE_ALLEGRO], +AS_IF([test "x$use_allegro" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_allegro"]) + +AM_CONDITIONAL([USE_DIRECTX8], + [test "x$use_directx8" = "xyes"]) + +AM_CONDITIONAL([USE_DIRECTX9], + [test "x$use_directx9" = "xyes"]) + +AM_CONDITIONAL([USE_DIRECTX], + [test "x$use_directx8" = "xyes" -o "x$use_directx9" = "xyes"]) +dnl AM_COND_IF([USE_DIRECTX], +AS_IF([test "x$use_directx8" = "xyes" -o "x$use_directx9" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_d3d ILUT_windows"]) + +AM_CONDITIONAL([USE_OPENGL], + [test "x$use_ogl" = "xyes"]) + +AM_CONDITIONAL([HAVE_GLUT], + [test "x$have_glut" = "xyes"]) + +AM_CONDITIONAL([USE_SDL], + [test "x$use_sdl" = "xyes"]) +dnl AM_COND_IF([USE_SDL], +AS_IF([test "x$use_sdl" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_sdl"]) + +AM_CONDITIONAL([USE_W32], + [test "x$use_w32" = "xyes"]) +dnl AM_COND_IF([USE_W32], +AS_IF([test "x$use_w32" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_animation"]) + +AM_CONDITIONAL([USE_X11], + [test "x$use_x11" = "xyes"]) +#this is instedad AM_COND_IF([USE_OPENGL && USE_X11]) +AS_IF([test "x$have_glut" = "xyes" -a "x$use_x11" = "xyes"], + [EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_gl ILUT_volume"]) + +dnl Win32 +AS_CASE([$host], + [*mingw32*], + [PLATFORM="MINGW32"], + [*cygwin*], + [ADD_CFLAGS([-mno-cygwin]) + LIBILUT_WIN32LIBPATH="-L/usr/lib/w32api" + PLATFORM="CYGWIN"], + [*darwin*], + [AC_DEFINE([MAX_OS_X], + [], + [Building on Mac OS X]) + PLATFORM="OSX"]) +AC_SUBST([PLATFORM]) + +AM_CONDITIONAL([WINDOWS_BUILD], + [test "x$PLATFORM" = "xMINGW32" -o "x$PLATFORM" = "xCYGWIN"]) + +dnl Final substitution +AC_SUBST([GENERAL_CFLAGS]) +AC_SUBST([IL_CFLAGS]) +AC_SUBST([IL_LIBS]) +AC_SUBST([ILU_CFLAGS]) +AC_SUBST([ILU_LIBS]) +AC_SUBST([ILUT_CFLAGS]) +AC_SUBST([ILUT_LIBS]) +AC_SUBST([LIBILUT_WIN32LIBPATH]) +AC_SUBST([SUPPORTED_FORMATS]) + +dnl +dnl Ouput files to generate +dnl note: keep the list on one line separated by single spaces +dnl (otherwise MSYS compilation breaks) +AC_CONFIG_FILES([Makefile + lib/Makefile + bin/Makefile + test/Makefile + docs/Makefile + data/Makefile + data/IL.pc data/ILU.pc data/ILUT.pc + test/format_test/format_checks.sh]) +dnl projects/Makefile]) +# src-IL/Makefile src-IL/src/Makefile src-IL/include/Makefile src-ILU/Makefile src-ILU/src/Makefile src-ILU/include/Makefile src-ILUT/Makefile src-ILUT/src/Makefile src-ILUT/include/Makefile include/Makefile include/IL/Makefile +AC_OUTPUT + +dnl And a nice report in the end! +IL_REPORT +ILU_REPORT +ILUT_REPORT +EXTENSIONS_REPORT +EXAMPLES_REPORT diff --git a/libs/DevIL-1.7.8/configure.bat b/libs/DevIL-1.7.8/configure.bat new file mode 100644 index 00000000..01770751 --- /dev/null +++ b/libs/DevIL-1.7.8/configure.bat @@ -0,0 +1,9 @@ +@echo off +echo Generating include/IL/config.h based on what your system has installed... +copy include\IL\config.h.win include\IL\config.h +echo Done. +echo. +echo Please check include/IL/config.h to make sure that it has +echo set the appropriate #defines. +echo. +pause diff --git a/libs/DevIL-1.7.8/data/IL.pc.in b/libs/DevIL-1.7.8/data/IL.pc.in new file mode 100644 index 00000000..932d27c3 --- /dev/null +++ b/libs/DevIL-1.7.8/data/IL.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +Name: IL +Description: Developer's Image Library - IL part (just image loading) +Version: @VERSION@ +URL: http://openil.sourceforge.net +Libs: -L@libdir@ -lIL +Libs.private: @IL_LIBS@ +Cflags: -I@includedir@ @IL_CFLAGS@ diff --git a/libs/DevIL-1.7.8/data/ILU.pc.in b/libs/DevIL-1.7.8/data/ILU.pc.in new file mode 100644 index 00000000..4479abd6 --- /dev/null +++ b/libs/DevIL-1.7.8/data/ILU.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +Name: ILU +Description: Developer's Image Library - ILU part (image library utilities) +Version: @VERSION@ +URL: http://openil.sourceforge.net +Requires: IL +Libs: -L@libdir@ -lILU +Libs.private: @ILU_LIBS@ -lIL +Cflags: -I@includedir@ @IL_CFLAGS@ diff --git a/libs/DevIL-1.7.8/data/ILUT.pc.in b/libs/DevIL-1.7.8/data/ILUT.pc.in new file mode 100644 index 00000000..1ce899ee --- /dev/null +++ b/libs/DevIL-1.7.8/data/ILUT.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +Name: ILUT +Description: Developer's Image Library - ILUT part (connection to higher level libraries) +Version: @VERSION@ +URL: http://openil.sourceforge.net +Libs: -L@libdir@ -lILUT -ILU -lIL +Libs.private: @ILUT_LIBS@ +Cflags: -I@includedir@ @IL_CFLAGS@ diff --git a/libs/DevIL-1.7.8/data/Makefile.am b/libs/DevIL-1.7.8/data/Makefile.am new file mode 100644 index 00000000..09b4a79f --- /dev/null +++ b/libs/DevIL-1.7.8/data/Makefile.am @@ -0,0 +1,15 @@ +pkgdir=$(libdir)/pkgconfig + +pkg_DATA = + +if BUILD_IL +pkg_DATA += IL.pc +endif #BUILD_IL + +if BUILD_ILU +pkg_DATA += ILU.pc +endif #BUILD_ILU + +if BUILD_ILUT +pkg_DATA += ILUT.pc +endif #BUILD_ILUT diff --git a/libs/DevIL-1.7.8/data/Makefile.in b/libs/DevIL-1.7.8/data/Makefile.in new file mode 100644 index 00000000..762ca11c --- /dev/null +++ b/libs/DevIL-1.7.8/data/Makefile.in @@ -0,0 +1,420 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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@ +@BUILD_IL_TRUE@am__append_1 = IL.pc +@BUILD_ILU_TRUE@am__append_2 = ILU.pc +@BUILD_ILUT_TRUE@am__append_3 = ILUT.pc +subdir = data +DIST_COMMON = $(srcdir)/IL.pc.in $(srcdir)/ILU.pc.in \ + $(srcdir)/ILUT.pc.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = IL.pc ILU.pc ILUT.pc +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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgdir)" +pkgDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkg_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pkgdir = $(libdir)/pkgconfig +pkg_DATA = $(am__append_1) $(am__append_2) $(am__append_3) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +IL.pc: $(top_builddir)/config.status $(srcdir)/IL.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +ILU.pc: $(top_builddir)/config.status $(srcdir)/ILU.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +ILUT.pc: $(top_builddir)/config.status $(srcdir)/ILUT.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgDATA: $(pkg_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(pkgDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +uninstall-pkgDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkg_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done +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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; 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) + +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 + +info: info-am + +info-am: + +install-data-am: install-pkgDATA + +install-dvi: install-dvi-am + +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 + +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: uninstall-pkgDATA + +.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-pkgDATA 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 uninstall-pkgDATA + +# 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/libs/DevIL-1.7.8/docs/DevIL_manual.info b/libs/DevIL-1.7.8/docs/DevIL_manual.info new file mode 100644 index 00000000..bfeaaf62 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/DevIL_manual.info differ diff --git a/libs/DevIL-1.7.8/docs/DevIL_manual.pdf b/libs/DevIL-1.7.8/docs/DevIL_manual.pdf new file mode 100644 index 00000000..a2df54e8 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/DevIL_manual.pdf differ diff --git a/libs/DevIL-1.7.8/docs/DevIL_manual.texi b/libs/DevIL-1.7.8/docs/DevIL_manual.texi new file mode 100644 index 00000000..4e3d6ab9 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/DevIL_manual.texi @@ -0,0 +1,1246 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename DevIL_manual.info +@settitle Developer's Image Library manual +@documentencoding UTF-8 +@c %**end of header + +@c QUITE IMPORTANT: This document is revision-controlled. +@c Revision-control systems operate on per-line basis, so they +@c will like if editors write using 'one sentence = one line' rule. + +@c just some fancy stuff like VERSION and UPDATED generation +@c version.texi is generated automatically +@include version.texi + +@copying +This is @code{DevIL @value{VERSION}} manual. +Last update is from @value{UPDATED}. + +Copyright @copyright{} 2008,2009 Denton Woods, MatÄ›j Týč + +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; +with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +A copy of the license is included in the section entitled ``GNU Free Documentation License''. +@end copying + +@titlepage +@title Developer's Image Library manual +@sp 1 +@center @image{images/DevIL,14.9cm} +@c The following two commands start the copyright page. +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage +@c Output the table of contents at the beginning. +@contents + +@node Top +@top IL manual +This is a manual describing IL part of @code{DevIL} -- handling images. +@menu +* Introduction:: General intro +* Basic usage:: How to write your first code +* Image management:: How to manage images :-) +* Error handling:: If you encounter an error... +* Image manipulation:: How to manipulate with images using ILU +* Common #defines:: #defines you are likely to come across when using DevIL +* Sample program:: If you want to get going quickly +* Functions index:: Index of IL and ILU functions +@end menu + +@node Introduction +@chapter Introduction +@section General introduction + +Developer's Image Library was previously called OpenIL, but due to trademark issues, @code{OpenIL} is now known as @code{DevIL}. + +@code{DevIL} is an Open Source programming library for programmers to incorporate into their own programs. +@code{DevIL} loads and saves a large variety of images for use in a software developer's program. +This library is capable of manipulating images in various ways and passing image information to display APIs, such as OpenGL and Direct3D. + +The purpose of this manual is to guide users in coding with the Developer's Image Library. +This manual is for users proficient in C and with competent knowledge of the integrated development environment (IDE) or compiler they are using. + +@section Library Reference + +Several times throughout this document, the three different sub-libraries of @code{DevIL} are referenced as IL, ILU and ILUT. +IL refers to the base library for loading, saving and converting images. +ILU refers to the middle level library for image manipulation. +ILUT refers to the high level library for displaying images. +Functions in IL, ILU and ILUT are prefixed by ā€il', ā€ilu' and ā€ilut', respectively. + +@c @node Library setup +@chapter Library setup +@section Microsoft Visual C++ setup + +@code{DevIL} setup for Windows is straightforward. +Unzip @code{DevIL} in an empty directory. +If using WinZip, check the ``Use folder names'' box before unzipping. +Use the -d command line option if using pkunzip. +Then double-click on the ImageLib.sln file in the install directory to load the @code{DevIL} workspace in Microsoft Visual C++ (MSVC++). + +@subsection Directories + +You will need to change some directory settings in MSVC++ to get @code{DevIL} working. + +@enumerate + @item Navigate to the Tools menu and select Options. + @item Click on the Directories tab. + @item Under Show directories for, select ``Include files''. + @item Click the New button (to the left of the red 'X') + @item Type the directory @code{DevIL} is installed in, plus @file{\Include}. + For example, if you installed @code{DevIL} to E:\ImageLib, enter @file{E:\ImageLib\Include}. + @image{images/devil_msvc_include} + @item Under Show directories for, click on ``Library files''. + @item Click the New button (to the left of the red 'X'). + @item Type the directory @code{DevIL} is installed in, plus @file{\Lib}. + For example, if you installed @code{DevIL} to E:\ImageLib, enter @file{E:\ImageLib\Lib}. + @image{images/devil_msvc_lib} + @item Click the New button (to the left of the red ā€X'). + @item Type the directory @code{DevIL} is installed in, plus @file{\Lib\Debug}. + In the previous example, you would enter @file{E:\ImageLib\Lib\Debug}. + @item Choose OK. +@end enumerate + +@subsection MSVC++ Bug Workaround + +Microsoft Visual C++ 6.0 has a bug that prevents debugging of a project. +The bug appears to occur when you use a #pragma to link a .lib file and link it via another method. +The header files @file{il.h}, @file{ilu.h} and @file{ilut.h} automatically link the .lib files in via a @code{#pragma} for convenience. +To prevent this bug, check for and remove these: + +@itemize + @item @file{devil.lib}, @file{devil-d.lib}, @file{ilu.lib}, @file{ilu-d.lib}, @file{ilut.lib} and @file{ilut-d.lib} in your project settings (Project – Settings menu). + @item @file{devil.lib}, @file{devil-d.lib}, @file{ilu.lib}, @file{ilu-d.lib}, @file{ilut.lib} and @file{ilut-d.lib} in your project's workspace. +Some people link libraries into their project this way, which really should be discouraged, due to the hardcoded paths. +@end itemize + +@subsection Multithreading + +@code{DevIL} takes advantage of the multithreaded standard @code{LIBC} DLLs. +To use file streams with @code{DevIL}, you must change the project settings of your project. +If you do not perform these steps, your program will crash whenever you attempt to use a @code{DevIL} file stream. + +Generally, @code{DevIL} is not thread safe. +You should make sure that threads in your application do not use @code{DevIL} at the same time. + +@enumerate + @item Navigate to the Project menu and choose Settings. + @item Click the C/C++ tab. + @item Change the Category drop-down menu to read Code Generation. + @item Change the Use run-time library drop-down menu to Multithreaded DLL if the Settings For menu says Win32 Release. +Change the Use run-time library drop-down menu to Debug Multithreaded DLL if the Settings For menu says Win32 Debug. + @item Choose OK. +@end enumerate + +@section @code{DJGPP} Setup + +Setting up @code{DevIL} in DJGPP requires the following steps: + +@enumerate + @item Unzip @code{DevIL} in an empty directory. +If using WinZip, check the ``Use folder names'' box before unzipping. +Use the -d command line option if using pkunzip. + @item Create a new subdirectory called ā€il' in your @code{DJGPP} include directory. + @item Copy the files to their respective places: + @itemize + @item To use the precompiled libraries, copy @file{libil.a}, @file{libilu.a} and @file{libilut.a} from ImageLib\lib\djgpp to your @code{DJGPP} lib directory. +Then copy @file{il.h}, @file{ilu.h} and @file{ilut.h} from your ImageLib\lib\il directory to your @code{DJGPP} include\il directory. + @item To compile the library yourself, change directories to ImageLib\Makefiles\Djgpp. +This folder contains only a makefile for @code{DJGPP}. +Simply type @command{make}, and the makefile will compile @code{DevIL} and copy the files to their respective locations. + @end itemize +@end enumerate + +To compile with @code{DevIL} in DJGPP, add @option{-lil} to your command line. +To also use ILU and ILUT, use @option{-lilu} and @option{-lilut}, respectively. + +@section General GCC-based (Linux, Cygwin, Max OS X, etc.) Setup + +Setting up @code{DevIL} in this environment requires the following steps: + +@enumerate + @item Unpack @code{DevIL} to your favourite build area: Typically this is done by running @command{tar -xvvf devil-xxx.tar.gz} + @item Go to the root devil directory and run @command{./configure } + + TIP: Typically, you will want to specify @code{--prefix=/usr} (where to install @code{DevIL}), @code{--enable-ILU} and/or @code{--enable-ILUT} and probably also @code{--with-examples}. + Running @command{configure --help} gives you an exhaustive list of possibilities how to tweak @code{DevIL} build. + @item If no errors occured and you are satisfied with the configure report, you can compile it by running @command{make} + + TIP: You can run @command{make -j3} if you have a dual-core processor. Generally, if you replace the number '3' with 'number of CPU cores' + 1, you are likely to get the job done in the shortest time. + @item Run @command{make check} to check whether everything works as it should. + @xref{tests}, for hints what to do if a test fails. + @item Install @code{DevIL} by running @command{make install} as superuser. + + TIP: You can override variables at make time if you forgot to do that at configure time. + For instance, you can install by @command{make install prefix=/usr} +@end enumerate + +In order to link to @code{DevIL}, you may use autotools with @code{libtool}, which means to link either with @file{libIL.la} or @file{libILU.la} or with @file{libILUT.la} depending what level of functionality you require. +You may decide to use a monolithic build of the library and you then link with @file{libDevIL.la}. +The best way is to have this code in your @file{configure.ac} file: + +@example +... +@i{dnl Check for libtool (older macro for this is AC_PROG_LIBTOOL)} +LT_INIT +... +@i{# Check for libs we need for our program now} +@i{dnl Check that we have the header} +AC_CHECK_HEADER([IL/il.h]) +@i{dnl Check for the IL part on DevIL on unix-like systems} +PKG_CHECK_MODULES([DEVIL], + [IL ILU ILUT]) +@i{dnl Check that DevIL library exists (good for Windows)} +AC_CHECK_LIB([DevIL], [main], [LIBS_WE_NEED="-lDevIL $LIBS_WE_NEED"]) +... +@i{dnl Now export the variable that contains libraries} +@i{dnl so we can use it in makefiles} +AC_SUBST([LIBS_WE_NEED]) +AC_SUBST([DEVIL_CFLAGS DEVIL_LIBS]) +... +@end example +If you are skilled with automake, you may link with the libtool files directly, which is more portable (@code{pkg-config} currently breaks cross-compilation). + +If you use an IDE or if you don't like autotools (which is a big mistake, by the way :-), then you may use @file{pkg-config} as a program. +This is not recommended if you intend to use @code{DevIL} in a cross-platform programs. +You can get libraries you need to link to by running @command{pkg-config IL --libs}. Again, you decide whether you need @code{IL}, @code{ILU} or @code{ILUT}. +Also pass @command{pkg-config IL --cflags} to the compiler! + +If you are a happy IDE user, you have to write this commands in the backquotes like @command{`pkg-config ILUT --libs`} into some text boxes that allow you to specify additional @code{LDFLAGS}. + +@section Test and examples + +@anchor{tests} +@subsection Test suite +@code{DevIL} now comes with a test suite. +If you can use autotools to configure and compile it, you can also run the test suite by executing @command{make check} in the directory where you ran @command{configure}. + +There are following tests available: +@itemize + @item Format test: An image is generated and saved to disc. + It is loaded afterwards and compared to the original. + If they are pretty much the same, the test is passed. + @item Format test 2 (coming soon): Some image formats can't be saved. + So a test images are provided and loaded and compared. +@end itemize + +@subsection Examples + +@code{IL} examples: +@itemize + @item Simple + @item Read + @item Override +@end itemize +Note: Those examples can be linked against @code{ILU}, but this is only because error report functions. + +@code{ILUT} examples: +@itemize + @item Allegro + @item C++ wrapper + @item SDL + @item Volume + @item OpenGL +@end itemize + +@node Basic usage +@chapter Basic usage +You must initialize @code{DevIL}, or it will most certainly crash. +You need to initialize each library (IL, ILU, and ILUT) separately. +You do not need to initialize libraries you are not using, but keep in mind that the higher level libraries are dependent on the lower ones. +For example, ILUT is dependent on ILU and IL, so you have to initialize IL and ILU as well. + +@section Initializing DevIL + +@findex ilInit +@subsection IL Initialization +Simply call the @code{ilInit} function with no parameters: + +@example +// Initialize IL +ilInit(); +@end example + +@findex iluInit +@subsection ILU Initialization +Call the @code{iluInit} function with no parameters: + +@example +// Initialize ILU +iluInit(); +@end example + +@subsection ILUT Initialization +ILUT initialization is slightly more complex than IL and ILU initialization. +The function you will use is @code{ilutRenderer}. You must call @code{ilutRenderer} before you use any ILUT functions. +This function initializes ILUT support for the API you desire to use by a single parameter: + +@itemize + @item @code{ILUT_OPENGL} -- Initializes ILUT's OpenGL support. + @item @code{ILUT_ALLEGRO} -- Initializes ILUT's Allegro support. + @item @code{ILUT_WIN32} -- Initializes ILUT's Windows GDI and DirectX 8 support. +@end itemize + +An example of using @code{ilutRenderer} follows: + +@example +// Initialize ILUT with OpenGL support. +ilutRenderer(ILUT_OPENGL); +@end example + +@section Image Name Handling +Image names are @code{DevIL}'s way of keeping track of images it is currently containing. +Some other image libraries return structs, but they generally seem more cluttered than @code{DevIL}'s image name handling. + +@example +ILvoid ilGenImages(ILsizei Num, ILuint *Images); +ILvoid ilBindImage(ILuint Image); +ILvoid ilDeleteImages(ILsizei Num, ILuint *Images); +@end example + +@findex ilGenImages +@subsection Generating Image Names +Use @code{ilGenImages} to generate a set of image names. @code{ilGenImages} accepts an array of ILuint to receive the generated image names. +There are no guarantees about the order of the generated image names or any other predictable behaviour like this. +If @code{ilDeleteImages} is called on an image name, @code{ilGenImages} will return that value afterward, until all deleted image names are used. +This conserves memory and is generally quick. +The only guarantee is that each member of the Images parameter (up to Num number of them) will have a new, unique value. + +@findex ilBindImage +@subsection Binding Image Names +@code{ilBindImage} binds the current image to the image described by the image name in Image. +@code{DevIL} reserves the number zero for the default base image. +If you pass a value for Image that was not generated by @code{ilGenImages}, @code{ilBindImage} automatically creates an image specified by the image name passed. +An image must always be bound before you call any functions that operate on images and their data. + +When @code{DevIL} creates a new image, the image has the default properties of with a bit depth of 8. +@code{DevIL} creates a new image when you call @code{ilBindImage} with an image name that has not been generated by @code{ilGenImages} or when you call @code{ilGenImages} specifically. + +@findex ilDeleteImages +@subsection Deleting Image Names +@code{ilDeleteImages} is the exact opposite of @code{ilGenImages} and even accepts the exact same parameters. @code{ilDeleteImages} deletes image names to free memory for subsequent operations. +You should always call @code{ilDeleteImages} on images that are not in use anymore. +When you delete an image, @code{DevIL} actually deletes all data and anything associate with it, so that @code{ilGenImages} can possibly use the image name later. + +@section File handling -- loading images + +@code{DevIL}'s main purpose is to load images. +@code{DevIL}'s loading is designed to be extremely easy but very powerful. + +@xref{file_formats}, lists the image types @code{DevIL} is capable of loading. + +@code{DevIL} contains four loading functions to support different loading styles and loading from several different image sources. + +@example +ILboolean ilLoadImage(const char *FileName); +ILboolean ilLoad(ILenum Type, const char *FileName); +ILboolean ilLoadF(ILenum Type, ILHANDLE File); +ILboolean ilLoadL(ILenum Type, ILvoid *Lump, ILuint Size); +@end example + +@findex ilLoadImage +@subsection Loading from Files -- @code{ilLoadImage} +@code{ilLoadImage} is the main @code{DevIL} loading function. +All you do is pass @code{ilLoadImage} the filename of the image you wish to load. @code{ilLoadImage} takes care of the rest. @code{ilLoadImage} allows users to transparently load several different image formats uniformly. +@code{DevIL}'s most powerful function is @code{ilLoadImage} because of this feature. + +Before loading the image, @code{ilLoadImage} must first determine the image format of the file. @code{ilLoadImage} performs the following steps: + +@enumerate + @item Compares the filename's extension to any registered file handlers, allowing the registered file handlers to take precedence over the default @code{DevIL} file handlers. +If the extension matches a registered file handler, @code{ilLoadImage} passes control to the file handler and returns. +For more information on registering, refer to the section entitled (@pxref{registration}). + @item Compares the filename's extension to the extensions natively supported by @code{DevIL}. +If the extension matches a loading function's extension, @code{ilLoadImage} passes control to the file handler and returns. + @item Examines the file for a header and tries to match it with a known type of image header. +If a valid image header is found, @code{ilLoadImage} passes control to the appropriate file hander and returns. + @item Returns @code{IL_FALSE}. +@end enumerate + +@findex ilLoad +@subsection Loading from Files -- @code{ilLoad} +@code{DevIL}'s other file loading function is @code{ilLoad}. @code{ilLoad} is similar to @code{ilLoadImage} in many respects but different in other ways. @code{ilLoad} accepts two parameters: the type of image and the filename of the image. + +@code{ilLoad}'s type parameter is what differentiates it from @code{ilLoadImage}. +Type can be any of the values listed in table B-2 in appendix B or the value @code{IL_TYPE_UNKNOWN}. +If Type is a value from table B-1, @code{ilLoad} attempts to load the file as the specified type of image format. +Only use this if you know what type of images you will be loading and want to bypass @code{DevIL}'s checks. + +If @code{IL_TYPE_UNKNOWN} is specified for Type, @code{ilLoad} behaves exactly like @code{ilLoadImage}. +Refer to the previous section for detailed behaviour of these two functions. + +@findex ilLoadF +@subsection Loading from File Streams -- @code{ilLoadF} +@code{DevIL}'s file stream loading function is @code{ilLoadF}. +@code{ilLoadF} is exactly equivalent to @code{ilLoad}, but instead of accepting a const char pointer, @code{ilLoadF} accepts an @code{ILHANDLE}. +@code{DevIL} defines @code{ILHANDLE} as a void pointer via a typedef. +Under normal circumstances, File will be a @code{FILE} struct pointer defined in @file{stdio.h}. + +@xref{registration}, for instructions on how to use your own file handling functions and file handles. + +@findex ilLoadL +@subsection Loading from Memory Lumps -- @code{ilLoadL} +@code{DevIL}'s file handling is abstracted to allow loading images from memory called ``lumps''. @code{ilLoadL} handles loading from lumps. +You must specify a valid type as the first parameter and the lump as the second parameter. + +The third parameter that @code{ilLoadL} accepts is the total size of the lump. +@code{DevIL} uses this value to perform bounds checking on the input data. +Specify a value of zero for Size if you do not want @code{ilLoadL} to perform any bounds checking. + +@subsection Saving to Files +@code{DevIL} also has some powerful saving functions to fully complement the loading functions. + +@example +ILboolean ilSaveImage(const char *FileName); +ILboolean ilSave(ILenum Type, const char *FileName); +ILboolean ilSaveF(ILenum Type, ILHANDLE File); +ILuint ilSaveL(ILenum Type, ILvoid *Lump, ILuint Size); +@end example + +@code{DevIL}'s saving functions are identical to the loading functions, despite the fact that they save images instead of load images. + +Typically, the user does not know exactly how large the output image will be. +If you pass @code{NULL} for @code{Lump} and 0 for @code{Size} to @code{ilSaveL}, @code{ilSaveL} will return the buffer size needed to save an image of @code{Type}. +When a buffer is passed for @code{Lump}, the return value is how many bytes were written to the buffer. + +Note that not all formats that have load support have also save support (@pxref{file_formats}) + +@node Image management +@chapter Image management + +@findex ilTexImage +@anchor{ilTexImage reference} +@section Defining Images +@code{ilTexImage} is used to give the current bound image new attributes that you specify. +Any image data or attributes previously in the current bound image are lost after a call to @code{ilTexImage}, so make sure that you call it only after preserving the image data if need be. + +@example +ILboolean ilTexImage(ILuint Width, ILuint Height, ILuint Depth, @* ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data); +@end example + +@code{ilTexImage} has one of the longer parameter lists of the @code{DevIL} functions, so we will briefly go over what is expected for each argument. + +@itemize @minus + @item @code{Width}: The width of the image. +If this is zero, @code{DevIL} creates an image with a width of one. + @item @code{Height}: The height of the image. +If this is zero, @code{DevIL} creates an image with a height of one. + @item @code{Depth}: The depth of the image, if it is an image volume. +Most applications should specify 0 or 1 for this parameter. + @item @code{Bpp}: The bytes per pixel of the image data. +Do not confuse this with bits per pixel, which is also commonly used. +Common bytes per pixel values are 1, 3 and 4. + @item @code{Format}: The format of the image data. @xref{format #defines}, for what you can pass. + @item @code{Type}: The type of image data. +Usually, this will be @code{IL_UNSIGNED_BYTE}, unless you want to utilize multiple bytes per colour channel. @xref{type #defines}, for acceptable type. + @item @code{Data}: Mainly for convenience, if you already have image data loaded and ready to put into the newly created image. +Specifying @code{NULL} for this parameter just results in the image having unpredictable image data. +You can specify image data later using @code{ilSetData} or @code{ilSetPixels}. +@end itemize + +@section Getting image data +There are two ways to set image data: one is quick and dirty, while the other is more flexible but slower. +These two functions are @code{ilGetData} and @code{ilCopyPixels}. + +@example +ILubyte *ilGetData(ILvoid); +ILuint ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, + ILuint Width, ILuint Height, ILuint Depth, ILenum Format, + ILenum Type, ILvoid * Data); +@end example + +@findex ilGetData +@subsection The Quick Method +Use @code{ilGetData} to get a direct pointer to the current bound image's data pointer. +Do not ever try to delete this pointer that is returned. +To get information about the image data, use @code{ilGetInteger}. + +@code{ilGetData} will return @code{NULL} and set an error of @code{IL_ILLEGAL_OPERATION} if there is no currently bound image. + +@findex ilCopyPixels +@subsection The Flexible Method +Use @code{ilCopyPixels} to get a portion of the current bound image's data or to get the current image's data with in a different format / type. +@code{DevIL} takes care of all conversions automatically for you to give you the image data in the format or type that you need. +The data block can range from a single line to a rectangle, all the way to a cube. + +@code{ilCopyPixels} has a long parameter list, like @code{ilTexImage}, so here is a description of the parameters of @code{ilCopyPixels}: + +@itemize @minus + @item @code{XOff}: Specifies where to start copying in the @i{x} direction. + @item @code{YOff}: Specifies where to start copying in the @i{y} direction. + @item @code{ZOff}: Specifies where to start copying in the @i{z} direction. +This will be 0 in most cases, unless you are using image volumes. + @item @code{Width}: Number of pixels to copy in the @i{x} direction. + @item @code{Height}: Number of pixels to copy in the @i{y} direction. + @item @code{Depth}: Number of pixels to copy in the @i{z} direction. +This will be 1, unless + @item @code{Format, Type, Data}: These are basically the same as ones described above. @pxref{ilTexImage reference}. +@end itemize + +@section Setting image Data + +There are two ways to set image data: one is quick and dirty, while the other is more flexible but slower. +These two functions are @code{ilSetData} and @code{ilSetPixels}. + +@example +ILboolean ilSetData(ILvoid *Data); +ILvoid ilSetPixels(ILuint XOff, ILuint YOff, ILuint ZOff, + ILuint Width, ILuint Height, ILuint Depth, ILenum Format, + ILenum Type, ILvoid *Data); +@end example + +@findex ilSetData +@subsection The Quick Method +Use @code{ilSetData} to set the image data directly. +@code{DevIL} will copy the data provided in the Data parameter to the image’s data, so you need not worry about @code{DevIL} trying to delete your pointer later on. +This function is the counterpart to @code{ilGetData}. + +You must provide image data in the exact same format, type, width, height, depth and bpp as the current bound image, since @code{DevIL} does no conversions here; it just does a simple memory copy. + +@code{ilSetData} will return @code{IL_FALSE} and set an error of @code{IL_INVALID_PARAM} if Data is @code{NULL}. + +@findex ilSetPixels +@subsection The Flexible Method +Use @code{ilSetPixels} to set a portion of the current bound image’s data or to set the current image’s data with data of a different format / type. +Specify the data block, where you want to put it and what kind of data it is, and @code{DevIL} takes care of all conversions automatically for you. +The data block can range from a single line to a rectangle, all the way to a cube. + +@code{ilSetPixels} has a long parameter list, like @code{ilCopyPixels}, so here is a description of the parameters of @code{ilSetPixels}: + +@itemize @minus + @item Previous parameters are the same as in @code{ilTexImage} + @item @code{Data}: A pointer to the actual data block. If this is @code{NULL}, @code{DevIL} will set an error of @code{IL_INVALID_PARAM} and return @code{IL_FALSE} (please refer to the section on error handling in @code{DevIL}). +@end itemize + +If you specify a combination of an offset with a width/height/depth that makes your data block overreach the edge of the currently bound image, @code{DevIL} will clip your data so that no crashes will occur and that the resulting image will be correctly produced. + +@section Copying Images +@code{DevIL} has three functions to copy images: @code{ilCopyImage}, @code{ilOverlayImage} and @code{ilBlit}. + +@example +ILboolean ilCopyImage(ILuint Src); +ILboolean ilOverlayImage(ILuint Src, ILint XCoord, ILint YCoord, + ILint ZCoord); +ILboolean ilBlit(ILuint Src, ILint DestX, ILint DestY, ILint DestZ, + ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, + ILuint Height, ILuint Depth); +@end example + +@findex ilCopyImage +@subsection Direct Copying +Use @code{ilCopyImage} to create a copy of an image. @code{ilCopyImage} will copy the image specified by the image name in Src to the currently bound image. @code{ilCopyImage} can be useful when you want to apply an effect to an image but want to preserve the original. +The image bound before calling @code{ilCopyImage} will still be bound after @code{ilCopyImage} exits. + +If you specify an image name in Src that has not been generated by @code{ilGenImages} or @code{ilBindImage}, @code{ilCopyImage} will set the @code{IL_INVALID_PARAM} error and return @code{IL_FALSE}. + +@findex ilBlit +@subsection Blitting +@code{ilBlit} copies a portion of an image over to another image. +This is similar to blitting performed in graphics libraries, such as StretchBlt in the Windows API. +You can copy a rectangular block from anywhere in a source image, specified by Src, to any point in the currently bound image. +A description of the various @code{ilBlit} parameters follows: + +@itemize @minus + @item @code{Src}: The source image name. + @item @code{DestX}: Specifies where to place the block of image data in the @i{x} direction. + @item @code{DestY}: Specifies where to place the block of image data in the @i{y} direction. + @item @code{DestZ}: Specifies where to place the block of image data in the @i{z} direction. + @item @code{SrcX}: Specifies where to start copying in the @i{x} direction of the source image. + @item @code{SrcY}: Specifies where to start copying in the @i{y} direction of the source image. + @item @code{SrcZ}: Specifies where to start copying in the @i{z} direction of the source image. + @item @code{Width}: How many pixels to copy in the @i{x} direction of the source image. + @item @code{Height}: How many pixels to copy in the @i{y} direction of the source image. + @item @code{Depth}: How many pixels to copy in the @i{z} direction of the source image. +@end itemize + +@findex ilOverlay +@subsection Overlaying +@code{ilOverlay} is essentially the same as @code{ilBlit}, but it copies the entire image over, instead of just a portion of the image. @code{ilOverlay} is more of a convenience function, since you can obtain the same results by calling @code{ilBlit} with SrcX, SrcY and SrcZ set to zero, with the Width, Height and Depth parameters set to the source image's height, width and depth, respectively. @code{ilOverlay} is missing six parameters that @code{ilBlit} has: + +@itemize @minus + @item @code{Src}: The source image name. + @item @code{DestX}: Specifies where to place the block of image data in the @i{x} direction. + @item @code{DestY}: Specifies where to place the block of image data in the @i{y} direction. + @item @code{DestZ}: Specifies where to place the block of image data in the @i{z} direction. +@end itemize + +@subsection Blit/Overlay Behavior +By default, @code{ilBlit} and @code{ilOverlay} will blend the source with the destination image if the source has an alpha channel present. +If you need to blit the image without blending, you can use the @code{IL_BLIT_BLEND} #define. +This behavior can be toggled with @code{ilEnable} and @code{ilDisable}. + +@example +ilDisable(IL_BLIT_BLEND); // Turns off blending +ilEnable(IL_BLIT_BLEND); // Turns on blending +@end example + +@chapter Image Characteristics + +All images have a certain set of characteristics: origin of the image, format of the image, type of the image, and more. + +@section Origin +Depending on the file format, data can start in the upper left or the lower left corner of the image. +By default, @code{DevIL} keeps the origin in the same place as the original image. +This can cause your image to be flipped vertically if the image you are loading has an origin other than what you expect. +To obtain the origin of the image, use @code{ilGetInteger}. +@example +ilGetInteger(IL_IMAGE_ORIGIN); +@end example + +To force @code{DevIL} to use just one origin, you need to use the following code: +@example +ilEnable(IL_ORIGIN_SET); +ilSetInteger(@emph{Origin}); +@end example +@emph{Origin} is either @code{IL_ORIGIN_LOWER_LEFT} or @code{IL_ORIGIN_UPPER_LEFT}. Finally, if you need to find out which origin mode is currently set, use: + +@example +ilGetInteger(IL_ORIGIN_MODE); +@end example + +@section Format +Format refers to the ordering of the bytes for each pixel. + +@anchor{registration} +@section Registration + +@node Error handling +@chapter Error handling +@code{DevIL} contains error-handling routines to alert the users of this library to any internal problems in @code{DevIL}. +The @code{ilGetError} function reports all errors in @code{DevIL}. @code{iluErrorString} converts error numbers returned from @code{ilGetError} to a human-readable format. + +@example +ILenum ilGetError(ILvoid); +const char* iluErrorString(ILenum Error); +@end example + +@findex ilGetError +@section Error Detection +Problems can always occur in any software application, and @code{DevIL} is no different. +@code{DevIL} keeps track of all non-fatal errors that have occurred during its operation. +All errors are kept on a stack maintained by @code{ilGetError}. Every time @code{ilGetError} is called, the last error is returned and pushed off the top of the stack. +You should call @code{ilGetError} until @code{IL_NO_ERROR} is returned. @code{IL_NO_ERROR} signifies that there are no more errors on the error stack. +Most errors reported are not harmful, and @code{DevIL} operation can continue, except for @code{IL_OUT_OF_MEMORY}. + +@xref{error_codes}, for error codes that can be returned by @code{ilGetError}. + +@findex iluErrorString +@section Error Strings +@code{iluErrorString} returns a human readable error string from any error that @code{ilGetError} can return. +This is useful for when you want to display what kind of error happened to the user. + +@subsection Languages +The ILU error messages have been translated into multiple languages: +Arabic, Dutch, German, Japanese and Spanish. +The default language is English. + +@subsection Selecting a Language +@code{iluSetLanguage} will change the error string returned by @code{iluErrorString} to the language specified in its parameter. +Languages supported are: English, Arabic, Dutch, German, Japanese and Spanish. +@xref{language #defines}, for a list of possible values. + +Be aware that if the Unicode version of @code{DevIL} is not being used, some translations will not display properly. +An example is Arabic, which uses characters outside of the standard ASCII character set. + +@node Image manipulation +@chapter Image manipulation + +ILU (Image Library Utilities) contains functions to manipulate any type of image in a variety of ways. +Some functions filter images, while others perform a wider variety of operations, such as scaling an image. +This section will give a comparison of the utility functions against the below figure. + +@float Figure,fig:stairway_original +@center @image{images/original_stairway,14cm} +@caption{Original, unmodified image} +@end float + +This is a crop of a Bertrand Benoit's image taken from @url{http://www.blender.org/features-gallery/gallery/art-gallery/,Blender art gallery}, and Bertrand has kindly allowed us to use it for demonstrations. +You can check out his @url{http://www.bertrand-benoit.com,website}. +Thank you, Bertrand! + +The image samples here have a better-than-bad resolution, so you don't have to be afraid to zoom at them if you wish to see details. + +@findex iluAlienify +@section Alienifying +@code{iluAlienify} is a filter I created purely by accident, when I was attempting to write colour matrix code. +The effect @code{iluAlienify} gives to an image is a green and purple tint. +On images with humans in them, @code{iluAlienify} generally makes the people look green, hence the fabricated term ``alienify''. +@code{iluAlienify} does not accept any parameters. +The figure below illustrates this effect on the @code{DevIL} logo. + +@float Figure,fig:stairway_alienified +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_alienify,4.9cm} +@caption{Original and ``alienified'' image} +@end float + +@findex iluBlurAverage +@findex iluBlurGaussian +@section Blurring +ILU has two blurring functions – @code{iluBlurAverage} and @code{iluBlurGaussian}. Blurring can be used for a simple motion blur effect or something as sophisticated as concealing the identity of a person in an image. +Both of these functions use a convolution filter and multiple iterations to blur an image. +Gaussian blurs look more natural than averaging blurs, because the center pixel in the convolution filter ``weighs'' more. +For an in-depth description of convolution filters, see the excellent @emph{Elementary Digital Filtering} article at @url{http://www.gamedev.net/reference/programming/features/edf/,gamedev.net}. + +@code{iluBlurAverage} and @code{iluBlurGaussian} are functionally equivalent. +Both functions accept a single parameter. +Call the desired function with the number of iterations of blurring you wish to be performed on the image. +Increase the number of iterations to increase the blurriness of an image. + +@float Figure,fig:stairway_blurred +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_blurAvg_10,4.9cm} @ @image{images/ilu_small_stairway_blurGaussian_10,4.9cm} +@caption{Original image, average blurred and gaussian blurred, both with 10 iterations applied} +@end float + +@findex iluContrast +@section Contrast +ILU can apply more colour contrast to your image by brightening the lights and darkening the darks via @code{iluContrast}. This effect can make a dull image livelier and ``stand out'' more. + +@code{iluContrast} accepts a single parameter describing the desired amount of contrast to modify the image by. +@itemize + @item values from 0.0 to 1.0 decrease the amount of contrast in the image. + @item value of 1.0 does not affect the image. + @item values above 1.0 to 1.7 increase the amount of contrast in the image, with 1.7 increasing the contrast the most. + @item values outside of the 0.0 to 1.7 range will give undefined results. -0.5 to 0.0 will actually create a negative of the image and increase the contrast. +@end itemize + +@float Figure,fig:stairway_contrast +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_contrast_0.4,4.9cm} @ @image{images/ilu_small_stairway_contrast_1.7,4.9cm} +@caption{Original image, image with contrast of 0.4 and with contrast of 1.7} +@end float + +@findex iluEqualize +@section Equalization +Sometimes it may be useful to equalize an image – that is, bring the extreme colour values to a median point. +@code{iluEqualize} darkens the bright colours and lightens the dark colours, reducing the contrast in an image or ``equalizing'' it. +The below figure shows the results of applying @code{iluEqualize} to the @code{DevIL} image. + +@float Figure,fig:stairway_equalized +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_equalize,4.9cm} +@caption{Original image and equalized image} +@end float + +@findex iluGammaCorrect +@section Gamma Correction +@code{iluGammaCorrect} applies gamma correction to an image using an exponential curve. +The single parameter @code{iluGammaCorrect} accepts is the gamma correction factor you wish to use. +A gamma correction factor of 1.0 leaves the image unmodified. +Values in the range @code{0.0 - 1.0} darken the image. +0.0 leaves a totally black image. +Anything above 1.0 brightens the image, but values too large may saturate the image. + +@float Figure,fig:stairway_gamma +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_gammaCorrect_0.7,4.9cm} @ @image{images/ilu_small_stairway_gammaCorrect_1.6,4.9cm} +@caption{Original image, image with gamma 0.7 and with with gamma 1.6} +@end float + +@findex iluNegative +@section Negativity +@code{iluNegative} is a very basic function that inverts every pixel's colour in an image. +For example, pure white becomes pure black, and vice-versa. +The resulting colour of a pixel can be determined by this formula: @code{new_colour = ~old_colour} (where the tilde is the negation of the set of bits). +@code{iluNegative} does not accept any parameters and is reversible by calling it again. + +@float Figure,fig:stairway_negative +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_negative,4.9cm} +@caption{Original and negative image} +@end float + +@findex iluNoisify +@section Noise +ILU can add ``random'' noise to any image to make it appear noisy. +The function, @code{iluNoisify}, simply uses the standard libc @code{rand} function after initializing it with a seed to @code{srand}. If your program depends on a different seed to @code{rand}, reset it after calling @code{iluNoisify}. The seed ILU uses is the standard @code{time(NULL)} call. +Of course, the noise added to the image is not totally random, since no such thing exists, but there should be no repeating, except in extremely large images. + +@float Figure,fig:stairway_noisify +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_noisify_0.1,4.9cm} @ @image{images/ilu_small_stairway_noisify_0.8,4.9cm} +@caption{Original image, noisified image 0.1, noisified 0.8} +@end float + +@code{iluNoisify} accepts a single parameter – the tolerance to use. +This parameter is a clamped (float) value that should be in the range @code{0.0f - 1.0f}. +Lower values indicate a lower tolerance, while higher values indicate the opposite. +The tolerance indicates just how much of a mono intensity that @code{iluNoisify} is allowed to apply to each pixel. +A ``random'' mono intensity is applied to each pixel so that you will not end up with totally new colours, just the same colours with a different luminance value. +Colours change by both negative and positive values, so some pixels may be darker, some may be lighter, and others will remain the same. + +@findex iluPixelize +@section Pixelization +@code{iluPixelize} creates pixelized images by averaging the colour values of blocks of pixels. +The single parameter passed to @code{iluPixelize} determines the size of these square blocks. +The result is a pixelized image. + +Call @code{iluPixelize} with values greater than 1 to pixelize the image. +The larger the values, the larger the pixel blocks will be. +A value of 1 will leave the image unchanged. +Values less than 1 generate an error. + +@float Figure,fig:stairway_pixelize +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_pixelize_5,4.9cm} +@caption{Pixelization of 5 pixels across} +@end float + +@findex iluSharpen +@section Sharpening +Sharpening sharply defines the outlines in an image. @code{iluSharpen} performs this sharpening effect on an image. +@code{iluSharpen} accepts two parameters: the sharpening factor and the number of iterations to perform the sharpening effect. + +The sharpening factor must be in the range of 0.0 - 2.5. +@itemize + @item values from 0.0 to 1.0 do a type of reverse sharpening, blurring the image. + @item value of 1.0 for the sharpening factor will have no effect on the image. + @item values in the range 1.0 - 2.5 will sharpen the image, with 2.5 having the most pronounced sharpening effect. + @item values outside of the 0.0 - 2.5 range produce undefined results. +@end itemize + +The number of iterations to perform will usually be 1, but to achieve more sharpening, increase the number of iterations. +This parameter is similar to the @emph{Iterations} parameter of the two blurring functions. +The time it takes to run this function is directly proportional to the number of iterations desired. + +@float Figure,fig:stairway_sharpen +@center @image{images/small_stairway,4.9cm} @ @image{images/ilu_small_stairway_sharpen_1.8_2,4.9cm} @ @image{images/ilu_small_stairway_sharpen_2.1_3,4.9cm} +@caption{Original image, image sharpened by 1.8 in 2 iterations and sharpened by 2.1 in 3 iterations} +@end float + +@c @node Resizing Images +@chapter Resizing Images + +@findex iluScale +@section Basic Scaling +To resize images, use the @code{iluScale} function: + +@example +ILboolean iluScale(ILuint Width, ILuint Height, ILuint Depth); +@end example + +The three parameters are relatively explanatory. +Any image can be resized to a new width, height and depth, provided that you have enough memory to hold the new image. +The new dimensions do not have to be the same as the original in any way. +Aspect ratios of the image do not even have to be the same. +The currently bound image is replaced entirely by the new scaled image. + +If you specify a dimension greater than the original dimension, the image enlarges in that direction. +Alternately, if you specify a dimension smaller than the original dimension, the image shrinks in that direction. + +@c @multitable {Original image} { } {@image{images/manipulation/enlarged}} { } {Shrunk image} +@c @item @image{images/manipulation/resize-original} @tab @tab @image{images/manipulation/enlarged} @c @tab @tab @image{images/manipulation/shrunk} +@c @item @emph{Original image} @tab @tab @emph{Enlarged image} @tab @tab @emph{Shrunk image} +@c @end multitable + +@findex iluImageParameter +@section Advanced Scaling +ILU also allows you to specify which method you want to use to resize images. +As you can see in the middle figure above, the enlarged image is very pixelized. +The shrunk image is also blocky. +This is because a nearest filter was applied to the image in figure 5.1 to produce figures 5.2 and 5.3. + +ILU allows you to use different filters to produce better scaling results via @code{iluImageParameter}: +@itemize @bullet + @item Nearest filter - @code{ILU_NEAREST} + @item Linear filter - @code{ILU_LINEAR} + @item Bilinear filter - @code{ILU_BILINEAR} + @item Box filter - @code{ILU_SCALE_BOX} + @item Triangle filter - @code{ILU_SCALE_TRIANGLE} + @item Bell filter - @code{ILU_SCALE_BELL} + @item B Spline filter - @code{ILU_SCALE_BSPLINE} + @item Lanczos filter - @code{ILU_SCALE_LANCZOS3} + @item Mitchell filter - @code{ILU_SCALE_MITCHELL} +@end itemize + +Just use the @code{ILU_FILTER} define as @emph{PName} in @code{iluImageParameter} with the appropriate filter define as @emph{Param}. + +@example +ILvoid iluImageParameter(ILenum PName, ILenum Param); +@end example + +@section Filter Comparisons +The first three filters (nearest, linear and bilinear) require an increasing amount of time to resize an image, with nearest being the quickest and bilinear being the slowest of the three. +All the filters after bilinear are considered the ā€advanced” scaling functions and require much more time to complete, but they generally produce much nicer results. + +When minimizing an image, bilinear filtering should be sufficient, since it uses a four-pixel averaging scheme to create every destination pixel. +Minimized images do not generally have to use higher sampling schemes to achieve a reasonable image. + +Enlarging an image, though, depends quite heavily on how good the sampling scheme is. +ILU provides several filtering functions to let you choose which one best fits your needs: speed versus image quality. +Below is a comparison of the different types of filters when enlarging an image. + +@c @multitable {@image{images/lena/nearest}} { } {@image{images/lena/nearest}} { } {@image{images/lena/nearest}} +@c @item @image{images/lena/nearest} Nearest filter +@c @tab @tab @image{images/lena/linear} Linear filter +@c @tab @tab @image{images/lena/bilinear} Bilinear filter +@c @item @image{images/lena/box} Box filter +@c @tab @tab @image{images/lena/triangle} Triangle filter +@c @tab @tab @image{images/lena/bell} Bell filter +@c @item @image{images/lena/bspline} B spline filter +@c @tab @tab @image{images/lena/lanczos} Lanczos filter +@c @tab @tab @image{images/lena/mitchell} Mitchell filter +@c @end multitable + + +@c @node Sub-Images +@chapter Sub-Images + +@section Mipmaps +Mipmaps in @code{DevIL} are successive half-dimensioned power-of-2 images. +The dimensions do not have to be powers of 2 if you generate them manually, but @code{DevIL}'s mipmap generation facilities assume power-of-2 images. + +@c @multitable {@image{images/mipmaps/128}} {@image{images/mipmaps/64}} {@image{images/mipmaps/32}} {@image{images/mipmaps/16}} {@image{images/mipmaps/8}} {@image{images/mipmaps/4}} {@image{images/mipmaps/2}} {@image{images/mipmaps/1}} +@c @item @image{images/mipmaps/128} +@c @tab @image{images/mipmaps/64} +@c @c @tab @image{images/mipmaps/32} +@c @tab @image{images/mipmaps/16} +@c @tab @image{images/mipmaps/8} +@c @tab @image{images/mipmaps/4} +@c @tab @image{images/mipmaps/2} +@c @tab @image{images/mipmaps/1} +@c @end multitable +@center @emph{All mipmap levels down to 1x1} + +@findex iluBuildMipmaps +@subsection Mipmap Creation +You generate mipmaps for any image using @code{iluBuildMipmaps}. If the image already has mipmaps, the previous mipmaps are erased, and new mipmaps are generated. +Otherwise, @code{iluBuildMipmaps} generates mipmaps for the image. + +The mipmaps built are always powers of 2. +If the original image does not have power-of-2 dimensions, @code{iluBuildMipmaps} resizes the original image via @code{iluScale} to have power-of-2 dimensions. + +@findex iluActiveMipmap +@subsection Mipmap Access +Access mipmaps through the @code{iluActiveMipmap} function: +@example +ILboolean ilActiveMipmap(ILuint MipNum); +@end example + +@code{iluActiveMipmap} sets the current image to the @emph{MipNum} mipmap level of the current image. +If there are no mipmaps present, then @code{iluActiveMipmap} returns @code{IL_FALSE}, else it returns @code{IL_TRUE}. The base image is mipmap level 0, so specify 0 for @emph{MipNum} to return to the base image. +The only other method for setting the current image to the base image is to call @code{ilBindImage} again. + +@section Animations +Animations are similar to mipmaps, but instead of being smaller successive images, the images are the same size but have different data. +The successive animation chains in @code{DevIL} can be used to create animations in your programs. +File formats that natively support animations are @code{.gif} and @code{.mng}. +You can also create your own sub-images as animations. + +@subsection Animation Chain Creation +To be added... + +@subsection Animation Chain Access +Access animations through the @code{iluActiveImage} function: +@example +ILboolean ilActiveImage(ILuint ImageNum); +@end example + +@code{iluActiveImage} sets the current image to the @emph{ImageNum} animation frame of the current image. +If there are no animation frames present, then @code{iluActiveImage} returns @code{IL_FALSE}, else it returns @code{IL_TRUE}. The base image is animation frame 0, so specify 0 for @emph{ImageNum} to return to the base image. +The only other method for setting the current image to the base image is to call @code{ilBindImage} again. + +@code{iluActiveImage} is functionally equivalent to @code{iluActiveMipmap}, except that it deals with animations and not mipmaps. + +@section Layers +@code{DevIL} does not have a full layer implementation yet. + +@section Sub-Image Mixing +An image can have both mipmaps and animations at the same time. +Every image in an animation chain can have its own set of mipmaps, though it is not necessary by any means. +If you ``activate'' an animation image in the base image's animation chain, the active image becomes the new ``base'' image. +Therefore, if you call @code{iluActiveMipmap} after @code{iluActiveImage}, a mipmap from the selected image in the animation chain is chosen. + + +@c @node DXTC/S3TC Notes +@chapter DXTC/S3TC Notes +@section DDS Loading/Saving +@code{DevIL} supports loading and saving of Microsoft .dds files. +DDS files can either be compressed or uncompressed. +If they are compressed, DDS files use DirectX Texture Compression (DXTC). DXTC is also known as S3TC, since Microsoft licensed the compression technology from S3. + +@subsection Keeping DXTC Data +When loading, @code{DevIL} uncompresses the DXTC. +If you call @code{ilEnable} with the @code{IL_KEEP_DXTC_DATA} parameter, @code{DevIL} will keep an uncompressed copy of the DXTC data along with the image. +Functions that deal with DXTC data can use this data without having to recompress the uncompressed data, making these functions operate faster. +The only drawback is the use of more memory. + +@subsection Controlling Saving +@code{DevIL}'s DXTC support consists of three different compression formats: DXT1, DXT3 and DXT5. +DXT2 and DXT4 use premultiplied alpha, which not even OpenGL supports. +@code{DevIL} loads DXT2 and DXT4 textures but immediately converts them to formats that do not use premultiplied alpha. +To set what format to save DDS files in, use this line: + +@example +ilSetInteger(IL_DXTC_FORMAT, Format); +@end example + +@emph{Format} can be @code{IL_DXT1}, @code{IL_DXT3} or @code{IL_DXT5}. + +@subsection Compression Method +@code{DevIL} can use the nVidia Texture Tools (NVTT) library, the libsquish library and its own internal compressor to generate DXTC data. +By default, @code{DevIL} uses its internal compressor. +This compressor is fast but is not very high quality. +NVTT is usually CUDA-enabled, meaning that it can run quickly on computers with GeForce 8-series and higher cards. +libsquish generates images with the highest quality possible, but it can be very slow. + +To enable compression by NVTT or libsquish, use one of the following lines of code: + +@example +ilEnable(IL_NVIDIA_COMPRESS); +ilEnable(IL_SQUISH_COMPRESS); +@end example + +You can also disable compression by these libraries by using @code{ilDisable}. +If both are enabled, NVTT is used. + +@section Retrieving DXTC Data +To retrieve a copy of the DXTC data, use @code{ilGetDXTCData}. +To determine how large Buffer should be, first call @code{ilGetDXTCData} with the Buffer parameter as @code{NULL}. +This function will then return the number of bytes that are required to completely store the DXTC data. +Call it a second time to actually retrieve the data. + +@example +ILuint ilGetDXTCData(ILvoid *Buffer, ILuint BufferSize, + ILenum DXTCFormat); +@end example + +If the DXTC data does not exist in the format that you request, @code{DevIL} will automatically compress the data. +If @code{ilGetDXTCData} returns 0, then the data could not be compressed. +To see if a certain format of DXTC data already exists for the currently bound image, call @code{ilGetInteger} with the @code{IL_DXTC_DATA_FORMAT} parameter. + +@section Compressing DXTC Data +In the previous section, it was mentioned that @code{DevIL} can compress the data of an image with DXT compression. If you have image data in your program that you want to compress, you can use the @code{ilCompressDXT} function. + +@example +ILubyte *ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, + ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize); +@end example + +Data must be in BGRA format for NVTT and @code{DevIL}'s compressor, and it must be in RGBA format for libsquish. Please keep this in mind when calling this @code{ilCompressDXT}. Look at Compression Method in this section for information on how to use these libraries. + +@section OpenGL/Direct3D DXTC Support +ILUT allows you to directly send the DXTC data to OpenGL or Direct3D. +Several modes in ILUT directly control this behavior. + +@subsection OpenGL S3TC Support +OpenGL can use S3TC (DXTC) textures via extensions. +If a computer does not support the S3TC texture extension, @code{DevIL} will just send the data normally through @code{glTexImage2D}, as always. +Please keep in mind that DDS files store their data in a top-down format, so if you enable the OpenGL S3TC support, make certain to set the origins of all images in the upper left: + +@example +ilEnable(IL_ORIGIN_SET); +ilSetInteger(IL_ORIGIN_MODE, IL_ORIGIN_UPPER_LEFT); +@end example + +To enable the OpenGL S3TC support, use the @code{ilutEnable} function with the @code{ILUT_GL_USE_S3TC} parameter: + +@example +ilutEnable(ILUT_GL_USE_S3TC); +@end example + +Setting this parameter means that ILUT will only use DXTC data from images that are already compressed with DXTC (e.g. +DDS files). To force ILUT to compress any image it sends to OpenGL, use @code{ilutEnable} again: + +@example +ilutEnable(ILUT_GL_GEN_S3TC); +@end example + +This can adversely affect your performance while loading textures, though, so use it with caution, especially if you are running a performance-critical application. + +@subsection Direct3D DXTC Support +ILUT's Direct3D (D3D) support works exactly like the OpenGL support, except you use the @code{ILUT_D3D_USE_DXTC} and @code{ILUT_D3D_GEN_DXTC} defines instead of @code{ILUT_GL_USE_S3TC} and @code{ILUT_GL_GEN_S3TC}, respectively. + + +@node Common #defines +@appendix Common @code{DevIL} @code{#defines} +Here goes lists of @code{DevIL} @code{#defines} used in functions that manipulate image data. +As you can see, they are self-explanatory. + +@anchor{format #defines} +@section @code{format}-related @code{#defines} + +@itemize @w{ } + @item @code{IL_COLOUR_INDEX} + @item @code{IL_RGB} + @item @code{IL_RGBA} + @item @code{IL_BGR} + @item @code{IL_BGRA} + @item @code{IL_LUMINANCE} +@end itemize + +@anchor{type #defines} +@section @code{type}-related @code{#defines} + +@itemize @w{ } + @item @code{IL_BYTE} + @item @code{IL_UNSIGNED_BYTE} + @item @code{IL_SHORT} + @item @code{IL_UNSIGNED_SHORT} + @item @code{IL_INT} + @item @code{IL_UNSIGNED_INT} + @item @code{IL_FLOAT} + @item @code{IL_DOUBLE} +@end itemize + +@anchor{language #defines} +@section Language-related @code{#defines} + +@itemize @w{ } + @item @code{IL_ENGLISH} + @item @code{IL_ARABIC} + @item @code{IL_DUTCH} + @item @code{IL_GERMAN} + @item @code{IL_JAPANESE} + @item @code{IL_SPANISH} +@end itemize + +@anchor{error_codes} +@appendix Common @code{DevIL} Error Codes + +Errors sometimes occur within @code{DevIL}. +To get the error code of the last error that occurred, call @code{ilGetError} with no parameters. +To get a human-readable string of an error code, call @code{iluErrorString} with the error code. +A table of error codes follows: + +@multitable {IL_FORMAT_NOT_SUPPORTED} {0x503} {1283} + @headitem Error code @code{#define} @tab Hex value @tab Decimal value + @item @code{IL_NO_ERROR} @tab @code{0x000} @tab @code{0} + @item @code{IL_INVALID_ENUM} @tab @code{0x501} @tab @code{1281} + @item @code{IL_OUT_OF_MEMORY} @tab @code{0x502} @tab @code{1282} + @item @code{IL_FORMAT_NOT_SUPPORTED} @tab @code{0x503} @tab @code{1283} + @item @code{IL_INTERNAL_ERROR} @tab @code{0x504} @tab @code{1284} + @item @code{IL_INVALID_VALUE} @tab @code{0x505} @tab @code{1285} + @item @code{IL_ILLEGAL_OPERATION} @tab @code{0x506} @tab @code{1286} + @item @code{IL_ILLEGAL_FILE_VALUE} @tab @code{0x507} @tab @code{1287} + @item @code{IL_INVALID_FILE_HEADER} @tab @code{0x508} @tab @code{1288} + @item @code{IL_INVALID_PARAM} @tab @code{0x509} @tab @code{1289} + @item @code{IL_COULD_NOT_OPEN_FILE} @tab @code{0x50A} @tab @code{1290} + @item @code{IL_INVALID_EXTENSION} @tab @code{0x50B} @tab @code{1291} + @item @code{IL_FILE_ALREADY_EXISTS} @tab @code{0x50C} @tab @code{1292} + @item @code{IL_OUT_FORMAT_SAME} @tab @code{0x50D} @tab @code{1293} + @item @code{IL_STACK_OVERFLOW} @tab @code{0x50E} @tab @code{1294} + @item @code{IL_STACK_UNDERFLOW} @tab @code{0x50F} @tab @code{1295} + @item @code{IL_INVALID_CONVERSION} @tab @code{0x510} @tab @code{1296} + @item @code{IL_BAD_DIMENSIONS} @tab @code{0x511} @tab @code{1297} + @item @code{IL_FILE_READ_ERROR} @tab @code{0x512} @tab @code{1298} + @item @code{IL_LIB_JPEG_ERROR} @tab @code{0x5E2} @tab @code{1506} + @item @code{IL_LIB_PNG_ERROR} @tab @code{0x5E3} @tab @code{1507} + @item @code{IL_LIB_TIFF_ERROR} @tab @code{0x5E4} @tab @code{1508} + @item @code{IL_LIB_MNG_ERROR} @tab @code{0x5E5} @tab @code{1509} + @item @code{IL_LIB_JP2_ERROR} @tab @code{0x5E6} @tab @code{1510} + @item @code{IL_LIB_EXR_ERROR} @tab @code{0x5E7} @tab @code{1511} + @item @code{IL_UNKNOWN_ERROR} @tab @code{0x5FF} @tab @code{1535} +@end multitable + +@anchor{file_formats} +@appendix Supported File Formats + +@code{DevIL} supports loading and saving of a large number of image formats. +Table lists the formats @code{DevIL} supports sorted according to @code{#define}. +@c The page should fit into margins since somebody may want to print it... +@multitable {Graphics Interchange Format} {.pbm, .pgm, } {IL_DOOM_FLAT} {loading?} {saving?} + @headitem Format name @tab Extension @tab IL @code{#define} @tab Loading? @tab Saving? + @item Blizzard texture @tab .blp @tab @code{IL_BLP} @tab yes @tab no + @item Windows bitmap @tab .bmp @tab @code{IL_BMP} @tab yes @tab yes + @item C-style header @tab .h @tab @code{IL_CHED} @tab no @tab yes + @item Dr. Halo Cut File @tab .cut @tab @code{IL_CUT} @tab yes @tab no + @item ZSoft Multi-PCX @tab .dcx @tab @code{IL_DCX} @tab yes @tab no + @item Digital Imaging and Communications in Medicine @tab .dicom, .dcm @tab @code{IL_DCM} @tab yes @tab no + @item DirectDraw surface @tab .dds @tab @code{IL_DDS} @tab yes @tab yes + @item Digital Picture Exchange @tab .dpx @tab @code{IL_DPX} @tab yes @tab no + @item DOOM walls/flats @tab .lmp @tab @code{IL_DOOM}, @code{IL_DOOM_FLAT} @tab yes @tab no + @item OpenEXR @tab .exr @tab @code{IL_EXR} @tab yes @tab yes + @item Flexible Image Transport System @tab .fits, .fit @tab @code{IL_FITS} @tab yes @tab no + @item Heavy Metal: FAKK 2 Texture @tab .ftx @tab @code{IL_FTX} @tab yes @tab no + @item Graphics Interchange Format @tab .gif @tab @code{IL_GIF} @tab yes @tab no + @item Radiance High Dynamic Range @tab .hdr @tab @code{IL_HDR} @tab yes @tab yes + @item Macintosh Icons @tab .icns @tab @code{IL_ICNS} @tab yes @tab no + @item Windows Icons @tab .ico, .cur @tab @code{IL_ICO} @tab yes @tab no + @item Interchange File Format @tab .iff @tab @code{IL_IFF} @tab yes @tab no + @item Infinity Ward Image @tab .iwi @tab @code{IL_IWI} @tab yes @tab no + @item Jpeg Network Graphics @tab .jng @tab @code{IL_JNG} @tab yes @tab no + @item Jpeg 2000 @tab .jp2 @tab @code{IL_JP2} @tab yes @tab yes + @item Jpeg @tab .jpg, .jpe, .jpeg @tab @code{IL_JPG} @tab yes @tab yes + @item Interlaced Bitmap @tab .lbm @tab @code{IL_LBM} @tab yes @tab no + @item Homeworld File @tab .lif @tab @code{IL_LIF} @tab yes @tab no + @item Half-Life Model @tab .mdl @tab @code{IL_MDL} @tab yes @tab no + @item Mng Animation @tab .mng @tab @code{IL_MNG} @tab yes @tab no + @item MPEG-1 Audio Layer 3 @tab .mp3 @tab @code{IL_MP3} @tab yes @tab no + @item PhotoCD @tab .pcd @tab @code{IL_PCD} @tab yes @tab no + @item ZSoft PCX @tab .pcx @tab @code{IL_PCX} @tab yes @tab yes + @item Softimage PIC @tab .pic @tab @code{IL_PIC} @tab yes @tab no + @item PIX @tab .pix @tab @code{IL_PIX} @tab yes @tab no + @item Portable Network Graphics @tab .png @tab @code{IL_PNG} @tab yes @tab yes + @item Pnm @tab .pbm, .pgm, .ppm, .pnm @tab @code{IL_PPM} @tab yes @tab yes + @item Adobe PhotoShop @tab .psd @tab @code{IL_PSD} @tab yes @tab yes + @item PaintShop Pro @tab .psp @tab @code{IL_PSP} @tab yes @tab no + @item Pixar @tab .pxr @tab @code{IL_PXR} @tab yes @tab no + @item Raw Data @tab * @tab @code{IL_RAW} @tab yes @tab yes + @item Homeworld 2 Texture @tab .rot @tab @code{IL_ROT} @tab yes @tab no + @item Silicon Graphics @tab .sgi, .bw, .rgb, .rgba @tab @code{IL_SGI} @tab yes @tab yes + @item Sun RAS @tab .sun, .ras, .rs, .im* @tab @code{IL_SUN} @tab yes @tab no + @item Creative Assembly Texture @tab .texture @tab @code{IL_TEXTURE} @tab yes @tab no + @item Targa @tab .tga @tab @code{IL_TGA} @tab yes @tab yes + @item Tagged Image File Format @tab .tif, .tiff @tab @code{IL_TIF} @tab yes @tab yes + @item Gamecube Texture @tab .tpl @tab @code{IL_TPL} @tab yes @tab no + @item Unreal Texture @tab .utx @tab @code{IL_UTX} @tab yes @tab no + @item Valve Texture @tab .vtf @tab @code{IL_VTF} @tab yes @tab yes + @item Quake2 Texture @tab .wal @tab @code{IL_WAL} @tab yes @tab no + @item HD Photo @tab .wdp, .hdp @tab @code{IL_WDP} @tab yes @tab no + @item X Pixel Map @tab .xpm @tab @code{IL_XPM} @tab yes @tab no +@end multitable + +@strong{Exception:} @code{IL_JPG} (IJL) type is not supported by @code{ilLoadF} nor by @code{ilSaveF}. @code{IL_JPG} (libjpeg) is supported by both. + +@node Sample program +@appendix Sample @code{DevIL} program + +If you are not used to this approach, you may be grateful for a short program demonstrating how to actually use @code{DevIL}: + +@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite +@example +@b{#include}@t{} +@b{#include}@t{} @i{/* because of malloc() etc. */} + +int @b{main}(int argc, const char * argv[]) +@{ + ILuint handle, w, h; + @i{/* First we initialize the library. */} + @i{/*Do not forget that... */} + @b{ilInit}(); + @i{/* We want all images to be loaded in a consistent manner */} + @b{ilEnable}(IL_ORIGIN_SET); + @i{/* In the next section, we load one image */} + @b{ilGenImages}(1, & handle); + @b{ilBindImage}(handle); + ILboolean loaded = @b{ilLoadImage}(@t{"original_file.jpg"}); + if (loaded == IL_FALSE) + return -1; @i{/* error encountered during loading */} + @i{/* Let's spy on it a little bit */} + w = @b{ilGetInteger}(IL_IMAGE_WIDTH); @i{// getting image width} + h = @b{ilGetInteger}(IL_IMAGE_HEIGHT); @i{// and height} + @b{printf}(@t{"Our image resolution: %dx%d}@t{\n}@t{"}, w, h); + @i{/* how much memory will we need? */} + int memory_needed = w * h * 3 * @b{sizeof}(unsigned char); + @i{/* We multiply by 3 here because we want 3 components per pixel */} + ILubyte * data = (ILubyte *)@b{malloc}(memory_needed); + @i{/* finally get the image data */} + @b{ilCopyPixels}(0, 0, 0, w, h, 1, IL_RGB, IL_UNSIGNED_BYTE, data); + @i{/* We want to do something with the image, right? */} + int i; + for(i = 0; i < memory_needed; i++) + if(i % 31 == 0) @i{/* vandalise the image */} + data[i] = i % 255; + @i{/* And maybe we want to save that all... */} + @b{ilSetPixels}(0, 0, 0, w, h, 1, IL_RGB, IL_UNSIGNED_BYTE, data); + @i{/* and dump them to the disc... */} + @b{ilSaveImage}(@t{"our_result.png"}); + @i{/* Finally, clean the mess! */} + @b{ilDeleteImages}(1, & handle); + @b{free}(data); data = NULL; + @b{return} 0; +@} +@end example + +@node Functions index +@unnumbered Functions index +@printindex fn +@bye + diff --git a/libs/DevIL-1.7.8/docs/Makefile.am b/libs/DevIL-1.7.8/docs/Makefile.am new file mode 100644 index 00000000..e9793325 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/Makefile.am @@ -0,0 +1,29 @@ +info_TEXINFOS = DevIL_manual.texi + +dvi: + echo "The DVI documentation won't be built. It is not feasible since it contains a lot of images. Build PDF or HTML docs instead..." + +EXTRA_DIST = images/DevIL.jpg\ + images/DevIL.png\ + images/devil_msvc_include.png\ + images/devil_msvc_lib.png\ + images/ilu_small_stairway_alienify.jpg\ + images/ilu_small_stairway_blurAvg_10.jpg\ + images/ilu_small_stairway_blurGaussian_10.jpg\ + images/ilu_small_stairway_contrast_0.4.jpg\ + images/ilu_small_stairway_contrast_1.7.jpg\ + images/ilu_small_stairway_emboss.jpg\ + images/ilu_small_stairway_equalize.jpg\ + images/ilu_small_stairway_gammaCorrect_0.7.jpg\ + images/ilu_small_stairway_gammaCorrect_1.6.jpg\ + images/ilu_small_stairway_mirror.jpg\ + images/ilu_small_stairway_negative.jpg\ + images/ilu_small_stairway_noisify_0.1.jpg\ + images/ilu_small_stairway_noisify_0.8.jpg\ + images/ilu_small_stairway_pixelize_5.jpg\ + images/ilu_small_stairway_saturate1f_0.6.jpg\ + images/ilu_small_stairway_sharpen_1.8_2.jpg\ + images/ilu_small_stairway_sharpen_2.1_3.jpg\ + images/ilu_small_stairway_wave_1.2.jpg\ + images/original_stairway.jpg\ + images/small_stairway.jpg diff --git a/libs/DevIL-1.7.8/docs/Makefile.in b/libs/DevIL-1.7.8/docs/Makefile.in new file mode 100644 index 00000000..f1c5b84b --- /dev/null +++ b/libs/DevIL-1.7.8/docs/Makefile.in @@ -0,0 +1,674 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/stamp-vti $(srcdir)/version.texi +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/DevIL_manual.info +TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex +am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux +DVIS = DevIL_manual.dvi +PDFS = DevIL_manual.pdf +PSS = DevIL_manual.ps +HTMLS = DevIL_manual.html +TEXINFOS = DevIL_manual.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +info_TEXINFOS = DevIL_manual.texi +EXTRA_DIST = images/DevIL.jpg\ + images/DevIL.png\ + images/devil_msvc_include.png\ + images/devil_msvc_lib.png\ + images/ilu_small_stairway_alienify.jpg\ + images/ilu_small_stairway_blurAvg_10.jpg\ + images/ilu_small_stairway_blurGaussian_10.jpg\ + images/ilu_small_stairway_contrast_0.4.jpg\ + images/ilu_small_stairway_contrast_1.7.jpg\ + images/ilu_small_stairway_emboss.jpg\ + images/ilu_small_stairway_equalize.jpg\ + images/ilu_small_stairway_gammaCorrect_0.7.jpg\ + images/ilu_small_stairway_gammaCorrect_1.6.jpg\ + images/ilu_small_stairway_mirror.jpg\ + images/ilu_small_stairway_negative.jpg\ + images/ilu_small_stairway_noisify_0.1.jpg\ + images/ilu_small_stairway_noisify_0.8.jpg\ + images/ilu_small_stairway_pixelize_5.jpg\ + images/ilu_small_stairway_saturate1f_0.6.jpg\ + images/ilu_small_stairway_sharpen_1.8_2.jpg\ + images/ilu_small_stairway_sharpen_2.1_3.jpg\ + images/ilu_small_stairway_wave_1.2.jpg\ + images/original_stairway.jpg\ + images/small_stairway.jpg + +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +.texi.info: + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + cd $(srcdir); \ + else \ + rc=$$?; \ + cd $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/DevIL_manual.info: DevIL_manual.texi $(srcdir)/version.texi +DevIL_manual.dvi: DevIL_manual.texi $(srcdir)/version.texi +DevIL_manual.pdf: DevIL_manual.texi $(srcdir)/version.texi +DevIL_manual.html: DevIL_manual.texi $(srcdir)/version.texi +$(srcdir)/version.texi: $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: DevIL_manual.texi $(top_srcdir)/configure + @(dir=.; test -f ./DevIL_manual.texi || dir=$(srcdir); \ + set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/DevIL_manual.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: + -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf DevIL_manual.aux DevIL_manual.cp DevIL_manual.cps DevIL_manual.fn \ + DevIL_manual.fns DevIL_manual.ky DevIL_manual.kys \ + DevIL_manual.log DevIL_manual.pg DevIL_manual.pgs \ + DevIL_manual.tmp DevIL_manual.toc DevIL_manual.tp \ + DevIL_manual.tps DevIL_manual.vr DevIL_manual.vrs \ + DevIL_manual.dvi DevIL_manual.pdf DevIL_manual.ps \ + DevIL_manual.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) +installdirs: + for dir in "$(DESTDIR)$(infodir)"; 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) + +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-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + else \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + fi; \ + done +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ + echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ + $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ + else : ; fi; \ + done; \ + done + @$(POST_INSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ + done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool mostlyclean-vti + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + dist-info 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-aminfo \ + maintainer-clean-generic maintainer-clean-vti mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \ + mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + + +dvi: + echo "The DVI documentation won't be built. It is not feasible since it contains a lot of images. Build PDF or HTML docs instead..." +# 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/libs/DevIL-1.7.8/docs/html/altivec__common_8h-source.html b/libs/DevIL-1.7.8/docs/html/altivec__common_8h-source.html new file mode 100644 index 00000000..5087e6a2 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/altivec__common_8h-source.html @@ -0,0 +1,55 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/altivec_common.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/altivec__typeconversion_8h-source.html b/libs/DevIL-1.7.8/docs/html/altivec__typeconversion_8h-source.html new file mode 100644 index 00000000..016a937f --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/altivec__typeconversion_8h-source.html @@ -0,0 +1,49 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/altivec_typeconversion.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/annotated.html b/libs/DevIL-1.7.8/docs/html/annotated.html new file mode 100644 index 00000000..076a02ac --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/annotated.html @@ -0,0 +1,33 @@ + + +DevIL: Data Structures + + + + + +
+

Data Structures

Here are the data structures with brief descriptions: + + +
ILimageThe Fundamental Image structure
ILpalBasic Palette struct
+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/config_8h-source.html b/libs/DevIL-1.7.8/docs/html/config_8h-source.html new file mode 100644 index 00000000..40e793b2 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/config_8h-source.html @@ -0,0 +1,379 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/config.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/devil__cpp__wrapper_8hpp-source.html b/libs/DevIL-1.7.8/docs/html/devil__cpp__wrapper_8hpp-source.html new file mode 100644 index 00000000..03fdaa8a --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/devil__cpp__wrapper_8hpp-source.html @@ -0,0 +1,973 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/devil_cpp_wrapper.hpp Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/devil__internal__exports_8h-source.html b/libs/DevIL-1.7.8/docs/html/devil__internal__exports_8h-source.html new file mode 100644 index 00000000..dbe6c472 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/devil__internal__exports_8h-source.html @@ -0,0 +1,180 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/devil_internal_exports.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/doxygen.css b/libs/DevIL-1.7.8/docs/html/doxygen.css new file mode 100644 index 00000000..22c48430 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/doxygen.css @@ -0,0 +1,473 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { + font-weight: bold +} +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navpath { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { + text-decoration: none; + background-color: #6666cc; + color: #ffffff +} +A.el { + text-decoration: none; + font-weight: bold +} +A.elRef { + font-weight: bold +} +A.code:link { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.code:visited { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.codeRef:link { + font-weight: normal; + color: #0000FF +} +A.codeRef:visited { + font-weight: normal; + color: #0000FF +} +A:hover { + text-decoration: none; + background-color: #f2f2ff +} +DL.el { + margin-left: -1cm +} +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: 90% +} +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { + text-align: center; +} +IMG.formulaDsp { +} +IMG.formulaInl { + vertical-align: middle; +} +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +SPAN.vhdldigit { color: #ff00ff } +SPAN.vhdlchar { color: #000000 } +SPAN.vhdlkeyword { color: #700070 } +SPAN.vhdllogic { color: #ff0000 } + +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { + color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { + font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { + background: #e8eef2; + font-weight: bold; +} +HR { + height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +/* these are for tree view when used as main index */ +.directory { + font-size: 9pt; + font-weight: bold; +} +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* The following two styles can be used to replace the root node title */ +/* with an image of your choice. Simply uncomment the next two styles, */ +/* specify the name of your image and be sure to set 'height' to the */ +/* proper pixel height of your image. */ + +/* .directory h3.swap { */ +/* height: 61px; */ +/* background-repeat: no-repeat; */ +/* background-image: url("yourimage.gif"); */ +/* } */ +/* .directory h3.swap span { */ +/* display: none; */ +/* } */ + +.directory > h3 { + margin-top: 0; +} +.directory p { + margin: 0px; + white-space: nowrap; +} +.directory div { + display: none; + margin: 0px; +} +.directory img { + vertical-align: -30%; +} +/* these are for tree view when not used as main index */ +.directory-alt { + font-size: 100%; + font-weight: bold; +} +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} +.directory-alt > h3 { + margin-top: 0; +} +.directory-alt p { + margin: 0px; + white-space: nowrap; +} +.directory-alt div { + display: none; + margin: 0px; +} +.directory-alt img { + vertical-align: -30%; +} + diff --git a/libs/DevIL-1.7.8/docs/html/doxygen.png b/libs/DevIL-1.7.8/docs/html/doxygen.png new file mode 100644 index 00000000..f0a274bb Binary files /dev/null and b/libs/DevIL-1.7.8/docs/html/doxygen.png differ diff --git a/libs/DevIL-1.7.8/docs/html/files.html b/libs/DevIL-1.7.8/docs/html/files.html new file mode 100644 index 00000000..70f54af9 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/files.html @@ -0,0 +1,87 @@ + + +DevIL: File Index + + + + + +
+

File List

Here is a list of all documented files with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
/home/dwoods/DevIL/include/IL/config.h [code]
/home/dwoods/DevIL/include/IL/devil_cpp_wrapper.hpp [code]
/home/dwoods/DevIL/include/IL/devil_internal_exports.h [code]
/home/dwoods/DevIL/include/IL/il.h [code]
/home/dwoods/DevIL/include/IL/il_wrap.h [code]
/home/dwoods/DevIL/include/IL/ilu.h [code]
/home/dwoods/DevIL/include/IL/ilu_region.h [code]
/home/dwoods/DevIL/include/IL/ilut.h [code]
/home/dwoods/DevIL/include/IL/ilut_config.h [code]
/home/dwoods/DevIL/src-IL/include/altivec_common.h [code]
/home/dwoods/DevIL/src-IL/include/altivec_typeconversion.h [code]
/home/dwoods/DevIL/src-IL/include/il_alloc.h [code]
/home/dwoods/DevIL/src-IL/include/il_bits.h [code]
/home/dwoods/DevIL/src-IL/include/il_bmp.h [code]
/home/dwoods/DevIL/src-IL/include/il_dcx.h [code]
/home/dwoods/DevIL/src-IL/include/il_dds.h [code]
/home/dwoods/DevIL/src-IL/include/il_doompal.h [code]
/home/dwoods/DevIL/src-IL/include/il_dpx.h [code]
/home/dwoods/DevIL/src-IL/include/il_endian.h [code]
/home/dwoods/DevIL/src-IL/include/il_exr.h [code]
/home/dwoods/DevIL/src-IL/include/il_files.h [code]
/home/dwoods/DevIL/src-IL/include/il_gif.h [code]
/home/dwoods/DevIL/src-IL/include/il_hdr.h [code]
/home/dwoods/DevIL/src-IL/include/il_icns.h [code]
/home/dwoods/DevIL/src-IL/include/il_icon.h [code]
/home/dwoods/DevIL/src-IL/include/il_internal.h [code]
/home/dwoods/DevIL/src-IL/include/il_jp2.h [code]
/home/dwoods/DevIL/src-IL/include/il_jpeg.h [code]
/home/dwoods/DevIL/src-IL/include/il_lif.h [code]
/home/dwoods/DevIL/src-IL/include/il_manip.h [code]
/home/dwoods/DevIL/src-IL/include/il_mdl.h [code]
/home/dwoods/DevIL/src-IL/include/il_pal.h [code]
/home/dwoods/DevIL/src-IL/include/il_pcx.h [code]
/home/dwoods/DevIL/src-IL/include/il_pic.h [code]
/home/dwoods/DevIL/src-IL/include/il_pnm.h [code]
/home/dwoods/DevIL/src-IL/include/il_psd.h [code]
/home/dwoods/DevIL/src-IL/include/il_psp.h [code]
/home/dwoods/DevIL/src-IL/include/il_q2pal.h [code]
/home/dwoods/DevIL/src-IL/include/il_register.h [code]
/home/dwoods/DevIL/src-IL/include/il_rle.h [code]
/home/dwoods/DevIL/src-IL/include/il_sgi.h [code]
/home/dwoods/DevIL/src-IL/include/il_stack.h [code]
/home/dwoods/DevIL/src-IL/include/il_states.h [code]
/home/dwoods/DevIL/src-IL/include/il_targa.h [code]
/home/dwoods/DevIL/src-IL/include/il_utx.h [code]
/home/dwoods/DevIL/src-IL/include/il_vtf.h [code]
/home/dwoods/DevIL/src-IL/include/il_wdp.h [code]
/home/dwoods/DevIL/src-ILU/include/ilu_alloc.h [code]
/home/dwoods/DevIL/src-ILU/include/ilu_filter.h [code]
/home/dwoods/DevIL/src-ILU/include/ilu_internal.h [code]
/home/dwoods/DevIL/src-ILU/include/ilu_region.h [code]
/home/dwoods/DevIL/src-ILU/include/ilu_states.h [code]
/home/dwoods/DevIL/src-ILUT/include/ilut_allegro.h [code]
/home/dwoods/DevIL/src-ILUT/include/ilut_internal.h [code]
/home/dwoods/DevIL/src-ILUT/include/ilut_opengl.h [code]
/home/dwoods/DevIL/src-ILUT/include/ilut_states.h [code]
+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/functions.html b/libs/DevIL-1.7.8/docs/html/functions.html new file mode 100644 index 00000000..b8776212 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/functions.html @@ -0,0 +1,145 @@ + + +DevIL: Data Fields + + + + + +
+Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: +

+

- a -

+

- b -

+

- c -

+

- d -

+

- f -

+

- h -

+

- l -

+

- m -

+

- n -

+

- o -

+

- p -

+

- s -

+

- t -

+

- w -

+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/functions_vars.html b/libs/DevIL-1.7.8/docs/html/functions_vars.html new file mode 100644 index 00000000..22651b7e --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/functions_vars.html @@ -0,0 +1,145 @@ + + +DevIL: Data Fields - Variables + + + + + +
+  +

+

- a -

+

- b -

+

- c -

+

- d -

+

- f -

+

- h -

+

- l -

+

- m -

+

- n -

+

- o -

+

- p -

+

- s -

+

- t -

+

- w -

+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/globals.html b/libs/DevIL-1.7.8/docs/html/globals.html new file mode 100644 index 00000000..91334249 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/globals.html @@ -0,0 +1,271 @@ + + +DevIL: Data Fields + + + + + +
+Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation: +

+

- i -

+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/globals_defs.html b/libs/DevIL-1.7.8/docs/html/globals_defs.html new file mode 100644 index 00000000..1cf9bec9 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/globals_defs.html @@ -0,0 +1,149 @@ + + +DevIL: Data Fields + + + + + +
+  +

+

- i -

+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/globals_func.html b/libs/DevIL-1.7.8/docs/html/globals_func.html new file mode 100644 index 00000000..9a6b0bc6 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/globals_func.html @@ -0,0 +1,167 @@ + + +DevIL: Data Fields + + + + + +
+  +

+

- i -

    +
  • ilActiveFace() +: il.h +
  • ilActiveImage() +: il.h +
  • ilActiveLayer() +: il.h +
  • ilActiveMipmap() +: il.h +
  • ilBindImage() +: il.h +
  • ilClampNTSC() +: il.h +
  • ilClearImage() +: il.h +
  • ilCompressDXT() +: il.h +
  • ilConvertImage() +: il.h +
  • ilConvertPal() +: il.h +
  • ilCopyImage() +: il.h +
  • ilDefaultImage() +: il.h +
  • ilDeleteImages() +: il.h +
  • ilDisable() +: il.h +
  • ilEnable() +: il.h +
  • ilFormatFunc() +: il.h +
  • ilGenImages() +: il.h +
  • ilGetBoolean() +: il.h +
  • ilGetBooleanv() +: il.h +
  • ilGetData() +: il.h +
  • ilGetError() +: il.h +
  • ilGetInteger() +: il.h +
  • ilGetIntegerv() +: il.h +
  • ilGetPalette() +: il.h +
  • ilGetString() +: il.h +
  • ilHint() +: il.h +
  • ilIsDisabled() +: il.h +
  • ilIsEnabled() +: il.h +
  • ilIsImage() +: il.h +
  • ilLoad() +: il.h +
  • ilLoadData() +: il.h +
  • ilLoadDataF() +: il.h +
  • ilLoadDataL() +: il.h +
  • ilLoadF() +: il.h +
  • ilLoadImage() +: il.h +
  • ilLoadL() +: il.h +
  • ilLoadPal() +: il.h +
  • ilOriginFunc() +: il.h +
  • ilOverlayImage() +: il.h +
  • ilPopAttrib() +: il.h +
  • ilPushAttrib() +: il.h +
  • ilRemoveLoad() +: il.h +
  • ilRemoveSave() +: il.h +
  • ilSave() +: il.h +
  • ilSaveData() +: il.h +
  • ilSaveF() +: il.h +
  • ilSaveImage() +: il.h +
  • ilSaveL() +: il.h +
  • ilSetData() +: il.h +
  • ilSetRead() +: il.h +
  • ilTexImage() +: il.h +
  • ilTypeFunc() +: il.h +
  • iluAlienify() +: ilu.h +
  • iluEnlargeCanvas() +: ilu.h +
  • iluFlipImage() +: ilu.h +
  • iluGetImageInfo() +: ilu.h +
  • iluInvertAlpha() +: ilu.h +
  • iluMirror() +: ilu.h +
  • iluNegative() +: ilu.h +
  • iluPixelize() +: ilu.h +
  • iluScaleColours() +: ilu.h +
+
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il_8h-source.html b/libs/DevIL-1.7.8/docs/html/il_8h-source.html new file mode 100644 index 00000000..edcbc1f6 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il_8h-source.html @@ -0,0 +1,659 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/il.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il_8h.html b/libs/DevIL-1.7.8/docs/html/il_8h.html new file mode 100644 index 00000000..9d3028cb --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il_8h.html @@ -0,0 +1,1827 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/il.h File Reference + + + + + +
+

/home/dwoods/DevIL/include/IL/il.h File Reference

#include <stdio.h>
+#include <limits.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

+#define __il_h_
+#define __IL_H__
+#define CLAMP_HALF   1
+#define CLAMP_FLOATS   1
+#define CLAMP_DOUBLES   1
+#define RESTRICT
+#define CONST_RESTRICT   const
+#define ILchar   char
+#define ILstring   char*
+#define ILconst_string   char const *
+#define IL_FALSE   0
+#define IL_TRUE   1
+#define IL_COLOUR_INDEX   0x1900
 Data formats Formats.
+#define IL_COLOR_INDEX   0x1900
+#define IL_ALPHA   0x1906
+#define IL_RGB   0x1907
+#define IL_RGBA   0x1908
+#define IL_BGR   0x80E0
+#define IL_BGRA   0x80E1
+#define IL_LUMINANCE   0x1909
+#define IL_LUMINANCE_ALPHA   0x190A
+#define IL_BYTE   0x1400
 Data types Types.
+#define IL_UNSIGNED_BYTE   0x1401
+#define IL_SHORT   0x1402
+#define IL_UNSIGNED_SHORT   0x1403
+#define IL_INT   0x1404
+#define IL_UNSIGNED_INT   0x1405
+#define IL_FLOAT   0x1406
+#define IL_DOUBLE   0x140A
+#define IL_HALF   0x140B
+#define IL_MAX_BYTE   SCHAR_MAX
+#define IL_MAX_UNSIGNED_BYTE   UCHAR_MAX
+#define IL_MAX_SHORT   SHRT_MAX
+#define IL_MAX_UNSIGNED_SHORT   USHRT_MAX
+#define IL_MAX_INT   INT_MAX
+#define IL_MAX_UNSIGNED_INT   UINT_MAX
+#define IL_LIMIT(x, m, M)   (x<m?m:(x>M?M:x))
+#define IL_CLAMP(x)   IL_LIMIT(x,0,1)
+#define IL_VENDOR   0x1F00
+#define IL_LOAD_EXT   0x1F01
+#define IL_SAVE_EXT   0x1F02
+#define IL_VERSION_1_7_8   1
+#define IL_VERSION   178
+#define IL_ORIGIN_BIT   0x00000001
+#define IL_FILE_BIT   0x00000002
+#define IL_PAL_BIT   0x00000004
+#define IL_FORMAT_BIT   0x00000008
+#define IL_TYPE_BIT   0x00000010
+#define IL_COMPRESS_BIT   0x00000020
+#define IL_LOADFAIL_BIT   0x00000040
+#define IL_FORMAT_SPECIFIC_BIT   0x00000080
+#define IL_ALL_ATTRIB_BITS   0x000FFFFF
+#define IL_PAL_NONE   0x0400
+#define IL_PAL_RGB24   0x0401
+#define IL_PAL_RGB32   0x0402
+#define IL_PAL_RGBA32   0x0403
+#define IL_PAL_BGR24   0x0404
+#define IL_PAL_BGR32   0x0405
+#define IL_PAL_BGRA32   0x0406
+#define IL_TYPE_UNKNOWN   0x0000
+#define IL_BMP   0x0420
 Microsoft Windows Bitmap - .bmp extension.
+#define IL_CUT   0x0421
 Dr. Halo - .cut extension.
+#define IL_DOOM   0x0422
 DooM walls - no specific extension.
+#define IL_DOOM_FLAT   0x0423
 DooM flats - no specific extension.
+#define IL_ICO   0x0424
 Microsoft Windows Icons and Cursors - .ico and .cur extensions.
+#define IL_JPG   0x0425
 JPEG - .jpg, .jpe and .jpeg extensions.
+#define IL_JFIF   0x0425
+#define IL_ILBM   0x0426
 Amiga IFF (FORM ILBM) - .iff, .ilbm, .lbm extensions.
+#define IL_PCD   0x0427
 Kodak PhotoCD - .pcd extension.
+#define IL_PCX   0x0428
 ZSoft PCX - .pcx extension.
+#define IL_PIC   0x0429
 PIC - .pic extension.
+#define IL_PNG   0x042A
 Portable Network Graphics - .png extension.
+#define IL_PNM   0x042B
 Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions.
+#define IL_SGI   0x042C
 Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions.
+#define IL_TGA   0x042D
 TrueVision Targa File - .tga, .vda, .icb and .vst extensions.
+#define IL_TIF   0x042E
 Tagged Image File Format - .tif and .tiff extensions.
+#define IL_CHEAD   0x042F
 C-Style Header - .h extension.
+#define IL_RAW   0x0430
 Raw Image Data - any extension.
+#define IL_MDL   0x0431
 Half-Life Model Texture - .mdl extension.
+#define IL_WAL   0x0432
 Quake 2 Texture - .wal extension.
+#define IL_LIF   0x0434
 Homeworld Texture - .lif extension.
+#define IL_MNG   0x0435
 Multiple-image Network Graphics - .mng extension.
+#define IL_JNG   0x0435
+#define IL_GIF   0x0436
 Graphics Interchange Format - .gif extension.
+#define IL_DDS   0x0437
 DirectDraw Surface - .dds extension.
+#define IL_DCX   0x0438
 ZSoft Multi-PCX - .dcx extension.
+#define IL_PSD   0x0439
 Adobe PhotoShop - .psd extension.
+#define IL_EXIF   0x043A
+#define IL_PSP   0x043B
 PaintShop Pro - .psp extension.
+#define IL_PIX   0x043C
 PIX - .pix extension.
+#define IL_PXR   0x043D
 Pixar - .pxr extension.
+#define IL_XPM   0x043E
 X Pixel Map - .xpm extension.
+#define IL_HDR   0x043F
 Radiance High Dynamic Range - .hdr extension.
+#define IL_ICNS   0x0440
 Macintosh Icon - .icns extension.
+#define IL_JP2   0x0441
 Jpeg 2000 - .jp2 extension.
+#define IL_EXR   0x0442
 OpenEXR - .exr extension.
+#define IL_WDP   0x0443
 Microsoft HD Photo - .wdp and .hdp extension.
+#define IL_VTF   0x0444
 Valve Texture Format - .vtf extension.
+#define IL_WBMP   0x0445
 Wireless Bitmap - .wbmp extension.
+#define IL_SUN   0x0446
 Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions.
+#define IL_IFF   0x0447
 Interchange File Format - .iff extension.
+#define IL_TPL   0x0448
 Gamecube Texture - .tpl extension.
+#define IL_FITS   0x0449
 Flexible Image Transport System - .fit and .fits extensions.
+#define IL_DICOM   0x044A
 Digital Imaging and Communications in Medicine (DICOM) - .dcm and .dicom extensions.
+#define IL_IWI   0x044B
 Call of Duty Infinity Ward Image - .iwi extension.
+#define IL_BLP   0x044C
 Blizzard Texture Format - .blp extension.
+#define IL_FTX   0x044D
 Heavy Metal: FAKK2 Texture - .ftx extension.
+#define IL_ROT   0x044E
 Homeworld 2 - Relic Texture - .rot extension.
+#define IL_TEXTURE   0x044F
 Medieval II: Total War Texture - .texture extension.
+#define IL_DPX   0x0450
 Digital Picture Exchange - .dpx extension.
+#define IL_UTX   0x0451
 Unreal (and Unreal Tournament) Texture - .utx extension.
+#define IL_MP3   0x0452
 MPEG-1 Audio Layer 3 - .mp3 extension.
+#define IL_JASC_PAL   0x0475
 PaintShop Pro Palette.
+#define IL_NO_ERROR   0x0000
+#define IL_INVALID_ENUM   0x0501
+#define IL_OUT_OF_MEMORY   0x0502
+#define IL_FORMAT_NOT_SUPPORTED   0x0503
+#define IL_INTERNAL_ERROR   0x0504
+#define IL_INVALID_VALUE   0x0505
+#define IL_ILLEGAL_OPERATION   0x0506
+#define IL_ILLEGAL_FILE_VALUE   0x0507
+#define IL_INVALID_FILE_HEADER   0x0508
+#define IL_INVALID_PARAM   0x0509
+#define IL_COULD_NOT_OPEN_FILE   0x050A
+#define IL_INVALID_EXTENSION   0x050B
+#define IL_FILE_ALREADY_EXISTS   0x050C
+#define IL_OUT_FORMAT_SAME   0x050D
+#define IL_STACK_OVERFLOW   0x050E
+#define IL_STACK_UNDERFLOW   0x050F
+#define IL_INVALID_CONVERSION   0x0510
+#define IL_BAD_DIMENSIONS   0x0511
+#define IL_FILE_READ_ERROR   0x0512
+#define IL_FILE_WRITE_ERROR   0x0512
+#define IL_LIB_GIF_ERROR   0x05E1
+#define IL_LIB_JPEG_ERROR   0x05E2
+#define IL_LIB_PNG_ERROR   0x05E3
+#define IL_LIB_TIFF_ERROR   0x05E4
+#define IL_LIB_MNG_ERROR   0x05E5
+#define IL_LIB_JP2_ERROR   0x05E6
+#define IL_LIB_EXR_ERROR   0x05E7
+#define IL_UNKNOWN_ERROR   0x05FF
+#define IL_ORIGIN_SET   0x0600
+#define IL_ORIGIN_LOWER_LEFT   0x0601
+#define IL_ORIGIN_UPPER_LEFT   0x0602
+#define IL_ORIGIN_MODE   0x0603
+#define IL_FORMAT_SET   0x0610
+#define IL_FORMAT_MODE   0x0611
+#define IL_TYPE_SET   0x0612
+#define IL_TYPE_MODE   0x0613
+#define IL_FILE_OVERWRITE   0x0620
+#define IL_FILE_MODE   0x0621
+#define IL_CONV_PAL   0x0630
+#define IL_DEFAULT_ON_FAIL   0x0632
+#define IL_USE_KEY_COLOUR   0x0635
+#define IL_USE_KEY_COLOR   0x0635
+#define IL_BLIT_BLEND   0x0636
+#define IL_SAVE_INTERLACED   0x0639
+#define IL_INTERLACE_MODE   0x063A
+#define IL_QUANTIZATION_MODE   0x0640
+#define IL_WU_QUANT   0x0641
+#define IL_NEU_QUANT   0x0642
+#define IL_NEU_QUANT_SAMPLE   0x0643
+#define IL_MAX_QUANT_INDEXS   0x0644
+#define IL_MAX_QUANT_INDICES   0x0644
+#define IL_FASTEST   0x0660
+#define IL_LESS_MEM   0x0661
+#define IL_DONT_CARE   0x0662
+#define IL_MEM_SPEED_HINT   0x0665
+#define IL_USE_COMPRESSION   0x0666
+#define IL_NO_COMPRESSION   0x0667
+#define IL_COMPRESSION_HINT   0x0668
+#define IL_NVIDIA_COMPRESS   0x0670
+#define IL_SQUISH_COMPRESS   0x0671
+#define IL_SUB_NEXT   0x0680
+#define IL_SUB_MIPMAP   0x0681
+#define IL_SUB_LAYER   0x0682
+#define IL_COMPRESS_MODE   0x0700
+#define IL_COMPRESS_NONE   0x0701
+#define IL_COMPRESS_RLE   0x0702
+#define IL_COMPRESS_LZO   0x0703
+#define IL_COMPRESS_ZLIB   0x0704
+#define IL_TGA_CREATE_STAMP   0x0710
+#define IL_JPG_QUALITY   0x0711
+#define IL_PNG_INTERLACE   0x0712
+#define IL_TGA_RLE   0x0713
+#define IL_BMP_RLE   0x0714
+#define IL_SGI_RLE   0x0715
+#define IL_TGA_ID_STRING   0x0717
+#define IL_TGA_AUTHNAME_STRING   0x0718
+#define IL_TGA_AUTHCOMMENT_STRING   0x0719
+#define IL_PNG_AUTHNAME_STRING   0x071A
+#define IL_PNG_TITLE_STRING   0x071B
+#define IL_PNG_DESCRIPTION_STRING   0x071C
+#define IL_TIF_DESCRIPTION_STRING   0x071D
+#define IL_TIF_HOSTCOMPUTER_STRING   0x071E
+#define IL_TIF_DOCUMENTNAME_STRING   0x071F
+#define IL_TIF_AUTHNAME_STRING   0x0720
+#define IL_JPG_SAVE_FORMAT   0x0721
+#define IL_CHEAD_HEADER_STRING   0x0722
+#define IL_PCD_PICNUM   0x0723
+#define IL_PNG_ALPHA_INDEX   0x0724
+#define IL_JPG_PROGRESSIVE   0x0725
+#define IL_VTF_COMP   0x0726
+#define IL_DXTC_FORMAT   0x0705
+#define IL_DXT1   0x0706
+#define IL_DXT2   0x0707
+#define IL_DXT3   0x0708
+#define IL_DXT4   0x0709
+#define IL_DXT5   0x070A
+#define IL_DXT_NO_COMP   0x070B
+#define IL_KEEP_DXTC_DATA   0x070C
+#define IL_DXTC_DATA_FORMAT   0x070D
+#define IL_3DC   0x070E
+#define IL_RXGB   0x070F
+#define IL_ATI1N   0x0710
+#define IL_DXT1A   0x0711
+#define IL_CUBEMAP_POSITIVEX   0x00000400
+#define IL_CUBEMAP_NEGATIVEX   0x00000800
+#define IL_CUBEMAP_POSITIVEY   0x00001000
+#define IL_CUBEMAP_NEGATIVEY   0x00002000
+#define IL_CUBEMAP_POSITIVEZ   0x00004000
+#define IL_CUBEMAP_NEGATIVEZ   0x00008000
+#define IL_SPHEREMAP   0x00010000
+#define IL_VERSION_NUM   0x0DE2
+#define IL_IMAGE_WIDTH   0x0DE4
+#define IL_IMAGE_HEIGHT   0x0DE5
+#define IL_IMAGE_DEPTH   0x0DE6
+#define IL_IMAGE_SIZE_OF_DATA   0x0DE7
+#define IL_IMAGE_BPP   0x0DE8
+#define IL_IMAGE_BYTES_PER_PIXEL   0x0DE8
+#define IL_IMAGE_BPP   0x0DE8
+#define IL_IMAGE_BITS_PER_PIXEL   0x0DE9
+#define IL_IMAGE_FORMAT   0x0DEA
+#define IL_IMAGE_TYPE   0x0DEB
+#define IL_PALETTE_TYPE   0x0DEC
+#define IL_PALETTE_SIZE   0x0DED
+#define IL_PALETTE_BPP   0x0DEE
+#define IL_PALETTE_NUM_COLS   0x0DEF
+#define IL_PALETTE_BASE_TYPE   0x0DF0
+#define IL_NUM_FACES   0x0DE1
+#define IL_NUM_IMAGES   0x0DF1
+#define IL_NUM_MIPMAPS   0x0DF2
+#define IL_NUM_LAYERS   0x0DF3
+#define IL_ACTIVE_IMAGE   0x0DF4
+#define IL_ACTIVE_MIPMAP   0x0DF5
+#define IL_ACTIVE_LAYER   0x0DF6
+#define IL_ACTIVE_FACE   0x0E00
+#define IL_CUR_IMAGE   0x0DF7
+#define IL_IMAGE_DURATION   0x0DF8
+#define IL_IMAGE_PLANESIZE   0x0DF9
+#define IL_IMAGE_BPC   0x0DFA
+#define IL_IMAGE_OFFX   0x0DFB
+#define IL_IMAGE_OFFY   0x0DFC
+#define IL_IMAGE_CUBEFLAGS   0x0DFD
+#define IL_IMAGE_ORIGIN   0x0DFE
+#define IL_IMAGE_CHANNELS   0x0DFF
+#define DEPRECATED   (D) D
+#define ILAPIENTRY
+#define IL_PACKSTRUCT
+#define ILAPI
+#define IL_SEEK_SET   0
+#define IL_SEEK_CUR   1
+#define IL_SEEK_END   2
+#define IL_EOF   -1
+#define ilClearColor   ilClearColour
+#define ilKeyColor   ilKeyColour
+#define imemclear(x, y)   memset(x,0,y);

Typedefs

+typedef unsigned int ILenum
+typedef unsigned char ILboolean
+typedef unsigned int ILbitfield
+typedef signed char ILbyte
+typedef signed short ILshort
+typedef int ILint
+typedef size_t ILsizei
+typedef unsigned char ILubyte
+typedef unsigned short ILushort
+typedef unsigned int ILuint
+typedef float ILfloat
+typedef float ILclampf
+typedef double ILdouble
+typedef double ILclampd
+typedef long long int ILint64
+typedef long long unsigned int ILuint64
+typedef void * ILHANDLE
+typedef void(ILAPIENTRY * fCloseRProc )(ILHANDLE)
+typedef void(ILAPIENTRY * fCloseWProc )(ILHANDLE)
+typedef void *(ILAPIENTRY * mAlloc )(const ILsizei)
+typedef ILenum(ILAPIENTRY * IL_LOADPROC )(ILconst_string)
+typedef ILenum(ILAPIENTRY * IL_SAVEPROC )(ILconst_string)

Functions

+typedef ILboolean (ILAPIENTRY *fEofProc)(ILHANDLE)
+typedef ILint (ILAPIENTRY *fGetcProc)(ILHANDLE)
+typedef ILHANDLE (ILAPIENTRY *fOpenRProc)(ILconst_string)
+typedef void (ILAPIENTRY *mFree)(const void *CONST_RESTRICT)
+ILAPI ILboolean ILAPIENTRY ilActiveFace (ILuint Number)
 Used for setting the current face if it is a cubemap.
+ILAPI ILboolean ILAPIENTRY ilActiveImage (ILuint Number)
 Used for setting the current image if it is an animation.
+ILAPI ILboolean ILAPIENTRY ilActiveLayer (ILuint Number)
 Used for setting the current layer if layers exist.
+ILAPI ILboolean ILAPIENTRY ilActiveMipmap (ILuint Number)
 Sets the current mipmap level.
+ILAPI ILboolean ILAPIENTRY ilApplyPal (ILconst_string FileName)
+ILAPI ILboolean ILAPIENTRY ilApplyProfile (ILstring InProfile, ILstring OutProfile)
+ILAPI void ILAPIENTRY ilBindImage (ILuint Image)
 Makes Image the current active image - similar to glBindTexture().
+ILAPI ILboolean ILAPIENTRY ilBlit (ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth)
+ILAPI ILboolean ILAPIENTRY ilClampNTSC (void)
 Clamps data values of unsigned bytes from 16 to 235 for display on an.
+ILAPI void ILAPIENTRY ilClearColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
+ILAPI ILboolean ILAPIENTRY ilClearImage (void)
 Clears the current bound image to the values specified in ilClearColour.
+ILAPI ILuint ILAPIENTRY ilCloneCurImage (void)
+ILAPI ILubyte *ILAPIENTRY ilCompressDXT (ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize)
 Compresses data to a DXT format using different methods.
+ILAPI ILboolean ILAPIENTRY ilCompressFunc (ILenum Mode)
ILAPI ILboolean ILAPIENTRY ilConvertImage (ILenum DestFormat, ILenum DestType)
 Converts the current image to the DestFormat format.
+ILAPI ILboolean ILAPIENTRY ilConvertPal (ILenum DestFormat)
 Converts the current image to the DestFormat format.
+ILAPI ILboolean ILAPIENTRY ilCopyImage (ILuint Src)
 Copies everything from Src to the current bound image.
+ILAPI ILuint ILAPIENTRY ilCopyPixels (ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
+ILAPI ILuint ILAPIENTRY ilCreateSubImage (ILenum Type, ILuint Num)
+ILAPI ILboolean ILAPIENTRY ilDefaultImage (void)
 Creates an ugly 64x64 black and yellow checkerboard image.
+ILAPI void ILAPIENTRY ilDeleteImage (const ILuint Num)
+ILAPI void ILAPIENTRY ilDeleteImages (ILsizei Num, const ILuint *Images)
 Deletes Num images from the image stack - similar to glDeleteTextures().
+ILAPI ILenum ILAPIENTRY ilDetermineType (ILconst_string FileName)
+ILAPI ILenum ILAPIENTRY ilDetermineTypeF (ILHANDLE File)
+ILAPI ILenum ILAPIENTRY ilDetermineTypeL (const void *Lump, ILuint Size)
+ILAPI ILboolean ILAPIENTRY ilDisable (ILenum Mode)
 Disables a mode.
+ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage (void)
+ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface (void)
+ILAPI ILboolean ILAPIENTRY ilEnable (ILenum Mode)
 Enables a mode.
+ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData (void)
+ILAPI ILboolean ILAPIENTRY ilFormatFunc (ILenum Mode)
 Sets the default format to be used.
+ILAPI void ILAPIENTRY ilGenImages (ILsizei Num, ILuint *Images)
 Creates Num images and puts their index in Images - similar to glGenTextures().
+ILAPI ILuint ILAPIENTRY ilGenImage (void)
+ILAPI ILubyte *ILAPIENTRY ilGetAlpha (ILenum Type)
+ILAPI ILboolean ILAPIENTRY ilGetBoolean (ILenum Mode)
 Returns the current value of the Mode.
+ILAPI void ILAPIENTRY ilGetBooleanv (ILenum Mode, ILboolean *Param)
 Sets Param equal to the current value of the Mode.
ILAPI ILubyte *ILAPIENTRY ilGetData (void)
 Returns a pointer to the current image's data.
+ILAPI ILuint ILAPIENTRY ilGetDXTCData (void *Buffer, ILuint BufferSize, ILenum DXTCFormat)
+ILAPI ILenum ILAPIENTRY ilGetError (void)
 Gets the last error on the error stack.
+ILAPI ILint ILAPIENTRY ilGetInteger (ILenum Mode)
 Returns the current value of the Mode.
+ILAPI void ILAPIENTRY ilGetIntegerv (ILenum Mode, ILint *Param)
 Sets Param equal to the current value of the Mode.
+ILAPI ILuint ILAPIENTRY ilGetLumpPos (void)
ILAPI ILubyte *ILAPIENTRY ilGetPalette (void)
 Returns a pointer to the current image's palette data.
+ILAPI ILconst_string ILAPIENTRY ilGetString (ILenum StringName)
 Returns a constant string detailing aspects about this library.
+ILAPI void ILAPIENTRY ilHint (ILenum Target, ILenum Mode)
 Specifies implementation-dependent performance hints.
+ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha (void)
+ILAPI void ILAPIENTRY ilInit (void)
+ILAPI ILboolean ILAPIENTRY ilImageToDxtcData (ILenum Format)
+ILAPI ILboolean ILAPIENTRY ilIsDisabled (ILenum Mode)
 Checks whether the mode is disabled.
+ILAPI ILboolean ILAPIENTRY ilIsEnabled (ILenum Mode)
 Checks whether the mode is enabled.
+ILAPI ILboolean ILAPIENTRY ilIsImage (ILuint Image)
 Checks if Image is a valid ilGenImages-generated image (like glIsTexture()).
+ILAPI ILboolean ILAPIENTRY ilIsValid (ILenum Type, ILconst_string FileName)
+ILAPI ILboolean ILAPIENTRY ilIsValidF (ILenum Type, ILHANDLE File)
+ILAPI ILboolean ILAPIENTRY ilIsValidL (ILenum Type, void *Lump, ILuint Size)
+ILAPI void ILAPIENTRY ilKeyColour (ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha)
ILAPI ILboolean ILAPIENTRY ilLoad (ILenum Type, ILconst_string FileName)
 Attempts to load an image from a file. The file format is specified by the user.
ILAPI ILboolean ILAPIENTRY ilLoadF (ILenum Type, ILHANDLE File)
 Attempts to load an image from a file stream. The file format is specified by the user.
ILAPI ILboolean ILAPIENTRY ilLoadImage (ILconst_string FileName)
 Attempts to load an image from a file with various different methods before failing - very generic.
ILAPI ILboolean ILAPIENTRY ilLoadL (ILenum Type, const void *Lump, ILuint Size)
 Attempts to load an image from a memory buffer. The file format is specified by the user.
+ILAPI ILboolean ILAPIENTRY ilLoadPal (ILconst_string FileName)
 Loads a palette from FileName into the current image's palette.
+ILAPI void ILAPIENTRY ilModAlpha (ILdouble AlphaValue)
+ILAPI ILboolean ILAPIENTRY ilOriginFunc (ILenum Mode)
 Sets the default origin to be used.
+ILAPI ILboolean ILAPIENTRY ilOverlayImage (ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord)
 Overlays the image found in Src on top of the current bound image at the coords specified.
+ILAPI void ILAPIENTRY ilPopAttrib (void)
 Pops the last entry off the state stack into the current states.
+ILAPI void ILAPIENTRY ilPushAttrib (ILuint Bits)
 Pushes the states indicated by Bits onto the state stack.
+ILAPI void ILAPIENTRY ilRegisterFormat (ILenum Format)
+ILAPI ILboolean ILAPIENTRY ilRegisterLoad (ILconst_string Ext, IL_LOADPROC Load)
+ILAPI ILboolean ILAPIENTRY ilRegisterMipNum (ILuint Num)
+ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces (ILuint Num)
+ILAPI ILboolean ILAPIENTRY ilRegisterNumImages (ILuint Num)
+ILAPI void ILAPIENTRY ilRegisterOrigin (ILenum Origin)
+ILAPI void ILAPIENTRY ilRegisterPal (void *Pal, ILuint Size, ILenum Type)
+ILAPI ILboolean ILAPIENTRY ilRegisterSave (ILconst_string Ext, IL_SAVEPROC Save)
+ILAPI void ILAPIENTRY ilRegisterType (ILenum Type)
+ILAPI ILboolean ILAPIENTRY ilRemoveLoad (ILconst_string Ext)
 Unregisters a load extension - doesn't have to be called.
+ILAPI ILboolean ILAPIENTRY ilRemoveSave (ILconst_string Ext)
 Unregisters a save extension - doesn't have to be called.
+ILAPI void ILAPIENTRY ilResetMemory (void)
+ILAPI void ILAPIENTRY ilResetRead (void)
+ILAPI void ILAPIENTRY ilResetWrite (void)
ILAPI ILboolean ILAPIENTRY ilSave (ILenum Type, ILconst_string FileName)
 Attempts to save an image to a file. The file format is specified by the user.
ILAPI ILuint ILAPIENTRY ilSaveF (ILenum Type, ILHANDLE File)
 Attempts to save an image to a file stream. The file format is specified by the user.
ILAPI ILboolean ILAPIENTRY ilSaveImage (ILconst_string FileName)
 Saves the current image based on the extension given in FileName.
ILAPI ILuint ILAPIENTRY ilSaveL (ILenum Type, void *Lump, ILuint Size)
 Attempts to save an image to a memory buffer. The file format is specified by the user.
+ILAPI ILboolean ILAPIENTRY ilSavePal (ILconst_string FileName)
+ILAPI ILboolean ILAPIENTRY ilSetAlpha (ILdouble AlphaValue)
ILAPI ILboolean ILAPIENTRY ilSetData (void *Data)
 Uploads Data of the same size to replace the current image's data.
+ILAPI ILboolean ILAPIENTRY ilSetDuration (ILuint Duration)
+ILAPI void ILAPIENTRY ilSetInteger (ILenum Mode, ILint Param)
+ILAPI void ILAPIENTRY ilSetMemory (mAlloc, mFree)
+ILAPI void ILAPIENTRY ilSetPixels (ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data)
+ILAPI void ILAPIENTRY ilSetRead (fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc)
 Allows you to override the default file-reading functions.
+ILAPI void ILAPIENTRY ilSetString (ILenum Mode, const char *String)
+ILAPI void ILAPIENTRY ilSetWrite (fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc)
+ILAPI void ILAPIENTRY ilShutDown (void)
+ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData (ILenum Format)
ILAPI ILboolean ILAPIENTRY ilTexImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data)
 Changes the current bound image to use these new dimensions (current data is destroyed).
+ILAPI ILboolean ILAPIENTRY ilTexImageDxtc (ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte *data)
+ILAPI ILenum ILAPIENTRY ilTypeFromExt (ILconst_string FileName)
+ILAPI ILboolean ILAPIENTRY ilTypeFunc (ILenum Mode)
 Sets the default type to be used.
+ILAPI ILboolean ILAPIENTRY ilLoadData (ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Reads a raw data file.
+ILAPI ILboolean ILAPIENTRY ilLoadDataF (ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Reads an already-opened raw data file.
+ILAPI ILboolean ILAPIENTRY ilLoadDataL (void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp)
 Reads from a raw data memory "lump".
+ILAPI ILboolean ILAPIENTRY ilSaveData (ILconst_string FileName)
 Save the current image to FileName as raw data.
+


Detailed Description

+The main include file for DevIL

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilConvertImage (ILenum  DestFormat,
ILenum  DestType 
)
+
+
+ +

+Converts the current image to the DestFormat format. +

+

Parameters:
+ + + +
DestFormat An enum of the desired output format. Any format values are accepted.
DestType An enum of the desired output type. Any type values are accepted.
+
+
Exceptions:
+ + + + +
IL_ILLEGAL_OPERATION No currently bound image
IL_INVALID_CONVERSION DestFormat or DestType was an invalid identifier.
IL_OUT_OF_MEMORY Could not allocate enough memory.
+
+
Returns:
Boolean value of failure or success
+ +
+

+ +

+
+ + + + + + + + + +
ILAPI ILubyte* ILAPIENTRY ilGetData (void   ) 
+
+
+ +

+Returns a pointer to the current image's data. +

+The pointer to the image data returned by this function is only valid until any operations are done on the image. After any operations, this function should be called again. The pointer can be cast to other types for images that have more than one byte per channel for easier access to data.

Exceptions:
+ + +
IL_ILLEGAL_OPERATION No currently bound image
+
+
Returns:
ILubyte pointer to image data.
+ +
+

+ +

+
+ + + + + + + + + +
ILAPI ILubyte* ILAPIENTRY ilGetPalette (void   ) 
+
+
+ +

+Returns a pointer to the current image's palette data. +

+The pointer to the image palette data returned by this function is only valid until any operations are done on the image. After any operations, this function should be called again.

Exceptions:
+ + +
IL_ILLEGAL_OPERATION No currently bound image
+
+
Returns:
ILubyte pointer to image palette data.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilLoad (ILenum  Type,
ILconst_string  FileName 
)
+
+
+ +

+Attempts to load an image from a file. The file format is specified by the user. +

+

Parameters:
+ + + +
Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. If IL_TYPE_UNKNOWN is specified, ilLoad will try to determine the type of the file and load it.
FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename of the file to load.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if all three loading methods have been tried and failed.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilLoadF (ILenum  Type,
ILHANDLE  File 
)
+
+
+ +

+Attempts to load an image from a file stream. The file format is specified by the user. +

+

Parameters:
+ + + +
Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. If IL_TYPE_UNKNOWN is specified, ilLoadF will try to determine the type of the file and load it.
File File stream to load from.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if loading fails.
+ +
+

+ +

+
+ + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilLoadImage (ILconst_string  FileName  ) 
+
+
+ +

+Attempts to load an image from a file with various different methods before failing - very generic. +

+The ilLoadImage function allows a general interface to the specific internal file-loading routines. First, it finds the extension and checks to see if any user-registered functions (registered through ilRegisterLoad) match the extension. If nothing matches, it takes the extension and determines which function to call based on it. Lastly, it attempts to identify the image based on various image header verification functions, such as ilIsValidPngF. If all this checking fails, IL_FALSE is returned with no modification to the current bound image.

Parameters:
+ + +
FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename of the file to load.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if all three loading methods have been tried and failed.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilLoadL (ILenum  Type,
const void *  Lump,
ILuint  Size 
)
+
+
+ +

+Attempts to load an image from a memory buffer. The file format is specified by the user. +

+

Parameters:
+ + + + +
Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. If IL_TYPE_UNKNOWN is specified, ilLoadL will try to determine the type of the file and load it.
Lump The buffer where the file data is located
Size Size of the buffer
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if loading fails.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilSave (ILenum  Type,
ILconst_string  FileName 
)
+
+
+ +

+Attempts to save an image to a file. The file format is specified by the user. +

+

Parameters:
+ + + +
Type Format of this file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, IL_VTF, IL_WBMP and IL_JASC_PAL.
FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename to save to.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if saving failed.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
ILAPI ILuint ILAPIENTRY ilSaveF (ILenum  Type,
ILHANDLE  File 
)
+
+
+ +

+Attempts to save an image to a file stream. The file format is specified by the user. +

+

Parameters:
+ + + +
Type Format of this file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, IL_VTF, IL_WBMP and IL_JASC_PAL.
File File stream to save to.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if saving failed.
+ +
+

+ +

+
+ + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilSaveImage (ILconst_string  FileName  ) 
+
+
+ +

+Saves the current image based on the extension given in FileName. +

+

Parameters:
+ + +
FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives the filename to save to.
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if saving failed.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ILAPI ILuint ILAPIENTRY ilSaveL (ILenum  Type,
void *  Lump,
ILuint  Size 
)
+
+
+ +

+Attempts to save an image to a memory buffer. The file format is specified by the user. +

+

Parameters:
+ + + + +
Type Format of this image file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, IL_VTF, IL_WBMP and IL_JASC_PAL.
Lump Memory buffer to save to
Size Size of the memory buffer
+
+
Returns:
Boolean value of failure or success. Returns IL_FALSE if saving failed.
+ +
+

+ +

+
+ + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilSetData (void *  Data  ) 
+
+
+ +

+Uploads Data of the same size to replace the current image's data. +

+

Parameters:
+ + +
Data New image data to update the currently bound image
+
+
Exceptions:
+ + + +
IL_ILLEGAL_OPERATION No currently bound image
IL_INVALID_PARAM Data was NULL.
+
+
Returns:
Boolean value of failure or success
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ILAPI ILboolean ILAPIENTRY ilTexImage (ILuint  Width,
ILuint  Height,
ILuint  Depth,
ILubyte  Bpp,
ILenum  Format,
ILenum  Type,
void *  Data 
)
+
+
+ +

+Changes the current bound image to use these new dimensions (current data is destroyed). +

+

Parameters:
+ + + + + + + + +
Width Specifies the new image width. This cannot be 0.
Height Specifies the new image height. This cannot be 0.
Depth Specifies the new image depth. This cannot be 0.
Bpp Number of channels (ex. 3 for RGB)
Format Enum of the desired format. Any format values are accepted.
Type Enum of the desired type. Any type values are accepted.
Data Specifies data that should be copied to the new image. If this parameter is NULL, no data is copied, and the new image data consists of undefined values.
+
+
Exceptions:
+ + + + +
IL_ILLEGAL_OPERATION No currently bound image.
IL_INVALID_PARAM One of the parameters is incorrect, such as one of the dimensions being 0.
IL_OUT_OF_MEMORY Could not allocate enough memory.
+
+
Returns:
Boolean value of failure or success
+ +
+

+

+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__alloc_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__alloc_8h-source.html new file mode 100644 index 00000000..130ccfbb --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__alloc_8h-source.html @@ -0,0 +1,62 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_alloc.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__bits_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__bits_8h-source.html new file mode 100644 index 00000000..a4a42ba4 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__bits_8h-source.html @@ -0,0 +1,64 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_bits.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__bmp_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__bmp_8h-source.html new file mode 100644 index 00000000..a416e174 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__bmp_8h-source.html @@ -0,0 +1,128 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_bmp.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__dcx_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__dcx_8h-source.html new file mode 100644 index 00000000..d1bbdbd9 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__dcx_8h-source.html @@ -0,0 +1,73 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_dcx.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__dds_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__dds_8h-source.html new file mode 100644 index 00000000..b3f01767 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__dds_8h-source.html @@ -0,0 +1,242 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_dds.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__doompal_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__doompal_8h-source.html new file mode 100644 index 00000000..0fdf3bc1 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__doompal_8h-source.html @@ -0,0 +1,297 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_doompal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__dpx_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__dpx_8h-source.html new file mode 100644 index 00000000..32e97310 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__dpx_8h-source.html @@ -0,0 +1,171 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_dpx.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__endian_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__endian_8h-source.html new file mode 100644 index 00000000..92b5b620 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__endian_8h-source.html @@ -0,0 +1,398 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_endian.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__exr_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__exr_8h-source.html new file mode 100644 index 00000000..001c103e --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__exr_8h-source.html @@ -0,0 +1,111 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_exr.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__files_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__files_8h-source.html new file mode 100644 index 00000000..31a225a4 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__files_8h-source.html @@ -0,0 +1,100 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_files.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__gif_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__gif_8h-source.html new file mode 100644 index 00000000..3f8b82f4 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__gif_8h-source.html @@ -0,0 +1,92 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_gif.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__hdr_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__hdr_8h-source.html new file mode 100644 index 00000000..25b65c36 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__hdr_8h-source.html @@ -0,0 +1,64 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_hdr.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__icns_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__icns_8h-source.html new file mode 100644 index 00000000..e2e3c3fc --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__icns_8h-source.html @@ -0,0 +1,63 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_icns.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__icon_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__icon_8h-source.html new file mode 100644 index 00000000..341b29fb --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__icon_8h-source.html @@ -0,0 +1,91 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_icon.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__internal_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__internal_8h-source.html new file mode 100644 index 00000000..0658c809 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__internal_8h-source.html @@ -0,0 +1,560 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_internal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__jp2_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__jp2_8h-source.html new file mode 100644 index 00000000..e2f30597 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__jp2_8h-source.html @@ -0,0 +1,43 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_jp2.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__jpeg_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__jpeg_8h-source.html new file mode 100644 index 00000000..1bf5ae50 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__jpeg_8h-source.html @@ -0,0 +1,50 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_jpeg.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__lif_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__lif_8h-source.html new file mode 100644 index 00000000..b11d0964 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__lif_8h-source.html @@ -0,0 +1,58 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_lif.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__manip_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__manip_8h-source.html new file mode 100644 index 00000000..155b6d03 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__manip_8h-source.html @@ -0,0 +1,270 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_manip.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__mdl_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__mdl_8h-source.html new file mode 100644 index 00000000..7429bb1a --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__mdl_8h-source.html @@ -0,0 +1,49 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_mdl.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__pal_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__pal_8h-source.html new file mode 100644 index 00000000..16099143 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__pal_8h-source.html @@ -0,0 +1,75 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_pal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__pcx_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__pcx_8h-source.html new file mode 100644 index 00000000..e62fff8c --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__pcx_8h-source.html @@ -0,0 +1,79 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_pcx.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__pic_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__pic_8h-source.html new file mode 100644 index 00000000..6ea3c077 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__pic_8h-source.html @@ -0,0 +1,100 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_pic.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__pnm_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__pnm_8h-source.html new file mode 100644 index 00000000..0db51027 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__pnm_8h-source.html @@ -0,0 +1,67 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_pnm.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__psd_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__psd_8h-source.html new file mode 100644 index 00000000..0a37eb71 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__psd_8h-source.html @@ -0,0 +1,77 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_psd.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__psp_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__psp_8h-source.html new file mode 100644 index 00000000..d1491272 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__psp_8h-source.html @@ -0,0 +1,271 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_psp.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__q2pal_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__q2pal_8h-source.html new file mode 100644 index 00000000..322a7681 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__q2pal_8h-source.html @@ -0,0 +1,297 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_q2pal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__register_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__register_8h-source.html new file mode 100644 index 00000000..554f9248 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__register_8h-source.html @@ -0,0 +1,62 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_register.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__rle_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__rle_8h-source.html new file mode 100644 index 00000000..95342927 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__rle_8h-source.html @@ -0,0 +1,113 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_rle.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__sgi_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__sgi_8h-source.html new file mode 100644 index 00000000..83968a10 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__sgi_8h-source.html @@ -0,0 +1,87 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_sgi.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__stack_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__stack_8h-source.html new file mode 100644 index 00000000..7e49c458 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__stack_8h-source.html @@ -0,0 +1,64 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_stack.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__states_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__states_8h-source.html new file mode 100644 index 00000000..cba11f6b --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__states_8h-source.html @@ -0,0 +1,420 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_states.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__targa_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__targa_8h-source.html new file mode 100644 index 00000000..418d9b56 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__targa_8h-source.html @@ -0,0 +1,130 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_targa.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__utx_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__utx_8h-source.html new file mode 100644 index 00000000..7e54c1a7 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__utx_8h-source.html @@ -0,0 +1,121 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_utx.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__vtf_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__vtf_8h-source.html new file mode 100644 index 00000000..3c5618ba --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__vtf_8h-source.html @@ -0,0 +1,153 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_vtf.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__wdp_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__wdp_8h-source.html new file mode 100644 index 00000000..692f602d --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__wdp_8h-source.html @@ -0,0 +1,209 @@ + + +DevIL: /home/dwoods/DevIL/src-IL/include/il_wdp.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/il__wrap_8h-source.html b/libs/DevIL-1.7.8/docs/html/il__wrap_8h-source.html new file mode 100644 index 00000000..ec88cf15 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/il__wrap_8h-source.html @@ -0,0 +1,226 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/il_wrap.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilu_8h-source.html new file mode 100644 index 00000000..1f277187 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu_8h-source.html @@ -0,0 +1,212 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilu.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu_8h.html b/libs/DevIL-1.7.8/docs/html/ilu_8h.html new file mode 100644 index 00000000..600d6d6a --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu_8h.html @@ -0,0 +1,309 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilu.h File Reference + + + + + +
+

/home/dwoods/DevIL/include/IL/ilu.h File Reference

#include <IL/il.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ILinfo
struct  ILpointf
struct  ILpointi

Defines

+#define __ilu_h_
+#define __ILU_H__
+#define ILU_VERSION_1_7_8   1
+#define ILU_VERSION   178
+#define ILU_FILTER   0x2600
+#define ILU_NEAREST   0x2601
+#define ILU_LINEAR   0x2602
+#define ILU_BILINEAR   0x2603
+#define ILU_SCALE_BOX   0x2604
+#define ILU_SCALE_TRIANGLE   0x2605
+#define ILU_SCALE_BELL   0x2606
+#define ILU_SCALE_BSPLINE   0x2607
+#define ILU_SCALE_LANCZOS3   0x2608
+#define ILU_SCALE_MITCHELL   0x2609
+#define ILU_INVALID_ENUM   0x0501
+#define ILU_OUT_OF_MEMORY   0x0502
+#define ILU_INTERNAL_ERROR   0x0504
+#define ILU_INVALID_VALUE   0x0505
+#define ILU_ILLEGAL_OPERATION   0x0506
+#define ILU_INVALID_PARAM   0x0509
+#define ILU_PLACEMENT   0x0700
+#define ILU_LOWER_LEFT   0x0701
+#define ILU_LOWER_RIGHT   0x0702
+#define ILU_UPPER_LEFT   0x0703
+#define ILU_UPPER_RIGHT   0x0704
+#define ILU_CENTER   0x0705
+#define ILU_CONVOLUTION_MATRIX   0x0710
+#define ILU_VERSION_NUM   IL_VERSION_NUM
+#define ILU_VENDOR   IL_VENDOR
+#define ILU_ENGLISH   0x0800
+#define ILU_ARABIC   0x0801
+#define ILU_DUTCH   0x0802
+#define ILU_JAPANESE   0x0803
+#define ILU_SPANISH   0x0804
+#define ILU_GERMAN   0x0805
+#define ILU_FRENCH   0x0806
+#define iluColorsUsed   iluColoursUsed
+#define iluSwapColors   iluSwapColours
+#define iluReplaceColor   iluReplaceColour
+#define iluScaleColor   iluScaleColour

Functions

+ILAPI ILboolean ILAPIENTRY iluAlienify (void)
 Funny as hell filter that I stumbled upon accidentally.
+ILAPI ILboolean ILAPIENTRY iluBlurAvg (ILuint Iter)
+ILAPI ILboolean ILAPIENTRY iluBlurGaussian (ILuint Iter)
+ILAPI ILboolean ILAPIENTRY iluBuildMipmaps (void)
+ILAPI ILuint ILAPIENTRY iluColoursUsed (void)
+ILAPI ILboolean ILAPIENTRY iluCompareImage (ILuint Comp)
+ILAPI ILboolean ILAPIENTRY iluContrast (ILfloat Contrast)
+ILAPI ILboolean ILAPIENTRY iluCrop (ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth)
+ILAPI void ILAPIENTRY iluDeleteImage (ILuint Id)
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectE (void)
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectP (void)
+ILAPI ILboolean ILAPIENTRY iluEdgeDetectS (void)
+ILAPI ILboolean ILAPIENTRY iluEmboss (void)
+ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas (ILuint Width, ILuint Height, ILuint Depth)
 Enlarges the canvas.
+ILAPI ILboolean ILAPIENTRY iluEnlargeImage (ILfloat XDim, ILfloat YDim, ILfloat ZDim)
+ILAPI ILboolean ILAPIENTRY iluEqualize (void)
+ILAPI ILconst_string ILAPIENTRY iluErrorString (ILenum Error)
+ILAPI ILboolean ILAPIENTRY iluConvolution (ILint *matrix, ILint scale, ILint bias)
+ILAPI ILboolean ILAPIENTRY iluFlipImage (void)
 Flips an image over its x axis.
+ILAPI ILboolean ILAPIENTRY iluGammaCorrect (ILfloat Gamma)
+ILAPI ILuint ILAPIENTRY iluGenImage (void)
+ILAPI void ILAPIENTRY iluGetImageInfo (ILinfo *Info)
 Retrieves information about the current bound image.
+ILAPI ILint ILAPIENTRY iluGetInteger (ILenum Mode)
+ILAPI void ILAPIENTRY iluGetIntegerv (ILenum Mode, ILint *Param)
+ILAPI ILstring ILAPIENTRY iluGetString (ILenum StringName)
+ILAPI void ILAPIENTRY iluImageParameter (ILenum PName, ILenum Param)
+ILAPI void ILAPIENTRY iluInit (void)
+ILAPI ILboolean ILAPIENTRY iluInvertAlpha (void)
 Inverts the alpha in the image.
+ILAPI ILuint ILAPIENTRY iluLoadImage (ILconst_string FileName)
+ILAPI ILboolean ILAPIENTRY iluMirror (void)
 Mirrors an image over its y axis.
+ILAPI ILboolean ILAPIENTRY iluNegative (void)
 Inverts the colours in the image.
+ILAPI ILboolean ILAPIENTRY iluNoisify (ILclampf Tolerance)
+ILAPI ILboolean ILAPIENTRY iluPixelize (ILuint PixSize)
 Pixelizes an image.
+ILAPI void ILAPIENTRY iluRegionfv (ILpointf *Points, ILuint n)
+ILAPI void ILAPIENTRY iluRegioniv (ILpointi *Points, ILuint n)
+ILAPI ILboolean ILAPIENTRY iluReplaceColour (ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance)
+ILAPI ILboolean ILAPIENTRY iluRotate (ILfloat Angle)
+ILAPI ILboolean ILAPIENTRY iluRotate3D (ILfloat x, ILfloat y, ILfloat z, ILfloat Angle)
+ILAPI ILboolean ILAPIENTRY iluSaturate1f (ILfloat Saturation)
+ILAPI ILboolean ILAPIENTRY iluSaturate4f (ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation)
+ILAPI ILboolean ILAPIENTRY iluScale (ILuint Width, ILuint Height, ILuint Depth)
+ILAPI ILboolean ILAPIENTRY iluScaleAlpha (ILfloat scale)
+ILAPI ILboolean ILAPIENTRY iluScaleColours (ILfloat r, ILfloat g, ILfloat b)
 Scales image colours.
+ILAPI ILboolean ILAPIENTRY iluSetLanguage (ILenum Language)
+ILAPI ILboolean ILAPIENTRY iluSharpen (ILfloat Factor, ILuint Iter)
+ILAPI ILboolean ILAPIENTRY iluSwapColours (void)
+ILAPI ILboolean ILAPIENTRY iluWave (ILfloat Angle)
+


Detailed Description

+The main include file for ILU
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu__alloc_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilu__alloc_8h-source.html new file mode 100644 index 00000000..fc5638e5 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu__alloc_8h-source.html @@ -0,0 +1,48 @@ + + +DevIL: /home/dwoods/DevIL/src-ILU/include/ilu_alloc.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu__filter_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilu__filter_8h-source.html new file mode 100644 index 00000000..b8d8ca8e --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu__filter_8h-source.html @@ -0,0 +1,102 @@ + + +DevIL: /home/dwoods/DevIL/src-ILU/include/ilu_filter.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu__internal_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilu__internal_8h-source.html new file mode 100644 index 00000000..fc671a19 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu__internal_8h-source.html @@ -0,0 +1,121 @@ + + +DevIL: /home/dwoods/DevIL/src-ILU/include/ilu_internal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilu__states_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilu__states_8h-source.html new file mode 100644 index 00000000..f9e4540f --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilu__states_8h-source.html @@ -0,0 +1,41 @@ + + +DevIL: /home/dwoods/DevIL/src-ILU/include/ilu_states.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut_8h-source.html new file mode 100644 index 00000000..8d415e9c --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut_8h-source.html @@ -0,0 +1,405 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilut.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut_8h.html b/libs/DevIL-1.7.8/docs/html/ilut_8h.html new file mode 100644 index 00000000..9d08959c --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut_8h.html @@ -0,0 +1,204 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilut.h File Reference + + + + + +
+

/home/dwoods/DevIL/include/IL/ilut.h File Reference

#include <IL/il.h>
+#include <IL/ilu.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

+#define __ilut_h_
+#define __ILUT_H__
+#define ILUT_VERSION_1_7_8   1
+#define ILUT_VERSION   178
+#define ILUT_OPENGL_BIT   0x00000001
+#define ILUT_D3D_BIT   0x00000002
+#define ILUT_ALL_ATTRIB_BITS   0x000FFFFF
+#define ILUT_INVALID_ENUM   0x0501
+#define ILUT_OUT_OF_MEMORY   0x0502
+#define ILUT_INVALID_VALUE   0x0505
+#define ILUT_ILLEGAL_OPERATION   0x0506
+#define ILUT_INVALID_PARAM   0x0509
+#define ILUT_COULD_NOT_OPEN_FILE   0x050A
+#define ILUT_STACK_OVERFLOW   0x050E
+#define ILUT_STACK_UNDERFLOW   0x050F
+#define ILUT_BAD_DIMENSIONS   0x0511
+#define ILUT_NOT_SUPPORTED   0x0550
+#define ILUT_PALETTE_MODE   0x0600
+#define ILUT_OPENGL_CONV   0x0610
+#define ILUT_D3D_MIPLEVELS   0x0620
+#define ILUT_MAXTEX_WIDTH   0x0630
+#define ILUT_MAXTEX_HEIGHT   0x0631
+#define ILUT_MAXTEX_DEPTH   0x0632
+#define ILUT_GL_USE_S3TC   0x0634
+#define ILUT_D3D_USE_DXTC   0x0634
+#define ILUT_GL_GEN_S3TC   0x0635
+#define ILUT_D3D_GEN_DXTC   0x0635
+#define ILUT_S3TC_FORMAT   0x0705
+#define ILUT_DXTC_FORMAT   0x0705
+#define ILUT_D3D_POOL   0x0706
+#define ILUT_D3D_ALPHA_KEY_COLOR   0x0707
+#define ILUT_D3D_ALPHA_KEY_COLOUR   0x0707
+#define ILUT_FORCE_INTEGER_FORMAT   0x0636
+#define ILUT_GL_AUTODETECT_TEXTURE_TARGET   0x0807
+#define ILUT_VERSION_NUM   IL_VERSION_NUM
+#define ILUT_VENDOR   IL_VENDOR
+#define ILUT_OPENGL   0
+#define ILUT_ALLEGRO   1
+#define ILUT_WIN32   2
+#define ILUT_DIRECT3D8   3
+#define ILUT_DIRECT3D9   4
+#define ILUT_X11   5
+#define ILUT_DIRECT3D10   6

Functions

+ILAPI ILboolean ILAPIENTRY ilutDisable (ILenum Mode)
+ILAPI ILboolean ILAPIENTRY ilutEnable (ILenum Mode)
+ILAPI ILboolean ILAPIENTRY ilutGetBoolean (ILenum Mode)
+ILAPI void ILAPIENTRY ilutGetBooleanv (ILenum Mode, ILboolean *Param)
+ILAPI ILint ILAPIENTRY ilutGetInteger (ILenum Mode)
+ILAPI void ILAPIENTRY ilutGetIntegerv (ILenum Mode, ILint *Param)
+ILAPI ILstring ILAPIENTRY ilutGetString (ILenum StringName)
+ILAPI void ILAPIENTRY ilutInit (void)
+ILAPI ILboolean ILAPIENTRY ilutIsDisabled (ILenum Mode)
+ILAPI ILboolean ILAPIENTRY ilutIsEnabled (ILenum Mode)
+ILAPI void ILAPIENTRY ilutPopAttrib (void)
+ILAPI void ILAPIENTRY ilutPushAttrib (ILuint Bits)
+ILAPI void ILAPIENTRY ilutSetInteger (ILenum Mode, ILint Param)
+ILAPI ILboolean ILAPIENTRY ilutRenderer (ILenum Renderer)
+


Detailed Description

+The main include file for ILUT
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut__allegro_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut__allegro_8h-source.html new file mode 100644 index 00000000..9657b7b2 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut__allegro_8h-source.html @@ -0,0 +1,48 @@ + + +DevIL: /home/dwoods/DevIL/src-ILUT/include/ilut_allegro.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut__config_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut__config_8h-source.html new file mode 100644 index 00000000..e7ad40cd --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut__config_8h-source.html @@ -0,0 +1,47 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilut_config.h Source File + + + + + +
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut__internal_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut__internal_8h-source.html new file mode 100644 index 00000000..fd98a485 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut__internal_8h-source.html @@ -0,0 +1,120 @@ + + +DevIL: /home/dwoods/DevIL/src-ILUT/include/ilut_internal.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut__opengl_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut__opengl_8h-source.html new file mode 100644 index 00000000..7944d710 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut__opengl_8h-source.html @@ -0,0 +1,68 @@ + + +DevIL: /home/dwoods/DevIL/src-ILUT/include/ilut_opengl.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/ilut__states_8h-source.html b/libs/DevIL-1.7.8/docs/html/ilut__states_8h-source.html new file mode 100644 index 00000000..fa19d1f5 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/ilut__states_8h-source.html @@ -0,0 +1,78 @@ + + +DevIL: /home/dwoods/DevIL/src-ILUT/include/ilut_states.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/include_2IL_2ilu__region_8h-source.html b/libs/DevIL-1.7.8/docs/html/include_2IL_2ilu__region_8h-source.html new file mode 100644 index 00000000..783e951a --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/include_2IL_2ilu__region_8h-source.html @@ -0,0 +1,46 @@ + + +DevIL: /home/dwoods/DevIL/include/IL/ilu_region.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/index.html b/libs/DevIL-1.7.8/docs/html/index.html new file mode 100644 index 00000000..bffc6b1a --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/index.html @@ -0,0 +1,25 @@ + + +DevIL: Main Page + + + + + +
+

DevIL Documentation

+

+

+
Generated on Sun Mar 8 20:01:41 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/src-ILU_2include_2ilu__region_8h-source.html b/libs/DevIL-1.7.8/docs/html/src-ILU_2include_2ilu__region_8h-source.html new file mode 100644 index 00000000..820b425c --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/src-ILU_2include_2ilu__region_8h-source.html @@ -0,0 +1,49 @@ + + +DevIL: /home/dwoods/DevIL/src-ILU/include/ilu_region.h Source File + + + + + +
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/structILimage.html b/libs/DevIL-1.7.8/docs/html/structILimage.html new file mode 100644 index 00000000..7a7ebbfc --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/structILimage.html @@ -0,0 +1,155 @@ + + +DevIL: ILimage Struct Reference + + + + + +
+

ILimage Struct Reference

The Fundamental Image structure. +More... +

+#include <devil_internal_exports.h> +

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

Data Fields

+ILuint Width
 the image's width
+ILuint Height
 the image's height
+ILuint Depth
 the image's depth
+ILubyte Bpp
 bytes per pixel (now number of channels)
+ILubyte Bpc
 bytes per channel
+ILuint Bps
 bytes per scanline (components for IL)
+ILubyte * Data
 the image data
+ILuint SizeOfData
 the total size of the data (in bytes)
+ILuint SizeOfPlane
 SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes).
+ILenum Format
 image format (in IL enum style)
+ILenum Type
 image type (in IL enum style)
+ILenum Origin
 origin of the image
+ILpal Pal
 palette details
+ILuint Duration
 length of the time to display this "frame"
+ILenum CubeFlags
 cube map flags for sides present in chain
+struct ILimageMipmaps
 mipmapped versions of this image terminated by a NULL - usu. NULL
+struct ILimageNext
 next image in the chain - usu. NULL
+struct ILimageFaces
 next cubemap face in the chain - usu. NULL
+struct ILimageLayers
 subsequent layers in the chain - usu. NULL
+ILuint * AnimList
 animation list
+ILuint AnimSize
 animation list size
+void * Profile
 colour profile
+ILuint ProfileSize
 colour profile size
+ILuint OffX
 x-offset of the image
+ILuint OffY
 y-offset of the image
+ILubyte * DxtcData
 compressed data
+ILenum DxtcFormat
 compressed data format
+ILuint DxtcSize
 compressed data size
+


Detailed Description

+The Fundamental Image structure. +

+Every bit of information about an image is stored in this internal structure.


The documentation for this struct was generated from the following file: +
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/structILpal.html b/libs/DevIL-1.7.8/docs/html/structILpal.html new file mode 100644 index 00000000..97cd31e7 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/structILpal.html @@ -0,0 +1,53 @@ + + +DevIL: ILpal Struct Reference + + + + + +
+

ILpal Struct Reference

Basic Palette struct. +More... +

+#include <devil_internal_exports.h> +

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

Data Fields

+ILubyte * Palette
 the image palette (if any)
+ILuint PalSize
 size of the palette (in bytes)
+ILenum PalType
 the palette types in il.h (0x0500 range)
+


Detailed Description

+Basic Palette struct.
The documentation for this struct was generated from the following file: +
+
Generated on Sun Mar 8 20:01:42 2009 for DevIL by  + +doxygen 1.5.6
+ + diff --git a/libs/DevIL-1.7.8/docs/html/tab_b.gif b/libs/DevIL-1.7.8/docs/html/tab_b.gif new file mode 100644 index 00000000..0d623483 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/html/tab_b.gif differ diff --git a/libs/DevIL-1.7.8/docs/html/tab_l.gif b/libs/DevIL-1.7.8/docs/html/tab_l.gif new file mode 100644 index 00000000..9b1e6337 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/html/tab_l.gif differ diff --git a/libs/DevIL-1.7.8/docs/html/tab_r.gif b/libs/DevIL-1.7.8/docs/html/tab_r.gif new file mode 100644 index 00000000..ce9dd9f5 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/html/tab_r.gif differ diff --git a/libs/DevIL-1.7.8/docs/html/tabs.css b/libs/DevIL-1.7.8/docs/html/tabs.css new file mode 100644 index 00000000..95f00a91 --- /dev/null +++ b/libs/DevIL-1.7.8/docs/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.navpath +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +} diff --git a/libs/DevIL-1.7.8/docs/images/DevIL.jpg b/libs/DevIL-1.7.8/docs/images/DevIL.jpg new file mode 100644 index 00000000..2a2bab62 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/DevIL.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/DevIL.png b/libs/DevIL-1.7.8/docs/images/DevIL.png new file mode 100644 index 00000000..f7a9034e Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/DevIL.png differ diff --git a/libs/DevIL-1.7.8/docs/images/devil_msvc_include.png b/libs/DevIL-1.7.8/docs/images/devil_msvc_include.png new file mode 100644 index 00000000..6f49384c Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/devil_msvc_include.png differ diff --git a/libs/DevIL-1.7.8/docs/images/devil_msvc_lib.png b/libs/DevIL-1.7.8/docs/images/devil_msvc_lib.png new file mode 100644 index 00000000..cc8e3238 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/devil_msvc_lib.png differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_alienify.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_alienify.jpg new file mode 100644 index 00000000..aed87ce7 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_alienify.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurAvg_10.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurAvg_10.jpg new file mode 100644 index 00000000..f672d786 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurAvg_10.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurGaussian_10.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurGaussian_10.jpg new file mode 100644 index 00000000..5b5fc783 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_blurGaussian_10.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_0.4.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_0.4.jpg new file mode 100644 index 00000000..a74f14a9 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_0.4.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_1.7.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_1.7.jpg new file mode 100644 index 00000000..05760177 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_contrast_1.7.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_emboss.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_emboss.jpg new file mode 100644 index 00000000..d7106d7c Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_emboss.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_equalize.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_equalize.jpg new file mode 100644 index 00000000..9a2912de Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_equalize.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_0.7.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_0.7.jpg new file mode 100644 index 00000000..f70c4baa Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_0.7.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_1.6.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_1.6.jpg new file mode 100644 index 00000000..9a751eb5 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_gammaCorrect_1.6.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_mirror.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_mirror.jpg new file mode 100644 index 00000000..2eafdef5 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_mirror.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_negative.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_negative.jpg new file mode 100644 index 00000000..a3498cb2 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_negative.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.1.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.1.jpg new file mode 100644 index 00000000..a2de0a7c Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.1.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.8.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.8.jpg new file mode 100644 index 00000000..30700d09 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_noisify_0.8.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_pixelize_5.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_pixelize_5.jpg new file mode 100644 index 00000000..0cedb96f Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_pixelize_5.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_saturate1f_0.6.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_saturate1f_0.6.jpg new file mode 100644 index 00000000..766122a9 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_saturate1f_0.6.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_1.8_2.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_1.8_2.jpg new file mode 100644 index 00000000..c8bd33c5 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_1.8_2.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_2.1_3.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_2.1_3.jpg new file mode 100644 index 00000000..46b0fe4a Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_sharpen_2.1_3.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_wave_1.2.jpg b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_wave_1.2.jpg new file mode 100644 index 00000000..9d1c63f7 Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/ilu_small_stairway_wave_1.2.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/original_stairway.jpg b/libs/DevIL-1.7.8/docs/images/original_stairway.jpg new file mode 100644 index 00000000..00171f9c Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/original_stairway.jpg differ diff --git a/libs/DevIL-1.7.8/docs/images/small_stairway.jpg b/libs/DevIL-1.7.8/docs/images/small_stairway.jpg new file mode 100644 index 00000000..828b2c2a Binary files /dev/null and b/libs/DevIL-1.7.8/docs/images/small_stairway.jpg differ diff --git a/libs/DevIL-1.7.8/docs/stamp-vti b/libs/DevIL-1.7.8/docs/stamp-vti new file mode 100644 index 00000000..cbb2f16f --- /dev/null +++ b/libs/DevIL-1.7.8/docs/stamp-vti @@ -0,0 +1,4 @@ +@set UPDATED 8 March 2009 +@set UPDATED-MONTH March 2009 +@set EDITION 1.7.8 +@set VERSION 1.7.8 diff --git a/libs/DevIL-1.7.8/docs/version.texi b/libs/DevIL-1.7.8/docs/version.texi new file mode 100644 index 00000000..cbb2f16f --- /dev/null +++ b/libs/DevIL-1.7.8/docs/version.texi @@ -0,0 +1,4 @@ +@set UPDATED 8 March 2009 +@set UPDATED-MONTH March 2009 +@set EDITION 1.7.8 +@set VERSION 1.7.8 diff --git a/libs/DevIL-1.7.8/examples/allegro_example/allegtest.c b/libs/DevIL-1.7.8/examples/allegro_example/allegtest.c new file mode 100644 index 00000000..578f2ad1 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/allegro_example/allegtest.c @@ -0,0 +1,51 @@ +// Almost identical to Allegro's ex15.c + +#include +#include +#include +#include +#include +#include + + +int main(int argc, char *argv[]) +{ + BITMAP *Image; + PALETTE Pal; + ILuint Id; + + if (argc != 2) { + printf("Please specify a filename.\n"); + return 1; + } + + ilInit(); + ilGenImages(1, &Id); + ilBindImage(Id); + ilLoadImage(argv[1]); + +// if (ilGetInteger(IL_IMAGE_FORMAT) == GL_BGR || +// ilGetInteger(IL_IMAGE_FORMAT) == GL_BGRA) + ilSwapColours(); + + Image = (BITMAP*)ilutConvertToAlleg(Pal); + + allegro_init(); + install_keyboard(); + if (ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL) == 8) { + set_color_depth(8); + set_palette(Pal); + } + else + set_color_depth(32); + set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); + + blit(Image, screen, 0, 0, (SCREEN_W - Image->w) / 2, + (SCREEN_H - Image->h) / 2, Image->w, Image->h); + + destroy_bitmap(Image); + + readkey(); + + return 0; +} diff --git a/libs/DevIL-1.7.8/examples/animation_example/AnimTest.cpp b/libs/DevIL-1.7.8/examples/animation_example/AnimTest.cpp new file mode 100644 index 00000000..dadd174f --- /dev/null +++ b/libs/DevIL-1.7.8/examples/animation_example/AnimTest.cpp @@ -0,0 +1,379 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Windows (GDI) Test Source +// Copyright (C) 2000 by Denton Woods +// Last modified: 08/26/2001 <--Y2K Compliant! =] +// +// Filename: testil/animtest/animtest.c +// +// Description: Animation test application for DevIL. +// +//----------------------------------------------------------------------------- + +#include +#ifdef _DEBUG +#define IL_DEBUG +#endif +#include +#include +#include +#include "resource.h" + + +// Evil globals! +HINSTANCE hInstance; +HDC hDC, hMemDC = NULL; +HWND HWnd; + +#define BORDER_W 8 +#define MENU_H 46 +#define MIN_W 205 // Accomodate the menu bar. +#define MAX_W 400 +#define MAX_H 400 +#define TITLE "DevIL Animation Test" + +ILuint FilterType; +ILuint FilterParamInt; +ILfloat FilterParamFloat; +char FilterEditString[255]; +char NewTitle[512]; + +BITMAPINFOHEADER *BmpInfo = NULL; +HBITMAP *Bitmaps = NULL; +ILuint *Durations = NULL; +ILuint NumImages = 0, CurImage = 0; + +__int64 StartTime, TimerFreq; +double TimerRes; +bool IsPaused = false; + + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +void GenFilterString(char *Out, char **Strings); +void DisplayImage(void); +void LoadImages(char *FileName); + + +int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +{ + MSG msg; + WNDCLASSEX wcex; + HACCEL hAccelTable; + + hInstance = hInst; + + wcex.cbSize = sizeof(WNDCLASSEX); + + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = (WNDPROC)WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = (LPCSTR)IDR_MENU1; + wcex.lpszClassName = TITLE; + wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_ICON1); + + RegisterClassEx(&wcex); + + HWnd = CreateWindow(TITLE, TITLE, WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 50, 50, 400, 300, NULL, NULL, hInstance, NULL); + if (HWnd == NULL) + return FALSE; + + // Display the window + ShowWindow(HWnd, nCmdShow); + UpdateWindow(HWnd); + + ilInit(); + ilEnable(IL_ORIGIN_SET); + ilEnable(IL_TYPE_SET); + ilEnable(IL_FORMAT_SET); + + ilOriginFunc(IL_ORIGIN_LOWER_LEFT); + ilTypeFunc(IL_UNSIGNED_BYTE); + ilFormatFunc(IL_BGR); + + // Is there a file to load from the command-line? + if (__argc > 1) { + LoadImages(__argv[1]); + } + + hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDR_MENU1); + + while (GetMessage(&msg, NULL, 0, 0)) { + if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + + return msg.wParam; +} + + +void LoadImages(char *FileName) +{ + ILuint Image, i; + + hDC = GetDC(HWnd); + hMemDC = CreateCompatibleDC(hDC); + + ilGenImages(1, &Image); + ilBindImage(Image); + if (!ilLoadImage(FileName)) { + ilDeleteImages(1, &Image); + return; + } + + ilEnable(IL_ORIGIN_SET); + ilEnable(IL_FORMAT_SET); + ilOriginFunc(IL_ORIGIN_LOWER_LEFT); + //ilFormatFunc(IL_BGRA); + ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE); + ilutRenderer(ILUT_WIN32); + + CurImage = 0; + NumImages = ilGetInteger(IL_NUM_IMAGES) + 1; + Bitmaps = new HBITMAP[NumImages]; + BmpInfo = new BITMAPINFOHEADER[NumImages]; + Durations = new ILuint[NumImages]; + if (Bitmaps == NULL || BmpInfo == NULL || Durations == NULL) { + ilDeleteImages(1, &Image); + return; + } + + for (i = 0; i < NumImages; i++) { + ilActiveImage(0); + ilActiveImage(i); + Durations[i] = ilGetInteger(IL_IMAGE_DURATION); + *(Bitmaps + i) = ilutConvertToHBitmap(hDC); + ilutGetBmpInfo((BITMAPINFO*)(BmpInfo + i)); + } + + SelectObject(hMemDC, Bitmaps[0]); + + ilDeleteImages(1, &Image); + + sprintf(NewTitle, "%s - %s", TITLE, FileName); + SetWindowText(HWnd, NewTitle); + + QueryPerformanceFrequency((LARGE_INTEGER*)&TimerFreq); + TimerRes = 1.0 / TimerFreq; + QueryPerformanceCounter((LARGE_INTEGER*)&StartTime); + + return; +} + + +void DestroyGDI() +{ + ILuint i; + + if (Bitmaps) { + for (i = 0; i < NumImages; i++) { + DeleteObject(*(Bitmaps + i)); + } + } + + if (hMemDC) + DeleteDC(hMemDC); + + if (Bitmaps) + delete []Bitmaps; + if (BmpInfo) + delete []BmpInfo; + + Bitmaps = NULL; + BmpInfo = NULL; + hMemDC = NULL; + + return; +} + + +void DisplayImage() +{ + static PAINTSTRUCT ps; + static __int64 CurTime; + static double TimeElapsed; + + // Not created yet. + if (Durations == NULL || BmpInfo == NULL || Bitmaps == NULL) + return; + + if (!IsPaused) { + QueryPerformanceCounter((LARGE_INTEGER*)&CurTime); + TimeElapsed = (CurTime - StartTime) * TimerRes; + if (TimeElapsed * 1000 > Durations[CurImage]) { + StartTime = CurTime; + CurImage++; + if (CurImage >= NumImages) { + CurImage = 0; + } + SelectObject(hMemDC, Bitmaps[CurImage]); + } + } + + hDC = BeginPaint(HWnd, &ps); + BitBlt(hDC, 0, 0, (WORD)BmpInfo[CurImage].biWidth, (WORD)BmpInfo[CurImage].biHeight, + hMemDC, 0, 0, SRCCOPY); + EndPaint(HWnd, &ps); + + return; +} + + +// Window procedure, handles all messages for this program +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + static HMENU hMenu; + static ILuint Colours; + static RECT Rect; + static HDROP hDrop; + + static char OpenFileName[2048]; + static char OpenFilter[2048]; + static char *OFilter[] = { + "All Files (*.*)", "*.*", + "Half-Life Model Files (*.mdl)", "*.mdl", + "Homeworld Image Files (*.lif)", "*.lif", + "Image Files (All Supported Types)", "*.jpe;*.jpg;*.jpeg;*.lif;*.bmp;*.ico;*.pbm;*.pgm;*.pnm;*.ppm;*.png;*.bw;*.rgb;*.rgba;*.sgi;*.tga;*.tif;*.tiff;*.pcx", + "Jpeg Files (*.jpe, *.jpg, *.jpeg)", "*.jpe;*.jpg;*.jpeg", + "Microsoft Bitmap Files (*.bmp)", "*.bmp", + "Microsoft Icon Files (*.ico)", "*.ico", + "OpenIL Files (*.oil)", "*.oil", + "Portable AnyMap Files (*.pbm, *.pgm, *.pnm, *.ppm)", "*.pbm;*.pgm;*.pnm;*.ppm", + "Portable Network Graphics Files (*.png)", "*.png", + "Sgi Files (*.sgi)", "*.bw;*.rgb;*.rgba;*.sgi", + "Targa Files (*.tga)", "*.tga", + "Tiff Files (*.tif)", "*.tif;*.tiff", + "Quake Wal Files (*.wal)", "*.wal", + "ZSoft Pcx Files (*.pcx)", "*.pcx", + "\0\0" + }; + + static OPENFILENAME Ofn = { + sizeof(OPENFILENAME), + hWnd, + NULL, + OpenFilter, + NULL, + 0, + 0, + OpenFileName, + 512, + NULL, + 0, + NULL, + NULL, + OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST, + 0, + 0, + NULL, + NULL, + NULL, + NULL + }; + + switch (message) + { + case WM_CREATE: + GenFilterString(OpenFilter, OFilter); + + hDC = GetDC(hWnd); + DragAcceptFiles(hWnd, TRUE); + + break; + + case WM_CLOSE: + DestroyGDI(); + ReleaseDC(hWnd, hDC); + DestroyWindow(hWnd); + UnregisterClass(TITLE, hInstance); + break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + + case WM_PAINT: + DisplayImage(); + InvalidateRect(hWnd, NULL, FALSE); + break; + + case WM_KEYDOWN: + if (wParam == VK_ESCAPE) + PostQuitMessage(0); + InvalidateRect(hWnd, NULL, FALSE); + break; + + case WM_DROPFILES: + hDrop = (HDROP)wParam; + DragQueryFile(hDrop, 0, OpenFileName, 512); + + DestroyGDI(); + LoadImages(OpenFileName); + + DragFinish (hDrop); + return 0; + + case WM_COMMAND: + FilterType = LOWORD(wParam); + + switch (LOWORD(wParam)) + { + case ID_FILE_EXIT: + PostMessage(hWnd, WM_CLOSE, 0, 0); + return (0L); + + case ID_FILE_LOAD: + sprintf(OpenFileName, "*.*"); + Ofn.lpstrFilter = OpenFilter; + Ofn.lpstrFile = OpenFileName; + Ofn.lpstrTitle = "Open File"; + Ofn.nFilterIndex = 1; + Ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; + + if (!GetOpenFileName(&Ofn)) + return (0L); + + DestroyGDI(); + LoadImages(OpenFileName); + + return (0L); + + case ID_EDIT_PAUSE: + IsPaused = true; + return 0; + + case ID_EDIT_RESUME: + IsPaused = false; + QueryPerformanceCounter((LARGE_INTEGER*)&StartTime); + return 0; + } + + default: + return (DefWindowProc(hWnd, message, wParam, lParam)); + } + + return (0L); +} + + +void GenFilterString(char *Out, char **Strings) +{ + int OutPos = 0, StringPos = 0; + + while (Strings[StringPos][0] != 0) { + sprintf(Out + OutPos, Strings[StringPos]); + OutPos += strlen(Strings[StringPos++]) + 1; + } + + Out[OutPos++] = 0; + Out[OutPos] = 0; + + return; +} diff --git a/libs/DevIL-1.7.8/examples/animation_example/AnimTest.rc b/libs/DevIL-1.7.8/examples/animation_example/AnimTest.rc new file mode 100644 index 00000000..2cc6902c --- /dev/null +++ b/libs/DevIL-1.7.8/examples/animation_example/AnimTest.rc @@ -0,0 +1,109 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_LOAD + MENUITEM "E&xit\tEsc", ID_FILE_EXIT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Pause", ID_EDIT_PAUSE + MENUITEM "&Resume", ID_EDIT_RESUME + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "OpenIL.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MENU1 ACCELERATORS DISCARDABLE +BEGIN + "O", ID_FILE_LOAD, VIRTKEY, CONTROL, NOINVERT +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/examples/animation_example/OpenIL.ico b/libs/DevIL-1.7.8/examples/animation_example/OpenIL.ico new file mode 100644 index 00000000..98900848 Binary files /dev/null and b/libs/DevIL-1.7.8/examples/animation_example/OpenIL.ico differ diff --git a/libs/DevIL-1.7.8/examples/animation_example/resource.h b/libs/DevIL-1.7.8/examples/animation_example/resource.h new file mode 100644 index 00000000..7ff26234 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/animation_example/resource.h @@ -0,0 +1,75 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by AnimTest.rc +// +#define IDC_MYICON 2 +#define IDD_ABOUTBOX 103 +#define IDS_APP_TITLE 103 +#define IDM_ABOUT 104 +#define IDM_EXIT 105 +#define IDC_OPENIL 109 +#define IDR_MAINFRAME 128 +#define IDI_ICON1 155 +#define IDR_MENU1 167 +#define IDD_DIALOG_ABOUT 168 +#define IDC_ABOUT_VENDOR 1001 +#define IDC_ABOUT_VER_STRING 1002 +#define IDC_ABOUT_VER_NUM 1003 +#define IDC_FILTER_EDIT 1004 +#define IDC_FILTER_DESC_TEXT 1005 +#define IDC_ERROR1 1014 +#define IDC_ERROR2 1015 +#define IDC_ERROR3 1016 +#define IDC_ERROR4 1017 +#define IDC_ERROR5 1018 +#define IDC_ERROR6 1019 +#define IDC_OPENIL_LINK 1020 +#define ID_FILE_EXIT 32771 +#define ID_HELP_ABOUT 32772 +#define ID_CONVERT_RGB 32773 +#define ID_CONVERT_RGBA 32774 +#define ID_CONVERT_BGR 32775 +#define ID_CONVERT_BGRA 32776 +#define ID_CONVERT_LUMINANCE 32777 +#define ID_FILE_LOAD 32778 +#define ID_FILE_SAVE 32779 +#define ID_FILTER_BITFILTER1 32780 +#define ID_FILTER_BITFILTER2 32781 +#define ID_FILTER_BITFILTER3 32782 +#define ID_FILTER_EMBOSS 32783 +#define ID_FILTER_NOISE 32784 +#define ID_FILTER_PIXELIZE 32785 +#define ID_EFFECTS_FILTERS_SCALE 32786 +#define ID_EFFECTS_FILTERS_EDGEDETECT_SOBEL 32787 +#define ID_EFFECTS_FILTERS_EDGEDETECT_PREWITT 32788 +#define ID_EDIT_UNDO 32789 +#define ID_EDIT_UNDOLEVEL 32790 +#define ID_FILTERS_BLUR_AVERAGE 32791 +#define ID_FILTERS_BLUR_GAUSSIAN 32792 +#define ID_FILTER_GAMMACORRECT 32793 +#define ID_FILTER_ALIENIFY 32794 +#define ID_FILTER_SHARPEN 32795 +#define ID_FILTER_NEGATIVE 32796 +#define ID_EFFECTS_FLIP 32797 +#define ID_EFFECTS_MIRROR 32798 +#define ID_EFFECTS_COUNTCOLORS 32799 +#define ID_EDIT_COPY 32800 +#define ID_EDIT_PASTE 32801 +#define ID_EFFECTS_FILTERS_ROTATE 32802 +#define ID_EFFECTS_FILTERS_EDGEDETECT_EMBOSS 32804 +#define ID_FILE_OPENURL 32808 +#define ID_CONVERT_PALETTE 32809 +#define ID_EDIT_PAUSE 32810 +#define ID_EDIT_RESUME 32811 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 182 +#define _APS_NEXT_COMMAND_VALUE 32812 +#define _APS_NEXT_CONTROL_VALUE 1021 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/libs/DevIL-1.7.8/examples/cpp_wrapper_example/il_wrap.cpp b/libs/DevIL-1.7.8/examples/cpp_wrapper_example/il_wrap.cpp new file mode 100644 index 00000000..7e788f83 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/cpp_wrapper_example/il_wrap.cpp @@ -0,0 +1,23 @@ +#include + +#include +using namespace std; + +int main(int argc, char **argv) +{ + if (argc < 2) { + cout << "Please specify a filename." << endl; + return 1; + } + + ilImage Image(argv[1]); + + cout << Image.Width() << 'x' << Image.Height() << '@' << (ILuint)Image.Bpp() << endl; + + ilEnable(IL_FILE_OVERWRITE); + + Image.Save("test.tga"); + + return 0; +} + diff --git a/libs/DevIL-1.7.8/examples/direct3d_example/d3dtest.cpp b/libs/DevIL-1.7.8/examples/direct3d_example/d3dtest.cpp new file mode 100644 index 00000000..da7f44b6 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/direct3d_example/d3dtest.cpp @@ -0,0 +1,335 @@ +//----------------------------------------------------------------------------- +// +// ImageLib GL Test Source +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 04/28/2001 <--Y2K Compliant! =] +// +// Filename: testil/d3dtest/d3dtest.cpp +// +// Description: Sample implementation of a Direct3D 8.0a image viewer. +// +// +// 20040801 XIX: DX9 update, hopefully :) +// +//----------------------------------------------------------------------------- + + +#define STRICT +#include +#include + +#include + +//#include "dxstdafx.h" + +//#include "D3DApp.h" +//#include "D3DFile.h" +//#include "D3DFont.h" +//#include "D3DUtil.h" + +#ifdef _DEBUG +#define IL_DEBUG +#endif//_DEBUG +#include + + +#pragma comment(lib, "d3d9.lib") +#pragma comment(lib, "d3dx9.lib") +#pragma comment(lib, "winmm.lib") + + +// +// +// Taken from the D3D 8.0a SDK Volumetric Texture Sample. +// +// + + +//----------------------------------------------------------------------------- +// Defines, constants, and global variables +//----------------------------------------------------------------------------- +struct VERTEX +{ + FLOAT x, y, z; + DWORD color; + FLOAT tu, tv; +}; + +#define D3DFVF_VERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1|D3DFVF_TEXCOORDSIZE2(0)) + +VERTEX g_vVertices[4] = +{ + { 1.0f,-1.0f, 0.0f, 0xffffffff, 1.0f, 1.0f }, + {-1.0f,-1.0f, 0.0f, 0xffffffff, 0.0f, 1.0f }, + { 1.0f, 1.0f, 0.0f, 0xffffffff, 1.0f, 0.0f }, + {-1.0f, 1.0f, 0.0f, 0xffffffff, 0.0f, 0.0f } +}; + + + + +//----------------------------------------------------------------------------- +// Name: class CMyD3DApplication +// Desc: Application class. The base class (CD3DApplication) provides the +// generic functionality needed in all Direct3D samples. CMyD3DApplication +// adds functionality specific to this sample program. +//----------------------------------------------------------------------------- +class CMyD3DApplication : public CD3DApplication +{ + CD3DFont* m_pFont; + LPDIRECT3DTEXTURE9 m_pTexture; + LPDIRECT3DVERTEXBUFFER9 m_pVB; + + HRESULT ConfirmDevice( D3DCAPS9*, DWORD, D3DFORMAT ); + +protected: + HRESULT OneTimeSceneInit(); + HRESULT InitDeviceObjects(); + HRESULT RestoreDeviceObjects(); + HRESULT InvalidateDeviceObjects(); + HRESULT DeleteDeviceObjects(); + HRESULT FinalCleanup(); + HRESULT Render(); + HRESULT FrameMove(); + +public: + CMyD3DApplication(); +}; + + + + +//----------------------------------------------------------------------------- +// Name: WinMain() +// Desc: Entry point to the program. Initializes everything, and goes into a +// message-processing loop. Idle time is used to render the scene. +//----------------------------------------------------------------------------- +INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ) +{ + CMyD3DApplication d3dApp; + + if (__argc <= 1) + return 1; + + if( FAILED( d3dApp.Create( hInst ) ) ) + return 0; + + return d3dApp.Run(); +} + + + + +//----------------------------------------------------------------------------- +// Name: CMyD3DApplication() +// Desc: Application constructor. Sets attributes for the app. +//----------------------------------------------------------------------------- +CMyD3DApplication::CMyD3DApplication() +{ + m_strWindowTitle = _T("DevIL Direct3D Test"); +// m_bUseDepthBuffer = TRUE; + + m_pFont = new CD3DFont( _T("Arial"), 12, D3DFONT_BOLD ); + m_pTexture = NULL; + m_pVB = NULL; +} + + + + +//----------------------------------------------------------------------------- +// Name: OneTimeSceneInit() +// Desc: Called during initial app startup, this function performs all the +// permanent initialization. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::OneTimeSceneInit() +{ + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: FrameMove() +// Desc: Called once per frame, the call is the entry point for animating +// the scene. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::FrameMove() +{ + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: Render() +// Desc: Called once per frame, the call is the entry point for 3d +// rendering. This function sets up render states, clears the +// viewport, and renders the scene. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::Render() +{ + // Clear the viewport + m_pd3dDevice->Clear( 0L, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, + 0x00000000, 1.0f, 0L ); + + // Begin the scene + if( SUCCEEDED( m_pd3dDevice->BeginScene() ) ) + { + // Draw the quad, with the volume texture + m_pd3dDevice->SetTexture( 0, m_pTexture ); +// m_pd3dDevice->SetVertexShader( D3DFVF_VERTEX ); + m_pd3dDevice->SetStreamSource( 0, m_pVB, sizeof(VERTEX) ); + m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2); + + // Output statistics + m_pFont->DrawText( 2, 0, D3DCOLOR_ARGB(255,255,255,0), m_strFrameStats ); + m_pFont->DrawText( 2, 20, D3DCOLOR_ARGB(255,255,255,0), m_strDeviceStats ); + + // End the scene. + m_pd3dDevice->EndScene(); + } + + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: InitDeviceObjects() +// Desc: Initialize scene objects. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::InitDeviceObjects() +{ + HRESULT hr; + + m_pFont->InitDeviceObjects( m_pd3dDevice ); + + ilInit(); + iluInit(); + ilutInit(); + ilutD3D8TexFromFile(m_pd3dDevice, __argv[1], &m_pTexture); + //D3DXCreateTextureFromFile(m_pd3dDevice, __argv[1], &m_pTexture); + + // Create a vertex buffer + { + if( FAILED( hr = m_pd3dDevice->CreateVertexBuffer( 4*sizeof(VERTEX), + D3DUSAGE_WRITEONLY, + D3DFVF_VERTEX, + D3DPOOL_MANAGED, &m_pVB ) ) ) + return hr; + + VERTEX* pVertices; + m_pVB->Lock( 0, 4*sizeof(VERTEX), (BYTE**)&pVertices, 0 ); + memcpy( pVertices, g_vVertices, sizeof(VERTEX)*4 ); + m_pVB->Unlock(); + } + + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: RestoreDeviceObjects() +// Desc: Initialize scene objects. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::RestoreDeviceObjects() +{ + m_pFont->RestoreDeviceObjects(); + + // Set the matrices + D3DXVECTOR3 vEye( 0.0f, 0.0f,-3.0f ); + D3DXVECTOR3 vAt( 0.0f, 0.0f, 0.0f ); + D3DXVECTOR3 vUp( 0.0f, 1.0f, 0.0f ); + D3DXMATRIX matWorld, matView, matProj; + D3DXMatrixIdentity( &matWorld ); + D3DXMatrixLookAtLH( &matView, &vEye,&vAt, &vUp ); + FLOAT fAspect = m_d3dsdBackBuffer.Width / (FLOAT)m_d3dsdBackBuffer.Height; + D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, fAspect, 1.0f, 100.0f ); + m_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld ); + m_pd3dDevice->SetTransform( D3DTS_VIEW, &matView ); + m_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj ); + + // Set state + m_pd3dDevice->SetRenderState( D3DRS_DITHERENABLE, FALSE ); + m_pd3dDevice->SetRenderState( D3DRS_CLIPPING, FALSE ); + m_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE ); + m_pd3dDevice->SetRenderState( D3DRS_CLIPPING, FALSE ); + m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, FALSE ); + m_pd3dDevice->SetRenderState( D3DRS_ZENABLE, FALSE ); + m_pd3dDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); + + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR ); + m_pd3dDevice->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR ); + + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: InvalidateDeviceObjects() +// Desc: +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::InvalidateDeviceObjects() +{ + m_pFont->InvalidateDeviceObjects(); + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: DeleteDeviceObjects() +// Desc: Called when the app is exiting, or the device is being changed, +// this function deletes any device dependent objects. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::DeleteDeviceObjects() +{ + m_pFont->DeleteDeviceObjects(); + SAFE_RELEASE( m_pTexture ); + SAFE_RELEASE( m_pVB ); + + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: FinalCleanup() +// Desc: Called before the app exits, this function gives the app the chance +// to cleanup after itself. +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::FinalCleanup() +{ + SAFE_DELETE( m_pFont ); + return S_OK; +} + + + + +//----------------------------------------------------------------------------- +// Name: ConfirmDevice() +// Desc: Called during device intialization, this code checks the device +// for some minimum set of capabilities +//----------------------------------------------------------------------------- +HRESULT CMyD3DApplication::ConfirmDevice( D3DCAPS8* pCaps, DWORD dwBehavior, + D3DFORMAT Format ) +{ + return S_OK; +} diff --git a/libs/DevIL-1.7.8/examples/opengl_example/gltest.c b/libs/DevIL-1.7.8/examples/opengl_example/gltest.c new file mode 100644 index 00000000..a8953b62 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/opengl_example/gltest.c @@ -0,0 +1,259 @@ +//----------------------------------------------------------------------------- +// +// ImageLib GL Test Source +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/17/2002 <--Y2K Compliant! =] +// +// Filename: examples/gl example/gl example.c +// +// Description: Sample implementation of an OpenGL image viewer. +// +//----------------------------------------------------------------------------- + +// +// We use FreeGlut in Windows, because it's more stable. +// +#ifdef _WIN32 +#include +#else +#include +#endif + +#ifdef _DEBUG +#define IL_DEBUG +#endif//_DEBUG + +#define ILUT_USE_OPENGL +#include +#include +#include +#include "gltest.h" +#include +#include +#include +#include + +// +// Easier to do this than change the project's settings in MSVC++. (I'm lazy!) +// +#ifdef _MSC_VER + + #pragma comment(lib, "freeglut.lib") + +// Prevent the console window from popping up. +//#pragma comment(linker, "/entry:mainCRTStartup") +//#pragma comment(linker, "/subsystem:windows") + +#endif + +char *FileName; +ILuint Width, Height, window; + + + +void HandleDevILErrors () +{ + ILenum error = ilGetError (); + + if (error != IL_NO_ERROR) { + do { + printf ("\n\n%s\n", iluErrorString (error)); + } while ((error = ilGetError ())); + + exit (1); + } +} + +extern int main(int argc, char** argv); + +int main(int argc, char** argv) +{ + // No filename is specified on the command-line. + if (argc < 2) { + printf ("Please run as:\n\nDevIL_testGL image_filename\n"); + return 1; + } + FileName = argv[1]; // Set filename equal to the first argument. + + // + // Check if the shared lib's version matches the executable's version. + // + + + +// +// fixed to get the right numbers from the right library call... +// + if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION || + iluGetInteger(ILU_VERSION_NUM) < ILU_VERSION || + ilutGetInteger(ILUT_VERSION_NUM) < ILUT_VERSION) { + printf ("DevIL library is out of date! Please upgrade\n"); + return 2; + } + + // Needed to initialize DevIL. + ilInit (); + iluInit(); + + // GL cannot use palettes anyway, so convert early. + ilEnable (IL_CONV_PAL); + + // Gets rid of dithering on some nVidia-based cards. + ilutEnable (ILUT_OPENGL_CONV); + + // Generate the main image name to use. + ilGenImages (1, &ImgId); + + // Bind this image name. + ilBindImage (ImgId); + + // Loads the image specified by File into the ImgId image. + if (!ilLoadImage (FileName)) { + HandleDevILErrors (); + } + + // Make sure the window is in the same proportions as the image. + // Generate the appropriate width x height less than or equal to MAX_X x MAX_Y. + // Instead of just clipping Width x Height to MAX_X x MAX_Y, we scale to + // an appropriate size, so the image isn't stretched/squished. + Width = ilGetInteger (IL_IMAGE_WIDTH); + Height = ilGetInteger (IL_IMAGE_HEIGHT); + + if (Width > 0) { // Don't want a divide by 0... + if (Width > MAX_X) { + Width = MAX_X; + Height = (ILuint)(MAX_X / (ILfloat)ilGetInteger(IL_IMAGE_WIDTH) * Height); + } + } + if (Height > 0) { // Don't want a divide by 0... + if (Height > MAX_Y) { + Height = MAX_Y; + Width = (ILuint)(MAX_Y / (ILfloat)ilGetInteger(IL_IMAGE_HEIGHT) * Width); + } + } + + HandleDevILErrors (); + + // Standard glut initializations. + glutInit (&argc, argv); // Standard glut initialization. + glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE); + glutInitWindowPosition (100, 100); + glutInitWindowSize (Width, Height); + + window = glutCreateWindow("Developer's Image Library (DevIL) Test"); + + ilutInit(); + + glutDisplayFunc (DisplayFunc); + glutKeyboardFunc (KeyboardFunc); + + // Goes into our setup function. + if (Setup() == IL_FALSE) + return 1; + + // Enter the main (Free)GLUT processing loop + glutMainLoop(); + + // Clean up any loose ends. + CleanUp(); + + return 0; +} + + +// +// Standard glut resize function. +// +void ResizeFunc(int NewWidth, int NewHeight) +{ + glMatrixMode (GL_PROJECTION); + glLoadIdentity (); + + glViewport (0, 0, NewWidth, NewHeight); + glOrtho (0, Width, Height, 0, -1, 1); +} + + +// +// Standard glut display function. +// +void DisplayFunc() +{ + glClear(GL_COLOR_BUFFER_BIT); // Clear the colour buffer. + + // Texture a quad with our image that fills the entire window. + glBindTexture (GL_TEXTURE_2D, TexID); + + glBegin (GL_QUADS); + /*glTexCoord2f (0.0f, 0.0f); glVertex3i (0, 0, 0); + glTexCoord2f (1.0f, 0.0f); glVertex3i (Width, 0, 0); + glTexCoord2f (1.0f, 1.0f); glVertex3i (Width, Height, 0); + glTexCoord2f (0.0f, 1.0f); glVertex3i (0, Height, 0);*/ + + glTexCoord2f (0.0f, 1.0f); glVertex3i (0, 0, 0); + glTexCoord2f (1.0f, 1.0f); glVertex3i (Width, 0, 0); + glTexCoord2f (1.0f, 0.0f); glVertex3i (Width, Height, 0); + glTexCoord2f (0.0f, 0.0f); glVertex3i (0, Height, 0); + glEnd(); + + glutSwapBuffers(); // We use double buffering, so swap the buffers. +} + + +// +// Standard glut idle function +// +void IdleFunc() +{ + glutShowWindow (); + glutPostRedisplay (); +} + + +// +// Any keypress closes the window - standard glut keypress function. +// +void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY) +{ + CleanUp(); // Clean up OpenGL. + glutDestroyWindow(window); // Destroy the window. +#ifndef _WIN32 + // Must use this with regular glut, since it never returns control to main(). + exit(0); +#endif +} + + +// +// Setup OpenGL to use our image. +// +ILboolean Setup() +{ + glEnable (GL_TEXTURE_2D); // Enable texturing. + glMatrixMode (GL_PROJECTION); // We want to use the projection matrix. + glLoadIdentity (); // Loads the identity matrix into the current matrix. + + // Lets ILUT know to use its OpenGL functions. + ilutRenderer (ILUT_OPENGL); + + // Goes through all steps of sending the image to OpenGL. + TexID = ilutGLBindTexImage(); + + // We're done with our image, so we go ahead and delete it. + ilDeleteImages(1, &ImgId); + + glOrtho(0, Width, Height, 0, -1, 1); // Set up an orthographic projection with OpenGL. + + return IL_TRUE; +} + + +// +// Cleans up any loose ends. +// +void CleanUp() +{ + if (!bCleaned) // Can only delete the texture once. + glDeleteTextures (1, &TexID); // Delete our OpenGL texture. + bCleaned = IL_TRUE; // Want to make sure we only delete it once. +} diff --git a/libs/DevIL-1.7.8/examples/opengl_example/gltest.h b/libs/DevIL-1.7.8/examples/opengl_example/gltest.h new file mode 100644 index 00000000..e43f9d04 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/opengl_example/gltest.h @@ -0,0 +1,36 @@ +//----------------------------------------------------------------------------- +// +// ImageLib GL Test Source +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 10/13/2000 <--Y2K Compliant! =] +// +// Filename: examples/gl example/gl example.h +// +// Description: Sample implementation of an OpenGL image viewer. +// +//----------------------------------------------------------------------------- + +#ifndef GLTEST_H +#define GLTEST_H + +// We don't want a larger window than this. +#define MAX_X 640 +#define MAX_Y 480 + +// Function prototypes. +void DisplayFunc(void); +void CleanUp(void); +void ResizeFunc(int NewWidth, int NewHeight); +void IdleFunc(void); +void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY); +ILboolean Setup(); + +// Has the main GL texture been deleted? +ILboolean bCleaned = 0; + +// GL texture ID +GLuint TexID = 0; +// IL image ID +ILuint ImgId = 0; + +#endif//GLTEST_H diff --git a/libs/DevIL-1.7.8/examples/override_example/iotest.c b/libs/DevIL-1.7.8/examples/override_example/iotest.c new file mode 100644 index 00000000..460ae7bc --- /dev/null +++ b/libs/DevIL-1.7.8/examples/override_example/iotest.c @@ -0,0 +1,165 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Source Example +// Copyright (C) 2000-2001 by Denton Woods +// Last modified: 09/06/2001 <--Y2K Compliant! =] +// +// Filename: examples/file override/file override.c +// +// Description: An example of overriding the DevIL reading and +// writing functions via ilSetRead and ilSetWrite. +// +//----------------------------------------------------------------------------- + +// Required include files. +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include + +/* We would need ILU just because of iluErrorString() function... */ +/* So make it possible for both with and without ILU! */ +#ifdef ILU_ENABLED +#include +#define PRINT_ERROR_MACRO printf("Error: %s\n", iluErrorString(Error)) +#else /* not ILU_ENABLED */ +#define PRINT_ERROR_MACRO printf("Error: 0x%X\n", (unsigned int)Error) +#endif /* not ILU_ENABLED */ + +ILHANDLE ILAPIENTRY iOpenRead(const char *FileName) +{ + return (ILHANDLE)fopen(FileName, "rb"); +} + +void ILAPIENTRY iCloseRead(ILHANDLE Handle) +{ + fclose((FILE*)Handle); + return; +} + +ILHANDLE ILAPIENTRY iOpenWrite(const char *FileName) +{ + return (ILHANDLE)fopen(FileName, "wb"); +} + +void ILAPIENTRY iCloseWrite(ILHANDLE Handle) +{ + fclose((FILE*)Handle); + return; +} + +ILboolean ILAPIENTRY iEof(ILHANDLE Handle) +{ + return (feof((FILE*)Handle) != 0); +} + +ILint ILAPIENTRY iGetc(ILHANDLE Handle) +{ + return fgetc((FILE*)Handle); +} + +ILint ILAPIENTRY iPutc(ILubyte Char, ILHANDLE Handle) +{ + return fputc(Char, (FILE*)Handle); +} + +ILint ILAPIENTRY iRead(void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle) +{ + return fread(Buffer, Size, Number, (FILE*)Handle); +} + +ILint ILAPIENTRY iWrite(const void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle) +{ + return fwrite(Buffer, Size, Number, (FILE*)Handle); +} + +ILint ILAPIENTRY iReadSeek(ILHANDLE Handle, ILint Offset, ILint Mode) +{ + return fseek((FILE*)Handle, Offset, Mode); +} + +ILint ILAPIENTRY iWriteSeek(ILHANDLE Handle, ILint Offset, ILint Mode) +{ + return fseek((FILE*)Handle, Offset, Mode); +} + +ILint ILAPIENTRY iReadTell(ILHANDLE Handle) +{ + return ftell((FILE*)Handle); +} + +ILint ILAPIENTRY iWriteTell(ILHANDLE Handle) +{ + return ftell((FILE*)Handle); +} + + + + +int main(int argc, char **argv) +{ + ILuint ImgId; + ILenum Error; + + // We use the filename specified in the first argument of the command-line. + if (argc < 2) { + printf("Please specify a file to open.\n"); + return 1; + } + + // Check if the shared lib's version matches the executable's version. + if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) { + printf("DevIL version is different...exiting!\n"); + return 2; + } + + // Initialize DevIL. + ilInit(); + // Generate the main image name to use. + ilGenImages(1, &ImgId); + // Bind this image name. + ilBindImage(ImgId); + + + // Override the reading functions. + ilSetRead(iOpenRead, iCloseRead, iEof, iGetc, iRead, iReadSeek, iReadTell); + ilSetWrite(iOpenWrite, iCloseWrite, iPutc, iWriteSeek, iWriteTell, iWrite); + + + // Loads the image specified by File into the image named by ImgId. + if (!ilLoadImage(argv[1])) { + printf("Could not open file...exiting.\n"); + return 3; + } + + // Display the image's dimensions to the end user. + printf("Width: %d Height: %d Depth: %d Bpp: %d\n", ilGetInteger(IL_IMAGE_WIDTH), + ilGetInteger(IL_IMAGE_HEIGHT), ilGetInteger(IL_IMAGE_DEPTH), ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL)); + + // Enable this to let us overwrite the destination file if it already exists. + ilEnable(IL_FILE_OVERWRITE); + + // If argv[2] is present, we save to this filename, else we save to test.tga. + if (argc > 2) + ilSaveImage(argv[2]); + else + ilSaveImage("test.tga"); + + + // Reset the reading / writing functions when we're done loading specially. + // This isn't required here, since we're exiting, but here's how it's done: + ilResetRead(); + ilResetWrite(); + + + // We're done with the image, so let's delete it. + ilDeleteImages(1, &ImgId); + + // Simple Error detection loop that displays the Error to the user in a human-readable form. + while ((Error = ilGetError())) { + PRINT_ERROR_MACRO;} + + return 0; +} diff --git a/libs/DevIL-1.7.8/examples/register_read_example/readtest.c b/libs/DevIL-1.7.8/examples/register_read_example/readtest.c new file mode 100644 index 00000000..a149008f --- /dev/null +++ b/libs/DevIL-1.7.8/examples/register_read_example/readtest.c @@ -0,0 +1,119 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Source Example +// Copyright (C) 2000-2001 by Denton Woods +// Last modified: 09/07/2001 <--Y2K Compliant! =] +// +// Filename: examples/register read/register read.c +// +// Description: An example of creating your own loading routine +// to use with DevIL -- uses a hypothetical format. +// +//----------------------------------------------------------------------------- + +// Required include files. +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include + +/* We would need ILU just because of iluErrorString() function... */ +/* So make it possible for both with and without ILU! */ +#ifdef ILU_ENABLED +#include +#define PRINT_ERROR_MACRO printf("Error: %s\n", iluErrorString(Error)) +#else /* not ILU_ENABLED */ +#define PRINT_ERROR_MACRO printf("Error: 0x%X\n", (unsigned int)Error) +#endif /* not ILU_ENABLED */ + +ILboolean ILAPIENTRY LoadFunction(const char *FileName) +{ + ILuint Width, Height; + FILE *f = fopen(FileName, "rb"); + + if (f == NULL) + return IL_FALSE; + fread(&Width, 1, 4, f); + fread(&Height, 1, 4, f); + + if (!ilTexImage(Width, Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) { + fclose(f); + return IL_FALSE; + } + + // Set the origin via the register functions. + ilRegisterOrigin(IL_ORIGIN_UPPER_LEFT); + + fread(ilGetData(), 1, Width * Height * 3, f); + fclose(f); + + return IL_TRUE; +} + + +int main(int argc, char **argv) +{ + ILuint ImgId; + ILenum Error; + + // We use the filename specified in the first argument of the command-line. + if (argc < 2) { + printf("Please specify a file to open.\n"); + return 1; + } + + // Check if the shared lib's version matches the executable's version. + if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) { + printf("DevIL version is different...exiting!\n"); + return 2; + } + + // Initialize DevIL. + ilInit(); + + + // Set the loading function here. + ilRegisterLoad("xxx", LoadFunction); + + + // Generate the main image name to use. + ilGenImages(1, &ImgId); + // Bind this image name. + ilBindImage(ImgId); + // Loads the image specified by File into the image named by ImgId. + if (!ilLoadImage(argv[1])) { + printf("Could not open file...exiting.\n"); + return 3; + } + + // Display the image's dimensions to the end user. + printf("Width: %d Height: %d Depth: %d Bpp: %d\n", ilGetInteger(IL_IMAGE_WIDTH), + ilGetInteger(IL_IMAGE_HEIGHT), ilGetInteger(IL_IMAGE_DEPTH), ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL)); + + // Enable this to let us overwrite the destination file if it already exists. + ilEnable(IL_FILE_OVERWRITE); + + // If argv[2] is present, we save to this filename, else we save to test.tga. + if (argc > 2) + ilSaveImage(argv[2]); + else + ilSaveImage("test.tga"); + + + // Remove the loading function when we're done using it or want to change it. + // This isn't required here, since we're exiting, but here's how it's done: + ilRemoveLoad("xxx"); + + + // We're done with the image, so let's delete it. + ilDeleteImages(1, &ImgId); + + // Simple Error detection loop that displays the Error to the user in a human-readable form. + while ((Error = ilGetError())) { + PRINT_ERROR_MACRO; + } + + return 0; +} diff --git a/libs/DevIL-1.7.8/examples/sdl_example/sdl_test.c b/libs/DevIL-1.7.8/examples/sdl_example/sdl_test.c new file mode 100644 index 00000000..890c18a2 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/sdl_example/sdl_test.c @@ -0,0 +1,389 @@ +//----------------------------------------------------------------------------- +// +// ImageLib SDL Test Source +// Copyright (C) 2000 by Denton Woods +// Copyright (C) 2001 Nelson Rush. +// Last modified: 7/02/2001 +// +// Filename: testil/sdltest/sdl_test.c +// +// Description: SDL test application for DevIL. +// +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +#include +#include +#include + + +#ifdef _WIN32 + #ifdef _DEBUG + #pragma comment(linker, "/NODEFAULTLIB:msvcrt.lib") + #endif//_DEBUG +#endif + + + +/* Bring up a window and play with it */ + +#define BENCHMARK_SDL + +#define NOTICE(X) printf("%s", X); + + +void DrawPict(SDL_Surface *screen, char *bmpfile, + int speedy, int flip, int nofade) +{ + SDL_Surface *picture; + SDL_Rect dest, update; + int i, centered; + int ncolors; + SDL_Color *colors, *cmap; + + /* Load the image into a surface */ + if ( bmpfile == NULL ) { + bmpfile = "sample.bmp"; /* Sample image */ + } +fprintf(stderr, "Loading picture: %s\n", bmpfile); + //picture = SDL_LoadBMP(bmpfile); + picture = ilutSDLSurfaceLoadImage(bmpfile); + if ( picture == NULL ) { + fprintf(stderr, "Couldn't load %s: %s\n", bmpfile, + SDL_GetError()); + return; + } + + /* Set the display colors -- on a hicolor display this is a no-op */ + if ( picture->format->palette ) { + ncolors = picture->format->palette->ncolors; + colors = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color)); + cmap = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color)); + memcpy(colors, picture->format->palette->colors, + ncolors*sizeof(SDL_Color)); + } else { + int r, g, b; + + /* Allocate 256 color palette */ + ncolors = 256; + colors = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color)); + cmap = (SDL_Color *)malloc(ncolors*sizeof(SDL_Color)); + + /* Set a 3,3,2 color cube */ + for ( r=0; r<8; ++r ) { + for ( g=0; g<8; ++g ) { + for ( b=0; b<4; ++b ) { + i = ((r<<5)|(g<<2)|b); + colors[i].r = r<<5; + colors[i].g = g<<5; + colors[i].b = b<<6; + } + } + } + } +NOTICE("testwin: setting colors\n"); + if ( ! SDL_SetColors(screen, colors, 0, ncolors) && + (screen->format->palette != NULL) ) { + fprintf(stderr, +"Warning: Couldn't set all of the colors, but SDL will map the image\n" +" (colormap fading will suffer - try the -warp option)\n" + ); + } + + /* Set the screen to black (not really necessary) */ + if ( SDL_LockSurface(screen) == 0 ) { + Uint32 black; + Uint8 *pixels; + + black = SDL_MapRGB(screen->format, 0, 0, 0); + pixels = (Uint8 *)screen->pixels; + for ( i=0; ih; ++i ) { + memset(pixels, black, + screen->w*screen->format->BytesPerPixel); + pixels += screen->pitch; + } + SDL_UnlockSurface(screen); + SDL_UpdateRect(screen, 0, 0, 0, 0); + } + + /* Display the picture */ + if ( speedy ) { + SDL_Surface *displayfmt; + +fprintf(stderr, "Converting picture\n"); + displayfmt = SDL_DisplayFormat(picture); + if ( displayfmt == NULL ) { + fprintf(stderr, + "Couldn't convert image: %s\n", SDL_GetError()); + goto done; + } + SDL_FreeSurface(picture); + picture = displayfmt; + } + printf("(image surface located in %s memory)\n", + (picture->flags&SDL_HWSURFACE) ? "video" : "system"); + centered = (screen->w - picture->w)/2; + if ( centered < 0 ) { + centered = 0; + } + dest.y = (screen->h - picture->h)/2; + dest.w = picture->w; + dest.h = picture->h; +NOTICE("testwin: moving image\n"); + for ( i=0; i<=centered; ++i ) { + dest.x = i; + update = dest; + if ( SDL_BlitSurface(picture, NULL, screen, &update) < 0 ) { + fprintf(stderr, "Blit failed: %s\n", SDL_GetError()); + break; + } + if ( flip ) { + SDL_Flip(screen); + } else { + SDL_UpdateRects(screen, 1, &update); + } + } + +#ifdef SCREENSHOT + if ( SDL_SaveBMP(screen, "screen.bmp") < 0 ) + printf("Couldn't save screen: %s\n", SDL_GetError()); +#endif + +#ifndef BENCHMARK_SDL + /* Let it sit there for a while */ + SDL_Delay(5*1000); +#endif + /* Fade the colormap */ + if ( ! nofade ) { + int maxstep; + SDL_Color final; + SDL_Color palcolors[256]; + struct { + Sint16 r, g, b; + } cdist[256]; + +NOTICE("testwin: fading out...\n"); + memcpy(cmap, colors, ncolors*sizeof(SDL_Color)); + maxstep = 32-1; + final.r = 0xFF; + final.g = 0x00; + final.b = 0x00; + memcpy(palcolors, colors, ncolors*sizeof(SDL_Color)); + for ( i=0; i 1 ) { + if ( strcmp(argv[1], "-speedy") == 0 ) { + speedy = 1; + argv += 1; + argc -= 1; + } else + if ( strcmp(argv[1], "-nofade") == 0 ) { + nofade = 1; + argv += 1; + argc -= 1; + } else + if ( strcmp(argv[1], "-delay") == 0 ) { + if ( argv[2] ) { + delay = atoi(argv[2]); + argv += 2; + argc -= 2; + } else { + fprintf(stderr, + "The -delay option requires an argument\n"); + exit(1); + } + } else + if ( strcmp(argv[1], "-width") == 0 ) { + if ( argv[2] && ((w = atoi(argv[2])) > 0) ) { + argv += 2; + argc -= 2; + } else { + fprintf(stderr, + "The -width option requires an argument\n"); + exit(1); + } + } else + if ( strcmp(argv[1], "-height") == 0 ) { + if ( argv[2] && ((h = atoi(argv[2])) > 0) ) { + argv += 2; + argc -= 2; + } else { + fprintf(stderr, + "The -height option requires an argument\n"); + exit(1); + } + } else + if ( strcmp(argv[1], "-bpp") == 0 ) { + if ( argv[2] ) { + desired_bpp = atoi(argv[2]); + argv += 2; + argc -= 2; + } else { + fprintf(stderr, + "The -bpp option requires an argument\n"); + exit(1); + } + } else + if ( strcmp(argv[1], "-warp") == 0 ) { + video_flags |= SDL_HWPALETTE; + argv += 1; + argc -= 1; + } else + if ( strcmp(argv[1], "-hw") == 0 ) { + video_flags |= SDL_HWSURFACE; + argv += 1; + argc -= 1; + } else + if ( strcmp(argv[1], "-flip") == 0 ) { + video_flags |= SDL_DOUBLEBUF; + argv += 1; + argc -= 1; + } else + if ( strcmp(argv[1], "-fullscreen") == 0 ) { + video_flags |= SDL_FULLSCREEN; + argv += 1; + argc -= 1; + } else + break; + } + + if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { + fprintf(stderr, + "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } + atexit(SDL_Quit); /* Clean up on exit */ + + /* Initialize the display */ + screen = SDL_SetVideoMode(w, h, desired_bpp, video_flags); + if ( screen == NULL ) { + fprintf(stderr, "Couldn't set %dx%dx%d video mode: %s\n", + w, h, desired_bpp, SDL_GetError()); + exit(1); + } + printf("Set %dx%dx%d mode\n", + screen->w, screen->h, screen->format->BitsPerPixel); + printf("(video surface located in %s memory)\n", + (screen->flags&SDL_HWSURFACE) ? "video" : "system"); + if ( screen->flags & SDL_DOUBLEBUF ) { + printf("Double-buffering enabled\n"); + flip = 1; + } + + /* Set the window manager title bar */ + SDL_WM_SetCaption("SDL test window", "testwin"); + + /* Do all the drawing work */ +#ifdef BENCHMARK_SDL + then = SDL_GetTicks(); + DrawPict(screen, argv[1], speedy, flip, nofade); + now = SDL_GetTicks(); + printf("Time: %d milliseconds\n", now-then); +#else + DrawPict(screen, argv[1], speedy, flip, nofade); +#endif + SDL_Delay(delay*1000); + return(0); +} diff --git a/libs/DevIL-1.7.8/examples/simple_example/simple.c b/libs/DevIL-1.7.8/examples/simple_example/simple.c new file mode 100644 index 00000000..fb1d9752 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/simple_example/simple.c @@ -0,0 +1,94 @@ +//----------------------------------------------------------------------------- +// +// DevIL Source Example +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 4/22/2002 +// +// Filename: examples/Simple Example/simple.c +// +// Description: Simplest implementation of an DevIL application. +// Loads an image and saves it to a new image. +// The images can be of any format and can be different. +// +//----------------------------------------------------------------------------- + +// Required include files. +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include + +/* We would need ILU just because of iluErrorString() function... */ +/* So make it possible for both with and without ILU! */ +#ifdef ILU_ENABLED +#include +#define PRINT_ERROR_MACRO printf("Error: %s\n", iluErrorString(Error)) +#else /* not ILU_ENABLED */ +#define PRINT_ERROR_MACRO printf("Error: 0x%X\n", (unsigned int)Error) +#endif /* not ILU_ENABLED */ + +int main(int argc, char **argv) +{ + ILuint ImgId; + ILenum Error; + + // We use the filename specified in the first argument of the command-line. + if (argc < 2) { + fprintf(stderr, "DevIL_test : DevIL simple command line application.\n"); + fprintf(stderr, "Usage : DevIL_test [output]\n"); + fprintf(stderr, "Default output is test.tga\n"); + return 1; + } + + // Check if the shared lib's version matches the executable's version. + if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION) { + printf("DevIL version is different...exiting!\n"); + return 2; + } + + // Initialize DevIL. + ilInit(); +#ifdef ILU_ENABLED + iluInit(); +#endif + + // Generate the main image name to use. + ilGenImages(1, &ImgId); + + // Bind this image name. + ilBindImage(ImgId); + + // Loads the image specified by File into the image named by ImgId. + if (!ilLoadImage(argv[1])) { + printf("Could not open file...exiting.\n"); + return 3; + } + + // Display the image's dimensions to the end user. + printf("Width: %d Height: %d Depth: %d Bpp: %d\n", + ilGetInteger(IL_IMAGE_WIDTH), + ilGetInteger(IL_IMAGE_HEIGHT), + ilGetInteger(IL_IMAGE_DEPTH), + ilGetInteger(IL_IMAGE_BITS_PER_PIXEL)); + + // Enable this to let us overwrite the destination file if it already exists. + ilEnable(IL_FILE_OVERWRITE); + + // If argv[2] is present, we save to this filename, else we save to test.tga. + if (argc > 2) + ilSaveImage(argv[2]); + else + ilSaveImage("test.tga"); + + // We're done with the image, so let's delete it. + ilDeleteImages(1, &ImgId); + + // Simple Error detection loop that displays the Error to the user in a human-readable form. + while ((Error = ilGetError())) { + PRINT_ERROR_MACRO;} + + return 0; + +} diff --git a/libs/DevIL-1.7.8/examples/volume_example/3dtest.c b/libs/DevIL-1.7.8/examples/volume_example/3dtest.c new file mode 100644 index 00000000..31869913 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/volume_example/3dtest.c @@ -0,0 +1,379 @@ +#ifdef _WIN32 +#include +#else +#include +#endif +#include +#include +//#define ILUT_USE_OPENGL +#include +#include "3dtest.h" +#include +#include +#include +#include +#include + +#ifdef _MSC_VER + #pragma comment(lib, "opengl32.lib") + #pragma comment(lib, "freeglut.lib") + + // Prevent the console window from popping up. + #pragma comment(linker, "/entry:mainCRTStartup") + #pragma comment(linker, "/subsystem:windows") +#endif + +char *File; +ILint Width, Height, Depth, Window; +ILuint ActiveImage = 0; + +int main(int argc, char** argv) +{ + //char Test[6] = { 0, 0, 0, 0, 0, 0 }; + + if (argc < 2) { + //cout << "Please specify a filename." << endl; + return 1; + } + File = argv[1]; + + if (argc > 2) { + TransFactor = atoi(argv[2]) != 0 ? -atoi(argv[2]) : TransFactor; + } + + if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION || + ilGetInteger(ILU_VERSION_NUM) < ILU_VERSION || + ilGetInteger(ILUT_VERSION_NUM) < ILUT_VERSION) { + //cout << "OpenIL version is different...exiting!" << endl; + return 2; + } + + ilInit(); + //ilEnable(IL_CONV_PAL); + ilutEnable(ILUT_OPENGL_CONV); + + glutInit(&argc, argv); + + ilGenImages(1, &ImgId); + ilBindImage(ImgId); + ilLoadImage(File); + + // Generate the appropriate width x height less than or equal to MAX_X x MAX_Y. + // Instead of just clipping Width x Height to MAX_X x MAX_Y, we scale to + // an appropriate size, so the image isn't stretched/squished. + Width = ilGetInteger(IL_IMAGE_WIDTH); + Height = ilGetInteger(IL_IMAGE_HEIGHT); + if (Width > 0) { // Don't want a divide by 0... + if (Width > MAX_X) { + Width = MAX_X; + Height = (ILuint)(MAX_X / (ILfloat)ilGetInteger(IL_IMAGE_WIDTH) * Height); + } + } + if (Height > 0) { // Don't want a divide by 0... + if (Height > MAX_Y) { + Height = MAX_Y; + Width = (ILuint)(MAX_Y / (ILfloat)ilGetInteger(IL_IMAGE_HEIGHT) * Width); + } + } + + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); + glutInitWindowPosition(100, 100); + glutInitWindowSize(Width, Height); + + Window = glutCreateWindow("Open Image Library (OpenIL) Test"); + glutDisplayFunc(DisplayFunc); + glutKeyboardFunc(KeyboardFunc); + glutSpecialFunc(KeySpecialFunc); + if (Setup() == IL_FALSE) + return 1; + + // Enter the main (Free)GLUT processing loop + glutMainLoop(); + + CleanUp(); + + return 0; +} + + +void ResizeFunc(int NewWidth, int NewHeight) +{ + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glViewport(0, 0, NewWidth, NewHeight); + //glOrtho(0, Width, 0, Height, -100, 1); + SetPerspective(50.0f); +} + + +void DisplayFunc() +{ + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glLoadIdentity(); + SetPerspective(50.0f); + glTranslatef(0.0f, 0.0f, TransFactor); + glRotatef(Angle, 0.0f, 1.0f, 0.0f); + + glBindTexture(GL_TEXTURE_2D, TexID1); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex3i(-Width, -Height, Depth); + glTexCoord2f(1.0f, 0.0f); + glVertex3i(Width, -Height, Depth); + glTexCoord2f(1.0f, 1.0f); + glVertex3i(Width, Height, Depth); + glTexCoord2f(0.0f, 1.0f); + glVertex3i(-Width, Height, Depth); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, TexID2); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex3i(-Width, -Height, Depth); + glTexCoord2f(1.0f, 0.0f); + glVertex3i(-Width, -Height, -Depth); + glTexCoord2f(1.0f, 1.0f); + glVertex3i(-Width, Height, -Depth); + glTexCoord2f(0.0f, 1.0f); + glVertex3i(-Width, Height, Depth); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, TexID3); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex3i(Width, -Height, Depth); + glTexCoord2f(1.0f, 0.0f); + glVertex3i(Width, -Height, -Depth); + glTexCoord2f(1.0f, 1.0f); + glVertex3i(Width, Height, -Depth); + glTexCoord2f(0.0f, 1.0f); + glVertex3i(Width, Height, Depth); + glEnd(); + + glBindTexture(GL_TEXTURE_2D, TexID4); + glBegin(GL_QUADS); + glTexCoord2f(0.0f, 0.0f); + glVertex3i(-Width, -Height, -Depth); + glTexCoord2f(1.0f, 0.0f); + glVertex3i(Width, -Height, -Depth); + glTexCoord2f(1.0f, 1.0f); + glVertex3i(Width, Height, -Depth); + glTexCoord2f(0.0f, 1.0f); + glVertex3i(-Width, Height, -Depth); + glEnd(); + + + glFlush(); + glFinish(); + glutSwapBuffers(); +} + + +void IdleFunc() +{ + glutShowWindow(); + glutPostRedisplay(); +} + + +void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY) +{ + if (cChar >= '0' && cChar <= '9') { + ActiveImage = cChar - '0'; + CleanUp(); + GenSides(); + return; + } + if (cChar == '+' || cChar == '=') { + ActiveImage++; + CleanUp(); + GenSides(); + return; + } + if (cChar == '-' || cChar == '_') { + if (ActiveImage == 0) + return; + ActiveImage--; + CleanUp(); + GenSides(); + return; + } + + CleanUp(); + glutDestroyWindow(Window); +#ifndef _WIN32 + /* Siigron: added exit(), since glutDestroyWindow() doesn't exit the + program with "normal" GLUT */ + exit(0); +#endif +} + + +void KeySpecialFunc(int Key, int x, int y) +{ + switch (Key) + { + case GLUT_KEY_UP: + TransFactor += 10.0f; + //glTranslatef(0.0f, 0.0f, 10.0f); + break; + case GLUT_KEY_DOWN: + TransFactor -= 10.0f; + //glTranslatef(0.0f, 0.0f, -10.0f); + break; + case GLUT_KEY_RIGHT: + Angle += 10.0f; + //glRotatef(10.0f, 0.0f, 1.0f, 0.0f); + break; + case GLUT_KEY_LEFT: + Angle -= 10.0f; + //glRotatef(-10.0f, 0.0f, 1.0f, 0.0f); + break; + } + glutPostRedisplay(); + + return; +} + + +#define PI 3.14159265 +void SetPerspective(float Fov) +{ + float fov = (float)tan(Fov * .5f * PI / 180.0f); + float Aspect = 0.0f; + + if (Height != 0) + Aspect = Width / (float)Height; + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-fov * Aspect, fov * Aspect, -fov, fov, 1.0f, 10000.0f); + + return; +} + + +ILboolean Setup() +{ + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LEQUAL); // or should this be GL_LESS? + glClearDepth(1); + + glEnable(GL_TEXTURE_2D); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + ilutRenderer(ILUT_OPENGL); + + if (!GenSides()) + return IL_FALSE; + + TransFactor += -Depth; + + glTranslatef(0.0f, 0.0f, -100.0f); + + return IL_TRUE; +} + + +ILboolean GenSides() +{ + ILubyte *Buffer, *Data, Bpp, Bpc; + ILuint TempImage; + ILenum Format, Type; + ILint SizePlane, Bps, c, y, z, i; + + ilActiveImage(ActiveImage); + Bpp = ilGetInteger(IL_IMAGE_BPP); + Bpc = ilGetInteger(IL_IMAGE_BPC); + Format = ilGetInteger(IL_IMAGE_FORMAT); + Type = ilGetInteger(IL_IMAGE_TYPE); + + // Front + TexID1 = ilutGLBindTexImage(); + Width = ilGetInteger(IL_IMAGE_WIDTH); + Height = ilGetInteger(IL_IMAGE_HEIGHT); + Depth = ilGetInteger(IL_IMAGE_DEPTH); + ilGenImages(1, &TempImage); + + SizePlane = ilGetInteger(IL_IMAGE_PLANESIZE); + + SizePlane = Width * Height * Bpp * Bpc; + Bps = Width * Bpp * Bpc; + Data = ilGetData(); + + // Left + i = 0; + Buffer = (ILubyte*)malloc(Height * Depth * Bpp * Bpc); + for (y = 0; y < Height; y++) { + for (z = 0; z < Depth; z++) { + for (c = 0; c < Bpp * Bpc; c++) { + Buffer[i++] = Data[z * SizePlane + y * Bps + c]; + } + } + } + ilBindImage(TempImage); + ilTexImage(Depth, Height, 1, Bpp, Format, Type, Buffer); + TexID2 = ilutGLBindTexImage(); + free(Buffer); + + // Right + ilBindImage(ImgId); + ilActiveImage(ActiveImage); + i = 0; + Buffer = (ILubyte*)malloc(Height * Depth * Bpp * Bpc); + for (y = 0; y < Height; y++) { + for (z = 0; z < Depth; z++) { + for (c = 0; c < Bpp * Bpc; c++) { + Buffer[i++] = Data[z * SizePlane + y * Bps + (Width - 1) * Bpp * Bpc + c]; + } + } + } + ilBindImage(TempImage); + ilTexImage(Depth, Height, 1, Bpp, Format, Type, Buffer); + TexID3 = ilutGLBindTexImage(); + free(Buffer); + + // Back + ilBindImage(ImgId); + ilActiveImage(ActiveImage); + Buffer = (ILubyte*)malloc(Width * Height * Bpp * Bpc); + ilCopyPixels(0, 0, Depth-1, Width, Height, 1, Format, Type, Buffer); + ilBindImage(TempImage); + ilTexImage(Width, Height, 1, Bpp, Format, Type, Buffer); + TexID4 = ilutGLBindTexImage(); + free(Buffer); + + //ilDeleteImages(1, &ImgId); + ilDeleteImages(1, &TempImage); + + ilBindImage(ImgId); + + return IL_TRUE; +} + + +void CleanUp() +{ + glDeleteTextures(1, &TexID1); + glDeleteTextures(1, &TexID2); + glDeleteTextures(1, &TexID3); + glDeleteTextures(1, &TexID4); + return; +} + + +void ExitClean() +{ + if (!bCleaned) { + glDeleteTextures(1, &TexID1); + glDeleteTextures(1, &TexID2); + glDeleteTextures(1, &TexID3); + glDeleteTextures(1, &TexID4); + ilDeleteImages(1, &ImgId); + } + bCleaned = IL_TRUE; + return; +} diff --git a/libs/DevIL-1.7.8/examples/volume_example/3dtest.h b/libs/DevIL-1.7.8/examples/volume_example/3dtest.h new file mode 100644 index 00000000..b85139c3 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/volume_example/3dtest.h @@ -0,0 +1,25 @@ +#ifndef TEST3D_H +#define TEST3D_H + +#define MAX_X 640 +#define MAX_Y 480 + +void DisplayFunc(void); +void CleanUp(void); +void ExitClean(void); +void ResizeFunc(int NewWidth, int NewHeight); +void IdleFunc(void); +void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY); +void KeySpecialFunc(int Key, int x, int y); +void SetPerspective(float Fov); +ILboolean Setup(void); +ILboolean GenSides(void); + +ILboolean bCleaned = IL_FALSE; + +GLuint TexID1 = 0, TexID2 = 0, TexID3 = 0, TexID4 = 0; +ILuint ImgId; + +float Angle = 0.0, TransFactor = -470.0; + +#endif//TEST3D_H diff --git a/libs/DevIL-1.7.8/examples/windows_example/BatchConv.cpp b/libs/DevIL-1.7.8/examples/windows_example/BatchConv.cpp new file mode 100644 index 00000000..6af587e7 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/windows_example/BatchConv.cpp @@ -0,0 +1,162 @@ +#ifdef _DEBUG +#define IL_DEBUG +#endif//_DEBUG + +#include +#include +#include +#include +using namespace std; + +TCHAR *ImageExtArray[] = +{ + L"jpe", L"jpg", L"jpeg", + L"bmp", + L"ico", + L"pbm", L"pgm", L"pnm", L"ppm", + L"png", + L"bw", L"rgb", L"rgba", L"sgi", + L"tga", L"tif", L"tiff", + L"pcx", + NULL +}; + + +void ParseDirs(const string &_Dir, char **ExtList, char *ConvExt, bool Recurse); +bool IsDir(WIN32_FIND_DATA *_Data); +char *GetExtension(const char *FileName); +bool CheckExtension(char *Arg, char *Ext); + + +TCHAR *Ext; +string NewExt; +int i, j; + + +//void BatchConv(TCHAR *Directory, TCHAR *ExtList, TCHAR *ConvExt, bool Recurse) +//{ +// ILuint Id, OrigId; +// ilGenImages(1, &Id); +// OrigId = ilGetInteger(IL_CUR_IMAGE); +// ilBindImage(Id); +// if (ExtList == NULL) +// ParseDirs(string(Directory), ImageExtArray, ConvExt, Recurse); +// else { +// /*char **List = ConvertExtList(ExtList); +// ParseDirs(string(Directory), ConvertExtList(ExtList), ConvExt, Recurse); +// DestroyExtList(List);*/ +// } +// ilDeleteImages(1, &Id); +// ilBindImage(OrigId); +// return; +//} +// +// +//void ParseDirs(const string &_Dir, TCHAR **ExtList, TCHAR *ConvExt, bool Recurse) +//{ +// HANDLE Search; +// WIN32_FIND_DATA FindData; +// +// _chdir(_Dir.c_str()); +// Search = FindFirstFile("*.*", &FindData); +// +// do { +// if (!strcmp(FindData.cFileName, ".") || !strcmp(FindData.cFileName, "..")) +// continue; +// if (IsDir(&FindData) && Recurse) { +// _chdir(FindData.cFileName); +// string NewDir = _Dir + string("\\"); +// NewDir += FindData.cFileName; +// ParseDirs(NewDir, ExtList, ConvExt, Recurse); +// _chdir(".."); +// } +// Ext = GetExtension(FindData.cFileName); +// if (Ext == NULL) +// continue; +// if (!_stricmp(Ext, ConvExt)) // Already has that extension. +// continue; +// for (j = 0; ExtList[j] != NULL; j++) { +// if (CheckExtension(FindData.cFileName, ExtList[j])) { +// string NewName; +// for (i = 0; i < Ext - FindData.cFileName; i++) { +// NewName += FindData.cFileName[i]; +// } +// NewName += ConvExt; +// if (!ilLoadImage(FindData.cFileName)) +// break; +// ilSaveImage((TCHAR*)NewName.c_str()); +// break; +// } +// } +// } while (FindNextFile(Search, &FindData)); +// +// FindClose(Search); +// return; +//} +// +// +//// Is the file actually a directory? +//bool IsDir(WIN32_FIND_DATA *_Data) +//{ +// if (_Data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) +// return true; +// return false; +//} + + +TCHAR *GetExtension(const TCHAR *FileName) +{ + bool PeriodFound = false; + TCHAR *Ext = (TCHAR*)FileName; + long i, Len = (long)wcslen(FileName); + + if (FileName == NULL || !Len) // if not a good filename/extension, exit early + return NULL; + + Ext += Len; // start at the end + + for (i = Len; i >= 0; i--) { + if (*Ext == '.') { // try to find a period + PeriodFound = true; + break; + } + Ext--; + } + + if (!PeriodFound) // if no period, no extension + return NULL; + + return Ext+1; +} + + +// Simple function to test if a filename has a given extension, disregarding case +bool CheckExtension(TCHAR *Arg, TCHAR *Ext) +{ + bool PeriodFound = false; + TCHAR *Argu = Arg; // pointer to arg so we don't destroy arg + unsigned int i; + + if (Arg == NULL || Ext == NULL || !wcslen(Arg) || !wcslen(Ext)) // if not a good filename/extension, exit early + return false; + + Argu += wcslen(Arg); // start at the end + + + for (i = (int)wcslen(Arg); i >= 0; i--) { + if (*Argu == '.') { // try to find a period + PeriodFound = true; + break; + } + Argu--; + } + + if (!PeriodFound) // if no period, no extension + return false; + + if (!_wcsicmp(Argu+1, Ext)) // extension and ext match? + return true; + + return false; // if all else fails, return IL_FALSE +} + diff --git a/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.cpp b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.cpp new file mode 100644 index 00000000..a3f0b6b0 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.cpp @@ -0,0 +1,1502 @@ +//-------------------------------------------------------------------------------- +// +// ImageLib Windows (GDI) Test Source +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: testil/windowstest/windowstest.c +// +// Description: Full GDI test application for DevIL. +// +// Note: This requires FluidStudio's Colour Picker library to compile +// properly (available at http://www.fluidstudios.com/publications.html). +// +//-------------------------------------------------------------------------------- + +#ifdef _DEBUG +#define IL_DEBUG +#endif//_DEBUG + +#define _UNICODE + +// Memory leak detection +#ifdef _DEBUG + #define _CRTDBG_MAP_ALLOC + #include + #include +#endif + +//#define ILUT_USE_WIN32 +#include +#include +#include +#include +#ifdef ILUT_USE_SDL + #include +#endif +#include "resource.h" +#include +#include + +//#pragma comment(lib, "sdl.lib") +//#pragma comment(lib, "sdlmain.lib") +//#pragma comment(lib, "colorpicker.lib") + + +// Evil globals! +HINSTANCE hInstance; +HBITMAP hBitmap; +BITMAPINFOHEADER BmpInfo; +HDC hDC = 0, hMemDC = 0; +HWND HWnd; +HBRUSH BackBrush; + +#define BORDER_W 16 //8 +#define MENU_H 58 //54 +#define MIN_W 450 // Accomodate the menu bar. +//#define MAX_W 400 +//#define MAX_H 400 +#define TITLE L"DevIL Windows Test" +ILuint NumUndosAllowed = 4, UndoSize = 0; +ILuint Undos[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +ILuint Width, Height, Depth, Size; // Main image +ILint CurImage; +TCHAR CurFileName[2048]; + +ILint XOff, YOff; + +ILdouble last_elapsed, cur_elapsed, elapsed; + +ILuint FilterType; +ILuint FilterParamInt; +ILfloat FilterParamFloat; +TCHAR FilterEditString[255]; +TCHAR OpenFileName[2048]; +TCHAR SaveFileName[2048]; +TCHAR NewTitle[512]; + +TCHAR *ExtList[] = { + L"pix", L"cut", L"dcx", L"gif", L"mdl", L"lif", L"jpe", L"jpg", L"jpeg", L"lif", L"bmp", + L"ico", L"pbm", L"pgm", L"ppm", L"png", L"bw", L"rgb", L"rgba", L"sgi", L"tga", L"tif", + L"tiff", L"xpm", L"psp", L"psd", L"iwi", L"exr", L"blp", L"tpl", L"wdp", L"pcx", L"dcm", + L"rot", L"iwi", L"ftx", L"dds", L"dpx", L"vtf", + NULL +}; + + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR APIENTRY AboutDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR APIENTRY PropertiesDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR APIENTRY FilterDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR APIENTRY ResizeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR APIENTRY BatchDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +void BatchConv(TCHAR *Directory, TCHAR *ExtList, TCHAR *ConvExt, bool Recurse); +void GenFilterString(TCHAR *Out, TCHAR **Strings); +void ResizeWin(void); +void CreateGDI(void); +bool IsOpenable(TCHAR *FileName); +bool GetPrevImage(void); +bool GetNextImage(void); +TCHAR *GetExtension(const TCHAR *FileName); +bool CheckExtension(TCHAR *Arg, TCHAR *Ext); + +//extern "C" +//// Colour picker export +//__declspec( dllimport ) bool WINAPI FSColorPickerDoModal(unsigned int * currentColor, const bool currentColorIsDefault, unsigned int * originalColor, const bool originalColorIsDefault, const int initialExpansionState); + + +ILAPI ILubyte* ILAPIENTRY ilNVidiaCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILenum DxtType); + + +int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +{ + MSG msg; + WNDCLASSEX wcex; + HACCEL hAccelTable; + + hInstance = hInst; + memset(OpenFileName, 0, 2048 * sizeof(TCHAR)); + + BackBrush = CreateSolidBrush(RGB(128,128,128)); + + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.style = CS_HREDRAW | CS_VREDRAW; + wcex.lpfnWndProc = (WNDPROC)WndProc; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 0; + wcex.hInstance = hInstance; + wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = BackBrush; + wcex.lpszMenuName = (LPCWSTR)IDR_MENU1; //@TODO: (LPCSTR)IDR_MENU1; + wcex.lpszClassName = TITLE; + wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_ICON1); + + RegisterClassEx(&wcex); + + HWnd = CreateWindow(TITLE, TITLE, WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 50, 50, 400, 300, NULL, NULL, hInstance, NULL); + if (HWnd == NULL) + return FALSE; + + //if (SDL_Init(SDL_INIT_TIMER) < 0) + // return FALSE; + //atexit(SDL_Quit); + + // Display the window + ShowWindow(HWnd, nCmdShow); + UpdateWindow(HWnd); + + // Initialize DevIL + ilInit(); + iluInit(); + ilutRenderer(ILUT_WIN32); + + // Is there a file to load from the command-line? + if (__argc > 1) { + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + /*if (ilLoadImage(__argv[1])) { + CurImage = 0; + //ilConvertImage(IL_BGRA); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + sprintf(NewTitle, "%s - %s", TITLE, __argv[1]); + SetWindowText(HWnd, NewTitle); + }*/ + } + + hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDR_MENU1); + + while (GetMessage(&msg, NULL, 0, 0)) { + if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + +#ifdef _DEBUG + _CrtDumpMemoryLeaks(); +#endif + + return (int)msg.wParam; +} + + +void CreateGDI() +{ + ILuint CopyName, CurName, CurImg, CurMip; + + hDC = GetDC(HWnd); + hMemDC = CreateCompatibleDC(hDC); + CurName = ilGetInteger(IL_CUR_IMAGE); + CurImg = ilGetInteger(IL_ACTIVE_IMAGE); + CurMip = ilGetInteger(IL_ACTIVE_MIPMAP); + CopyName = ilCloneCurImage(); + ilBindImage(CopyName); + //ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE); + hBitmap = ilutConvertToHBitmap(hDC); + ilutGetBmpInfo((BITMAPINFO*)&BmpInfo); + DeleteObject(SelectObject(hMemDC, hBitmap)); + ilBindImage(CurName); + if (CurImg) + ilActiveImage(CurImg);//ilBindImage(Undos[0]); + if (CurMip) + ilActiveMipmap(CurMip); + ilDeleteImages(1, &CopyName); + + return; +} + + +void DestroyGDI() +{ + if (hMemDC) { + DeleteObject(hBitmap); + DeleteDC(hMemDC); + } + if (hDC) { + ReleaseDC(HWnd, hDC); + } + hBitmap = NULL; + hMemDC = NULL; + hDC = NULL; + + return; +} + + +void ResizeWin() +{ + static RECT Rect1, Rect2; + static ILint NewW, NewH; + + SystemParametersInfo(SPI_GETWORKAREA, 0, &Rect1, 0); + + GetWindowRect(HWnd, &Rect2); + + Width = ilGetInteger(IL_IMAGE_WIDTH); + Height = ilGetInteger(IL_IMAGE_HEIGHT); + Depth = ilGetInteger(IL_IMAGE_DEPTH); + + NewW = Width < MIN_W ? MIN_W : Width + BORDER_W; + if (NewW + Rect2.left > Rect1.right) + NewW = Rect1.right - Rect2.left; + NewH = Height + MENU_H; + if (NewH + Rect2.top > Rect1.bottom) + NewH = Rect1.bottom - Rect2.top; + + SetWindowPos(HWnd, HWND_TOP, Rect2.left, Rect2.top, NewW, NewH, SWP_SHOWWINDOW); + InvalidateRect(HWnd, NULL, FALSE); + + return; +} + + +// Window procedure, handles all messages for this program +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + static HMENU hMenu; + static ILuint Colours; + static RECT Rect; + static PAINTSTRUCT ps; + static HDROP hDrop; + + static TCHAR OpenFilter[2048]; + static TCHAR SaveFilter[2048]; + static TCHAR *OFilter[] = { + L"All Files (*.*)", L"*.*", + L"Alias|Wavefront Files (*.pix)", L"*.pix", + L"Cut Files (*.cut)", L"*.cut", + L"Dcx Files (*.dcx)", L"*.dcx", + L"Graphics Interchange Format (*.gif)", L"*.gif", + L"Half-Life Model Files (*.mdl)", L"*.mdl", + L"Homeworld Image Files (*.lif)", L"*.lif", + L"Image Files (All Supported Types)", L"*.jpe;*.jpg;*.jpeg;*.lif;*.bmp;*.ico;*.pbm;*.pgm;*.pnm;*.ppm;*.png;*.bw;*.rgb;*.rgba;*.sgi;*.tga;*.tif;*.tiff;*.pcx;*.xpm;*.psp;*.psd;*.pix;*.pxr;*.cut;*.dcx", + L"Jpeg Files (*.jpe, *.jpg, *.jpeg)", L"*.jpe;*.jpg;*.jpeg", + L"Kodak Photo CD Files (*.pcd)", L"*.pcd", + L"Microsoft Bitmap Files (*.bmp)", L"*.bmp", + L"Microsoft DirectDraw Surface (*.dds)", L"*.dds", + L"Microsoft Icon Files (*.ico, *.cur)", L"*.ico, *.cur", + L"Multiple Network Graphics Files (*.mng)", L"*.mng", + L"Paint Shop Pro Files (*.psp)", L"*.psp", + L"PhotoShop Files (*.psd)", L"*.psd", + L"Pic Files (*.pic)", L"*.pic", + L"Pixar Files (*.pix)", L"*.pix", + L"Portable AnyMap Files (*.pbm, *.pgm, *.pnm, *.ppm)", L"*.pbm;*.pgm;*.pnm;*.ppm", + L"Portable Network Graphics Files (*.png)", L"*.png", + L"Sgi Files (*.sgi)", L"*.bw;*.rgb;*.rgba;*.sgi", + L"Targa Files (*.tga, *.vda, *.icb, *.vst)", L"*.tga;*.vda;*.icb;*.vst", + L"Tiff Files (*.tif)", L"*.tif;*.tiff", + L"Valve Texture Files (*.vtf)", L"*.vtf", + L"Quake Wal Files (*.wal)", L"*.wal", + L"X PixelMap (*.xpm)", L"*.xpm", + L"ZSoft Pcx Files (*.pcx)", L"*.pcx", + L"\0\0" + }; + static TCHAR *SFilter[] = { + L"All Files (*.*)", L"*.*", + L"C-Style Header (*.h)", L"*.h", + L"Jpeg Files (*.jpe, *.jpg, *.jpeg)", L"*.jpe;*.jpg;*.jpeg", + L"Microsoft Bitmap Files (*.bmp)", L"*.bmp", + L"Microsoft DirectDraw Surface (*.dds)", L"*.dds", + L"PhotoShop Files (*.psd)", L"*.psd", + L"Portable AnyMap Files (*.pbm, *.pgm, *.ppm)", L"*.pbm;*.pgm;*.ppm", + L"Portable Network Graphics Files (*.png)", L"*.png", + L"Sgi Files (*.sgi)", L"*.bw;*.rgb;*.rgba;*.sgi", + L"Targa Files (*.tga)", L"*.tga", + L"Tiff Files (*.tif)", L"*.tif", + L"ZSoft Pcx Files (*.pcx)", L"*.pcx", + L"\0\0" + }; + static OPENFILENAME Ofn = { + sizeof(OPENFILENAME), + hWnd, + NULL, + OpenFilter, + NULL, + 0, + 0, + OpenFileName, + 2048, + NULL, + 0, + NULL, + NULL, + OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST, + 0, + 0, + NULL, + NULL, + NULL, + NULL + }; + + POINT CurMouse; + static POINT PrevMouse; + static ILboolean MouseDown = IL_FALSE; + + static RECT WinSize; + + unsigned int currentColor = 0x80000000; + unsigned int originalColor = 0x80000000; + bool userClickedOK; + ILclampf Red = 255, Green = 255, Blue = 255; + ILubyte *AlphaChannel; + ILenum Origin; + + switch (message) + { + case WM_CREATE: + GenFilterString(OpenFilter, OFilter); + GenFilterString(SaveFilter, SFilter); + + hDC = GetDC(hWnd); + DragAcceptFiles(hWnd, TRUE); + + ReleaseDC(hWnd, hDC); + break; + + case WM_CLOSE: + +#ifdef _DEBUG + _CrtDumpMemoryLeaks(); +#endif + DestroyGDI(); + DestroyWindow(hWnd); + UnregisterClass(TITLE, hInstance); + break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + + case WM_PAINT: + GetWindowRect(HWnd, &WinSize); // Shouldn't be here! + hDC = BeginPaint(hWnd, &ps); + //StretchBlt(hDC, 0, 0, WinSize.right - WinSize.left, + // WinSize.bottom - WinSize.top, BackHDC, 0, 0, 1, 1, SRCCOPY); + WinSize.right -= WinSize.left; + WinSize.bottom -= WinSize.top; + WinSize.top = 0; + WinSize.left = 0; + FillRect(hDC, &WinSize, BackBrush); + + BitBlt(hDC, XOff, YOff, (WORD)BmpInfo.biWidth, (WORD)BmpInfo.biHeight, + hMemDC, 0, 0, SRCCOPY); + EndPaint(hWnd, &ps); + ValidateRect(hWnd, NULL); + break; + + case WM_KEYDOWN: + if (wParam == VK_ESCAPE) + PostQuitMessage(0); + + // View the next image in the animation chain. + if (wParam == VK_RIGHT) { + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + CurImage++; + if (CurImage > ilGetInteger(IL_NUM_IMAGES)) + CurImage = 0; // Go back to the beginning of the animation. + ilActiveImage(CurImage); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + + if (wParam == '0') { + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + + if (wParam == '1') { + ilActiveMipmap(1); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '2') { + ilActiveMipmap(2); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '3') { + ilActiveMipmap(3); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '4') { + ilActiveMipmap(4); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '5') { + ilActiveMipmap(5); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '6') { + ilActiveMipmap(6); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '7') { + ilActiveMipmap(7); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '8') { + ilActiveMipmap(8); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + else if (wParam == '9') { + ilActiveMipmap(9); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + + // View the previous image in the animation chain. + if (wParam == VK_LEFT) { + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + CurImage--; + if (CurImage < 0) + CurImage = 0; + ilActiveImage(CurImage); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + + if (wParam == VK_PRIOR) { + if (!GetPrevImage()) + break; + + DestroyGDI(); + if (UndoSize == 0) + UndoSize = 1; + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + XOff = 0; + YOff = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + + //last_elapsed = SDL_GetTicks(); + if (!ilLoadImage(OpenFileName)) { + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - Could not open %s", TITLE, OpenFileName); + SetWindowText(hWnd, NewTitle); + return (0L); + } + CurImage = 0; + //cur_elapsed = SDL_GetTicks(); + elapsed = cur_elapsed - last_elapsed; + last_elapsed = cur_elapsed; + + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - %s: %u ms", TITLE, OpenFileName, (unsigned int)elapsed); + SetWindowText(hWnd, NewTitle); + } + + if (wParam == VK_NEXT) { + if (!GetNextImage()) + break; + + DestroyGDI(); + if (UndoSize == 0) + UndoSize = 1; + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + XOff = 0; + YOff = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + + //last_elapsed = SDL_GetTicks(); + if (!ilLoadImage(OpenFileName)) { + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - Could not open %s", TITLE, OpenFileName); + SetWindowText(hWnd, NewTitle); + return (0L); + } + CurImage = 0; + //cur_elapsed = SDL_GetTicks(); + elapsed = cur_elapsed - last_elapsed; + last_elapsed = cur_elapsed; + + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - %s: %u ms", TITLE, OpenFileName, (unsigned int)elapsed); + SetWindowText(hWnd, NewTitle); + } + + InvalidateRect(hWnd, NULL, FALSE); + break; + + // Moves the "viewport" + case WM_MOUSEMOVE: + if (!MouseDown) + break; + GetCursorPos(&CurMouse); + + XOff += CurMouse.x - PrevMouse.x; + YOff += CurMouse.y - PrevMouse.y; + + PrevMouse.x = CurMouse.x; + PrevMouse.y = CurMouse.y; + InvalidateRect(hWnd, NULL, FALSE); + break; + + case WM_LBUTTONDOWN: + MouseDown = IL_TRUE; + GetCursorPos(&PrevMouse); + break; + + case WM_LBUTTONUP: + MouseDown = IL_FALSE; + break; + + case WM_DROPFILES: + hDrop = (HDROP)wParam; + DragQueryFile(hDrop, 0, OpenFileName, 512); + + DestroyGDI(); + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + ilLoadImage(OpenFileName); + CurImage = 0; + + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - %s", TITLE, OpenFileName); + SetWindowText(hWnd, NewTitle); + + DragFinish(hDrop); + return 0; + + case WM_COMMAND: + FilterType = LOWORD(wParam); + + switch (LOWORD(wParam)) + { + case ID_FILE_EXIT: + PostMessage(hWnd, WM_CLOSE, 0, 0); + return (0L); + + case ID_HELP_ABOUT: + DialogBox (hInstance, + MAKEINTRESOURCE(IDD_DIALOG_ABOUT), + hWnd, + AboutDlgProc); + return (0L); + + case ID_FILE_PROPERTIES: + DialogBox (hInstance, + MAKEINTRESOURCE(IDD_DIALOG_PROPERTIES), + hWnd, + PropertiesDlgProc); + return (0L); + + case ID_BATCHCONVERT: + DialogBox (hInstance, + MAKEINTRESOURCE(IDD_DIALOG_BATCHCONV), + hWnd, + BatchDlgProc); + return (0L); + + case ID_EFFECTS_COUNTCOLORS: + Colours = iluColoursUsed(); + TCHAR ColourString[255]; + wsprintf(ColourString, L"The number of colours in this image is: %d", Colours); + MessageBox(NULL, ColourString, L"Colour Count", MB_OK); + return (0L); + + case ID_EFFECTSTOOLS_BACKGROUNDCOLOUR: + //userClickedOK = FSColorPickerDoModal(¤tColor, true, &originalColor, true, 0); + userClickedOK = 0; + + if (userClickedOK) { + Red = (ILfloat)((currentColor & 0xff0000) >> 16) / 255.0f; + Green = (ILfloat)((currentColor & 0xff00) >> 8) / 255.0f; + Blue = (ILfloat)(currentColor & 0xff) / 255.0f; + + ilClearColour(Red, Green, Blue, 1.0f); + } + + return (0L); + + case ID_EDIT_COPY: + ilutSetWinClipboard(); + return (0L); + + case ID_EDIT_PASTE: + ILuint Test; + ilGenImages(1, &Test); + ilBindImage(Test); + + // Check if there's anything in the clipboard. + if (!ilutGetWinClipboard()) { + ilDeleteImages(1, &Test); + return (0L); + } + ilDeleteImages(1, &Test); + + DestroyGDI(); + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + XOff = 0; + YOff = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + ilutGetWinClipboard(); + + wsprintf(CurFileName, L"Clipboard Paste"); + wsprintf(NewTitle, L"%s - Pasted from the Clipboard", TITLE); + SetWindowText(hWnd, NewTitle); + + //ilConvertImage(IL_BGRA); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + return (0L); + + // @TODO: Will probably fail if no image loaded! + case ID_FILE_PRINT: + /*PRINTDLG Pd; + DOCINFO Di; + //HDC PrintDC; + //HBITMAP PrintReplace; + + memset(&Pd, 0, sizeof(PRINTDLG)); + Pd.lStructSize = sizeof(PRINTDLG); + Pd.hwndOwner = hWnd; + Pd.Flags = PD_RETURNDC; + Pd.nCopies = 1; + Pd.nFromPage = 0xFFFF; + Pd.nToPage = 0xFFFF; + Pd.nMinPage = 1; + Pd.nMaxPage = 0xFFFF; + + if (!PrintDlg(&Pd)) + return (0L); + + Di.cbSize = sizeof(DOCINFO); + Di.lpszDocName = L"DevIL Printing Test"; + Di.lpszOutput = NULL; + Di.lpszDatatype = NULL; + Di.fwType = 0; + + StartDoc(Pd.hDC, &Di); + StartPage(Pd.hDC); + + //PrintDC = CreateCompatibleDC(Pd.hDC); + //PrintReplace = (HBITMAP)SelectObject(PrintDC, hBitmap); + StretchBlt(Pd.hDC, 0, 0, Width * 2, Height * 2, hMemDC, 0, 0, Width, Height, SRCCOPY); + + EndPage(Pd.hDC); + EndDoc(Pd.hDC); + //DeleteObject(PrintReplace); + //DeleteDC(PrintDC); + DeleteDC(Pd.hDC);*/ + + ilutWinPrint(0, 0, ilGetInteger(IL_IMAGE_WIDTH) * 2, ilGetInteger(IL_IMAGE_HEIGHT) * 2, hDC); + + return (0L); + + case ID_FILE_LOAD: + wsprintf(OpenFileName, L"*.*"); + Ofn.lpstrFilter = OpenFilter; + Ofn.lpstrFile = OpenFileName; + Ofn.lpstrTitle = L"Open File"; + Ofn.nFilterIndex = 1; + Ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; + + if (!GetOpenFileName(&Ofn)) + return (0L); + + DestroyGDI(); + if (UndoSize == 0) + UndoSize = 1; + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + XOff = 0; + YOff = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + + //last_elapsed = SDL_GetTicks(); + if (!ilLoadImage(OpenFileName)) + return (0L); + CurImage = 0; + //cur_elapsed = SDL_GetTicks(); + elapsed = cur_elapsed - last_elapsed; + last_elapsed = cur_elapsed; + + //iluBuildMipmaps(); + + //ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE); + //ilEnable(IL_NVIDIA_COMPRESS); + //ilEnable(IL_SQUISH_COMPRESS); + //ilSetInteger(IL_DXTC_FORMAT, IL_DXT5); + //free(ilCompressDXT(ilGetData(), ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), 1, IL_DXT5, &Size)); + //free(ilNVidiaCompressDXT(ilGetData(), ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), 1, IL_DXT5)); + + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + + wsprintf(CurFileName, L"%s", OpenFileName); + wsprintf(NewTitle, L"%s - %s: %u ms", TITLE, OpenFileName, (unsigned int)elapsed); + SetWindowText(hWnd, NewTitle); + + return (0L); + + case ID_FILE_OPENURL: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) != TRUE) { + return (0L); + } + + DestroyGDI(); + ilDeleteImages(UndoSize, Undos); + UndoSize = 0; + XOff = 0; + YOff = 0; + + ilGenImages(1, Undos); + ilBindImage(Undos[0]); + /*if (!ilutWinLoadUrl(FilterEditString)) + return (0L);*/ + + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + + wsprintf(NewTitle, L"%s - %s", TITLE, FilterEditString); + SetWindowText(hWnd, NewTitle); + + return (0L); + + case ID_FILE_SAVE: + wsprintf(SaveFileName, L"monkey.tga"); + Ofn.lpstrFilter = SaveFilter; + Ofn.lpstrFile = SaveFileName; + Ofn.lpstrTitle = L"Save File"; + Ofn.nFilterIndex = 1; + Ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; + + if (!GetSaveFileName(&Ofn)) + return (0L); + + ilEnable(IL_FILE_OVERWRITE); + //ilBindImage(Undos[0]); //@TODO: Do better here... + + //last_elapsed = SDL_GetTicks(); + ilSaveImage(SaveFileName); + + //cur_elapsed = SDL_GetTicks(); + elapsed = cur_elapsed - last_elapsed; + last_elapsed = cur_elapsed; + + wsprintf(CurFileName, L"%s", SaveFileName); + wsprintf(NewTitle, L"%s - %s: %u ms", TITLE, SaveFileName, (unsigned int)elapsed); + SetWindowText(hWnd, NewTitle); + + return (0L); + + case ID_EDIT_UNDOLEVEL: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + NumUndosAllowed = FilterParamInt <= 10 ? FilterParamInt : 10; + } + return (0L); + + case ID_EDIT_UNDO: + if (UndoSize && NumUndosAllowed) { + ilDeleteImages(1, &Undos[UndoSize]); + ilBindImage(Undos[--UndoSize]); + ResizeWin(); + CreateGDI(); + } + return (0L); + + case ID_EDIT_VIEWIMAGENUM: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + ilActiveImage(FilterParamInt); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + return (0L); + + case ID_EDIT_VIEWFACE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + ilActiveFace(FilterParamInt); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + return (0L); + + case ID_EDIT_VIEWMIPMAP: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + ilActiveMipmap(FilterParamInt); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + } + return (0L); + + case ID_EDIT_NEXT: + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + CurImage++; + ilActiveImage(CurImage); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + return (0L); + + case ID_EDIT_PREV: + ilBindImage(Undos[0]); // @TODO: Implement undos better with this. + CurImage--; + ilActiveImage(CurImage); + ilutRenderer(ILUT_WIN32); + ResizeWin(); + CreateGDI(); + return (0L); + } + + + if (++UndoSize > NumUndosAllowed) { + if (NumUndosAllowed > 0) { + UndoSize = NumUndosAllowed; + ilDeleteImages(1, &Undos[0]); + memcpy(Undos, Undos+1, NumUndosAllowed * sizeof(ILuint)); + ilBindImage(Undos[UndoSize]); + } + } + + if (NumUndosAllowed > 0) { + ilGetIntegerv(IL_ACTIVE_IMAGE, (ILint*)&Undos[UndoSize]); + /*ilGenImages(1, &Undos[UndoSize]); + ilBindImage(Undos[UndoSize]); + ilCopyImage(Undos[UndoSize-1]);*/ + Undos[UndoSize] = ilCloneCurImage(); + ilBindImage(Undos[UndoSize]); + } + + DestroyGDI(); + switch (LOWORD(wParam)) + { + case ID_CONVERT_PALETTE: + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + break; + + case ID_CONVERT_RGB: + ilConvertImage(IL_RGB, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_CONVERT_RGBA: + ilConvertImage(IL_RGBA, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_CONVERT_BGR: + ilConvertImage(IL_BGR, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_CONVERT_BGRA: + ilConvertImage(IL_BGRA, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_CONVERT_LUMINANCE: + ilConvertImage(IL_LUMINANCE, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_CONVERT_LUMINANCEALPHA: + ilConvertImage(IL_LUMINANCE_ALPHA, ilGetInteger(IL_IMAGE_TYPE)); + break; + + case ID_EDIT_VIEWALPHA: + Origin = ilGetInteger(IL_ORIGIN_MODE); + AlphaChannel = ilGetAlpha(IL_UNSIGNED_BYTE); + ilTexImage(ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), + ilGetInteger(IL_IMAGE_DEPTH), 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, AlphaChannel); + free(AlphaChannel); + ilRegisterOrigin(Origin); + break; + + case ID_EFFECTS_FLIP: + iluFlipImage(); + break; + + case ID_EFFECTS_MIRROR: + iluMirror(); + break; + + case ID_FILTER_EMBOSS: + iluEmboss(); + break; + + case ID_FILTER_EQUALIZE: + iluEqualize(); + break; + + case ID_FILTER_ALIENIFY: + iluAlienify(); + break; + + case ID_FILTER_NEGATIVE: + iluNegative(); + break; + + case ID_EFFECTS_FILTERS_EDGEDETECT_EMBOSS: + iluEdgeDetectE(); + break; + + case ID_EFFECTS_FILTERS_EDGEDETECT_SOBEL: + iluEdgeDetectS(); + break; + + case ID_EFFECTS_FILTERS_EDGEDETECT_PREWITT: + iluEdgeDetectP(); + break; + + case ID_FILTER_NOISE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluNoisify(FilterParamFloat); + } + break; + + case ID_EFFECTS_FILTERS_WAVE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluWave(FilterParamFloat); + } + break; + + case ID_FILTER_PIXELIZE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluPixelize(FilterParamInt); + } + break; + + case ID_FILTERS_BLUR_AVERAGE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluBlurAvg(FilterParamInt); + } + break; + + case ID_FILTERS_BLUR_GAUSSIAN: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluBlurGaussian(FilterParamInt); + /*iluMatrixMode(ILU_CONVOLUTION_MATRIX); + iluLoadFilter(ILU_FILTER_GAUSSIAN_5X5); + iluApplyMatrix();*/ + } + break; + + case ID_FILTER_GAMMACORRECT: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluGammaCorrect(FilterParamFloat); + } + break; + + case ID_FILTER_SHARPEN: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluSharpen(FilterParamFloat, 1); + } + break; + + case ID_EFFECTS_FILTERS_ROTATE: + if (DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILTER), + hWnd, FilterDlgProc) == TRUE) { + iluRotate(FilterParamFloat); + ResizeWin(); + } + break; + + case ID_EFFECTS_FILTERS_SCALE: + HWnd = hWnd; + iluImageParameter(ILU_FILTER, ILU_BILINEAR); + DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG_RESIZE), hWnd, ResizeDlgProc); + break; + + } + + CreateGDI(); + InvalidateRect(hWnd, NULL, FALSE); + break; + + default: + return (DefWindowProc(hWnd, message, wParam, lParam)); + } + + return (0L); +} + + +void GenFilterString(TCHAR *Out, TCHAR **Strings) +{ + int OutPos = 0, StringPos = 0; + + while (Strings[StringPos][0] != 0) { + wsprintf(Out + OutPos, Strings[StringPos]); + OutPos += (int)wcslen(Strings[StringPos++]) + 1; + } + + Out[OutPos++] = 0; + Out[OutPos] = 0; + + return; +} + + +INT_PTR APIENTRY AboutDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + { + int i; + ILenum ilError; + TCHAR VersionNum[256]; + + wsprintf(VersionNum, L"Num: %d", ilGetInteger(IL_VERSION_NUM)); + + SetDlgItemText(hDlg, IDC_ABOUT_VENDOR, ilGetString(IL_VENDOR)); + SetDlgItemText(hDlg, IDC_ABOUT_VER_STRING, ilGetString(IL_VERSION_NUM)); + SetDlgItemText(hDlg, IDC_ABOUT_VER_NUM, VersionNum); + + for (i = 0; i < 6; i++) { + ilError = ilGetError(); + if (ilError == IL_NO_ERROR) + break; + SetDlgItemText(hDlg, IDC_ERROR1+i, iluErrorString(ilError)); + } + + return (TRUE); + } + break; + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDOK) + EndDialog(hDlg, TRUE); + if (LOWORD(wParam) == IDCANCEL) + EndDialog(hDlg, FALSE); + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + break; + } + + return FALSE; +} + + +INT_PTR APIENTRY PropertiesDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + { + TCHAR Temp[256]; + + SetDlgItemText(hDlg, IDC_PROP_FILENAME, CurFileName); + wsprintf(Temp, L"%d", ilGetInteger(IL_IMAGE_WIDTH)); + SetDlgItemText(hDlg, IDC_PROP_WIDTH, Temp); + wsprintf(Temp, L"%d", ilGetInteger(IL_IMAGE_HEIGHT)); + SetDlgItemText(hDlg, IDC_PROP_HEIGHT, Temp); + wsprintf(Temp, L"%d", ilGetInteger(IL_IMAGE_DEPTH)); + SetDlgItemText(hDlg, IDC_PROP_DEPTH, Temp); + wsprintf(Temp, L"%d", ilGetInteger(IL_IMAGE_SIZE_OF_DATA)); + SetDlgItemText(hDlg, IDC_PROP_SIZE, Temp); + + return (TRUE); + } + break; + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDOK) + EndDialog(hDlg, TRUE); + if (LOWORD(wParam) == IDCANCEL) + EndDialog(hDlg, FALSE); + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + break; + } + + return FALSE; +} + + +INT_PTR APIENTRY FilterDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + { + switch (FilterType) + { + case ID_FILTER_PIXELIZE: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Width of pixelized block:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1"); + break; + case ID_FILTER_NOISE: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Amount of noise threshold:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1.0"); + break; + case ID_EFFECTS_FILTERS_WAVE: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Angle of wave to apply:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"0.0"); + break; + case ID_FILTERS_BLUR_AVERAGE: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Number of iterations:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1"); + break; + case ID_FILTERS_BLUR_GAUSSIAN: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Number of iterations:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1"); + break; + case ID_FILTER_GAMMACORRECT: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Amount of gamma correction:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1.0"); + break; + case ID_FILTER_SHARPEN: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Sharpening factor:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"1.0"); + break; + case ID_EFFECTS_FILTERS_ROTATE: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Number of degress to rotate:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"0.0"); + break; + + case ID_EDIT_UNDOLEVEL: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Set level of undo:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"4"); + break; + case ID_EDIT_VIEWIMAGENUM: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Enter image number:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"0"); + break; + case ID_EDIT_VIEWMIPMAP: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Enter mipmap number:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L"0"); + break; + case ID_FILE_OPENURL: + SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, L"Enter url of image:"); + SetDlgItemText(hDlg, IDC_FILTER_EDIT, L""); + break; + } + + return TRUE; + } + break; + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDOK) { + GetDlgItemText(hDlg, IDC_FILTER_EDIT, FilterEditString, 255); + FilterParamInt = _wtoi(FilterEditString); + FilterParamFloat = (float)_wtof(FilterEditString); + EndDialog(hDlg, TRUE); + } + if (LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, FALSE); + } + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + break; + } + + return FALSE; +} + + +INT_PTR APIENTRY ResizeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + static TCHAR x[255], y[255], z[255]; + static ILuint xsize, ysize, zsize; + static RECT Rect; + + switch (message) + { + case WM_INITDIALOG: + { + wsprintf(x, L"%d", Width); + wsprintf(y, L"%d", Height); + wsprintf(z, L"%d", Depth); + SetDlgItemText(hDlg, IDC_EDIT_RESIZE_X, x); + SetDlgItemText(hDlg, IDC_EDIT_RESIZE_Y, y); + SetDlgItemText(hDlg, IDC_EDIT_RESIZE_Z, z); + return TRUE; + } + break; + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDOK) { + GetDlgItemText(hDlg, IDC_EDIT_RESIZE_X, x, 255); + GetDlgItemText(hDlg, IDC_EDIT_RESIZE_Y, y, 255); + GetDlgItemText(hDlg, IDC_EDIT_RESIZE_Z, z, 255); + xsize = _wtoi(x); + ysize = _wtoi(y); + zsize = _wtoi(z); + if (xsize && ysize && zsize) { + iluScale(xsize, ysize, zsize); + + Width = ilGetInteger(IL_IMAGE_WIDTH); + Height = ilGetInteger(IL_IMAGE_HEIGHT); + Depth = ilGetInteger(IL_IMAGE_DEPTH); + + GetWindowRect(HWnd, &Rect); + SetWindowPos(HWnd, HWND_TOP, Rect.left, Rect.top, + Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W, + Height + MENU_H, SWP_SHOWWINDOW); + + InvalidateRect(HWnd, NULL, FALSE); + } + EndDialog(hDlg, TRUE); + } + if (LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, FALSE); + } + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + break; + } + + return FALSE; +} + + +INT_PTR APIENTRY BatchDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + static TCHAR Dir[255], NewExt[255]; + static bool Recurse; + static RECT Rect; + + switch (message) + { + case WM_INITDIALOG: + { + wsprintf(Dir, L""); + wsprintf(NewExt, L"tga"); + SetDlgItemText(hDlg, IDC_BATCH_DIR, Dir); + SetDlgItemText(hDlg, IDC_BATCH_NEWEXT, NewExt); + return TRUE; + } + break; + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDOK) { + GetDlgItemText(hDlg, IDC_BATCH_DIR, Dir, 255); + GetDlgItemText(hDlg, IDC_BATCH_NEWEXT, NewExt, 255); + Recurse = IsDlgButtonChecked(hDlg, IDC_BATCH_CHECK1) == BST_CHECKED; + + // Do shit here. + + //BatchConv(Dir, NULL, NewExt, Recurse); + + EndDialog(hDlg, TRUE); + } + if (LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, FALSE); + } + } + break; + + case WM_CLOSE: + EndDialog(hDlg, TRUE); + break; + } + + return FALSE; +} + + +bool GetPrevImage() +{ + HANDLE Search; + WIN32_FIND_DATA FindData; + int i = 0, j, Total = 0, FileNamePos = -1; + TCHAR *Ext, *CurName; + + Search = FindFirstFile(L"*.*", &FindData); + CurName = wcsrchr(CurFileName, '\\'); + if (CurName == NULL) { + CurName = CurFileName; + } + else { + CurName++; // Skip the '\' + } + + do { + if (!_wcsicmp(FindData.cFileName, L".") || !_wcsicmp(FindData.cFileName, L"..")) + continue; + Ext = GetExtension(FindData.cFileName); + if (Ext == NULL) + continue; + for (j = 0; ExtList[j] != NULL; j++) { + if (CheckExtension(FindData.cFileName, ExtList[j])) { + if (!_wcsicmp(FindData.cFileName, CurName)) + FileNamePos = Total; + Total++; + break; + } + } + } while (FindNextFile(Search, &FindData)); + + FindClose(Search); + Search = FindFirstFile(L"*.*", &FindData); + + if (Total == 0 || FileNamePos == -1) + return false; + + if (FileNamePos == 0) + FileNamePos = Total; + + do { + if (!_wcsicmp(FindData.cFileName, L".") || !_wcsicmp(FindData.cFileName, L"..")) + continue; + Ext = GetExtension(FindData.cFileName); + if (Ext == NULL) + continue; + for (j = 0; ExtList[j] != NULL; j++) { + if (CheckExtension(FindData.cFileName, ExtList[j])) { + if (FileNamePos == i+1) { + wcscpy(OpenFileName, FindData.cFileName); + i++; + break; + } + i++; + break; + } + } + } while (FindNextFile(Search, &FindData)); + + + FindClose(Search); + return true; +} + + +bool GetNextImage() +{ + HANDLE Search; + WIN32_FIND_DATA FindData; + int i = 0, j, Total = 0, FileNamePos = -1; + TCHAR *Ext, *CurName; + + Search = FindFirstFile(L"*.*", &FindData); + CurName = wcsrchr(CurFileName, '\\'); + if (CurName == NULL) { + CurName = CurFileName; + } + else { + CurName++; // Skip the '\' + } + + do { + if (!_wcsicmp(FindData.cFileName, L".") || !_wcsicmp(FindData.cFileName, L"..")) + continue; + Ext = GetExtension(FindData.cFileName); + if (Ext == NULL) + continue; + for (j = 0; ExtList[j] != NULL; j++) { + if (CheckExtension(FindData.cFileName, ExtList[j])) { + if (!_wcsicmp(FindData.cFileName, CurName)) + FileNamePos = Total; + Total++; + break; + } + } + } while (FindNextFile(Search, &FindData)); + + FindClose(Search); + Search = FindFirstFile(L"*.*", &FindData); + + if (Total == 0 || FileNamePos == -1) + return false; + + if (FileNamePos == Total-1) + FileNamePos = -1; + + do { + if (!_wcsicmp(FindData.cFileName, L".") || !_wcsicmp(FindData.cFileName, L"..")) + continue; + Ext = GetExtension(FindData.cFileName); + if (Ext == NULL) + continue; + for (j = 0; ExtList[j] != NULL; j++) { + if (CheckExtension(FindData.cFileName, ExtList[j])) { + if (FileNamePos == i-1) { + wcscpy(OpenFileName, FindData.cFileName); + i++; + break; + } + i++; + break; + } + } + } while (FindNextFile(Search, &FindData)); + + + FindClose(Search); + return true; +} + + + diff --git a/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.h b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.h new file mode 100644 index 00000000..d00d47e7 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.h @@ -0,0 +1,3 @@ +#pragma once + +#include "resource.h" diff --git a/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.rc b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.rc new file mode 100644 index 00000000..011a5ac0 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/windows_example/WindowsTest.rc @@ -0,0 +1,255 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource." + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 278, 220 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About DevIL" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,113,198,50,14 + GROUPBOX "Info",IDC_STATIC,7,7,264,69 + GROUPBOX "Errors",IDC_STATIC,7,86,264,76 + LTEXT "Vendor:",IDC_STATIC,27,22,27,8 + LTEXT "Version:",IDC_STATIC,26,35,26,8 + CTEXT "",IDC_ERROR1,40,98,79,8 + LTEXT "Vendor",IDC_ABOUT_VENDOR,68,22,126,8 + LTEXT "Version String",IDC_ABOUT_VER_STRING,68,35,125,8 + LTEXT "Version Num",IDC_ABOUT_VER_NUM,68,46,38,8 + CTEXT "",IDC_ERROR4,158,98,79,8 + CTEXT "",IDC_ERROR6,158,142,79,8 + CTEXT "",IDC_ERROR2,40,119,79,8 + CTEXT "",IDC_ERROR5,158,120,79,8 + CTEXT "",IDC_ERROR3,40,142,79,8 + LTEXT "Visit the DevIL website at http://openil.sf.net.",IDC_OPENIL_LINK,56,182,164,8 + ICON "",IDC_STATIC,243,15,20,20 +END + +IDD_DIALOG_FILTER DIALOGEX 0, 0, 186, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Dialog Options" +FONT 8, "MS Sans Serif", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,14,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,31,50,14 + LTEXT "Enter number of iterations, monkey foo!",IDC_FILTER_DESC_TEXT,21,14,95,31 + EDITTEXT IDC_FILTER_EDIT,13,54,160,14,ES_AUTOHSCROLL +END + +IDD_DIALOG_RESIZE DIALOGEX 0, 0, 266, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Resize Options" +FONT 8, "MS Sans Serif", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,77,65,50,14 + PUSHBUTTON "Cancel",IDCANCEL,137,65,50,14 + LTEXT "Enter new image size:",IDC_STATIC,97,15,70,8 + EDITTEXT IDC_EDIT_RESIZE_X,33,36,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_RESIZE_Y,109,36,40,14,ES_AUTOHSCROLL + EDITTEXT IDC_EDIT_RESIZE_Z,187,37,40,14,ES_AUTOHSCROLL + LTEXT "X:",IDC_STATIC,20,39,8,8 + LTEXT "Y:",IDC_STATIC,96,38,8,8 + LTEXT "Z:",IDC_STATIC,173,39,8,8 +END + +IDD_DIALOG_BATCHCONV DIALOGEX 0, 0, 200, 138 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Batch Conversion Options" +FONT 8, "MS Sans Serif", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,43,108,50,14 + PUSHBUTTON "Cancel",IDCANCEL,107,108,50,14 + LTEXT "Enter Directory:",IDC_FILTER_DESC_TEXT,21,14,95,14 + EDITTEXT IDC_BATCH_DIR,21,30,160,14,ES_AUTOHSCROLL + CONTROL "Parse Subdirectories?",IDC_BATCH_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,57,89,85,10 + LTEXT "Enter New Extension:",IDC_STATIC,21,55,69,8 + EDITTEXT IDC_BATCH_NEWEXT,21,66,44,14,ES_AUTOHSCROLL +END + +IDD_DIALOG_PROPERTIES DIALOGEX 0, 0, 243, 158 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Image Properties" +FONT 8, "MS Sans Serif", 400, 0, 0x0 +BEGIN + DEFPUSHBUTTON "OK",IDOK,81,137,50,14 + GROUPBOX "Info",IDC_STATIC,7,7,229,119 + LTEXT "Filename:",IDC_STATIC,16,24,31,8 + LTEXT "Width:",IDC_STATIC,25,43,22,8 + LTEXT "Height:",IDC_STATIC,23,62,24,8 + LTEXT "Depth:",IDC_STATIC,25,81,22,8 + LTEXT "Filename",IDC_PROP_FILENAME,61,24,169,8 + LTEXT "Width",IDC_PROP_WIDTH,61,43,42,8 + LTEXT "Height",IDC_PROP_HEIGHT,61,62,42,8 + LTEXT "Depth",IDC_PROP_DEPTH,61,81,42,8 + LTEXT "Size:",IDC_STATIC,31,100,16,8 + LTEXT "Size",IDC_PROP_SIZE,61,100,41,8 + LTEXT "byte(s)",IDC_STATIC,111,100,22,8 + LTEXT "pixel(s)",IDC_STATIC,111,81,22,8 + LTEXT "pixel(s)",IDC_STATIC,111,62,22,8 + LTEXT "pixel(s)",IDC_STATIC,111,43,22,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_MENU1 MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open...\tCtrl+O", ID_FILE_LOAD + MENUITEM "Open &URL...\tCtrl+U", ID_FILE_OPENURL + MENUITEM "&Save...\tCtrl+S", ID_FILE_SAVE + MENUITEM "&Image Properties", ID_FILE_PROPERTIES + MENUITEM "&Print", ID_FILE_PRINT + MENUITEM "E&xit\tEsc", ID_FILE_EXIT + END + POPUP "&Convert" + BEGIN + MENUITEM "&Colour Indexed", ID_CONVERT_PALETTE + MENUITEM "&Luminance", ID_CONVERT_LUMINANCE + MENUITEM "L&uminance Alpha", ID_CONVERT_LUMINANCEALPHA + MENUITEM "&Rgb", ID_CONVERT_RGB + MENUITEM "Rgba", ID_CONVERT_RGBA + MENUITEM "&Bgr", ID_CONVERT_BGR + MENUITEM "Bgra", ID_CONVERT_BGRA + MENUITEM "&Alpha", ID_EDIT_VIEWALPHA + MENUITEM "Batch Convert", ID_BATCHCONVERT + END + POPUP "&Edit" + BEGIN + MENUITEM "&Undo", ID_EDIT_UNDO + MENUITEM "Undo &Level", ID_EDIT_UNDOLEVEL + MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY + MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE + MENUITEM "View Mipmap", ID_EDIT_VIEWMIPMAP + MENUITEM "View ImageNum", ID_EDIT_VIEWIMAGENUM + MENUITEM "Next Image", ID_EDIT_NEXT + MENUITEM "Previous Image", ID_EDIT_PREV + END + POPUP "&Tools" + BEGIN + MENUITEM "&Count Colours", ID_EFFECTS_COUNTCOLORS + MENUITEM "&Background Colour", ID_EFFECTSTOOLS_BACKGROUNDCOLOUR + POPUP "&Filters" + BEGIN + MENUITEM "&Alienify", ID_FILTER_ALIENIFY + MENUITEM "Apply &Wave", ID_EFFECTS_FILTERS_WAVE + POPUP "Blur" + BEGIN + MENUITEM "&Average", ID_FILTERS_BLUR_AVERAGE + MENUITEM "&Gaussian", ID_FILTERS_BLUR_GAUSSIAN + END + POPUP "Ed&ge Detect" + BEGIN + MENUITEM "&Emboss", ID_EFFECTS_FILTERS_EDGEDETECT_EMBOSS + MENUITEM "Prewitt", ID_EFFECTS_FILTERS_EDGEDETECT_PREWITT + MENUITEM "Sobel", ID_EFFECTS_FILTERS_EDGEDETECT_SOBEL + END + MENUITEM "&Emboss", ID_FILTER_EMBOSS + MENUITEM "E&qualize", ID_FILTER_EQUALIZE + MENUITEM "&Gamma Correct", ID_FILTER_GAMMACORRECT + MENUITEM "&Negative", ID_FILTER_NEGATIVE + MENUITEM "N&oise", ID_FILTER_NOISE + MENUITEM "&Pixelize", ID_FILTER_PIXELIZE + MENUITEM "&Sharpen", ID_FILTER_SHARPEN + END + MENUITEM "Fli&p", ID_EFFECTS_FLIP + MENUITEM "&Mirror", ID_EFFECTS_MIRROR + MENUITEM "&Rotate", ID_EFFECTS_FILTERS_ROTATE + MENUITEM "&Scale", ID_EFFECTS_FILTERS_SCALE + MENUITEM "&ScaleBOX", ID_EFFECTS_FILTERS_SCALEBOX + END + POPUP "&Help" + BEGIN + MENUITEM "&About", ID_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_MENU1 ACCELERATORS +BEGIN + "C", ID_EDIT_COPY, VIRTKEY, CONTROL + "O", ID_FILE_LOAD, VIRTKEY, CONTROL + "S", ID_FILE_SAVE, VIRTKEY, CONTROL + "U", ID_FILE_OPENURL, VIRTKEY, CONTROL + "V", ID_EDIT_PASTE, VIRTKEY, CONTROL +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "./resources/DevIL Logo.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/examples/windows_example/resource.h b/libs/DevIL-1.7.8/examples/windows_example/resource.h new file mode 100644 index 00000000..06211129 --- /dev/null +++ b/libs/DevIL-1.7.8/examples/windows_example/resource.h @@ -0,0 +1,81 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by windows_example.rc +// +#define IDR_MENU1 101 +#define IDI_ICON1 102 +#define IDR_ACCELERATOR1 103 +#define IDD_DIALOG_FILTER 104 +#define IDC_FILTER_EDIT 1001 +#define IDC_FILTER_DESC_TEXT 1002 +#define ID_FILE_OPEN40001 40001 +#define ID_FILE_OPENURL 40002 +#define ID_FILE_SAVE40003 40003 +#define ID_FILE_IMAGEPROPERTIES 40004 +#define ID_FILE_PRINT40005 40005 +#define ID_FILE_EXIT 40006 +#define ID_EDIT_UNDO40007 40007 +#define ID_EDIT_UNDOLEVEL 40008 +#define ID_EDIT_COOPY 40009 +#define ID_EDIT_PASTE40010 40010 +#define ID_EDIT_VIEWMIPMAP 40011 +#define ID_EDIT_VIEWIMAGENUMBER 40012 +#define ID_EDIT_NEXTIMAGE 40013 +#define ID_EDIT_C 40014 +#define ID_CONVERT_COLORINDEXED 40015 +#define ID_CONVERT_LUMINANCE 40016 +#define ID_CONVERT_LUMINANCEALPHA 40017 +#define ID_CONVERT_RGB 40018 +#define ID_CONVERT_RGBA 40019 +#define ID_CONVERT_BGR 40020 +#define ID_CONVERT_BGRA 40021 +#define ID_CONVERT_ALLPHA 40022 +#define ID_CONVERT_BATCHCONVERT 40023 +#define ID_CONVERT_UNSIGNEDBYTE 40024 +#define ID_CONVERT_UNSIGNEDBYTE40025 40025 +#define ID_CONVERT_UNSIGNEDSHORT 40026 +#define ID_CONVERT_FLOAT 40027 +#define ID_CONVERT_DOUBLE 40028 +#define ID_CONVERT_HALF 40029 +#define ID_HELP_ABOUT 40030 +#define ID_TOOLS_COUNTCOLORS 40031 +#define ID_TOOLS_BACKGROUNDCOLOR 40032 +#define ID_TOOLS_FILTERS 40033 +#define ID_TOOLS_FLIP 40034 +#define ID_TOOLS_MIRROR 40035 +#define ID_TOOLS_ROTATE 40036 +#define ID_TOOLS_SCALE 40037 +#define ID_TOOLS_SCALEBOX 40038 +#define ID_FILTERS_ALIENIFY 40039 +#define ID_FILTERS_APPLYWAVE 40040 +#define ID_FILTERS_BLUR 40041 +#define ID_FILTERS_EDGEDETECT 40042 +#define ID_FILTERS_EMBOSS 40043 +#define ID_FILTERS_EQUALIZE 40044 +#define ID_FILTERS_GAMMACORRECT 40045 +#define ID_FILTERS_NEGATIVE 40046 +#define ID_FILTERS_NOISE 40047 +#define ID_FILTERS_PIXELIZE 40048 +#define ID_FILTERS_SHARPEN 40049 +#define ID_EDIT_VIEWFACE 40050 +#define ID_EDIT_VIEWBASEIMAGE 40051 +#define ID_CONVERT_ALPHA 40052 +#define ID_CONVERT_UNSIGNEDINT 40053 +#define ID_EDIT_COPY40054 40054 +#define ID_EDIT_PREVIOUSIMAGE 40055 +#define ID_FILTERS_BLURGAUSSIAN 40064 +#define ID_FILTERS_BLURAVERAGE 40065 +#define ID_EDGEDETECT_SOBEL 40066 +#define ID_EDGEDETECT_PREWITT 40067 +#define ID_EDGEDETECT_EMBOSS 40068 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 105 +#define _APS_NEXT_COMMAND_VALUE 40069 +#define _APS_NEXT_CONTROL_VALUE 1003 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/examples/windows_example/resources/OpenIL.ico b/libs/DevIL-1.7.8/examples/windows_example/resources/OpenIL.ico new file mode 100644 index 00000000..29a27904 Binary files /dev/null and b/libs/DevIL-1.7.8/examples/windows_example/resources/OpenIL.ico differ diff --git a/libs/DevIL-1.7.8/include/IL/config.h.in b/libs/DevIL-1.7.8/include/IL/config.h.in new file mode 100644 index 00000000..5088c3f0 --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/config.h.in @@ -0,0 +1,357 @@ +/* include/IL/config.h.in. Generated from configure.ac by autoheader. */ + +/* Altivec extension found */ +#undef ALTIVEC_GCC + +/* "Enable debug code features" */ +#undef DEBUG + +/* PPC_ASM assembly found */ +#undef GCC_PCC_ASM + +/* X86_64_ASM assembly found */ +#undef GCC_X86_64_ASM + +/* X86_ASM assembly found */ +#undef GCC_X86_ASM + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GLUT_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GL_H + +/* Define if you have POSIX threads libraries and header files. */ +#undef HAVE_PTHREAD + +/* 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 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 + +/* Use nonstandard varargs form for the GLU tesselator callback */ +#undef HAVE_VARARGS_GLU_TESSCB + +/* Define to 1 if you have the header file. */ +#undef HAVE_WINDOWS_H + +/* Support Allegro API */ +#undef ILUT_USE_ALLEGRO + +/* Support DirectX8 API */ +#undef ILUT_USE_DIRECTX8 + +/* Support DirectX9 API */ +#undef ILUT_USE_DIRECTX9 + +/* Define if system supports OpenGL API */ +#undef ILUT_USE_OPENGL + +/* Support SDL API */ +#undef ILUT_USE_SDL + +/* Support X11 API */ +#undef ILUT_USE_X11 + +/* Support X11 XRender extension */ +#undef ILUT_USE_XRENDER + +/* Support X11 XShm extension */ +#undef ILUT_USE_XSHM + +/* Define if you want to build ILU part of DevIL (used in DevIL + examples/tests) */ +#undef ILU_ENABLED + +/* Define if you can support at least some ASM */ +#undef IL_INLINE_ASM + +/* blp support (BLP is the texture format for Blizzard games.) */ +#undef IL_NO_BLP + +/* bmp support (BMP is a standard Windows bitmap.) */ +#undef IL_NO_BMP + +/* dcx support (DCX is a multi-page PCX file.) */ +#undef IL_NO_DCX + +/* dds support (DDS (DirectDraw Surface) is used by DirectX to load images + (usually DXTC).) */ +#undef IL_NO_DDS + +/* dicom support (DICOM (Digital Imaging and Communications in Medicine) is + used extensively in medical imaging.) */ +#undef IL_NO_DICOM + +/* exr support (EXR is a HDR image file format standardized by Industrial + Light and Magic. OpenEXR powered) */ +#undef IL_NO_EXR + +/* fits support (FITS (Flexible Image Transport System) is used for storing + scientific images and is used extensively in astronomy.) */ +#undef IL_NO_FITS + +/* Define if you want to disable support for various game formats */ +#undef IL_NO_GAMES + +/* gif support (GIF is lossy and proprietary format used mainly to make + animations) */ +#undef IL_NO_GIF + +/* hdr support (HDR is the Radiance High Dynamic Range format, using more bits + per channel than normal.) */ +#undef IL_NO_HDR + +/* icns support (ICNS is the icon format for the Mac OS X operation system.) + */ +#undef IL_NO_ICNS + +/* icon support (ICO is the icon format for the Windows operating system.) */ +#undef IL_NO_ICON + +/* iff support (IFF (Interchange File Format) is used to transfer images + between software from different companies.) */ +#undef IL_NO_IFF + +/* ilbm support (ILBM (Amiga Interleaved BitMap Format).) */ +#undef IL_NO_ILBM + +/* iwi support (IWI is the Infinity Ward Image format used in the Call of Duty + games.) */ +#undef IL_NO_IWI + +/* jp2 support (JP2 (JPEG 2000) is a better, but not so widespread, + alternative to JPEG. JasPer powered) */ +#undef IL_NO_JP2 + +/* jpeg support (JPEG is most common lossy format. libjpeg powered) */ +#undef IL_NO_JPG + +/* lcms support () */ +#undef IL_NO_LCMS + +/* lif support (LIF is the image format of the game Homeworld.) */ +#undef IL_NO_LIF + +/* mdl support (MDL is the format for models in the game Half-Life.) */ +#undef IL_NO_MDL + +/* mng support (MNG is basically the animated version of PNG but is not + widespread.) */ +#undef IL_NO_MNG + +/* mp3 support (MP3 (MPEG-1 Audio Layer 3) sometimes have images in them, such + as cover art.) */ +#undef IL_NO_MP3 + +/* pcd support (PCD is the Kodak PhotoCD format.) */ +#undef IL_NO_PCD + +/* pcx support (PCX is one of the first widely accepted DOS imaging standards) + */ +#undef IL_NO_PCX + +/* pic support (PIC is used by SoftImage software.) */ +#undef IL_NO_PIC + +/* pix support () */ +#undef IL_NO_PIX + +/* png support (PNG is a smart, loseless and even open format. libpng + powered.) */ +#undef IL_NO_PNG + +/* pnm support (PNM (Portable aNy Map format) is considered the + least-common-denominator for converting pixmap, graymap, or bitmap files + between different platforms.) */ +#undef IL_NO_PNM + +/* psd support (PSD is the PhotoShop native file format.) */ +#undef IL_NO_PSD + +/* psp support (PSP is the Paint Shop Pro native file format.) */ +#undef IL_NO_PSP + +/* pxr support (PXR is used by Pixar.) */ +#undef IL_NO_PXR + +/* raw support (RAW is simply raw data.) */ +#undef IL_NO_RAW + +/* rot support (ROT is the image format for the game Homeworld 2.) */ +#undef IL_NO_ROT + +/* sgi support (SGI is the native raster graphics file format for Silicon + Graphics workstations) */ +#undef IL_NO_SGI + +/* sun support (SUN is the image format used on Sun's operating systems.) */ +#undef IL_NO_SUN + +/* texture support (TEXTURE is the format used in Medieval II: Total War + (similar to DDS).) */ +#undef IL_NO_TEXTURE + +/* tga support (TGA (aka TARGA file format) has been used mainly in games. It + is open and simple.) */ +#undef IL_NO_TGA + +/* tiff support (TIFF is a lossless format supporting greater color depths. + libtiff powered) */ +#undef IL_NO_TIF + +/* tpl support (TPL is the format used by many GameCube and Wii games.) */ +#undef IL_NO_TPL + +/* utx support (UTX is the format used in the Unreal Tournament game series.) + */ +#undef IL_NO_UTX + +/* vtf support (VTF (Valve Texture Format) is used by games based on Valve's + Source engine.) */ +#undef IL_NO_VTF + +/* doom support (WAD is the format for graphics in the original DooM I/II.) */ +#undef IL_NO_WAD + +/* wal support (WAL is the image format used for the game Quake 2.) */ +#undef IL_NO_WAL + +/* wbmp support (WBMP (Wireless Application Protocol Bitmap) is a monochrome + graphics file format optimized for mobile computing devices) */ +#undef IL_NO_WBMP + +/* wdp support (WDP is Microsoft's successor to JPEG, able to store many + different image types either lossy or losslessly, also known as HD Photo.) + */ +#undef IL_NO_WDP + +/* xpm support (XPM (X PixMap) is an ASCII-based image used in X Windows.) */ +#undef IL_NO_XPM + +/* Define if you have nvidia texture tools library installed */ +#undef IL_USE_DXTC_NVIDIA + +/* Define if you have libsquish installed */ +#undef IL_USE_DXTC_SQUISH + +/* Use libjpeg without modification. always enabled. */ +#undef IL_USE_JPEGLIB_UNMODIFIED + +/* LCMS include without lcms/ support */ +#undef LCMS_NODIRINCLUDE + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Building on Mac OS X */ +#undef MAX_OS_X + +/* define if you have memalign memory allocation */ +#undef MEMALIGN + +/* define if you have mm_malloc.h header */ +#undef MM_MALLOC + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* define if you have posix_memalign memory allocation */ +#undef POSIX_MEMALIGN + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#undef PTHREAD_CREATE_JOINABLE + +/* restric keyword available */ +#undef RESTRICT_KEYWORD + +/* SSE extension found */ +#undef SSE + +/* SSE2 extension found */ +#undef SSE2 + +/* SSE3 extension found */ +#undef SSE3 + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* define if you have valloc memory allocation */ +#undef VALLOC + +/* Memory must be vector aligned */ +#undef VECTORMEM + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING diff --git a/libs/DevIL-1.7.8/include/IL/devil_cpp_wrapper.hpp b/libs/DevIL-1.7.8/include/IL/devil_cpp_wrapper.hpp new file mode 100644 index 00000000..95c7f77d --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/devil_cpp_wrapper.hpp @@ -0,0 +1,952 @@ +#ifndef DEVIL_CPP_WRAPPER_HPP +#define DEVIL_CPP_WRAPPER_HPP + +#include // Probably only have to #include this one + +class ilImage +{ +public: + ilImage(); + ilImage(ILconst_string); + ilImage(const ilImage &); + virtual ~ilImage(); + + ILboolean Load(ILconst_string); + ILboolean Load(ILconst_string, ILenum); + ILboolean Save(ILconst_string); + ILboolean Save(ILconst_string, ILenum); + + // ImageLib functions + ILboolean ActiveImage(ILuint); + ILboolean ActiveLayer(ILuint); + ILboolean ActiveMipmap(ILuint); + ILboolean Clear(void); + void ClearColour(ILclampf, ILclampf, ILclampf, ILclampf); + ILboolean Convert(ILenum); + ILboolean Copy(ILuint); + ILboolean Default(void); + ILboolean Flip(void); + ILboolean SwapColours(void); + ILboolean Resize(ILuint, ILuint, ILuint); + ILboolean TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, void*); + + // Image handling + void Bind(void) const; + void Bind(ILuint); + void Close(void) { this->Delete(); } + void Delete(void); + void iGenBind(); + ILenum PaletteAlphaIndex(); + + // Image characteristics + ILuint Width(void); + ILuint Height(void); + ILuint Depth(void); + ILubyte Bpp(void); + ILubyte Bitpp(void); + ILenum PaletteType(void); + ILenum Format(void); + ILenum Type(void); + ILuint NumImages(void); + ILuint NumMipmaps(void); + ILuint GetId(void) const; + ILenum GetOrigin(void); + ILubyte *GetData(void); + ILubyte *GetPalette(void); + + // Rendering + ILuint BindImage(void); + ILuint BindImage(ILenum); + + // Operators + ilImage& operator = (ILuint); + ilImage& operator = (const ilImage &); + +protected: + ILuint Id; + +private: + static int ilStartUp(); + static ILboolean ilStartedUp; +}; + +// ensure that init is called exactly once +int ilImage::ilStartUp() +{ + ilInit(); + iluInit(); + //ilutInit(); + return true; +} +ILboolean ilImage::ilStartedUp = ilStartUp(); + +class ilFilters +{ +public: + static ILboolean Alienify(ilImage &); + static ILboolean BlurAvg(ilImage &, ILuint Iter); + static ILboolean BlurGaussian(ilImage &, ILuint Iter); + static ILboolean Contrast(ilImage &, ILfloat Contrast); + static ILboolean EdgeDetectE(ilImage &); + static ILboolean EdgeDetectP(ilImage &); + static ILboolean EdgeDetectS(ilImage &); + static ILboolean Emboss(ilImage &); + static ILboolean Gamma(ilImage &, ILfloat Gamma); + static ILboolean Negative(ilImage &); + static ILboolean Noisify(ilImage &, ILubyte Factor); + static ILboolean Pixelize(ilImage &, ILuint PixSize); + static ILboolean Saturate(ilImage &, ILfloat Saturation); + static ILboolean Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation); + static ILboolean ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b); + static ILboolean Sharpen(ilImage &, ILfloat Factor, ILuint Iter); +}; + +#ifdef ILUT_USE_OPENGL +class ilOgl +{ +public: + static void Init(void); + static GLuint BindTex(ilImage &); + static ILboolean Upload(ilImage &, ILuint); + static GLuint Mipmap(ilImage &); + static ILboolean Screen(void); + static ILboolean Screenie(void); +}; +#endif//ILUT_USE_OPENGL + + +#ifdef ILUT_USE_ALLEGRO +class ilAlleg +{ +public: + static void Init(void); + static BITMAP *Convert(ilImage &); +}; +#endif//ILUT_USE_ALLEGRO + + +#ifdef ILUT_USE_WIN32 +class ilWin32 +{ +public: + static void Init(void); + static HBITMAP Convert(ilImage &); + static ILboolean GetClipboard(ilImage &); + static void GetInfo(ilImage &, BITMAPINFO *Info); + static ILubyte *GetPadData(ilImage &); + static HPALETTE GetPal(ilImage &); + static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType); + static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type); + static ILboolean SetClipboard(ilImage &); +}; +#endif//ILUT_USE_WIN32 + + +class ilValidate +{ +public: + static ILboolean Valid(ILenum, ILconst_string); + static ILboolean Valid(ILenum, FILE *); + static ILboolean Valid(ILenum, void *, ILuint); + +protected: + +private: + +}; + +class ilState +{ +public: + static ILboolean Disable(ILenum); + static ILboolean Enable(ILenum); + static void Get(ILenum, ILboolean &); + static void Get(ILenum, ILint &); + static ILboolean GetBool(ILenum); + static ILint GetInt(ILenum); + static const char *GetString(ILenum); + static ILboolean IsDisabled(ILenum); + static ILboolean IsEnabled(ILenum); + static ILboolean Origin(ILenum); + static void Pop(void); + static void Push(ILuint); + +protected: + +private: + +}; + + +class ilError +{ +public: + static void Check(void (*Callback)(const char*)); + static void Check(void (*Callback)(ILenum)); + static ILenum Get(void); + static const char *String(void); + static const char *String(ILenum); + +protected: + +private: + +}; + + +// +// ILIMAGE +// +ilImage::ilImage() +{ + this->Id = 0; + //this->iStartUp(); // This was commented out, but it needs to be somewhere... + this->iGenBind(); + return; +} + + +ilImage::ilImage(ILconst_string FileName) +{ + this->Id = 0; + //this->iStartUp(); // This was commented out, but it needs to be somewhere... + this->iGenBind(); + ilLoadImage(FileName); + return; +} + + +ilImage::ilImage(const ilImage &Image) +{ + this->Id = 0; + // this->iStartUp(); + this->iGenBind(); + *this = Image; + return; +} + + +ilImage::~ilImage() +{ + if (this->Id) + ilDeleteImages(1, &this->Id); + this->Id = 0; + return; +} + + +ILboolean ilImage::Load(ILconst_string FileName) +{ + this->iGenBind(); + return ilLoadImage(FileName); +} + + +ILboolean ilImage::Load(ILconst_string FileName, ILenum Type) +{ + this->iGenBind(); + return ilLoad(Type, FileName); +} + + +ILboolean ilImage::Save(ILconst_string FileName) +{ + this->iGenBind(); + return ilSaveImage(FileName); +} + + +ILboolean ilImage::Save(ILconst_string FileName, ILenum Type) +{ + this->iGenBind(); + return ilSave(Type, FileName); +} + + + +// +// ImageLib functions +// +ILboolean ilImage::ActiveImage(ILuint Number) +{ + if (this->Id) { + this->Bind(); + return ilActiveImage(Number); + } + return IL_FALSE; +} + + +ILboolean ilImage::ActiveLayer(ILuint Number) +{ + if (this->Id) { + this->Bind(); + return ilActiveLayer(Number); + } + return IL_FALSE; +} + + +ILboolean ilImage::ActiveMipmap(ILuint Number) +{ + if (this->Id) { + this->Bind(); + return ilActiveMipmap(Number); + } + return IL_FALSE; +} + + +ILboolean ilImage::Clear() +{ + if (this->Id) { + this->Bind(); + return ilClearImage(); + } + return IL_FALSE; +} + + +void ilImage::ClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha) +{ + ilClearColour(Red, Green, Blue, Alpha); + return; +} + + +ILboolean ilImage::Convert(ILenum NewFormat) +{ + if (this->Id) { + this->Bind(); + return ilConvertImage(NewFormat, IL_UNSIGNED_BYTE); + } + return IL_FALSE; +} + + +ILboolean ilImage::Copy(ILuint Src) +{ + if (this->Id) { + this->Bind(); + return ilCopyImage(Src); + } + return IL_FALSE; +} + + +ILboolean ilImage::Default() +{ + if (this->Id) { + this->Bind(); + return ilDefaultImage(); + } + return IL_FALSE; +} + + +ILboolean ilImage::Flip() +{ + if (this->Id) { + this->Bind(); + return iluFlipImage(); + } + return IL_FALSE; +} + + +ILboolean ilImage::SwapColours() +{ + if (this->Id) { + this->Bind(); + return iluSwapColours(); + } + return IL_FALSE; +} + + +ILboolean ilImage::Resize(ILuint Width, ILuint Height, ILuint Depth) +{ + if (this->Id) { + this->Bind(); + return iluScale(Width, Height, Depth); + } + return IL_FALSE; +} + + +ILboolean ilImage::TexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) +{ + if (this->Id) { + this->Bind(); + return ilTexImage(Width, Height, Depth, Bpp, Format, Type, Data); + } + return IL_FALSE; +} + + + +// +// Image handling +// +void ilImage::Bind() const +{ + if (this->Id) + ilBindImage(this->Id); + return; +} + +// Note: Behaviour may be changed! +void ilImage::Bind(ILuint Image) +{ + if (this->Id == Image) + return; + this->Delete(); // Should we delete it? + this->Id = Image; + ilBindImage(this->Id); + return; +} + + +void ilImage::Delete() +{ + if (this->Id == 0) + return; + ilDeleteImages(1, &this->Id); + this->Id = 0; + return; +} + + + + +// +// Image characteristics +// +ILuint ilImage::Width() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_WIDTH); + } + return 0; +} + + +ILuint ilImage::Height() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_HEIGHT); + } + return 0; +} + +ILuint ilImage::Depth() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_DEPTH); + } + return 0; +} + +ILubyte ilImage::Bpp() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL); + } + return 0; +} + +ILubyte ilImage::Bitpp() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_BITS_PER_PIXEL); + } + return 0; +} + +ILenum ilImage::Format() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_FORMAT); + } + return 0; +} + +ILenum ilImage::PaletteType() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_PALETTE_TYPE); + } + return 0; +} + +ILenum ilImage::PaletteAlphaIndex() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_PNG_ALPHA_INDEX); + } + return 0; +} + +ILenum ilImage::Type() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_IMAGE_TYPE); + } + return 0; +} + +ILenum ilImage::NumImages() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_NUM_IMAGES); + } + return 0; +} + +ILenum ilImage::NumMipmaps() +{ + if (this->Id) { + this->Bind(); + return ilGetInteger(IL_NUM_MIPMAPS); + } + return 0; +} + +ILuint ilImage::GetId() const +{ + return this->Id; +} + +ILenum ilImage::GetOrigin(void) +{ + ILinfo Info; + + if (this->Id) { + this->Bind(); + iluGetImageInfo(&Info); + return Info.Origin; + } + return 0; +} + +ILubyte* ilImage::GetData() +{ + if (this->Id) { + this->Bind(); + return ilGetData(); + } + return 0; +} + +ILubyte* ilImage::GetPalette() +{ + if (this->Id) { + this->Bind(); + return ilGetPalette(); + } + return 0; +} + +// +// Private members +// +/*void ilImage::iStartUp() +{ + ilInit(); + iluInit(); + ilutInit(); + return; +}*/ + +void ilImage::iGenBind() +{ + if (this->Id == 0) { + ilGenImages(1, &this->Id); + } + ilBindImage(this->Id); + return; +} + +// +// Operators +// +ilImage& ilImage::operator = (ILuint Image) +{ + if (this->Id == 0) + this->Id = Image; + else { + this->Bind(); + ilCopyImage(Image); + } + + return *this; +} + +ilImage& ilImage::operator = (const ilImage &Image) +{ + if (Id == 0) + Id = Image.GetId(); + else { + Bind(); + ilCopyImage(Image.GetId()); + } + + return *this; +} + +// +// ILFILTERS +// +ILboolean ilFilters::Alienify(ilImage &Image) +{ + Image.Bind(); + return iluAlienify(); +} + +ILboolean ilFilters::BlurAvg(ilImage &Image, ILuint Iter) +{ + Image.Bind(); + return iluBlurAvg(Iter); +} + +ILboolean ilFilters::BlurGaussian(ilImage &Image, ILuint Iter) +{ + Image.Bind(); + return iluBlurGaussian(Iter); +} + +ILboolean ilFilters::Contrast(ilImage &Image, ILfloat Contrast) +{ + Image.Bind(); + return iluContrast(Contrast); +} + +ILboolean ilFilters::EdgeDetectE(ilImage &Image) +{ + Image.Bind(); + return iluEdgeDetectP(); +} + +ILboolean ilFilters::EdgeDetectP(ilImage &Image) +{ + Image.Bind(); + return iluEdgeDetectP(); +} + +ILboolean ilFilters::EdgeDetectS(ilImage &Image) +{ + Image.Bind(); + return iluEdgeDetectS(); +} + +ILboolean ilFilters::Emboss(ilImage &Image) +{ + Image.Bind(); + return iluEmboss(); +} + +ILboolean ilFilters::Gamma(ilImage &Image, ILfloat Gamma) +{ + Image.Bind(); + return iluGammaCorrect(Gamma); +} + +ILboolean ilFilters::Negative(ilImage &Image) +{ + Image.Bind(); + return iluNegative(); +} + +ILboolean ilFilters::Noisify(ilImage &Image, ILubyte Factor) +{ + Image.Bind(); + return iluNoisify(Factor); +} + +ILboolean ilFilters::Pixelize(ilImage &Image, ILuint PixSize) +{ + Image.Bind(); + return iluPixelize(PixSize); +} + +ILboolean ilFilters::Saturate(ilImage &Image, ILfloat Saturation) +{ + Image.Bind(); + return iluSaturate1f(Saturation); +} + +ILboolean ilFilters::Saturate(ilImage &Image, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation) +{ + Image.Bind(); + return iluSaturate4f(r, g, b, Saturation); +} + +ILboolean ilFilters::ScaleColours(ilImage &Image, ILfloat r, ILfloat g, ILfloat b) +{ + Image.Bind(); + return iluScaleColours(r, g, b); +} + + +ILboolean ilFilters::Sharpen(ilImage &Image, ILfloat Factor, ILuint Iter) +{ + Image.Bind(); + return iluSharpen(Factor, Iter); +} + + +// +// ILOPENGL +// +#ifdef ILUT_USE_OPENGL +void ilOgl::Init() +{ + ilutRenderer(ILUT_OPENGL); + return; +} + + +GLuint ilOgl::BindTex(ilImage &Image) +{ + Image.Bind(); + return ilutGLBindTexImage(); +} + +ILboolean ilOgl::Upload(ilImage &Image, ILuint Level) +{ + Image.Bind(); + return ilutGLTexImage(Level); +} + + +GLuint ilOgl::Mipmap(ilImage &Image) +{ + Image.Bind(); + return ilutGLBuildMipmaps(); +} + +ILboolean ilOgl::Screen() +{ + return ilutGLScreen(); +} + + +ILboolean ilOgl::Screenie() +{ + return ilutGLScreenie(); +} +#endif//ILUT_USE_OPENGL + +// +// ILALLEGRO +// +#ifdef ILUT_USE_ALLEGRO +void ilAlleg::Init() +{ + ilutRenderer(IL_ALLEGRO); + return; +} + +BITMAP *ilAlleg::Convert(ilImage &Image, PALETTE Pal) +{ + Image.Bind(); + return ilutConvertToAlleg(Pal); +} +#endif//ILUT_USE_ALLEGRO + +// +// ILWIN32 +// +#ifdef ILUT_USE_WIN32 +void ilWin32::Init() +{ + ilutRenderer(ILUT_WIN32); + return; +} + +HBITMAP ilWin32::Convert(ilImage &Image) +{ + Image.Bind(); + return ilutConvertToHBitmap(GetDC(NULL)); +} + +ILboolean ilWin32::GetClipboard(ilImage &Image) +{ + Image.Bind(); + return ilutGetWinClipboard(); +} + +void ilWin32::GetInfo(ilImage &Image, BITMAPINFO *Info) +{ + Image.Bind(); + ilutGetBmpInfo(Info); + return; +} + +ILubyte* ilWin32::GetPadData(ilImage &Image) +{ + Image.Bind(); + return ilutGetPaddedData(); +} + +HPALETTE ilWin32::GetPal(ilImage &Image) +{ + Image.Bind(); + return ilutGetHPal(); +} + +ILboolean ilWin32::GetResource(ilImage &Image, HINSTANCE hInst, ILint ID, char *ResourceType) +{ + Image.Bind(); + return ilutLoadResource(hInst, ID, ResourceType, IL_TYPE_UNKNOWN); +} + +ILboolean ilWin32::GetResource(ilImage &Image, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type) +{ + Image.Bind(); + return ilutLoadResource(hInst, ID, ResourceType, Type); +} + +ILboolean ilWin32::SetClipboard(ilImage &Image) +{ + Image.Bind(); + return ilutSetWinClipboard(); +} +#endif//ILUT_USE_WIN32 + +// +// ILVALIDATE +// +ILboolean ilValidate::Valid(ILenum Type, ILconst_string FileName) +{ + return ilIsValid(Type, FileName); +} + +ILboolean ilValidate::Valid(ILenum Type, FILE *File) +{ + return ilIsValidF(Type, File); +} + +ILboolean ilValidate::Valid(ILenum Type, void *Lump, ILuint Size) +{ + return ilIsValidL(Type, Lump, Size); +} + +// +// ILSTATE +// +ILboolean ilState::Disable(ILenum State) +{ + return ilDisable(State); +} + +ILboolean ilState::Enable(ILenum State) +{ + return ilEnable(State); +} + +void ilState::Get(ILenum Mode, ILboolean &Param) +{ + ilGetBooleanv(Mode, &Param); + return; +} + +void ilState::Get(ILenum Mode, ILint &Param) +{ + ilGetIntegerv(Mode, &Param); + return; +} + +ILboolean ilState::GetBool(ILenum Mode) +{ + return ilGetBoolean(Mode); +} + +ILint ilState::GetInt(ILenum Mode) +{ + return ilGetInteger(Mode); +} + +const char *ilState::GetString(ILenum StringName) +{ + return ilGetString(StringName); +} + +ILboolean ilState::IsDisabled(ILenum Mode) +{ + return ilIsDisabled(Mode); +} + +ILboolean ilState::IsEnabled(ILenum Mode) +{ + return ilIsEnabled(Mode); +} + +ILboolean ilState::Origin(ILenum Mode) +{ + return ilOriginFunc(Mode); +} + +void ilState::Pop() +{ + ilPopAttrib(); + return; +} + +void ilState::Push(ILuint Bits = IL_ALL_ATTRIB_BITS) +{ + ilPushAttrib(Bits); + return; +} + +// +// ILERROR +// +void ilError::Check(void (*Callback)(const char*)) +{ + static ILenum Error; + + while ((Error = ilGetError()) != IL_NO_ERROR) { + Callback(iluErrorString(Error)); + } + + return; +} + +void ilError::Check(void (*Callback)(ILenum)) +{ + static ILenum Error; + + while ((Error = ilGetError()) != IL_NO_ERROR) { + Callback(Error); + } + + return; +} + +ILenum ilError::Get() +{ + return ilGetError(); +} + +const char *ilError::String() +{ + return iluErrorString(ilGetError()); +} + +const char *ilError::String(ILenum Error) +{ + return iluErrorString(Error); +} + +#endif// DEVIL_CPP_WRAPPER_HPP diff --git a/libs/DevIL-1.7.8/include/IL/devil_internal_exports.h b/libs/DevIL-1.7.8/include/IL/devil_internal_exports.h new file mode 100644 index 00000000..30b7aaab --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/devil_internal_exports.h @@ -0,0 +1,161 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/06/2009 +// +// Filename: IL/devil_internal_exports.h +// +// Description: Internal stuff for DevIL (IL, ILU and ILUT) +// +//----------------------------------------------------------------------------- + +#ifndef IL_EXPORTS_H +#define IL_EXPORTS_H + +#include "IL/il.h" + +#ifdef DEBUG + #include +#else + #define assert(x) +#endif + +//#ifndef NOINLINE +#ifndef INLINE +#if defined(__GNUC__) + #define INLINE extern inline +#elif defined(_MSC_VER) //@TODO: Get this working in MSVC++. + // http://www.greenend.org.uk/rjk/2003/03/inline.html + #define NOINLINE + //#define INLINE + /*#ifndef _WIN64 // Cannot use inline assembly in x64 target platform. + #define USE_WIN32_ASM + #endif//_WIN64*/ + #define INLINE __inline +#else + #define INLINE inline +#endif +#endif +//#else +//#define INLINE +//#endif //NOINLINE + +#ifdef __cplusplus +extern "C" { +#endif + +#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b)) + + +//! Basic Palette struct +typedef struct ILpal +{ + ILubyte* Palette; //!< the image palette (if any) + ILuint PalSize; //!< size of the palette (in bytes) + ILenum PalType; //!< the palette types in il.h (0x0500 range) +} ILpal; + + +//! The Fundamental Image structure +/*! Every bit of information about an image is stored in this internal structure.*/ +typedef struct ILimage +{ + ILuint Width; //!< the image's width + ILuint Height; //!< the image's height + ILuint Depth; //!< the image's depth + ILubyte Bpp; //!< bytes per pixel (now number of channels) + ILubyte Bpc; //!< bytes per channel + ILuint Bps; //!< bytes per scanline (components for IL) + ILubyte* Data; //!< the image data + ILuint SizeOfData; //!< the total size of the data (in bytes) + ILuint SizeOfPlane; //!< SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes) + ILenum Format; //!< image format (in IL enum style) + ILenum Type; //!< image type (in IL enum style) + ILenum Origin; //!< origin of the image + ILpal Pal; //!< palette details + ILuint Duration; //!< length of the time to display this "frame" + ILenum CubeFlags; //!< cube map flags for sides present in chain + struct ILimage* Mipmaps; //!< mipmapped versions of this image terminated by a NULL - usu. NULL + struct ILimage* Next; //!< next image in the chain - usu. NULL + struct ILimage* Faces; //!< next cubemap face in the chain - usu. NULL + struct ILimage* Layers; //!< subsequent layers in the chain - usu. NULL + ILuint* AnimList; //!< animation list + ILuint AnimSize; //!< animation list size + void* Profile; //!< colour profile + ILuint ProfileSize; //!< colour profile size + ILuint OffX; //!< x-offset of the image + ILuint OffY; //!< y-offset of the image + ILubyte* DxtcData; //!< compressed data + ILenum DxtcFormat; //!< compressed data format + ILuint DxtcSize; //!< compressed data size +} ILimage; + + +// Memory functions +ILAPI void* ILAPIENTRY ialloc(const ILsizei Size); +ILAPI void ILAPIENTRY ifree(const void *Ptr); +ILAPI void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num); +#ifdef ALTIVEC_GCC +ILAPI void* ILAPIENTRY ivec_align_buffer(void *buffer, const ILuint size); +#endif + +// Internal library functions in IL +ILAPI ILimage* ILAPIENTRY ilGetCurImage(void); +ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image); +ILAPI void ILAPIENTRY ilSetError(ILenum Error); +ILAPI void ILAPIENTRY ilSetPal(ILpal *Pal); + +// +// Utility functions +// +ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format); +ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp); +ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type); +ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc); +ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType); +ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType); +ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint Num); +ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName); +ILAPI void ILAPIENTRY ilReplaceCurImage(ILimage *Image); +ILAPI void ILAPIENTRY iMemSwap(ILubyte *, ILubyte *, const ILuint); + +// +// Image functions +// +ILAPI void ILAPIENTRY iBindImageTemp (void); +ILAPI ILboolean ILAPIENTRY ilClearImage_ (ILimage *Image); +ILAPI void ILAPIENTRY ilCloseImage (ILimage *Image); +ILAPI void ILAPIENTRY ilClosePal (ILpal *Palette); +ILAPI ILpal* ILAPIENTRY iCopyPal (void); +ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src); +ILAPI ILimage* ILAPIENTRY ilCopyImage_ (ILimage *Src); +ILAPI void ILAPIENTRY ilGetClear (void *Colours, ILenum Format, ILenum Type); +ILAPI ILuint ILAPIENTRY ilGetCurName (void); +ILAPI ILboolean ILAPIENTRY ilIsValidPal (ILpal *Palette); +ILAPI ILimage* ILAPIENTRY ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc); +ILAPI ILimage* ILAPIENTRY ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); +ILAPI ILboolean ILAPIENTRY ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); +ILAPI ILboolean ILAPIENTRY ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc); +ILAPI ILboolean ILAPIENTRY ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data); +ILAPI ILboolean ILAPIENTRY ilTexSubImage_ (ILimage *Image, void *Data); +ILAPI void* ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer); +ILAPI ILimage* ILAPIENTRY iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType); +ILAPI ILpal* ILAPIENTRY iConvertPal (ILpal *Pal, ILenum DestFormat); +ILAPI ILubyte* ILAPIENTRY iGetFlipped (ILimage *Image); +ILAPI ILboolean ILAPIENTRY iMirror(); +ILAPI void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num); +ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num); +ILAPI void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param); + +// Internal library functions in ILU +ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle); +ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); +ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth); + +#ifdef __cplusplus +} +#endif + +#endif//IL_EXPORTS_H diff --git a/libs/DevIL-1.7.8/include/IL/il.h b/libs/DevIL-1.7.8/include/IL/il.h new file mode 100644 index 00000000..540a56eb --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/il.h @@ -0,0 +1,644 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: IL/il.h +// +// Description: The main include file for DevIL +// +//----------------------------------------------------------------------------- + +// Doxygen comment +/*! \file il.h + The main include file for DevIL +*/ + +#ifndef __il_h_ +#ifndef __IL_H__ + +#define __il_h_ +#define __IL_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +//this define controls if floats and doubles are clampled to [0..1] +//during conversion. It takes a little more time, but it is the correct +//way of doing this. If you are sure your floats are always valid, +//you can undefine this value... +#define CLAMP_HALF 1 +#define CLAMP_FLOATS 1 +#define CLAMP_DOUBLES 1 + +/*#ifdef _WIN32_WCE + #define IL_NO_EXR + #define IL_NO_GIF + #define IL_NO_JP2 + #define IL_NO_JPG + #define IL_NO_MNG + #define IL_NO_PNG + #define IL_NO_TIF + #define IL_NO_LCMS +#endif //_WIN32_WCE + +#ifdef DJGPP + #define IL_NO_EXR + #define IL_NO_GIF + #define IL_NO_JP2 + #define IL_NO_JPG + #define IL_NO_MNG + #define IL_NO_PNG + #define IL_NO_TIF + #define IL_NO_LCMS +#endif //DJGPP*/ + +#ifdef _WIN32 + #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #pragma comment(lib, "DevIL.lib") + #endif + #endif +#endif + +#ifdef RESTRICT_KEYWORD +#define RESTRICT restrict +#define CONST_RESTRICT const restrict +#else +#define RESTRICT +#define CONST_RESTRICT const +#endif + +#include + +typedef unsigned int ILenum; +typedef unsigned char ILboolean; +typedef unsigned int ILbitfield; +typedef signed char ILbyte; +typedef signed short ILshort; +typedef int ILint; +typedef size_t ILsizei; +typedef unsigned char ILubyte; +typedef unsigned short ILushort; +typedef unsigned int ILuint; +typedef float ILfloat; +typedef float ILclampf; +typedef double ILdouble; +typedef double ILclampd; + +#ifdef _MSC_VER +typedef __int64 ILint64; +typedef unsigned __int64 ILuint64; +#else +typedef long long int ILint64; +typedef long long unsigned int ILuint64; +#endif + + +#include +#ifdef _UNICODE + #ifndef _WIN32_WCE + #include + #endif + //if we use a define instead of a typedef, + //ILconst_string works as intended + #define ILchar wchar_t + #define ILstring wchar_t* + #define ILconst_string wchar_t const * +#else + //if we use a define instead of a typedef, + //ILconst_string works as intended + #define ILchar char + #define ILstring char* + #define ILconst_string char const * +#endif //_UNICODE + +#define IL_FALSE 0 +#define IL_TRUE 1 + +// Matches OpenGL's right now. +//! Data formats \link Formats Formats\endlink +#define IL_COLOUR_INDEX 0x1900 +#define IL_COLOR_INDEX 0x1900 +#define IL_ALPHA 0x1906 +#define IL_RGB 0x1907 +#define IL_RGBA 0x1908 +#define IL_BGR 0x80E0 +#define IL_BGRA 0x80E1 +#define IL_LUMINANCE 0x1909 +#define IL_LUMINANCE_ALPHA 0x190A + +//! Data types \link Types Types\endlink +#define IL_BYTE 0x1400 +#define IL_UNSIGNED_BYTE 0x1401 +#define IL_SHORT 0x1402 +#define IL_UNSIGNED_SHORT 0x1403 +#define IL_INT 0x1404 +#define IL_UNSIGNED_INT 0x1405 +#define IL_FLOAT 0x1406 +#define IL_DOUBLE 0x140A +#define IL_HALF 0x140B + + +#define IL_MAX_BYTE SCHAR_MAX +#define IL_MAX_UNSIGNED_BYTE UCHAR_MAX +#define IL_MAX_SHORT SHRT_MAX +#define IL_MAX_UNSIGNED_SHORT USHRT_MAX +#define IL_MAX_INT INT_MAX +#define IL_MAX_UNSIGNED_INT UINT_MAX + +#define IL_LIMIT(x,m,M) (xM?M:x)) +#define IL_CLAMP(x) IL_LIMIT(x,0,1) + +#define IL_VENDOR 0x1F00 +#define IL_LOAD_EXT 0x1F01 +#define IL_SAVE_EXT 0x1F02 + + +// +// IL-specific #define's +// + +#define IL_VERSION_1_7_8 1 +#define IL_VERSION 178 + + +// Attribute Bits +#define IL_ORIGIN_BIT 0x00000001 +#define IL_FILE_BIT 0x00000002 +#define IL_PAL_BIT 0x00000004 +#define IL_FORMAT_BIT 0x00000008 +#define IL_TYPE_BIT 0x00000010 +#define IL_COMPRESS_BIT 0x00000020 +#define IL_LOADFAIL_BIT 0x00000040 +#define IL_FORMAT_SPECIFIC_BIT 0x00000080 +#define IL_ALL_ATTRIB_BITS 0x000FFFFF + + +// Palette types +#define IL_PAL_NONE 0x0400 +#define IL_PAL_RGB24 0x0401 +#define IL_PAL_RGB32 0x0402 +#define IL_PAL_RGBA32 0x0403 +#define IL_PAL_BGR24 0x0404 +#define IL_PAL_BGR32 0x0405 +#define IL_PAL_BGRA32 0x0406 + + +// Image types +#define IL_TYPE_UNKNOWN 0x0000 +#define IL_BMP 0x0420 //!< Microsoft Windows Bitmap - .bmp extension +#define IL_CUT 0x0421 //!< Dr. Halo - .cut extension +#define IL_DOOM 0x0422 //!< DooM walls - no specific extension +#define IL_DOOM_FLAT 0x0423 //!< DooM flats - no specific extension +#define IL_ICO 0x0424 //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions +#define IL_JPG 0x0425 //!< JPEG - .jpg, .jpe and .jpeg extensions +#define IL_JFIF 0x0425 //!< +#define IL_ILBM 0x0426 //!< Amiga IFF (FORM ILBM) - .iff, .ilbm, .lbm extensions +#define IL_PCD 0x0427 //!< Kodak PhotoCD - .pcd extension +#define IL_PCX 0x0428 //!< ZSoft PCX - .pcx extension +#define IL_PIC 0x0429 //!< PIC - .pic extension +#define IL_PNG 0x042A //!< Portable Network Graphics - .png extension +#define IL_PNM 0x042B //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions +#define IL_SGI 0x042C //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions +#define IL_TGA 0x042D //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions +#define IL_TIF 0x042E //!< Tagged Image File Format - .tif and .tiff extensions +#define IL_CHEAD 0x042F //!< C-Style Header - .h extension +#define IL_RAW 0x0430 //!< Raw Image Data - any extension +#define IL_MDL 0x0431 //!< Half-Life Model Texture - .mdl extension +#define IL_WAL 0x0432 //!< Quake 2 Texture - .wal extension +#define IL_LIF 0x0434 //!< Homeworld Texture - .lif extension +#define IL_MNG 0x0435 //!< Multiple-image Network Graphics - .mng extension +#define IL_JNG 0x0435 //!< +#define IL_GIF 0x0436 //!< Graphics Interchange Format - .gif extension +#define IL_DDS 0x0437 //!< DirectDraw Surface - .dds extension +#define IL_DCX 0x0438 //!< ZSoft Multi-PCX - .dcx extension +#define IL_PSD 0x0439 //!< Adobe PhotoShop - .psd extension +#define IL_EXIF 0x043A //!< +#define IL_PSP 0x043B //!< PaintShop Pro - .psp extension +#define IL_PIX 0x043C //!< PIX - .pix extension +#define IL_PXR 0x043D //!< Pixar - .pxr extension +#define IL_XPM 0x043E //!< X Pixel Map - .xpm extension +#define IL_HDR 0x043F //!< Radiance High Dynamic Range - .hdr extension +#define IL_ICNS 0x0440 //!< Macintosh Icon - .icns extension +#define IL_JP2 0x0441 //!< Jpeg 2000 - .jp2 extension +#define IL_EXR 0x0442 //!< OpenEXR - .exr extension +#define IL_WDP 0x0443 //!< Microsoft HD Photo - .wdp and .hdp extension +#define IL_VTF 0x0444 //!< Valve Texture Format - .vtf extension +#define IL_WBMP 0x0445 //!< Wireless Bitmap - .wbmp extension +#define IL_SUN 0x0446 //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions +#define IL_IFF 0x0447 //!< Interchange File Format - .iff extension +#define IL_TPL 0x0448 //!< Gamecube Texture - .tpl extension +#define IL_FITS 0x0449 //!< Flexible Image Transport System - .fit and .fits extensions +#define IL_DICOM 0x044A //!< Digital Imaging and Communications in Medicine (DICOM) - .dcm and .dicom extensions +#define IL_IWI 0x044B //!< Call of Duty Infinity Ward Image - .iwi extension +#define IL_BLP 0x044C //!< Blizzard Texture Format - .blp extension +#define IL_FTX 0x044D //!< Heavy Metal: FAKK2 Texture - .ftx extension +#define IL_ROT 0x044E //!< Homeworld 2 - Relic Texture - .rot extension +#define IL_TEXTURE 0x044F //!< Medieval II: Total War Texture - .texture extension +#define IL_DPX 0x0450 //!< Digital Picture Exchange - .dpx extension +#define IL_UTX 0x0451 //!< Unreal (and Unreal Tournament) Texture - .utx extension +#define IL_MP3 0x0452 //!< MPEG-1 Audio Layer 3 - .mp3 extension + + +#define IL_JASC_PAL 0x0475 //!< PaintShop Pro Palette + + +// Error Types +#define IL_NO_ERROR 0x0000 +#define IL_INVALID_ENUM 0x0501 +#define IL_OUT_OF_MEMORY 0x0502 +#define IL_FORMAT_NOT_SUPPORTED 0x0503 +#define IL_INTERNAL_ERROR 0x0504 +#define IL_INVALID_VALUE 0x0505 +#define IL_ILLEGAL_OPERATION 0x0506 +#define IL_ILLEGAL_FILE_VALUE 0x0507 +#define IL_INVALID_FILE_HEADER 0x0508 +#define IL_INVALID_PARAM 0x0509 +#define IL_COULD_NOT_OPEN_FILE 0x050A +#define IL_INVALID_EXTENSION 0x050B +#define IL_FILE_ALREADY_EXISTS 0x050C +#define IL_OUT_FORMAT_SAME 0x050D +#define IL_STACK_OVERFLOW 0x050E +#define IL_STACK_UNDERFLOW 0x050F +#define IL_INVALID_CONVERSION 0x0510 +#define IL_BAD_DIMENSIONS 0x0511 +#define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam. +#define IL_FILE_WRITE_ERROR 0x0512 + +#define IL_LIB_GIF_ERROR 0x05E1 +#define IL_LIB_JPEG_ERROR 0x05E2 +#define IL_LIB_PNG_ERROR 0x05E3 +#define IL_LIB_TIFF_ERROR 0x05E4 +#define IL_LIB_MNG_ERROR 0x05E5 +#define IL_LIB_JP2_ERROR 0x05E6 +#define IL_LIB_EXR_ERROR 0x05E7 +#define IL_UNKNOWN_ERROR 0x05FF + + +// Origin Definitions +#define IL_ORIGIN_SET 0x0600 +#define IL_ORIGIN_LOWER_LEFT 0x0601 +#define IL_ORIGIN_UPPER_LEFT 0x0602 +#define IL_ORIGIN_MODE 0x0603 + + +// Format and Type Mode Definitions +#define IL_FORMAT_SET 0x0610 +#define IL_FORMAT_MODE 0x0611 +#define IL_TYPE_SET 0x0612 +#define IL_TYPE_MODE 0x0613 + + +// File definitions +#define IL_FILE_OVERWRITE 0x0620 +#define IL_FILE_MODE 0x0621 + + +// Palette definitions +#define IL_CONV_PAL 0x0630 + + +// Load fail definitions +#define IL_DEFAULT_ON_FAIL 0x0632 + + +// Key colour and alpha definitions +#define IL_USE_KEY_COLOUR 0x0635 +#define IL_USE_KEY_COLOR 0x0635 +#define IL_BLIT_BLEND 0x0636 + + +// Interlace definitions +#define IL_SAVE_INTERLACED 0x0639 +#define IL_INTERLACE_MODE 0x063A + + +// Quantization definitions +#define IL_QUANTIZATION_MODE 0x0640 +#define IL_WU_QUANT 0x0641 +#define IL_NEU_QUANT 0x0642 +#define IL_NEU_QUANT_SAMPLE 0x0643 +#define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256 +#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled + + +// Hints +#define IL_FASTEST 0x0660 +#define IL_LESS_MEM 0x0661 +#define IL_DONT_CARE 0x0662 +#define IL_MEM_SPEED_HINT 0x0665 +#define IL_USE_COMPRESSION 0x0666 +#define IL_NO_COMPRESSION 0x0667 +#define IL_COMPRESSION_HINT 0x0668 + + +// Compression +#define IL_NVIDIA_COMPRESS 0x0670 +#define IL_SQUISH_COMPRESS 0x0671 + + +// Subimage types +#define IL_SUB_NEXT 0x0680 +#define IL_SUB_MIPMAP 0x0681 +#define IL_SUB_LAYER 0x0682 + + +// Compression definitions +#define IL_COMPRESS_MODE 0x0700 +#define IL_COMPRESS_NONE 0x0701 +#define IL_COMPRESS_RLE 0x0702 +#define IL_COMPRESS_LZO 0x0703 +#define IL_COMPRESS_ZLIB 0x0704 + + +// File format-specific values +#define IL_TGA_CREATE_STAMP 0x0710 +#define IL_JPG_QUALITY 0x0711 +#define IL_PNG_INTERLACE 0x0712 +#define IL_TGA_RLE 0x0713 +#define IL_BMP_RLE 0x0714 +#define IL_SGI_RLE 0x0715 +#define IL_TGA_ID_STRING 0x0717 +#define IL_TGA_AUTHNAME_STRING 0x0718 +#define IL_TGA_AUTHCOMMENT_STRING 0x0719 +#define IL_PNG_AUTHNAME_STRING 0x071A +#define IL_PNG_TITLE_STRING 0x071B +#define IL_PNG_DESCRIPTION_STRING 0x071C +#define IL_TIF_DESCRIPTION_STRING 0x071D +#define IL_TIF_HOSTCOMPUTER_STRING 0x071E +#define IL_TIF_DOCUMENTNAME_STRING 0x071F +#define IL_TIF_AUTHNAME_STRING 0x0720 +#define IL_JPG_SAVE_FORMAT 0x0721 +#define IL_CHEAD_HEADER_STRING 0x0722 +#define IL_PCD_PICNUM 0x0723 +#define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette at this index value (0-255) is considered transparent, -1 for no trasparent color +#define IL_JPG_PROGRESSIVE 0x0725 +#define IL_VTF_COMP 0x0726 + + +// DXTC definitions +#define IL_DXTC_FORMAT 0x0705 +#define IL_DXT1 0x0706 +#define IL_DXT2 0x0707 +#define IL_DXT3 0x0708 +#define IL_DXT4 0x0709 +#define IL_DXT5 0x070A +#define IL_DXT_NO_COMP 0x070B +#define IL_KEEP_DXTC_DATA 0x070C +#define IL_DXTC_DATA_FORMAT 0x070D +#define IL_3DC 0x070E +#define IL_RXGB 0x070F +#define IL_ATI1N 0x0710 +#define IL_DXT1A 0x0711 // Normally the same as IL_DXT1, except for nVidia Texture Tools. + +// Environment map definitions +#define IL_CUBEMAP_POSITIVEX 0x00000400 +#define IL_CUBEMAP_NEGATIVEX 0x00000800 +#define IL_CUBEMAP_POSITIVEY 0x00001000 +#define IL_CUBEMAP_NEGATIVEY 0x00002000 +#define IL_CUBEMAP_POSITIVEZ 0x00004000 +#define IL_CUBEMAP_NEGATIVEZ 0x00008000 +#define IL_SPHEREMAP 0x00010000 + + +// Values +#define IL_VERSION_NUM 0x0DE2 +#define IL_IMAGE_WIDTH 0x0DE4 +#define IL_IMAGE_HEIGHT 0x0DE5 +#define IL_IMAGE_DEPTH 0x0DE6 +#define IL_IMAGE_SIZE_OF_DATA 0x0DE7 +#define IL_IMAGE_BPP 0x0DE8 +#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8 +#define IL_IMAGE_BPP 0x0DE8 +#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9 +#define IL_IMAGE_FORMAT 0x0DEA +#define IL_IMAGE_TYPE 0x0DEB +#define IL_PALETTE_TYPE 0x0DEC +#define IL_PALETTE_SIZE 0x0DED +#define IL_PALETTE_BPP 0x0DEE +#define IL_PALETTE_NUM_COLS 0x0DEF +#define IL_PALETTE_BASE_TYPE 0x0DF0 +#define IL_NUM_FACES 0x0DE1 +#define IL_NUM_IMAGES 0x0DF1 +#define IL_NUM_MIPMAPS 0x0DF2 +#define IL_NUM_LAYERS 0x0DF3 +#define IL_ACTIVE_IMAGE 0x0DF4 +#define IL_ACTIVE_MIPMAP 0x0DF5 +#define IL_ACTIVE_LAYER 0x0DF6 +#define IL_ACTIVE_FACE 0x0E00 +#define IL_CUR_IMAGE 0x0DF7 +#define IL_IMAGE_DURATION 0x0DF8 +#define IL_IMAGE_PLANESIZE 0x0DF9 +#define IL_IMAGE_BPC 0x0DFA +#define IL_IMAGE_OFFX 0x0DFB +#define IL_IMAGE_OFFY 0x0DFC +#define IL_IMAGE_CUBEFLAGS 0x0DFD +#define IL_IMAGE_ORIGIN 0x0DFE +#define IL_IMAGE_CHANNELS 0x0DFF + +# if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) +// __attribute__((deprecated)) is supported by GCC 3.1 and later. +# define DEPRECATED(D) D __attribute__((deprecated)) +# elif defined _MSC_VER && _MSC_VER >= 1300 +// __declspec(deprecated) is supported by MSVC 7.0 and later. +# define DEPRECATED(D) __declspec(deprecated) D +# else +# define DEPRECATED (D) D +# endif + +// +// Section shamelessly modified from the glut header. +// + +// This is from Win32's +#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) + #define ILAPIENTRY __stdcall + #define IL_PACKSTRUCT +//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364 +#elif defined( __GNUC__ ) + // this should work for any of the above commented platforms + // plus any platform using GCC + #ifdef __MINGW32__ + #define ILAPIENTRY __stdcall + #else + #define ILAPIENTRY + #endif + #define IL_PACKSTRUCT __attribute__ ((packed)) +#else + #define ILAPIENTRY + #define IL_PACKSTRUCT +#endif + +// This is from Win32's and +#if defined(__LCC__) + #define ILAPI __stdcall +#elif defined(_WIN32) //changed 20031221 to fix bug 840421 + #ifdef IL_STATIC_LIB + #define ILAPI + #else + #ifdef _IL_BUILD_LIBRARY + #define ILAPI __declspec(dllexport) + #else + #define ILAPI __declspec(dllimport) + #endif + #endif +#elif __APPLE__ + #define ILAPI extern +#else + #define ILAPI +#endif + + +#define IL_SEEK_SET 0 +#define IL_SEEK_CUR 1 +#define IL_SEEK_END 2 +#define IL_EOF -1 + + +// Callback functions for file reading +typedef void* ILHANDLE; +typedef void (ILAPIENTRY *fCloseRProc)(ILHANDLE); +typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE); +typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE); +typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string); +typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE); +typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint); +typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE); + +// Callback functions for file writing +typedef void (ILAPIENTRY *fCloseWProc)(ILHANDLE); +typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string); +typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE); +typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint); +typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE); +typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE); + +// Callback functions for allocation and deallocation +typedef void* (ILAPIENTRY *mAlloc)(const ILsizei); +typedef void (ILAPIENTRY *mFree) (const void* CONST_RESTRICT); + +// Registered format procedures +typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string); +typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string); + + +// ImageLib Functions +ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number); +ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number); +ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number); +ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number); +ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile); +ILAPI void ILAPIENTRY ilBindImage(ILuint Image); +ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth); +ILAPI ILboolean ILAPIENTRY ilClampNTSC(void); +ILAPI void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); +ILAPI ILboolean ILAPIENTRY ilClearImage(void); +ILAPI ILuint ILAPIENTRY ilCloneCurImage(void); +ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize); +ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType); +ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat); +ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src); +ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data); +ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num); +ILAPI ILboolean ILAPIENTRY ilDefaultImage(void); +ILAPI void ILAPIENTRY ilDeleteImage(const ILuint Num); +ILAPI void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images); +ILAPI ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName); +ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File); +ILAPI ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size); +ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void); +ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void); +ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode); +ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData(void); +ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode); +ILAPI void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images); +ILAPI ILuint ILAPIENTRY ilGenImage(void); +ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type); +ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode); +ILAPI void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param); +ILAPI ILubyte* ILAPIENTRY ilGetData(void); +ILAPI ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat); +ILAPI ILenum ILAPIENTRY ilGetError(void); +ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode); +ILAPI void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param); +ILAPI ILuint ILAPIENTRY ilGetLumpPos(void); +ILAPI ILubyte* ILAPIENTRY ilGetPalette(void); +ILAPI ILconst_string ILAPIENTRY ilGetString(ILenum StringName); +ILAPI void ILAPIENTRY ilHint(ILenum Target, ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void); +ILAPI void ILAPIENTRY ilInit(void); +ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format); +ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image); +ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File); +ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size); +ILAPI void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); +ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File); +ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size); +ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName); +ILAPI void ILAPIENTRY ilModAlpha(ILdouble AlphaValue); +ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord); +ILAPI void ILAPIENTRY ilPopAttrib(void); +ILAPI void ILAPIENTRY ilPushAttrib(ILuint Bits); +ILAPI void ILAPIENTRY ilRegisterFormat(ILenum Format); +ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load); +ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num); +ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num); +ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num); +ILAPI void ILAPIENTRY ilRegisterOrigin(ILenum Origin); +ILAPI void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type); +ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save); +ILAPI void ILAPIENTRY ilRegisterType(ILenum Type); +ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext); +ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext); +ILAPI void ILAPIENTRY ilResetMemory(void); // Deprecated +ILAPI void ILAPIENTRY ilResetRead(void); +ILAPI void ILAPIENTRY ilResetWrite(void); +ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName); +ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File); +ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName); +ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size); +ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilSetAlpha(ILdouble AlphaValue); +ILAPI ILboolean ILAPIENTRY ilSetData(void *Data); +ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration); +ILAPI void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param); +ILAPI void ILAPIENTRY ilSetMemory(mAlloc, mFree); +ILAPI void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data); +ILAPI void ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc); +ILAPI void ILAPIENTRY ilSetString(ILenum Mode, const char *String); +ILAPI void ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc); +ILAPI void ILAPIENTRY ilShutDown(void); +ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format); +ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data); +ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data); +ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); +ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); +ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); +ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName); + +// For all those weirdos that spell "colour" without the 'u'. +#define ilClearColor ilClearColour +#define ilKeyColor ilKeyColour + +#define imemclear(x,y) memset(x,0,y); + +#ifdef __cplusplus +} +#endif + +#endif // __IL_H__ +#endif // __il_h__ diff --git a/libs/DevIL-1.7.8/include/IL/ilu.h b/libs/DevIL-1.7.8/include/IL/ilu.h new file mode 100644 index 00000000..49871d79 --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/ilu.h @@ -0,0 +1,195 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: IL/ilu.h +// +// Description: The main include file for ILU +// +//----------------------------------------------------------------------------- + +// Doxygen comment +/*! \file ilu.h + The main include file for ILU +*/ + +#ifndef __ilu_h_ +#ifndef __ILU_H__ + +#define __ilu_h_ +#define __ILU_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef _WIN32 + #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #pragma comment(lib, "ILU.lib") + #endif + #endif +#endif + + +#define ILU_VERSION_1_7_8 1 +#define ILU_VERSION 178 + + +#define ILU_FILTER 0x2600 +#define ILU_NEAREST 0x2601 +#define ILU_LINEAR 0x2602 +#define ILU_BILINEAR 0x2603 +#define ILU_SCALE_BOX 0x2604 +#define ILU_SCALE_TRIANGLE 0x2605 +#define ILU_SCALE_BELL 0x2606 +#define ILU_SCALE_BSPLINE 0x2607 +#define ILU_SCALE_LANCZOS3 0x2608 +#define ILU_SCALE_MITCHELL 0x2609 + + +// Error types +#define ILU_INVALID_ENUM 0x0501 +#define ILU_OUT_OF_MEMORY 0x0502 +#define ILU_INTERNAL_ERROR 0x0504 +#define ILU_INVALID_VALUE 0x0505 +#define ILU_ILLEGAL_OPERATION 0x0506 +#define ILU_INVALID_PARAM 0x0509 + + +// Values +#define ILU_PLACEMENT 0x0700 +#define ILU_LOWER_LEFT 0x0701 +#define ILU_LOWER_RIGHT 0x0702 +#define ILU_UPPER_LEFT 0x0703 +#define ILU_UPPER_RIGHT 0x0704 +#define ILU_CENTER 0x0705 +#define ILU_CONVOLUTION_MATRIX 0x0710 + +#define ILU_VERSION_NUM IL_VERSION_NUM +#define ILU_VENDOR IL_VENDOR + + +// Languages +#define ILU_ENGLISH 0x0800 +#define ILU_ARABIC 0x0801 +#define ILU_DUTCH 0x0802 +#define ILU_JAPANESE 0x0803 +#define ILU_SPANISH 0x0804 +#define ILU_GERMAN 0x0805 +#define ILU_FRENCH 0x0806 + + +// Filters +/* +#define ILU_FILTER_BLUR 0x0803 +#define ILU_FILTER_GAUSSIAN_3x3 0x0804 +#define ILU_FILTER_GAUSSIAN_5X5 0x0805 +#define ILU_FILTER_EMBOSS1 0x0807 +#define ILU_FILTER_EMBOSS2 0x0808 +#define ILU_FILTER_LAPLACIAN1 0x080A +#define ILU_FILTER_LAPLACIAN2 0x080B +#define ILU_FILTER_LAPLACIAN3 0x080C +#define ILU_FILTER_LAPLACIAN4 0x080D +#define ILU_FILTER_SHARPEN1 0x080E +#define ILU_FILTER_SHARPEN2 0x080F +#define ILU_FILTER_SHARPEN3 0x0810 +*/ + + +typedef struct ILinfo +{ + ILuint Id; // the image's id + ILubyte *Data; // the image's data + ILuint Width; // the image's width + ILuint Height; // the image's height + ILuint Depth; // the image's depth + ILubyte Bpp; // bytes per pixel (not bits) of the image + ILuint SizeOfData; // the total size of the data (in bytes) + ILenum Format; // image format (in IL enum style) + ILenum Type; // image type (in IL enum style) + ILenum Origin; // origin of the image + ILubyte *Palette; // the image's palette + ILenum PalType; // palette type + ILuint PalSize; // palette size + ILenum CubeFlags; // flags for what cube map sides are present + ILuint NumNext; // number of images following + ILuint NumMips; // number of mipmaps + ILuint NumLayers; // number of layers +} ILinfo; + + +typedef struct ILpointf { + ILfloat x; + ILfloat y; +} ILpointf; + +typedef struct ILpointi { + ILint x; + ILint y; +} ILpointi; + +ILAPI ILboolean ILAPIENTRY iluAlienify(void); +ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter); +ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter); +ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void); +ILAPI ILuint ILAPIENTRY iluColoursUsed(void); +ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp); +ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast); +ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth); +ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated +ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void); +ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void); +ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void); +ILAPI ILboolean ILAPIENTRY iluEmboss(void); +ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth); +ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim); +ILAPI ILboolean ILAPIENTRY iluEqualize(void); +ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error); +ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias); +ILAPI ILboolean ILAPIENTRY iluFlipImage(void); +ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma); +ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated +ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info); +ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode); +ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param); +ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName); +ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param); +ILAPI void ILAPIENTRY iluInit(void); +ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void); +ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName); +ILAPI ILboolean ILAPIENTRY iluMirror(void); +ILAPI ILboolean ILAPIENTRY iluNegative(void); +ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance); +ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize); +ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n); +ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n); +ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); +ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle); +ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle); +ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation); +ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation); +ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth); +ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale); +ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b); +ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language); +ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter); +ILAPI ILboolean ILAPIENTRY iluSwapColours(void); +ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle); + +#define iluColorsUsed iluColoursUsed +#define iluSwapColors iluSwapColours +#define iluReplaceColor iluReplaceColour +#define iluScaleColor iluScaleColour + +#ifdef __cplusplus +} +#endif + +#endif // __ILU_H__ +#endif // __ilu_h_ diff --git a/libs/DevIL-1.7.8/include/IL/ilu_region.h b/libs/DevIL-1.7.8/include/IL/ilu_region.h new file mode 100644 index 00000000..b5b3adc2 --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/ilu_region.h @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 07/09/2002 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_region.h +// +// Description: Creates an image region. +// +//----------------------------------------------------------------------------- + +#ifndef ILU_REGION_H +#define ILU_REGION_H + +typedef struct Edge +{ + ILint yUpper; + ILfloat xIntersect, dxPerScan; + struct Edge *next; +} Edge; + + +#endif//ILU_REGION_H + diff --git a/libs/DevIL-1.7.8/include/IL/ilut.h b/libs/DevIL-1.7.8/include/IL/ilut.h new file mode 100644 index 00000000..4a84b845 --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/ilut.h @@ -0,0 +1,390 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: IL/ilut.h +// +// Description: The main include file for ILUT +// +//----------------------------------------------------------------------------- + +// Doxygen comment +/*! \file ilut.h + The main include file for ILUT +*/ + +#ifndef __ilut_h_ +#ifndef __ILUT_H__ + +#define __ilut_h_ +#define __ILUT_H__ + +#include +#include + + +//----------------------------------------------------------------------------- +// Defines +//----------------------------------------------------------------------------- + +#define ILUT_VERSION_1_7_8 1 +#define ILUT_VERSION 178 + + +// Attribute Bits +#define ILUT_OPENGL_BIT 0x00000001 +#define ILUT_D3D_BIT 0x00000002 +#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF + + +// Error Types +#define ILUT_INVALID_ENUM 0x0501 +#define ILUT_OUT_OF_MEMORY 0x0502 +#define ILUT_INVALID_VALUE 0x0505 +#define ILUT_ILLEGAL_OPERATION 0x0506 +#define ILUT_INVALID_PARAM 0x0509 +#define ILUT_COULD_NOT_OPEN_FILE 0x050A +#define ILUT_STACK_OVERFLOW 0x050E +#define ILUT_STACK_UNDERFLOW 0x050F +#define ILUT_BAD_DIMENSIONS 0x0511 +#define ILUT_NOT_SUPPORTED 0x0550 + + +// State Definitions +#define ILUT_PALETTE_MODE 0x0600 +#define ILUT_OPENGL_CONV 0x0610 +#define ILUT_D3D_MIPLEVELS 0x0620 +#define ILUT_MAXTEX_WIDTH 0x0630 +#define ILUT_MAXTEX_HEIGHT 0x0631 +#define ILUT_MAXTEX_DEPTH 0x0632 +#define ILUT_GL_USE_S3TC 0x0634 +#define ILUT_D3D_USE_DXTC 0x0634 +#define ILUT_GL_GEN_S3TC 0x0635 +#define ILUT_D3D_GEN_DXTC 0x0635 +#define ILUT_S3TC_FORMAT 0x0705 +#define ILUT_DXTC_FORMAT 0x0705 +#define ILUT_D3D_POOL 0x0706 +#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707 +#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707 +#define ILUT_FORCE_INTEGER_FORMAT 0x0636 + +//This new state does automatic texture target detection +//if enabled. Currently, only cubemap detection is supported. +//if the current image is no cubemap, the 2d texture is chosen. +#define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807 + + +// Values +#define ILUT_VERSION_NUM IL_VERSION_NUM +#define ILUT_VENDOR IL_VENDOR + +// The different rendering api's...more to be added later? +#define ILUT_OPENGL 0 +#define ILUT_ALLEGRO 1 +#define ILUT_WIN32 2 +#define ILUT_DIRECT3D8 3 +#define ILUT_DIRECT3D9 4 +#define ILUT_X11 5 +#define ILUT_DIRECT3D10 6 + +/* +// Includes specific config +#ifdef DJGPP + #define ILUT_USE_ALLEGRO +#elif _WIN32_WCE + #define ILUT_USE_WIN32 +#elif _WIN32 + //#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this with DevIL builds) + #define ILUT_USE_WIN32 + #include "IL/config.h" + + // Temporary fix for the SDL main() linker bug. + //#ifdef ILUT_USE_SDL + //#undef ILUT_USE_SDL + //#endif//ILUT_USE_SDL + + //#else + // #define ILUT_USE_WIN32 + // #define ILUT_USE_OPENGL + // #define ILUT_USE_SDL + // #define ILUT_USE_DIRECTX8 + //#endif +#elif BEOS // Don't know the #define + #define ILUT_USE_BEOS + #define ILUT_USE_OPENGL +#elif MACOSX + #define ILUT_USE_OPENGL +#else + + // We are surely using a *nix so the configure script + // may have written the configured config.h header + #include "IL/config.h" +#endif +*/ + +#if (defined(_WIN32) || defined(_WIN64)) + #if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY)) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #pragma comment(lib, "ILUT.lib") + #endif + #endif + + #include +#endif + + + +//this should remain private and hidden +//#include "IL/config.h" + +////////////// +// OpenGL +////////////// + +#ifdef ILUT_USE_OPENGL + #if defined(_MSC_VER) || defined(_WIN32) + //#define WIN32_LEAN_AND_MEAN + #include + #endif//_MSC_VER + + #ifdef __APPLE__ + #include + #include + #else + #include + #include + #endif//__APPLE__ +#endif + + +#ifdef ILUT_USE_WIN32 + //#define WIN32_LEAN_AND_MEAN + #ifdef _DEBUG + #define _CRTDBG_MAP_ALLOC + #include + #ifndef _WIN32_WCE + #include + #endif + #endif + #include +#endif + + +// +// If we can avoid including these in all cases thing tend to break less +// and we can keep all of them defined as available +// +// Kriss +// + +// ImageLib Utility Toolkit's Allegro Functions +#ifdef ILUT_USE_ALLEGRO +// #include +#endif//ILUT_USE_ALLEGRO + +#ifdef ILUT_USE_SDL +// #include +#endif + +#ifdef ILUT_USE_DIRECTX8 + #include +#endif//ILUT_USE_DIRECTX9 + +#ifdef ILUT_USE_DIRECTX9 + #include +#endif//ILUT_USE_DIRECTX9 + +#ifdef ILUT_USE_DIRECTX10 + #pragma warning(push) + #pragma warning(disable : 4201) // Disables 'nonstandard extension used : nameless struct/union' warning + #include + #include + #include + #pragma warning(pop) +#endif//ILUT_USE_DIRECTX10 + +#ifdef ILUT_USE_X11 + #include + #include +#ifdef ILUT_USE_XSHM + #include + #include + #include +#endif//ILUT_USE_XSHM +#endif//ILUT_USE_X11 + + + +//----------------------------------------------------------------------------- +// Functions +//----------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +// ImageLib Utility Toolkit Functions +ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode); +ILAPI void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param); +ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode); +ILAPI void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param); +ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName); +ILAPI void ILAPIENTRY ilutInit(void); +ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode); +ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode); +ILAPI void ILAPIENTRY ilutPopAttrib(void); +ILAPI void ILAPIENTRY ilutPushAttrib(ILuint Bits); +ILAPI void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param); + +ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer); + + +// ImageLib Utility Toolkit's OpenGL Functions +#ifdef ILUT_USE_OPENGL + ILAPI GLuint ILAPIENTRY ilutGLBindTexImage(); + ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(void); + ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(void); + ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName); + ILAPI ILboolean ILAPIENTRY ilutGLScreen(void); + ILAPI ILboolean ILAPIENTRY ilutGLScreenie(void); + ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID); + ILAPI ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff, ILuint YOff); + ILAPI ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff, ILuint YOff, ILuint ZOff); + ILAPI ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID); + ILAPI ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID); + ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level); + ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); + + ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); // Deprecated - use ilutGLSetTex2D. + ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); // Use ilutGLSubTex2D. +#endif//ILUT_USE_OPENGL + + +// ImageLib Utility Toolkit's Allegro Functions +#ifdef ILUT_USE_ALLEGRO + #ifdef __cplusplus + extern "C" { + #endif + #include + #ifdef __cplusplus + } + #endif + + ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName); + ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal); +#endif//ILUT_USE_ALLEGRO + + +// ImageLib Utility Toolkit's SDL Functions +#ifdef ILUT_USE_SDL + ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags); + ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName); + ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Surface *Bitmap); +#endif//ILUT_USE_SDL + + +// ImageLib Utility Toolkit's BeOS Functions +#ifdef ILUT_USE_BEOS + ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(void); +#endif//ILUT_USE_BEOS + + +// ImageLib Utility Toolkit's Win32 GDI Functions +#ifdef ILUT_USE_WIN32 + ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC); + ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice); + ILAPI void ILAPIENTRY ilutFreePaddedData(ILubyte *Data); + ILAPI void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info); + ILAPI HPALETTE ILAPIENTRY ilutGetHPal(void); + ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(void); + ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(void); + ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type); + ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap); + ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal); + ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(void); + ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC); + ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url); + ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC); + ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap); +#endif//ILUT_USE_WIN32 + +// ImageLib Utility Toolkit's DirectX 8 Functions +#ifdef ILUT_USE_DIRECTX8 +// ILAPI void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels); + ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device); + ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device); + ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture); + // These two are not tested yet. + ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface); +#endif//ILUT_USE_DIRECTX8 + +#ifdef ILUT_USE_DIRECTX9 + #pragma warning(push) + #pragma warning(disable : 4115) // Disables 'named type definition in parentheses' warning +// ILAPI void ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels); + ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture (struct IDirect3DDevice9* Device); + ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture (struct IDirect3DDevice9* Device); + ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture (struct IDirect3DDevice9* Device); + + ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DCubeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DCubeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DCubeTexture9 **Texture); + + ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DVolumeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture); + + // These three are not tested yet. + ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DVolumeTexture9 **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface); + #pragma warning(pop) +#endif//ILUT_USE_DIRECTX9 + +#ifdef ILUT_USE_DIRECTX10 + ILAPI ID3D10Texture2D* ILAPIENTRY ilutD3D10Texture(ID3D10Device *Device); + ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFile(ID3D10Device *Device, ILconst_string FileName, ID3D10Texture2D **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileInMemory(ID3D10Device *Device, void *Lump, ILuint Size, ID3D10Texture2D **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromResource(ID3D10Device *Device, HMODULE SrcModule, ILconst_string SrcResource, ID3D10Texture2D **Texture); + ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileHandle(ID3D10Device *Device, ILHANDLE File, ID3D10Texture2D **Texture); +#endif//ILUT_USE_DIRECTX10 + + + +#ifdef ILUT_USE_X11 + ILAPI XImage * ILAPIENTRY ilutXCreateImage( Display* ); + ILAPI Pixmap ILAPIENTRY ilutXCreatePixmap( Display*,Drawable ); + ILAPI XImage * ILAPIENTRY ilutXLoadImage( Display*,char* ); + ILAPI Pixmap ILAPIENTRY ilutXLoadPixmap( Display*,Drawable,char* ); +#ifdef ILUT_USE_XSHM + ILAPI XImage * ILAPIENTRY ilutXShmCreateImage( Display*,XShmSegmentInfo* ); + ILAPI void ILAPIENTRY ilutXShmDestroyImage( Display*,XImage*,XShmSegmentInfo* ); + ILAPI Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display*,Drawable,XShmSegmentInfo* ); + ILAPI void ILAPIENTRY ilutXShmFreePixmap( Display*,Pixmap,XShmSegmentInfo* ); + ILAPI XImage * ILAPIENTRY ilutXShmLoadImage( Display*,char*,XShmSegmentInfo* ); + ILAPI Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display*,Drawable,char*,XShmSegmentInfo* ); +#endif//ILUT_USE_XSHM +#endif//ILUT_USE_X11 + + +#ifdef __cplusplus +} +#endif + +#endif // __ILUT_H__ +#endif // __ilut_h_ diff --git a/libs/DevIL-1.7.8/include/IL/ilut_config.h b/libs/DevIL-1.7.8/include/IL/ilut_config.h new file mode 100644 index 00000000..a05da54c --- /dev/null +++ b/libs/DevIL-1.7.8/include/IL/ilut_config.h @@ -0,0 +1,26 @@ +#ifndef __ILUT_CONFIG_H__ +#define __ILUT_CONFIG_H__ + +#define IL_USE_PRAGMA_LIBS + +// Supported APIs (ILUT) + +// +// sorry just +// cant get this one to work under windows +// have disabled for the now +// +// will look at it some more later +// +// Kriss +// +#undef ILUT_USE_ALLEGRO + +#undef ILUT_USE_DIRECTX8 +//#define ILUT_USE_DIRECTX9 +//#define ILUT_USE_DIRECTX10 +#define ILUT_USE_OPENGL +//#define ILUT_USE_SDL +#define ILUT_USE_WIN32 + +#endif//__ILUT_CONFIG_H__ diff --git a/libs/DevIL-1.7.8/lib/Makefile.am b/libs/DevIL-1.7.8/lib/Makefile.am new file mode 100644 index 00000000..8d239df5 --- /dev/null +++ b/libs/DevIL-1.7.8/lib/Makefile.am @@ -0,0 +1,94 @@ +all_include = $(srcdir)/../include + +il_src = $(srcdir)/../src-IL/src +il_include = $(srcdir)/../src-IL/include +ilu_src = $(srcdir)/../src-ILU/src +ilu_include = $(srcdir)/../src-ILU/include +ilut_src = $(srcdir)/../src-ILUT/src +ilut_include = $(srcdir)/../src-ILUT/include + +ildir = $(includedir)/IL + +lib_LTLIBRARIES = +il_HEADERS = $(all_include)/IL/devil_cpp_wrapper.hpp +AM_LDFLAGS = -version-info @DEVIL_LTVERSION@ +AM_CFLAGS = $(GENERAL_CFLAGS) + +if WINDOWS_BUILD +AM_LDFLAGS += -no-undefined +endif #WINDOWS_BUILD + +if BUILD_IL + +lib_LTLIBRARIES += libIL.la +il_HEADERS += $(all_include)/IL/il.h + +endif #BUILD_IL + +if BUILD_ILU + +lib_LTLIBRARIES += libILU.la +il_HEADERS += $(all_include)/IL/ilu.h $(all_include)/IL/ilu_region.h + +endif #BUILD_ILU + +if BUILD_ILUT + +lib_LTLIBRARIES += libILUT.la +il_HEADERS += $(all_include)/IL/ilut.h + +endif #BUILD_ILUT + +libIL_la_CPPFLAGS = -I $(il_include) -I $(all_include) +libIL_la_CFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ +libIL_la_CXXFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ + +libIL_la_SOURCES = $(il_src)/il_alloc.c $(il_src)/il_doom.c $(il_src)/il_stack.c $(il_src)/il_pcx.c $(il_src)/il_rle.c $(il_src)/il_bits.c $(il_src)/il_endian.c $(il_src)/il_exr.cpp $(il_src)/il_jpeg.c $(il_src)/il_pic.c $(il_src)/il_sgi.c $(il_src)/il_bmp.c $(il_src)/il_error.c $(il_src)/il_lif.c $(il_src)/il_png.c $(il_src)/il_states.c $(il_src)/il_convbuff.c $(il_src)/il_files.c $(il_src)/il_main.c $(il_src)/il_pnm.c $(il_src)/il_targa.c $(il_src)/il_wdp.c $(il_src)/il_convert.c $(il_src)/il_gif.c $(il_src)/il_manip.c $(il_src)/il_profiles.c $(il_src)/il_tiff.c $(il_src)/il_cut.c $(il_src)/il_header.c $(il_src)/il_mdl.c $(il_src)/il_quantizer.c $(il_src)/il_utility.c $(il_src)/il_dcx.c $(il_src)/il_icon.c $(il_src)/il_mng.c $(il_src)/il_raw.c $(il_src)/il_wal.c $(il_src)/il_dds.c $(il_src)/il_internal.c $(il_src)/il_pal.c $(il_src)/il_rawdata.c $(il_src)/il_devil.c $(il_src)/il_io.c $(il_src)/il_pcd.c $(il_src)/il_register.c $(il_src)/il_psd.c $(il_src)/il_fastconv.c $(il_src)/il_neuquant.c $(il_src)/il_dds-save.c $(il_src)/il_psp.c $(il_src)/il_pix.c $(il_src)/il_pxr.c $(il_src)/il_vtf.c $(il_src)/il_xpm.c $(il_src)/il_hdr.c $(il_src)/il_icns.c $(il_src)/il_jp2.c $(il_src)/altivec_common.c $(il_src)/altivec_typeconversion.c $(il_src)/il_sun.c $(il_src)/il_nvidia.cpp $(il_src)/il_wbmp.c $(il_src)/il_squish.cpp $(il_src)/il_iff.c $(il_src)/il_ilbm.c $(il_src)/il_size.c $(il_src)/il_tpl.c $(il_src)/il_fits.c $(il_src)/il_iwi.c $(il_src)/il_blp.c $(il_src)/il_ftx.c $(il_src)/il_dicom.c $(il_src)/il_rot.c $(il_src)/il_texture.c $(il_src)/il_dpx.c $(il_src)/il_utx.cpp $(il_src)/il_mp3.c + +libIL_la_SOURCES += $(il_include)/altivec_common.h $(il_include)/altivec_typeconversion.h $(il_include)/il_alloc.h $(il_include)/il_bits.h $(il_include)/il_bmp.h $(il_include)/il_dcx.h $(il_include)/il_dds.h $(il_include)/il_doompal.h $(il_include)/il_dpx.h $(il_include)/il_endian.h $(il_include)/il_exr.h $(il_include)/il_files.h $(il_include)/il_gif.h $(il_include)/il_hdr.h $(il_include)/il_icns.h $(il_include)/il_icon.h $(il_include)/il_internal.h $(il_include)/il_jp2.h $(il_include)/il_jpeg.h $(il_include)/il_lif.h $(il_include)/il_manip.h $(il_include)/il_mdl.h $(il_include)/il_pal.h $(il_include)/il_pcx.h $(il_include)/il_pic.h $(il_include)/il_pnm.h $(il_include)/il_psd.h $(il_include)/il_psp.h $(il_include)/il_q2pal.h $(il_include)/il_register.h $(il_include)/il_rle.h $(il_include)/il_sgi.h $(il_include)/il_stack.h $(il_include)/il_states.h $(il_include)/il_targa.h $(il_include)/il_utx.h $(il_include)/il_vtf.h $(il_include)/il_wdp.h $(all_include)/IL/devil_internal_exports.h +libIL_la_LDFLAGS = @IL_LIBS@ $(AM_LDFLAGS) + +libILU_la_CPPFLAGS = -I $(ilu_include) -I $(all_include) +libILU_la_CFLAGS = $(AM_CFLAGS) @ILU_CFLAGS@ +libILU_la_SOURCES = $(ilu_src)/ilu_alloc.c $(ilu_src)/ilu_internal.c $(ilu_src)/ilu_noise.c $(ilu_src)/ilu_scale.c $(ilu_src)/ilu_error.c $(ilu_src)/ilu_main.c $(ilu_src)/ilu_rotate.c $(ilu_src)/ilu_scaling.c $(ilu_src)/ilu_filter.c $(ilu_src)/ilu_manip.c $(ilu_src)/ilu_scale2d.c $(ilu_src)/ilu_states.c $(ilu_src)/ilu_filter_rcg.c $(ilu_src)/ilu_mipmap.c $(ilu_src)/ilu_scale3d.c $(ilu_src)/ilu_utilities.c $(ilu_src)/ilu_region.c + +libILU_la_SOURCES += $(ilu_include)/ilu_alloc.h $(ilu_include)/ilu_filter.h $(ilu_include)/ilu_internal.h $(ilu_include)/ilu_region.h $(ilu_include)/ilu_states.h $(all_include)/IL/devil_internal_exports.h $(all_include)/IL/ilu_region.h $(ilu_include)/ilu_error/ilu_err-arabic.h $(ilu_include)/ilu_error/ilu_err-dutch.h $(ilu_include)/ilu_error/ilu_err-english.h $(ilu_include)/ilu_error/ilu_err-french.h $(ilu_include)/ilu_error/ilu_err-german.h $(ilu_include)/ilu_error/ilu_err-japanese.h $(ilu_include)/ilu_error/ilu_err-spanish.h + +libILU_la_LDFLAGS = @ILU_LIBS@ $(AM_LDFLAGS) +libILU_la_LIBADD = libIL.la + +libILUT_la_CPPFLAGS = -I $(ilut_include) -I $(all_include) +libILUT_la_CFLAGS = $(AM_CFLAGS) @ILUT_CFLAGS@ +libILUT_la_SOURCES = $(ilut_src)/ilut_main.c $(ilut_src)/ilut_states.c $(ilut_src)/ilut_internal.c +libILUT_la_SOURCES += $(ilut_include)/ilut_internal.h $(ilut_include)/ilut_states.h $(all_include)/IL/devil_internal_exports.h +libILUT_la_LDFLAGS = @ILUT_LIBS@ $(AM_LDFLAGS) +libILUT_la_LIBADD = libILU.la + +if USE_ALLEGRO +libILUT_la_SOURCES += $(ilut_src)/ilut_allegro.c $(ilut_include)/ilut_allegro.h +endif #USE_ALLEG + +if USE_DIRECTX +libILUT_la_SOURCES += $(ilut_src)/ilut_directx.c +endif #USE_DIRECTX + +if USE_DIRECTX9 +libILUT_la_SOURCES += $(ilut_src)/ilut_directx9.c +endif #USE_DIRECTX + +if USE_SDL +libILUT_la_SOURCES += $(ilut_src)/ilut_sdlsurface.c +endif #USE_SDL + +if USE_OPENGL +libILUT_la_SOURCES += $(ilut_include)/ilut_opengl.h $(ilut_src)/ilut_opengl.c +endif #USE_OPENGL + +if USE_X11 +libILUT_la_SOURCES += $(ilut_src)/ilut_x11.c +endif #USE_X11 + +if USE_W32 +libILUT_la_SOURCES += $(ilut_src)/ilut_win32.c +endif #USE_W32 + diff --git a/libs/DevIL-1.7.8/lib/Makefile.in b/libs/DevIL-1.7.8/lib/Makefile.in new file mode 100644 index 00000000..d9f8c6c9 --- /dev/null +++ b/libs/DevIL-1.7.8/lib/Makefile.in @@ -0,0 +1,1593 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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@ +@WINDOWS_BUILD_TRUE@am__append_1 = -no-undefined +@BUILD_IL_TRUE@am__append_2 = libIL.la +@BUILD_IL_TRUE@am__append_3 = $(all_include)/IL/il.h +@BUILD_ILU_TRUE@am__append_4 = libILU.la +@BUILD_ILU_TRUE@am__append_5 = $(all_include)/IL/ilu.h $(all_include)/IL/ilu_region.h +@BUILD_ILUT_TRUE@am__append_6 = libILUT.la +@BUILD_ILUT_TRUE@am__append_7 = $(all_include)/IL/ilut.h +@USE_ALLEGRO_TRUE@am__append_8 = $(ilut_src)/ilut_allegro.c $(ilut_include)/ilut_allegro.h +@USE_DIRECTX_TRUE@am__append_9 = $(ilut_src)/ilut_directx.c +@USE_DIRECTX9_TRUE@am__append_10 = $(ilut_src)/ilut_directx9.c +@USE_SDL_TRUE@am__append_11 = $(ilut_src)/ilut_sdlsurface.c +@USE_OPENGL_TRUE@am__append_12 = $(ilut_include)/ilut_opengl.h $(ilut_src)/ilut_opengl.c +@USE_X11_TRUE@am__append_13 = $(ilut_src)/ilut_x11.c +@USE_W32_TRUE@am__append_14 = $(ilut_src)/ilut_win32.c +subdir = lib +DIST_COMMON = $(am__il_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ildir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libIL_la_LIBADD = +am_libIL_la_OBJECTS = libIL_la-il_alloc.lo libIL_la-il_doom.lo \ + libIL_la-il_stack.lo libIL_la-il_pcx.lo libIL_la-il_rle.lo \ + libIL_la-il_bits.lo libIL_la-il_endian.lo libIL_la-il_exr.lo \ + libIL_la-il_jpeg.lo libIL_la-il_pic.lo libIL_la-il_sgi.lo \ + libIL_la-il_bmp.lo libIL_la-il_error.lo libIL_la-il_lif.lo \ + libIL_la-il_png.lo libIL_la-il_states.lo \ + libIL_la-il_convbuff.lo libIL_la-il_files.lo \ + libIL_la-il_main.lo libIL_la-il_pnm.lo libIL_la-il_targa.lo \ + libIL_la-il_wdp.lo libIL_la-il_convert.lo libIL_la-il_gif.lo \ + libIL_la-il_manip.lo libIL_la-il_profiles.lo \ + libIL_la-il_tiff.lo libIL_la-il_cut.lo libIL_la-il_header.lo \ + libIL_la-il_mdl.lo libIL_la-il_quantizer.lo \ + libIL_la-il_utility.lo libIL_la-il_dcx.lo libIL_la-il_icon.lo \ + libIL_la-il_mng.lo libIL_la-il_raw.lo libIL_la-il_wal.lo \ + libIL_la-il_dds.lo libIL_la-il_internal.lo libIL_la-il_pal.lo \ + libIL_la-il_rawdata.lo libIL_la-il_devil.lo libIL_la-il_io.lo \ + libIL_la-il_pcd.lo libIL_la-il_register.lo libIL_la-il_psd.lo \ + libIL_la-il_fastconv.lo libIL_la-il_neuquant.lo \ + libIL_la-il_dds-save.lo libIL_la-il_psp.lo libIL_la-il_pix.lo \ + libIL_la-il_pxr.lo libIL_la-il_vtf.lo libIL_la-il_xpm.lo \ + libIL_la-il_hdr.lo libIL_la-il_icns.lo libIL_la-il_jp2.lo \ + libIL_la-altivec_common.lo libIL_la-altivec_typeconversion.lo \ + libIL_la-il_sun.lo libIL_la-il_nvidia.lo libIL_la-il_wbmp.lo \ + libIL_la-il_squish.lo libIL_la-il_iff.lo libIL_la-il_ilbm.lo \ + libIL_la-il_size.lo libIL_la-il_tpl.lo libIL_la-il_fits.lo \ + libIL_la-il_iwi.lo libIL_la-il_blp.lo libIL_la-il_ftx.lo \ + libIL_la-il_dicom.lo libIL_la-il_rot.lo libIL_la-il_texture.lo \ + libIL_la-il_dpx.lo libIL_la-il_utx.lo libIL_la-il_mp3.lo +libIL_la_OBJECTS = $(am_libIL_la_OBJECTS) +libIL_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libIL_la_CXXFLAGS) \ + $(CXXFLAGS) $(libIL_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_IL_TRUE@am_libIL_la_rpath = -rpath $(libdir) +libILU_la_DEPENDENCIES = libIL.la +am_libILU_la_OBJECTS = libILU_la-ilu_alloc.lo \ + libILU_la-ilu_internal.lo libILU_la-ilu_noise.lo \ + libILU_la-ilu_scale.lo libILU_la-ilu_error.lo \ + libILU_la-ilu_main.lo libILU_la-ilu_rotate.lo \ + libILU_la-ilu_scaling.lo libILU_la-ilu_filter.lo \ + libILU_la-ilu_manip.lo libILU_la-ilu_scale2d.lo \ + libILU_la-ilu_states.lo libILU_la-ilu_filter_rcg.lo \ + libILU_la-ilu_mipmap.lo libILU_la-ilu_scale3d.lo \ + libILU_la-ilu_utilities.lo libILU_la-ilu_region.lo +libILU_la_OBJECTS = $(am_libILU_la_OBJECTS) +libILU_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libILU_la_CFLAGS) \ + $(CFLAGS) $(libILU_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ILU_TRUE@am_libILU_la_rpath = -rpath $(libdir) +libILUT_la_DEPENDENCIES = libILU.la +am__libILUT_la_SOURCES_DIST = $(ilut_src)/ilut_main.c \ + $(ilut_src)/ilut_states.c $(ilut_src)/ilut_internal.c \ + $(ilut_include)/ilut_internal.h $(ilut_include)/ilut_states.h \ + $(all_include)/IL/devil_internal_exports.h \ + $(ilut_src)/ilut_allegro.c $(ilut_include)/ilut_allegro.h \ + $(ilut_src)/ilut_directx.c $(ilut_src)/ilut_directx9.c \ + $(ilut_src)/ilut_sdlsurface.c $(ilut_include)/ilut_opengl.h \ + $(ilut_src)/ilut_opengl.c $(ilut_src)/ilut_x11.c \ + $(ilut_src)/ilut_win32.c +@USE_ALLEGRO_TRUE@am__objects_1 = libILUT_la-ilut_allegro.lo +@USE_DIRECTX_TRUE@am__objects_2 = libILUT_la-ilut_directx.lo +@USE_DIRECTX9_TRUE@am__objects_3 = libILUT_la-ilut_directx9.lo +@USE_SDL_TRUE@am__objects_4 = libILUT_la-ilut_sdlsurface.lo +@USE_OPENGL_TRUE@am__objects_5 = libILUT_la-ilut_opengl.lo +@USE_X11_TRUE@am__objects_6 = libILUT_la-ilut_x11.lo +@USE_W32_TRUE@am__objects_7 = libILUT_la-ilut_win32.lo +am_libILUT_la_OBJECTS = libILUT_la-ilut_main.lo \ + libILUT_la-ilut_states.lo libILUT_la-ilut_internal.lo \ + $(am__objects_1) $(am__objects_2) $(am__objects_3) \ + $(am__objects_4) $(am__objects_5) $(am__objects_6) \ + $(am__objects_7) +libILUT_la_OBJECTS = $(am_libILUT_la_OBJECTS) +libILUT_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libILUT_la_CFLAGS) \ + $(CFLAGS) $(libILUT_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ILUT_TRUE@am_libILUT_la_rpath = -rpath $(libdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/IL +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libIL_la_SOURCES) $(libILU_la_SOURCES) \ + $(libILUT_la_SOURCES) +DIST_SOURCES = $(libIL_la_SOURCES) $(libILU_la_SOURCES) \ + $(am__libILUT_la_SOURCES_DIST) +am__il_HEADERS_DIST = $(all_include)/IL/devil_cpp_wrapper.hpp \ + $(all_include)/IL/il.h $(all_include)/IL/ilu.h \ + $(all_include)/IL/ilu_region.h $(all_include)/IL/ilut.h +ilHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(il_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all_include = $(srcdir)/../include +il_src = $(srcdir)/../src-IL/src +il_include = $(srcdir)/../src-IL/include +ilu_src = $(srcdir)/../src-ILU/src +ilu_include = $(srcdir)/../src-ILU/include +ilut_src = $(srcdir)/../src-ILUT/src +ilut_include = $(srcdir)/../src-ILUT/include +ildir = $(includedir)/IL +lib_LTLIBRARIES = $(am__append_2) $(am__append_4) $(am__append_6) +il_HEADERS = $(all_include)/IL/devil_cpp_wrapper.hpp $(am__append_3) \ + $(am__append_5) $(am__append_7) +AM_LDFLAGS = -version-info @DEVIL_LTVERSION@ $(am__append_1) +AM_CFLAGS = $(GENERAL_CFLAGS) +libIL_la_CPPFLAGS = -I $(il_include) -I $(all_include) +libIL_la_CFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ +libIL_la_CXXFLAGS = $(AM_CFLAGS) @IL_CFLAGS@ +libIL_la_SOURCES = $(il_src)/il_alloc.c $(il_src)/il_doom.c \ + $(il_src)/il_stack.c $(il_src)/il_pcx.c $(il_src)/il_rle.c \ + $(il_src)/il_bits.c $(il_src)/il_endian.c $(il_src)/il_exr.cpp \ + $(il_src)/il_jpeg.c $(il_src)/il_pic.c $(il_src)/il_sgi.c \ + $(il_src)/il_bmp.c $(il_src)/il_error.c $(il_src)/il_lif.c \ + $(il_src)/il_png.c $(il_src)/il_states.c \ + $(il_src)/il_convbuff.c $(il_src)/il_files.c \ + $(il_src)/il_main.c $(il_src)/il_pnm.c $(il_src)/il_targa.c \ + $(il_src)/il_wdp.c $(il_src)/il_convert.c $(il_src)/il_gif.c \ + $(il_src)/il_manip.c $(il_src)/il_profiles.c \ + $(il_src)/il_tiff.c $(il_src)/il_cut.c $(il_src)/il_header.c \ + $(il_src)/il_mdl.c $(il_src)/il_quantizer.c \ + $(il_src)/il_utility.c $(il_src)/il_dcx.c $(il_src)/il_icon.c \ + $(il_src)/il_mng.c $(il_src)/il_raw.c $(il_src)/il_wal.c \ + $(il_src)/il_dds.c $(il_src)/il_internal.c $(il_src)/il_pal.c \ + $(il_src)/il_rawdata.c $(il_src)/il_devil.c $(il_src)/il_io.c \ + $(il_src)/il_pcd.c $(il_src)/il_register.c $(il_src)/il_psd.c \ + $(il_src)/il_fastconv.c $(il_src)/il_neuquant.c \ + $(il_src)/il_dds-save.c $(il_src)/il_psp.c $(il_src)/il_pix.c \ + $(il_src)/il_pxr.c $(il_src)/il_vtf.c $(il_src)/il_xpm.c \ + $(il_src)/il_hdr.c $(il_src)/il_icns.c $(il_src)/il_jp2.c \ + $(il_src)/altivec_common.c $(il_src)/altivec_typeconversion.c \ + $(il_src)/il_sun.c $(il_src)/il_nvidia.cpp $(il_src)/il_wbmp.c \ + $(il_src)/il_squish.cpp $(il_src)/il_iff.c $(il_src)/il_ilbm.c \ + $(il_src)/il_size.c $(il_src)/il_tpl.c $(il_src)/il_fits.c \ + $(il_src)/il_iwi.c $(il_src)/il_blp.c $(il_src)/il_ftx.c \ + $(il_src)/il_dicom.c $(il_src)/il_rot.c $(il_src)/il_texture.c \ + $(il_src)/il_dpx.c $(il_src)/il_utx.cpp $(il_src)/il_mp3.c \ + $(il_include)/altivec_common.h \ + $(il_include)/altivec_typeconversion.h \ + $(il_include)/il_alloc.h $(il_include)/il_bits.h \ + $(il_include)/il_bmp.h $(il_include)/il_dcx.h \ + $(il_include)/il_dds.h $(il_include)/il_doompal.h \ + $(il_include)/il_dpx.h $(il_include)/il_endian.h \ + $(il_include)/il_exr.h $(il_include)/il_files.h \ + $(il_include)/il_gif.h $(il_include)/il_hdr.h \ + $(il_include)/il_icns.h $(il_include)/il_icon.h \ + $(il_include)/il_internal.h $(il_include)/il_jp2.h \ + $(il_include)/il_jpeg.h $(il_include)/il_lif.h \ + $(il_include)/il_manip.h $(il_include)/il_mdl.h \ + $(il_include)/il_pal.h $(il_include)/il_pcx.h \ + $(il_include)/il_pic.h $(il_include)/il_pnm.h \ + $(il_include)/il_psd.h $(il_include)/il_psp.h \ + $(il_include)/il_q2pal.h $(il_include)/il_register.h \ + $(il_include)/il_rle.h $(il_include)/il_sgi.h \ + $(il_include)/il_stack.h $(il_include)/il_states.h \ + $(il_include)/il_targa.h $(il_include)/il_utx.h \ + $(il_include)/il_vtf.h $(il_include)/il_wdp.h \ + $(all_include)/IL/devil_internal_exports.h +libIL_la_LDFLAGS = @IL_LIBS@ $(AM_LDFLAGS) +libILU_la_CPPFLAGS = -I $(ilu_include) -I $(all_include) +libILU_la_CFLAGS = $(AM_CFLAGS) @ILU_CFLAGS@ +libILU_la_SOURCES = $(ilu_src)/ilu_alloc.c $(ilu_src)/ilu_internal.c \ + $(ilu_src)/ilu_noise.c $(ilu_src)/ilu_scale.c \ + $(ilu_src)/ilu_error.c $(ilu_src)/ilu_main.c \ + $(ilu_src)/ilu_rotate.c $(ilu_src)/ilu_scaling.c \ + $(ilu_src)/ilu_filter.c $(ilu_src)/ilu_manip.c \ + $(ilu_src)/ilu_scale2d.c $(ilu_src)/ilu_states.c \ + $(ilu_src)/ilu_filter_rcg.c $(ilu_src)/ilu_mipmap.c \ + $(ilu_src)/ilu_scale3d.c $(ilu_src)/ilu_utilities.c \ + $(ilu_src)/ilu_region.c $(ilu_include)/ilu_alloc.h \ + $(ilu_include)/ilu_filter.h $(ilu_include)/ilu_internal.h \ + $(ilu_include)/ilu_region.h $(ilu_include)/ilu_states.h \ + $(all_include)/IL/devil_internal_exports.h \ + $(all_include)/IL/ilu_region.h \ + $(ilu_include)/ilu_error/ilu_err-arabic.h \ + $(ilu_include)/ilu_error/ilu_err-dutch.h \ + $(ilu_include)/ilu_error/ilu_err-english.h \ + $(ilu_include)/ilu_error/ilu_err-french.h \ + $(ilu_include)/ilu_error/ilu_err-german.h \ + $(ilu_include)/ilu_error/ilu_err-japanese.h \ + $(ilu_include)/ilu_error/ilu_err-spanish.h +libILU_la_LDFLAGS = @ILU_LIBS@ $(AM_LDFLAGS) +libILU_la_LIBADD = libIL.la +libILUT_la_CPPFLAGS = -I $(ilut_include) -I $(all_include) +libILUT_la_CFLAGS = $(AM_CFLAGS) @ILUT_CFLAGS@ +libILUT_la_SOURCES = $(ilut_src)/ilut_main.c $(ilut_src)/ilut_states.c \ + $(ilut_src)/ilut_internal.c $(ilut_include)/ilut_internal.h \ + $(ilut_include)/ilut_states.h \ + $(all_include)/IL/devil_internal_exports.h $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_14) +libILUT_la_LDFLAGS = @ILUT_LIBS@ $(AM_LDFLAGS) +libILUT_la_LIBADD = libILU.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libIL.la: $(libIL_la_OBJECTS) $(libIL_la_DEPENDENCIES) + $(libIL_la_LINK) $(am_libIL_la_rpath) $(libIL_la_OBJECTS) $(libIL_la_LIBADD) $(LIBS) +libILU.la: $(libILU_la_OBJECTS) $(libILU_la_DEPENDENCIES) + $(libILU_la_LINK) $(am_libILU_la_rpath) $(libILU_la_OBJECTS) $(libILU_la_LIBADD) $(LIBS) +libILUT.la: $(libILUT_la_OBJECTS) $(libILUT_la_DEPENDENCIES) + $(libILUT_la_LINK) $(am_libILUT_la_rpath) $(libILUT_la_OBJECTS) $(libILUT_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_allegro.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_directx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_directx9.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_internal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_opengl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_sdlsurface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_states.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILUT_la-ilut_x11.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_alloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_filter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_filter_rcg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_internal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_manip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_mipmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_noise.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_region.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_rotate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_scale.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_scale2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_scale3d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_scaling.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_states.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libILU_la-ilu_utilities.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-altivec_common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-altivec_typeconversion.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_alloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_bits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_blp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_bmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_convbuff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_convert.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_cut.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_dcx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_dds-save.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_dds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_devil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_dicom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_doom.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_dpx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_endian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_exr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_fastconv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_files.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_fits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_ftx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_gif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_hdr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_header.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_icns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_icon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_iff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_ilbm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_internal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_iwi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_jp2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_jpeg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_lif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_manip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_mdl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_mng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_mp3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_neuquant.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_nvidia.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pcd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pcx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_png.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pnm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_profiles.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_psd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_psp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_pxr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_quantizer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_raw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_rawdata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_register.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_rle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_rot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_sgi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_size.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_squish.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_stack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_states.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_sun.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_targa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_texture.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_tiff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_tpl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_utility.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_utx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_vtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_wal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_wbmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_wdp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIL_la-il_xpm.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@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 $@ $< + +libIL_la-il_alloc.lo: $(il_src)/il_alloc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_alloc.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_alloc.Tpo -c -o libIL_la-il_alloc.lo `test -f '$(il_src)/il_alloc.c' || echo '$(srcdir)/'`$(il_src)/il_alloc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_alloc.Tpo $(DEPDIR)/libIL_la-il_alloc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_alloc.c' object='libIL_la-il_alloc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_alloc.lo `test -f '$(il_src)/il_alloc.c' || echo '$(srcdir)/'`$(il_src)/il_alloc.c + +libIL_la-il_doom.lo: $(il_src)/il_doom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_doom.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_doom.Tpo -c -o libIL_la-il_doom.lo `test -f '$(il_src)/il_doom.c' || echo '$(srcdir)/'`$(il_src)/il_doom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_doom.Tpo $(DEPDIR)/libIL_la-il_doom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_doom.c' object='libIL_la-il_doom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_doom.lo `test -f '$(il_src)/il_doom.c' || echo '$(srcdir)/'`$(il_src)/il_doom.c + +libIL_la-il_stack.lo: $(il_src)/il_stack.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_stack.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_stack.Tpo -c -o libIL_la-il_stack.lo `test -f '$(il_src)/il_stack.c' || echo '$(srcdir)/'`$(il_src)/il_stack.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_stack.Tpo $(DEPDIR)/libIL_la-il_stack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_stack.c' object='libIL_la-il_stack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_stack.lo `test -f '$(il_src)/il_stack.c' || echo '$(srcdir)/'`$(il_src)/il_stack.c + +libIL_la-il_pcx.lo: $(il_src)/il_pcx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pcx.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pcx.Tpo -c -o libIL_la-il_pcx.lo `test -f '$(il_src)/il_pcx.c' || echo '$(srcdir)/'`$(il_src)/il_pcx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pcx.Tpo $(DEPDIR)/libIL_la-il_pcx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pcx.c' object='libIL_la-il_pcx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pcx.lo `test -f '$(il_src)/il_pcx.c' || echo '$(srcdir)/'`$(il_src)/il_pcx.c + +libIL_la-il_rle.lo: $(il_src)/il_rle.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_rle.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_rle.Tpo -c -o libIL_la-il_rle.lo `test -f '$(il_src)/il_rle.c' || echo '$(srcdir)/'`$(il_src)/il_rle.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_rle.Tpo $(DEPDIR)/libIL_la-il_rle.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_rle.c' object='libIL_la-il_rle.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_rle.lo `test -f '$(il_src)/il_rle.c' || echo '$(srcdir)/'`$(il_src)/il_rle.c + +libIL_la-il_bits.lo: $(il_src)/il_bits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_bits.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_bits.Tpo -c -o libIL_la-il_bits.lo `test -f '$(il_src)/il_bits.c' || echo '$(srcdir)/'`$(il_src)/il_bits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_bits.Tpo $(DEPDIR)/libIL_la-il_bits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_bits.c' object='libIL_la-il_bits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_bits.lo `test -f '$(il_src)/il_bits.c' || echo '$(srcdir)/'`$(il_src)/il_bits.c + +libIL_la-il_endian.lo: $(il_src)/il_endian.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_endian.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_endian.Tpo -c -o libIL_la-il_endian.lo `test -f '$(il_src)/il_endian.c' || echo '$(srcdir)/'`$(il_src)/il_endian.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_endian.Tpo $(DEPDIR)/libIL_la-il_endian.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_endian.c' object='libIL_la-il_endian.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_endian.lo `test -f '$(il_src)/il_endian.c' || echo '$(srcdir)/'`$(il_src)/il_endian.c + +libIL_la-il_jpeg.lo: $(il_src)/il_jpeg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_jpeg.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_jpeg.Tpo -c -o libIL_la-il_jpeg.lo `test -f '$(il_src)/il_jpeg.c' || echo '$(srcdir)/'`$(il_src)/il_jpeg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_jpeg.Tpo $(DEPDIR)/libIL_la-il_jpeg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_jpeg.c' object='libIL_la-il_jpeg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_jpeg.lo `test -f '$(il_src)/il_jpeg.c' || echo '$(srcdir)/'`$(il_src)/il_jpeg.c + +libIL_la-il_pic.lo: $(il_src)/il_pic.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pic.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pic.Tpo -c -o libIL_la-il_pic.lo `test -f '$(il_src)/il_pic.c' || echo '$(srcdir)/'`$(il_src)/il_pic.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pic.Tpo $(DEPDIR)/libIL_la-il_pic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pic.c' object='libIL_la-il_pic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pic.lo `test -f '$(il_src)/il_pic.c' || echo '$(srcdir)/'`$(il_src)/il_pic.c + +libIL_la-il_sgi.lo: $(il_src)/il_sgi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_sgi.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_sgi.Tpo -c -o libIL_la-il_sgi.lo `test -f '$(il_src)/il_sgi.c' || echo '$(srcdir)/'`$(il_src)/il_sgi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_sgi.Tpo $(DEPDIR)/libIL_la-il_sgi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_sgi.c' object='libIL_la-il_sgi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_sgi.lo `test -f '$(il_src)/il_sgi.c' || echo '$(srcdir)/'`$(il_src)/il_sgi.c + +libIL_la-il_bmp.lo: $(il_src)/il_bmp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_bmp.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_bmp.Tpo -c -o libIL_la-il_bmp.lo `test -f '$(il_src)/il_bmp.c' || echo '$(srcdir)/'`$(il_src)/il_bmp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_bmp.Tpo $(DEPDIR)/libIL_la-il_bmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_bmp.c' object='libIL_la-il_bmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_bmp.lo `test -f '$(il_src)/il_bmp.c' || echo '$(srcdir)/'`$(il_src)/il_bmp.c + +libIL_la-il_error.lo: $(il_src)/il_error.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_error.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_error.Tpo -c -o libIL_la-il_error.lo `test -f '$(il_src)/il_error.c' || echo '$(srcdir)/'`$(il_src)/il_error.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_error.Tpo $(DEPDIR)/libIL_la-il_error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_error.c' object='libIL_la-il_error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_error.lo `test -f '$(il_src)/il_error.c' || echo '$(srcdir)/'`$(il_src)/il_error.c + +libIL_la-il_lif.lo: $(il_src)/il_lif.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_lif.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_lif.Tpo -c -o libIL_la-il_lif.lo `test -f '$(il_src)/il_lif.c' || echo '$(srcdir)/'`$(il_src)/il_lif.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_lif.Tpo $(DEPDIR)/libIL_la-il_lif.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_lif.c' object='libIL_la-il_lif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_lif.lo `test -f '$(il_src)/il_lif.c' || echo '$(srcdir)/'`$(il_src)/il_lif.c + +libIL_la-il_png.lo: $(il_src)/il_png.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_png.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_png.Tpo -c -o libIL_la-il_png.lo `test -f '$(il_src)/il_png.c' || echo '$(srcdir)/'`$(il_src)/il_png.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_png.Tpo $(DEPDIR)/libIL_la-il_png.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_png.c' object='libIL_la-il_png.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_png.lo `test -f '$(il_src)/il_png.c' || echo '$(srcdir)/'`$(il_src)/il_png.c + +libIL_la-il_states.lo: $(il_src)/il_states.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_states.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_states.Tpo -c -o libIL_la-il_states.lo `test -f '$(il_src)/il_states.c' || echo '$(srcdir)/'`$(il_src)/il_states.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_states.Tpo $(DEPDIR)/libIL_la-il_states.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_states.c' object='libIL_la-il_states.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_states.lo `test -f '$(il_src)/il_states.c' || echo '$(srcdir)/'`$(il_src)/il_states.c + +libIL_la-il_convbuff.lo: $(il_src)/il_convbuff.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_convbuff.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_convbuff.Tpo -c -o libIL_la-il_convbuff.lo `test -f '$(il_src)/il_convbuff.c' || echo '$(srcdir)/'`$(il_src)/il_convbuff.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_convbuff.Tpo $(DEPDIR)/libIL_la-il_convbuff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_convbuff.c' object='libIL_la-il_convbuff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_convbuff.lo `test -f '$(il_src)/il_convbuff.c' || echo '$(srcdir)/'`$(il_src)/il_convbuff.c + +libIL_la-il_files.lo: $(il_src)/il_files.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_files.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_files.Tpo -c -o libIL_la-il_files.lo `test -f '$(il_src)/il_files.c' || echo '$(srcdir)/'`$(il_src)/il_files.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_files.Tpo $(DEPDIR)/libIL_la-il_files.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_files.c' object='libIL_la-il_files.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_files.lo `test -f '$(il_src)/il_files.c' || echo '$(srcdir)/'`$(il_src)/il_files.c + +libIL_la-il_main.lo: $(il_src)/il_main.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_main.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_main.Tpo -c -o libIL_la-il_main.lo `test -f '$(il_src)/il_main.c' || echo '$(srcdir)/'`$(il_src)/il_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_main.Tpo $(DEPDIR)/libIL_la-il_main.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_main.c' object='libIL_la-il_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_main.lo `test -f '$(il_src)/il_main.c' || echo '$(srcdir)/'`$(il_src)/il_main.c + +libIL_la-il_pnm.lo: $(il_src)/il_pnm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pnm.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pnm.Tpo -c -o libIL_la-il_pnm.lo `test -f '$(il_src)/il_pnm.c' || echo '$(srcdir)/'`$(il_src)/il_pnm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pnm.Tpo $(DEPDIR)/libIL_la-il_pnm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pnm.c' object='libIL_la-il_pnm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pnm.lo `test -f '$(il_src)/il_pnm.c' || echo '$(srcdir)/'`$(il_src)/il_pnm.c + +libIL_la-il_targa.lo: $(il_src)/il_targa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_targa.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_targa.Tpo -c -o libIL_la-il_targa.lo `test -f '$(il_src)/il_targa.c' || echo '$(srcdir)/'`$(il_src)/il_targa.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_targa.Tpo $(DEPDIR)/libIL_la-il_targa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_targa.c' object='libIL_la-il_targa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_targa.lo `test -f '$(il_src)/il_targa.c' || echo '$(srcdir)/'`$(il_src)/il_targa.c + +libIL_la-il_wdp.lo: $(il_src)/il_wdp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_wdp.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_wdp.Tpo -c -o libIL_la-il_wdp.lo `test -f '$(il_src)/il_wdp.c' || echo '$(srcdir)/'`$(il_src)/il_wdp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_wdp.Tpo $(DEPDIR)/libIL_la-il_wdp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_wdp.c' object='libIL_la-il_wdp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_wdp.lo `test -f '$(il_src)/il_wdp.c' || echo '$(srcdir)/'`$(il_src)/il_wdp.c + +libIL_la-il_convert.lo: $(il_src)/il_convert.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_convert.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_convert.Tpo -c -o libIL_la-il_convert.lo `test -f '$(il_src)/il_convert.c' || echo '$(srcdir)/'`$(il_src)/il_convert.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_convert.Tpo $(DEPDIR)/libIL_la-il_convert.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_convert.c' object='libIL_la-il_convert.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_convert.lo `test -f '$(il_src)/il_convert.c' || echo '$(srcdir)/'`$(il_src)/il_convert.c + +libIL_la-il_gif.lo: $(il_src)/il_gif.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_gif.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_gif.Tpo -c -o libIL_la-il_gif.lo `test -f '$(il_src)/il_gif.c' || echo '$(srcdir)/'`$(il_src)/il_gif.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_gif.Tpo $(DEPDIR)/libIL_la-il_gif.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_gif.c' object='libIL_la-il_gif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_gif.lo `test -f '$(il_src)/il_gif.c' || echo '$(srcdir)/'`$(il_src)/il_gif.c + +libIL_la-il_manip.lo: $(il_src)/il_manip.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_manip.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_manip.Tpo -c -o libIL_la-il_manip.lo `test -f '$(il_src)/il_manip.c' || echo '$(srcdir)/'`$(il_src)/il_manip.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_manip.Tpo $(DEPDIR)/libIL_la-il_manip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_manip.c' object='libIL_la-il_manip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_manip.lo `test -f '$(il_src)/il_manip.c' || echo '$(srcdir)/'`$(il_src)/il_manip.c + +libIL_la-il_profiles.lo: $(il_src)/il_profiles.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_profiles.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_profiles.Tpo -c -o libIL_la-il_profiles.lo `test -f '$(il_src)/il_profiles.c' || echo '$(srcdir)/'`$(il_src)/il_profiles.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_profiles.Tpo $(DEPDIR)/libIL_la-il_profiles.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_profiles.c' object='libIL_la-il_profiles.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_profiles.lo `test -f '$(il_src)/il_profiles.c' || echo '$(srcdir)/'`$(il_src)/il_profiles.c + +libIL_la-il_tiff.lo: $(il_src)/il_tiff.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_tiff.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_tiff.Tpo -c -o libIL_la-il_tiff.lo `test -f '$(il_src)/il_tiff.c' || echo '$(srcdir)/'`$(il_src)/il_tiff.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_tiff.Tpo $(DEPDIR)/libIL_la-il_tiff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_tiff.c' object='libIL_la-il_tiff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_tiff.lo `test -f '$(il_src)/il_tiff.c' || echo '$(srcdir)/'`$(il_src)/il_tiff.c + +libIL_la-il_cut.lo: $(il_src)/il_cut.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_cut.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_cut.Tpo -c -o libIL_la-il_cut.lo `test -f '$(il_src)/il_cut.c' || echo '$(srcdir)/'`$(il_src)/il_cut.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_cut.Tpo $(DEPDIR)/libIL_la-il_cut.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_cut.c' object='libIL_la-il_cut.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_cut.lo `test -f '$(il_src)/il_cut.c' || echo '$(srcdir)/'`$(il_src)/il_cut.c + +libIL_la-il_header.lo: $(il_src)/il_header.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_header.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_header.Tpo -c -o libIL_la-il_header.lo `test -f '$(il_src)/il_header.c' || echo '$(srcdir)/'`$(il_src)/il_header.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_header.Tpo $(DEPDIR)/libIL_la-il_header.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_header.c' object='libIL_la-il_header.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_header.lo `test -f '$(il_src)/il_header.c' || echo '$(srcdir)/'`$(il_src)/il_header.c + +libIL_la-il_mdl.lo: $(il_src)/il_mdl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_mdl.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_mdl.Tpo -c -o libIL_la-il_mdl.lo `test -f '$(il_src)/il_mdl.c' || echo '$(srcdir)/'`$(il_src)/il_mdl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_mdl.Tpo $(DEPDIR)/libIL_la-il_mdl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_mdl.c' object='libIL_la-il_mdl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_mdl.lo `test -f '$(il_src)/il_mdl.c' || echo '$(srcdir)/'`$(il_src)/il_mdl.c + +libIL_la-il_quantizer.lo: $(il_src)/il_quantizer.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_quantizer.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_quantizer.Tpo -c -o libIL_la-il_quantizer.lo `test -f '$(il_src)/il_quantizer.c' || echo '$(srcdir)/'`$(il_src)/il_quantizer.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_quantizer.Tpo $(DEPDIR)/libIL_la-il_quantizer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_quantizer.c' object='libIL_la-il_quantizer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_quantizer.lo `test -f '$(il_src)/il_quantizer.c' || echo '$(srcdir)/'`$(il_src)/il_quantizer.c + +libIL_la-il_utility.lo: $(il_src)/il_utility.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_utility.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_utility.Tpo -c -o libIL_la-il_utility.lo `test -f '$(il_src)/il_utility.c' || echo '$(srcdir)/'`$(il_src)/il_utility.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_utility.Tpo $(DEPDIR)/libIL_la-il_utility.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_utility.c' object='libIL_la-il_utility.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_utility.lo `test -f '$(il_src)/il_utility.c' || echo '$(srcdir)/'`$(il_src)/il_utility.c + +libIL_la-il_dcx.lo: $(il_src)/il_dcx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_dcx.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_dcx.Tpo -c -o libIL_la-il_dcx.lo `test -f '$(il_src)/il_dcx.c' || echo '$(srcdir)/'`$(il_src)/il_dcx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_dcx.Tpo $(DEPDIR)/libIL_la-il_dcx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_dcx.c' object='libIL_la-il_dcx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_dcx.lo `test -f '$(il_src)/il_dcx.c' || echo '$(srcdir)/'`$(il_src)/il_dcx.c + +libIL_la-il_icon.lo: $(il_src)/il_icon.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_icon.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_icon.Tpo -c -o libIL_la-il_icon.lo `test -f '$(il_src)/il_icon.c' || echo '$(srcdir)/'`$(il_src)/il_icon.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_icon.Tpo $(DEPDIR)/libIL_la-il_icon.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_icon.c' object='libIL_la-il_icon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_icon.lo `test -f '$(il_src)/il_icon.c' || echo '$(srcdir)/'`$(il_src)/il_icon.c + +libIL_la-il_mng.lo: $(il_src)/il_mng.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_mng.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_mng.Tpo -c -o libIL_la-il_mng.lo `test -f '$(il_src)/il_mng.c' || echo '$(srcdir)/'`$(il_src)/il_mng.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_mng.Tpo $(DEPDIR)/libIL_la-il_mng.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_mng.c' object='libIL_la-il_mng.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_mng.lo `test -f '$(il_src)/il_mng.c' || echo '$(srcdir)/'`$(il_src)/il_mng.c + +libIL_la-il_raw.lo: $(il_src)/il_raw.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_raw.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_raw.Tpo -c -o libIL_la-il_raw.lo `test -f '$(il_src)/il_raw.c' || echo '$(srcdir)/'`$(il_src)/il_raw.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_raw.Tpo $(DEPDIR)/libIL_la-il_raw.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_raw.c' object='libIL_la-il_raw.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_raw.lo `test -f '$(il_src)/il_raw.c' || echo '$(srcdir)/'`$(il_src)/il_raw.c + +libIL_la-il_wal.lo: $(il_src)/il_wal.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_wal.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_wal.Tpo -c -o libIL_la-il_wal.lo `test -f '$(il_src)/il_wal.c' || echo '$(srcdir)/'`$(il_src)/il_wal.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_wal.Tpo $(DEPDIR)/libIL_la-il_wal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_wal.c' object='libIL_la-il_wal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_wal.lo `test -f '$(il_src)/il_wal.c' || echo '$(srcdir)/'`$(il_src)/il_wal.c + +libIL_la-il_dds.lo: $(il_src)/il_dds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_dds.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_dds.Tpo -c -o libIL_la-il_dds.lo `test -f '$(il_src)/il_dds.c' || echo '$(srcdir)/'`$(il_src)/il_dds.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_dds.Tpo $(DEPDIR)/libIL_la-il_dds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_dds.c' object='libIL_la-il_dds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_dds.lo `test -f '$(il_src)/il_dds.c' || echo '$(srcdir)/'`$(il_src)/il_dds.c + +libIL_la-il_internal.lo: $(il_src)/il_internal.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_internal.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_internal.Tpo -c -o libIL_la-il_internal.lo `test -f '$(il_src)/il_internal.c' || echo '$(srcdir)/'`$(il_src)/il_internal.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_internal.Tpo $(DEPDIR)/libIL_la-il_internal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_internal.c' object='libIL_la-il_internal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_internal.lo `test -f '$(il_src)/il_internal.c' || echo '$(srcdir)/'`$(il_src)/il_internal.c + +libIL_la-il_pal.lo: $(il_src)/il_pal.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pal.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pal.Tpo -c -o libIL_la-il_pal.lo `test -f '$(il_src)/il_pal.c' || echo '$(srcdir)/'`$(il_src)/il_pal.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pal.Tpo $(DEPDIR)/libIL_la-il_pal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pal.c' object='libIL_la-il_pal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pal.lo `test -f '$(il_src)/il_pal.c' || echo '$(srcdir)/'`$(il_src)/il_pal.c + +libIL_la-il_rawdata.lo: $(il_src)/il_rawdata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_rawdata.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_rawdata.Tpo -c -o libIL_la-il_rawdata.lo `test -f '$(il_src)/il_rawdata.c' || echo '$(srcdir)/'`$(il_src)/il_rawdata.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_rawdata.Tpo $(DEPDIR)/libIL_la-il_rawdata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_rawdata.c' object='libIL_la-il_rawdata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_rawdata.lo `test -f '$(il_src)/il_rawdata.c' || echo '$(srcdir)/'`$(il_src)/il_rawdata.c + +libIL_la-il_devil.lo: $(il_src)/il_devil.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_devil.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_devil.Tpo -c -o libIL_la-il_devil.lo `test -f '$(il_src)/il_devil.c' || echo '$(srcdir)/'`$(il_src)/il_devil.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_devil.Tpo $(DEPDIR)/libIL_la-il_devil.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_devil.c' object='libIL_la-il_devil.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_devil.lo `test -f '$(il_src)/il_devil.c' || echo '$(srcdir)/'`$(il_src)/il_devil.c + +libIL_la-il_io.lo: $(il_src)/il_io.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_io.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_io.Tpo -c -o libIL_la-il_io.lo `test -f '$(il_src)/il_io.c' || echo '$(srcdir)/'`$(il_src)/il_io.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_io.Tpo $(DEPDIR)/libIL_la-il_io.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_io.c' object='libIL_la-il_io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_io.lo `test -f '$(il_src)/il_io.c' || echo '$(srcdir)/'`$(il_src)/il_io.c + +libIL_la-il_pcd.lo: $(il_src)/il_pcd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pcd.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pcd.Tpo -c -o libIL_la-il_pcd.lo `test -f '$(il_src)/il_pcd.c' || echo '$(srcdir)/'`$(il_src)/il_pcd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pcd.Tpo $(DEPDIR)/libIL_la-il_pcd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pcd.c' object='libIL_la-il_pcd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pcd.lo `test -f '$(il_src)/il_pcd.c' || echo '$(srcdir)/'`$(il_src)/il_pcd.c + +libIL_la-il_register.lo: $(il_src)/il_register.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_register.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_register.Tpo -c -o libIL_la-il_register.lo `test -f '$(il_src)/il_register.c' || echo '$(srcdir)/'`$(il_src)/il_register.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_register.Tpo $(DEPDIR)/libIL_la-il_register.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_register.c' object='libIL_la-il_register.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_register.lo `test -f '$(il_src)/il_register.c' || echo '$(srcdir)/'`$(il_src)/il_register.c + +libIL_la-il_psd.lo: $(il_src)/il_psd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_psd.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_psd.Tpo -c -o libIL_la-il_psd.lo `test -f '$(il_src)/il_psd.c' || echo '$(srcdir)/'`$(il_src)/il_psd.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_psd.Tpo $(DEPDIR)/libIL_la-il_psd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_psd.c' object='libIL_la-il_psd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_psd.lo `test -f '$(il_src)/il_psd.c' || echo '$(srcdir)/'`$(il_src)/il_psd.c + +libIL_la-il_fastconv.lo: $(il_src)/il_fastconv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_fastconv.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_fastconv.Tpo -c -o libIL_la-il_fastconv.lo `test -f '$(il_src)/il_fastconv.c' || echo '$(srcdir)/'`$(il_src)/il_fastconv.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_fastconv.Tpo $(DEPDIR)/libIL_la-il_fastconv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_fastconv.c' object='libIL_la-il_fastconv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_fastconv.lo `test -f '$(il_src)/il_fastconv.c' || echo '$(srcdir)/'`$(il_src)/il_fastconv.c + +libIL_la-il_neuquant.lo: $(il_src)/il_neuquant.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_neuquant.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_neuquant.Tpo -c -o libIL_la-il_neuquant.lo `test -f '$(il_src)/il_neuquant.c' || echo '$(srcdir)/'`$(il_src)/il_neuquant.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_neuquant.Tpo $(DEPDIR)/libIL_la-il_neuquant.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_neuquant.c' object='libIL_la-il_neuquant.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_neuquant.lo `test -f '$(il_src)/il_neuquant.c' || echo '$(srcdir)/'`$(il_src)/il_neuquant.c + +libIL_la-il_dds-save.lo: $(il_src)/il_dds-save.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_dds-save.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_dds-save.Tpo -c -o libIL_la-il_dds-save.lo `test -f '$(il_src)/il_dds-save.c' || echo '$(srcdir)/'`$(il_src)/il_dds-save.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_dds-save.Tpo $(DEPDIR)/libIL_la-il_dds-save.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_dds-save.c' object='libIL_la-il_dds-save.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_dds-save.lo `test -f '$(il_src)/il_dds-save.c' || echo '$(srcdir)/'`$(il_src)/il_dds-save.c + +libIL_la-il_psp.lo: $(il_src)/il_psp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_psp.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_psp.Tpo -c -o libIL_la-il_psp.lo `test -f '$(il_src)/il_psp.c' || echo '$(srcdir)/'`$(il_src)/il_psp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_psp.Tpo $(DEPDIR)/libIL_la-il_psp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_psp.c' object='libIL_la-il_psp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_psp.lo `test -f '$(il_src)/il_psp.c' || echo '$(srcdir)/'`$(il_src)/il_psp.c + +libIL_la-il_pix.lo: $(il_src)/il_pix.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pix.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pix.Tpo -c -o libIL_la-il_pix.lo `test -f '$(il_src)/il_pix.c' || echo '$(srcdir)/'`$(il_src)/il_pix.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pix.Tpo $(DEPDIR)/libIL_la-il_pix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pix.c' object='libIL_la-il_pix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pix.lo `test -f '$(il_src)/il_pix.c' || echo '$(srcdir)/'`$(il_src)/il_pix.c + +libIL_la-il_pxr.lo: $(il_src)/il_pxr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_pxr.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_pxr.Tpo -c -o libIL_la-il_pxr.lo `test -f '$(il_src)/il_pxr.c' || echo '$(srcdir)/'`$(il_src)/il_pxr.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_pxr.Tpo $(DEPDIR)/libIL_la-il_pxr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_pxr.c' object='libIL_la-il_pxr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_pxr.lo `test -f '$(il_src)/il_pxr.c' || echo '$(srcdir)/'`$(il_src)/il_pxr.c + +libIL_la-il_vtf.lo: $(il_src)/il_vtf.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_vtf.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_vtf.Tpo -c -o libIL_la-il_vtf.lo `test -f '$(il_src)/il_vtf.c' || echo '$(srcdir)/'`$(il_src)/il_vtf.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_vtf.Tpo $(DEPDIR)/libIL_la-il_vtf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_vtf.c' object='libIL_la-il_vtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_vtf.lo `test -f '$(il_src)/il_vtf.c' || echo '$(srcdir)/'`$(il_src)/il_vtf.c + +libIL_la-il_xpm.lo: $(il_src)/il_xpm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_xpm.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_xpm.Tpo -c -o libIL_la-il_xpm.lo `test -f '$(il_src)/il_xpm.c' || echo '$(srcdir)/'`$(il_src)/il_xpm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_xpm.Tpo $(DEPDIR)/libIL_la-il_xpm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_xpm.c' object='libIL_la-il_xpm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_xpm.lo `test -f '$(il_src)/il_xpm.c' || echo '$(srcdir)/'`$(il_src)/il_xpm.c + +libIL_la-il_hdr.lo: $(il_src)/il_hdr.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_hdr.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_hdr.Tpo -c -o libIL_la-il_hdr.lo `test -f '$(il_src)/il_hdr.c' || echo '$(srcdir)/'`$(il_src)/il_hdr.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_hdr.Tpo $(DEPDIR)/libIL_la-il_hdr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_hdr.c' object='libIL_la-il_hdr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_hdr.lo `test -f '$(il_src)/il_hdr.c' || echo '$(srcdir)/'`$(il_src)/il_hdr.c + +libIL_la-il_icns.lo: $(il_src)/il_icns.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_icns.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_icns.Tpo -c -o libIL_la-il_icns.lo `test -f '$(il_src)/il_icns.c' || echo '$(srcdir)/'`$(il_src)/il_icns.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_icns.Tpo $(DEPDIR)/libIL_la-il_icns.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_icns.c' object='libIL_la-il_icns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_icns.lo `test -f '$(il_src)/il_icns.c' || echo '$(srcdir)/'`$(il_src)/il_icns.c + +libIL_la-il_jp2.lo: $(il_src)/il_jp2.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_jp2.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_jp2.Tpo -c -o libIL_la-il_jp2.lo `test -f '$(il_src)/il_jp2.c' || echo '$(srcdir)/'`$(il_src)/il_jp2.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_jp2.Tpo $(DEPDIR)/libIL_la-il_jp2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_jp2.c' object='libIL_la-il_jp2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_jp2.lo `test -f '$(il_src)/il_jp2.c' || echo '$(srcdir)/'`$(il_src)/il_jp2.c + +libIL_la-altivec_common.lo: $(il_src)/altivec_common.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-altivec_common.lo -MD -MP -MF $(DEPDIR)/libIL_la-altivec_common.Tpo -c -o libIL_la-altivec_common.lo `test -f '$(il_src)/altivec_common.c' || echo '$(srcdir)/'`$(il_src)/altivec_common.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-altivec_common.Tpo $(DEPDIR)/libIL_la-altivec_common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/altivec_common.c' object='libIL_la-altivec_common.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-altivec_common.lo `test -f '$(il_src)/altivec_common.c' || echo '$(srcdir)/'`$(il_src)/altivec_common.c + +libIL_la-altivec_typeconversion.lo: $(il_src)/altivec_typeconversion.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-altivec_typeconversion.lo -MD -MP -MF $(DEPDIR)/libIL_la-altivec_typeconversion.Tpo -c -o libIL_la-altivec_typeconversion.lo `test -f '$(il_src)/altivec_typeconversion.c' || echo '$(srcdir)/'`$(il_src)/altivec_typeconversion.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-altivec_typeconversion.Tpo $(DEPDIR)/libIL_la-altivec_typeconversion.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/altivec_typeconversion.c' object='libIL_la-altivec_typeconversion.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-altivec_typeconversion.lo `test -f '$(il_src)/altivec_typeconversion.c' || echo '$(srcdir)/'`$(il_src)/altivec_typeconversion.c + +libIL_la-il_sun.lo: $(il_src)/il_sun.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_sun.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_sun.Tpo -c -o libIL_la-il_sun.lo `test -f '$(il_src)/il_sun.c' || echo '$(srcdir)/'`$(il_src)/il_sun.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_sun.Tpo $(DEPDIR)/libIL_la-il_sun.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_sun.c' object='libIL_la-il_sun.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_sun.lo `test -f '$(il_src)/il_sun.c' || echo '$(srcdir)/'`$(il_src)/il_sun.c + +libIL_la-il_wbmp.lo: $(il_src)/il_wbmp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_wbmp.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_wbmp.Tpo -c -o libIL_la-il_wbmp.lo `test -f '$(il_src)/il_wbmp.c' || echo '$(srcdir)/'`$(il_src)/il_wbmp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_wbmp.Tpo $(DEPDIR)/libIL_la-il_wbmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_wbmp.c' object='libIL_la-il_wbmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_wbmp.lo `test -f '$(il_src)/il_wbmp.c' || echo '$(srcdir)/'`$(il_src)/il_wbmp.c + +libIL_la-il_iff.lo: $(il_src)/il_iff.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_iff.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_iff.Tpo -c -o libIL_la-il_iff.lo `test -f '$(il_src)/il_iff.c' || echo '$(srcdir)/'`$(il_src)/il_iff.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_iff.Tpo $(DEPDIR)/libIL_la-il_iff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_iff.c' object='libIL_la-il_iff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_iff.lo `test -f '$(il_src)/il_iff.c' || echo '$(srcdir)/'`$(il_src)/il_iff.c + +libIL_la-il_ilbm.lo: $(il_src)/il_ilbm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_ilbm.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_ilbm.Tpo -c -o libIL_la-il_ilbm.lo `test -f '$(il_src)/il_ilbm.c' || echo '$(srcdir)/'`$(il_src)/il_ilbm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_ilbm.Tpo $(DEPDIR)/libIL_la-il_ilbm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_ilbm.c' object='libIL_la-il_ilbm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_ilbm.lo `test -f '$(il_src)/il_ilbm.c' || echo '$(srcdir)/'`$(il_src)/il_ilbm.c + +libIL_la-il_size.lo: $(il_src)/il_size.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_size.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_size.Tpo -c -o libIL_la-il_size.lo `test -f '$(il_src)/il_size.c' || echo '$(srcdir)/'`$(il_src)/il_size.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_size.Tpo $(DEPDIR)/libIL_la-il_size.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_size.c' object='libIL_la-il_size.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_size.lo `test -f '$(il_src)/il_size.c' || echo '$(srcdir)/'`$(il_src)/il_size.c + +libIL_la-il_tpl.lo: $(il_src)/il_tpl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_tpl.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_tpl.Tpo -c -o libIL_la-il_tpl.lo `test -f '$(il_src)/il_tpl.c' || echo '$(srcdir)/'`$(il_src)/il_tpl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_tpl.Tpo $(DEPDIR)/libIL_la-il_tpl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_tpl.c' object='libIL_la-il_tpl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_tpl.lo `test -f '$(il_src)/il_tpl.c' || echo '$(srcdir)/'`$(il_src)/il_tpl.c + +libIL_la-il_fits.lo: $(il_src)/il_fits.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_fits.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_fits.Tpo -c -o libIL_la-il_fits.lo `test -f '$(il_src)/il_fits.c' || echo '$(srcdir)/'`$(il_src)/il_fits.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_fits.Tpo $(DEPDIR)/libIL_la-il_fits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_fits.c' object='libIL_la-il_fits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_fits.lo `test -f '$(il_src)/il_fits.c' || echo '$(srcdir)/'`$(il_src)/il_fits.c + +libIL_la-il_iwi.lo: $(il_src)/il_iwi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_iwi.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_iwi.Tpo -c -o libIL_la-il_iwi.lo `test -f '$(il_src)/il_iwi.c' || echo '$(srcdir)/'`$(il_src)/il_iwi.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_iwi.Tpo $(DEPDIR)/libIL_la-il_iwi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_iwi.c' object='libIL_la-il_iwi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_iwi.lo `test -f '$(il_src)/il_iwi.c' || echo '$(srcdir)/'`$(il_src)/il_iwi.c + +libIL_la-il_blp.lo: $(il_src)/il_blp.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_blp.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_blp.Tpo -c -o libIL_la-il_blp.lo `test -f '$(il_src)/il_blp.c' || echo '$(srcdir)/'`$(il_src)/il_blp.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_blp.Tpo $(DEPDIR)/libIL_la-il_blp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_blp.c' object='libIL_la-il_blp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_blp.lo `test -f '$(il_src)/il_blp.c' || echo '$(srcdir)/'`$(il_src)/il_blp.c + +libIL_la-il_ftx.lo: $(il_src)/il_ftx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_ftx.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_ftx.Tpo -c -o libIL_la-il_ftx.lo `test -f '$(il_src)/il_ftx.c' || echo '$(srcdir)/'`$(il_src)/il_ftx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_ftx.Tpo $(DEPDIR)/libIL_la-il_ftx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_ftx.c' object='libIL_la-il_ftx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_ftx.lo `test -f '$(il_src)/il_ftx.c' || echo '$(srcdir)/'`$(il_src)/il_ftx.c + +libIL_la-il_dicom.lo: $(il_src)/il_dicom.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_dicom.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_dicom.Tpo -c -o libIL_la-il_dicom.lo `test -f '$(il_src)/il_dicom.c' || echo '$(srcdir)/'`$(il_src)/il_dicom.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_dicom.Tpo $(DEPDIR)/libIL_la-il_dicom.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_dicom.c' object='libIL_la-il_dicom.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_dicom.lo `test -f '$(il_src)/il_dicom.c' || echo '$(srcdir)/'`$(il_src)/il_dicom.c + +libIL_la-il_rot.lo: $(il_src)/il_rot.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_rot.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_rot.Tpo -c -o libIL_la-il_rot.lo `test -f '$(il_src)/il_rot.c' || echo '$(srcdir)/'`$(il_src)/il_rot.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_rot.Tpo $(DEPDIR)/libIL_la-il_rot.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_rot.c' object='libIL_la-il_rot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_rot.lo `test -f '$(il_src)/il_rot.c' || echo '$(srcdir)/'`$(il_src)/il_rot.c + +libIL_la-il_texture.lo: $(il_src)/il_texture.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_texture.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_texture.Tpo -c -o libIL_la-il_texture.lo `test -f '$(il_src)/il_texture.c' || echo '$(srcdir)/'`$(il_src)/il_texture.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_texture.Tpo $(DEPDIR)/libIL_la-il_texture.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_texture.c' object='libIL_la-il_texture.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_texture.lo `test -f '$(il_src)/il_texture.c' || echo '$(srcdir)/'`$(il_src)/il_texture.c + +libIL_la-il_dpx.lo: $(il_src)/il_dpx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_dpx.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_dpx.Tpo -c -o libIL_la-il_dpx.lo `test -f '$(il_src)/il_dpx.c' || echo '$(srcdir)/'`$(il_src)/il_dpx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_dpx.Tpo $(DEPDIR)/libIL_la-il_dpx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_dpx.c' object='libIL_la-il_dpx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_dpx.lo `test -f '$(il_src)/il_dpx.c' || echo '$(srcdir)/'`$(il_src)/il_dpx.c + +libIL_la-il_mp3.lo: $(il_src)/il_mp3.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -MT libIL_la-il_mp3.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_mp3.Tpo -c -o libIL_la-il_mp3.lo `test -f '$(il_src)/il_mp3.c' || echo '$(srcdir)/'`$(il_src)/il_mp3.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libIL_la-il_mp3.Tpo $(DEPDIR)/libIL_la-il_mp3.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(il_src)/il_mp3.c' object='libIL_la-il_mp3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CFLAGS) $(CFLAGS) -c -o libIL_la-il_mp3.lo `test -f '$(il_src)/il_mp3.c' || echo '$(srcdir)/'`$(il_src)/il_mp3.c + +libILU_la-ilu_alloc.lo: $(ilu_src)/ilu_alloc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_alloc.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_alloc.Tpo -c -o libILU_la-ilu_alloc.lo `test -f '$(ilu_src)/ilu_alloc.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_alloc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_alloc.Tpo $(DEPDIR)/libILU_la-ilu_alloc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_alloc.c' object='libILU_la-ilu_alloc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_alloc.lo `test -f '$(ilu_src)/ilu_alloc.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_alloc.c + +libILU_la-ilu_internal.lo: $(ilu_src)/ilu_internal.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_internal.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_internal.Tpo -c -o libILU_la-ilu_internal.lo `test -f '$(ilu_src)/ilu_internal.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_internal.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_internal.Tpo $(DEPDIR)/libILU_la-ilu_internal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_internal.c' object='libILU_la-ilu_internal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_internal.lo `test -f '$(ilu_src)/ilu_internal.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_internal.c + +libILU_la-ilu_noise.lo: $(ilu_src)/ilu_noise.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_noise.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_noise.Tpo -c -o libILU_la-ilu_noise.lo `test -f '$(ilu_src)/ilu_noise.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_noise.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_noise.Tpo $(DEPDIR)/libILU_la-ilu_noise.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_noise.c' object='libILU_la-ilu_noise.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_noise.lo `test -f '$(ilu_src)/ilu_noise.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_noise.c + +libILU_la-ilu_scale.lo: $(ilu_src)/ilu_scale.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_scale.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_scale.Tpo -c -o libILU_la-ilu_scale.lo `test -f '$(ilu_src)/ilu_scale.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_scale.Tpo $(DEPDIR)/libILU_la-ilu_scale.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_scale.c' object='libILU_la-ilu_scale.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_scale.lo `test -f '$(ilu_src)/ilu_scale.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale.c + +libILU_la-ilu_error.lo: $(ilu_src)/ilu_error.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_error.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_error.Tpo -c -o libILU_la-ilu_error.lo `test -f '$(ilu_src)/ilu_error.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_error.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_error.Tpo $(DEPDIR)/libILU_la-ilu_error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_error.c' object='libILU_la-ilu_error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_error.lo `test -f '$(ilu_src)/ilu_error.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_error.c + +libILU_la-ilu_main.lo: $(ilu_src)/ilu_main.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_main.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_main.Tpo -c -o libILU_la-ilu_main.lo `test -f '$(ilu_src)/ilu_main.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_main.Tpo $(DEPDIR)/libILU_la-ilu_main.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_main.c' object='libILU_la-ilu_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_main.lo `test -f '$(ilu_src)/ilu_main.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_main.c + +libILU_la-ilu_rotate.lo: $(ilu_src)/ilu_rotate.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_rotate.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_rotate.Tpo -c -o libILU_la-ilu_rotate.lo `test -f '$(ilu_src)/ilu_rotate.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_rotate.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_rotate.Tpo $(DEPDIR)/libILU_la-ilu_rotate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_rotate.c' object='libILU_la-ilu_rotate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_rotate.lo `test -f '$(ilu_src)/ilu_rotate.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_rotate.c + +libILU_la-ilu_scaling.lo: $(ilu_src)/ilu_scaling.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_scaling.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_scaling.Tpo -c -o libILU_la-ilu_scaling.lo `test -f '$(ilu_src)/ilu_scaling.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scaling.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_scaling.Tpo $(DEPDIR)/libILU_la-ilu_scaling.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_scaling.c' object='libILU_la-ilu_scaling.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_scaling.lo `test -f '$(ilu_src)/ilu_scaling.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scaling.c + +libILU_la-ilu_filter.lo: $(ilu_src)/ilu_filter.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_filter.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_filter.Tpo -c -o libILU_la-ilu_filter.lo `test -f '$(ilu_src)/ilu_filter.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_filter.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_filter.Tpo $(DEPDIR)/libILU_la-ilu_filter.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_filter.c' object='libILU_la-ilu_filter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_filter.lo `test -f '$(ilu_src)/ilu_filter.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_filter.c + +libILU_la-ilu_manip.lo: $(ilu_src)/ilu_manip.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_manip.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_manip.Tpo -c -o libILU_la-ilu_manip.lo `test -f '$(ilu_src)/ilu_manip.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_manip.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_manip.Tpo $(DEPDIR)/libILU_la-ilu_manip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_manip.c' object='libILU_la-ilu_manip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_manip.lo `test -f '$(ilu_src)/ilu_manip.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_manip.c + +libILU_la-ilu_scale2d.lo: $(ilu_src)/ilu_scale2d.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_scale2d.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_scale2d.Tpo -c -o libILU_la-ilu_scale2d.lo `test -f '$(ilu_src)/ilu_scale2d.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale2d.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_scale2d.Tpo $(DEPDIR)/libILU_la-ilu_scale2d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_scale2d.c' object='libILU_la-ilu_scale2d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_scale2d.lo `test -f '$(ilu_src)/ilu_scale2d.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale2d.c + +libILU_la-ilu_states.lo: $(ilu_src)/ilu_states.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_states.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_states.Tpo -c -o libILU_la-ilu_states.lo `test -f '$(ilu_src)/ilu_states.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_states.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_states.Tpo $(DEPDIR)/libILU_la-ilu_states.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_states.c' object='libILU_la-ilu_states.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_states.lo `test -f '$(ilu_src)/ilu_states.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_states.c + +libILU_la-ilu_filter_rcg.lo: $(ilu_src)/ilu_filter_rcg.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_filter_rcg.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_filter_rcg.Tpo -c -o libILU_la-ilu_filter_rcg.lo `test -f '$(ilu_src)/ilu_filter_rcg.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_filter_rcg.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_filter_rcg.Tpo $(DEPDIR)/libILU_la-ilu_filter_rcg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_filter_rcg.c' object='libILU_la-ilu_filter_rcg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_filter_rcg.lo `test -f '$(ilu_src)/ilu_filter_rcg.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_filter_rcg.c + +libILU_la-ilu_mipmap.lo: $(ilu_src)/ilu_mipmap.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_mipmap.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_mipmap.Tpo -c -o libILU_la-ilu_mipmap.lo `test -f '$(ilu_src)/ilu_mipmap.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_mipmap.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_mipmap.Tpo $(DEPDIR)/libILU_la-ilu_mipmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_mipmap.c' object='libILU_la-ilu_mipmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_mipmap.lo `test -f '$(ilu_src)/ilu_mipmap.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_mipmap.c + +libILU_la-ilu_scale3d.lo: $(ilu_src)/ilu_scale3d.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_scale3d.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_scale3d.Tpo -c -o libILU_la-ilu_scale3d.lo `test -f '$(ilu_src)/ilu_scale3d.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale3d.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_scale3d.Tpo $(DEPDIR)/libILU_la-ilu_scale3d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_scale3d.c' object='libILU_la-ilu_scale3d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_scale3d.lo `test -f '$(ilu_src)/ilu_scale3d.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_scale3d.c + +libILU_la-ilu_utilities.lo: $(ilu_src)/ilu_utilities.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_utilities.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_utilities.Tpo -c -o libILU_la-ilu_utilities.lo `test -f '$(ilu_src)/ilu_utilities.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_utilities.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_utilities.Tpo $(DEPDIR)/libILU_la-ilu_utilities.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_utilities.c' object='libILU_la-ilu_utilities.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_utilities.lo `test -f '$(ilu_src)/ilu_utilities.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_utilities.c + +libILU_la-ilu_region.lo: $(ilu_src)/ilu_region.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -MT libILU_la-ilu_region.lo -MD -MP -MF $(DEPDIR)/libILU_la-ilu_region.Tpo -c -o libILU_la-ilu_region.lo `test -f '$(ilu_src)/ilu_region.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_region.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILU_la-ilu_region.Tpo $(DEPDIR)/libILU_la-ilu_region.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilu_src)/ilu_region.c' object='libILU_la-ilu_region.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILU_la_CPPFLAGS) $(CPPFLAGS) $(libILU_la_CFLAGS) $(CFLAGS) -c -o libILU_la-ilu_region.lo `test -f '$(ilu_src)/ilu_region.c' || echo '$(srcdir)/'`$(ilu_src)/ilu_region.c + +libILUT_la-ilut_main.lo: $(ilut_src)/ilut_main.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_main.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_main.Tpo -c -o libILUT_la-ilut_main.lo `test -f '$(ilut_src)/ilut_main.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_main.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_main.Tpo $(DEPDIR)/libILUT_la-ilut_main.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_main.c' object='libILUT_la-ilut_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_main.lo `test -f '$(ilut_src)/ilut_main.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_main.c + +libILUT_la-ilut_states.lo: $(ilut_src)/ilut_states.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_states.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_states.Tpo -c -o libILUT_la-ilut_states.lo `test -f '$(ilut_src)/ilut_states.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_states.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_states.Tpo $(DEPDIR)/libILUT_la-ilut_states.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_states.c' object='libILUT_la-ilut_states.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_states.lo `test -f '$(ilut_src)/ilut_states.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_states.c + +libILUT_la-ilut_internal.lo: $(ilut_src)/ilut_internal.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_internal.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_internal.Tpo -c -o libILUT_la-ilut_internal.lo `test -f '$(ilut_src)/ilut_internal.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_internal.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_internal.Tpo $(DEPDIR)/libILUT_la-ilut_internal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_internal.c' object='libILUT_la-ilut_internal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_internal.lo `test -f '$(ilut_src)/ilut_internal.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_internal.c + +libILUT_la-ilut_allegro.lo: $(ilut_src)/ilut_allegro.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_allegro.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_allegro.Tpo -c -o libILUT_la-ilut_allegro.lo `test -f '$(ilut_src)/ilut_allegro.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_allegro.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_allegro.Tpo $(DEPDIR)/libILUT_la-ilut_allegro.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_allegro.c' object='libILUT_la-ilut_allegro.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_allegro.lo `test -f '$(ilut_src)/ilut_allegro.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_allegro.c + +libILUT_la-ilut_directx.lo: $(ilut_src)/ilut_directx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_directx.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_directx.Tpo -c -o libILUT_la-ilut_directx.lo `test -f '$(ilut_src)/ilut_directx.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_directx.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_directx.Tpo $(DEPDIR)/libILUT_la-ilut_directx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_directx.c' object='libILUT_la-ilut_directx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_directx.lo `test -f '$(ilut_src)/ilut_directx.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_directx.c + +libILUT_la-ilut_directx9.lo: $(ilut_src)/ilut_directx9.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_directx9.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_directx9.Tpo -c -o libILUT_la-ilut_directx9.lo `test -f '$(ilut_src)/ilut_directx9.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_directx9.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_directx9.Tpo $(DEPDIR)/libILUT_la-ilut_directx9.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_directx9.c' object='libILUT_la-ilut_directx9.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_directx9.lo `test -f '$(ilut_src)/ilut_directx9.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_directx9.c + +libILUT_la-ilut_sdlsurface.lo: $(ilut_src)/ilut_sdlsurface.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_sdlsurface.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_sdlsurface.Tpo -c -o libILUT_la-ilut_sdlsurface.lo `test -f '$(ilut_src)/ilut_sdlsurface.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_sdlsurface.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_sdlsurface.Tpo $(DEPDIR)/libILUT_la-ilut_sdlsurface.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_sdlsurface.c' object='libILUT_la-ilut_sdlsurface.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_sdlsurface.lo `test -f '$(ilut_src)/ilut_sdlsurface.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_sdlsurface.c + +libILUT_la-ilut_opengl.lo: $(ilut_src)/ilut_opengl.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_opengl.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_opengl.Tpo -c -o libILUT_la-ilut_opengl.lo `test -f '$(ilut_src)/ilut_opengl.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_opengl.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_opengl.Tpo $(DEPDIR)/libILUT_la-ilut_opengl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_opengl.c' object='libILUT_la-ilut_opengl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_opengl.lo `test -f '$(ilut_src)/ilut_opengl.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_opengl.c + +libILUT_la-ilut_x11.lo: $(ilut_src)/ilut_x11.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_x11.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_x11.Tpo -c -o libILUT_la-ilut_x11.lo `test -f '$(ilut_src)/ilut_x11.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_x11.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_x11.Tpo $(DEPDIR)/libILUT_la-ilut_x11.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_x11.c' object='libILUT_la-ilut_x11.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_x11.lo `test -f '$(ilut_src)/ilut_x11.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_x11.c + +libILUT_la-ilut_win32.lo: $(ilut_src)/ilut_win32.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -MT libILUT_la-ilut_win32.lo -MD -MP -MF $(DEPDIR)/libILUT_la-ilut_win32.Tpo -c -o libILUT_la-ilut_win32.lo `test -f '$(ilut_src)/ilut_win32.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_win32.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libILUT_la-ilut_win32.Tpo $(DEPDIR)/libILUT_la-ilut_win32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(ilut_src)/ilut_win32.c' object='libILUT_la-ilut_win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libILUT_la_CPPFLAGS) $(CPPFLAGS) $(libILUT_la_CFLAGS) $(CFLAGS) -c -o libILUT_la-ilut_win32.lo `test -f '$(ilut_src)/ilut_win32.c' || echo '$(srcdir)/'`$(ilut_src)/ilut_win32.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +libIL_la-il_exr.lo: $(il_src)/il_exr.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -MT libIL_la-il_exr.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_exr.Tpo -c -o libIL_la-il_exr.lo `test -f '$(il_src)/il_exr.cpp' || echo '$(srcdir)/'`$(il_src)/il_exr.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libIL_la-il_exr.Tpo $(DEPDIR)/libIL_la-il_exr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(il_src)/il_exr.cpp' object='libIL_la-il_exr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -c -o libIL_la-il_exr.lo `test -f '$(il_src)/il_exr.cpp' || echo '$(srcdir)/'`$(il_src)/il_exr.cpp + +libIL_la-il_nvidia.lo: $(il_src)/il_nvidia.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -MT libIL_la-il_nvidia.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_nvidia.Tpo -c -o libIL_la-il_nvidia.lo `test -f '$(il_src)/il_nvidia.cpp' || echo '$(srcdir)/'`$(il_src)/il_nvidia.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libIL_la-il_nvidia.Tpo $(DEPDIR)/libIL_la-il_nvidia.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(il_src)/il_nvidia.cpp' object='libIL_la-il_nvidia.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -c -o libIL_la-il_nvidia.lo `test -f '$(il_src)/il_nvidia.cpp' || echo '$(srcdir)/'`$(il_src)/il_nvidia.cpp + +libIL_la-il_squish.lo: $(il_src)/il_squish.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -MT libIL_la-il_squish.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_squish.Tpo -c -o libIL_la-il_squish.lo `test -f '$(il_src)/il_squish.cpp' || echo '$(srcdir)/'`$(il_src)/il_squish.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libIL_la-il_squish.Tpo $(DEPDIR)/libIL_la-il_squish.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(il_src)/il_squish.cpp' object='libIL_la-il_squish.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -c -o libIL_la-il_squish.lo `test -f '$(il_src)/il_squish.cpp' || echo '$(srcdir)/'`$(il_src)/il_squish.cpp + +libIL_la-il_utx.lo: $(il_src)/il_utx.cpp +@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -MT libIL_la-il_utx.lo -MD -MP -MF $(DEPDIR)/libIL_la-il_utx.Tpo -c -o libIL_la-il_utx.lo `test -f '$(il_src)/il_utx.cpp' || echo '$(srcdir)/'`$(il_src)/il_utx.cpp +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libIL_la-il_utx.Tpo $(DEPDIR)/libIL_la-il_utx.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(il_src)/il_utx.cpp' object='libIL_la-il_utx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libIL_la_CPPFLAGS) $(CPPFLAGS) $(libIL_la_CXXFLAGS) $(CXXFLAGS) -c -o libIL_la-il_utx.lo `test -f '$(il_src)/il_utx.cpp' || echo '$(srcdir)/'`$(il_src)/il_utx.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ilHEADERS: $(il_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(ildir)" || $(MKDIR_P) "$(DESTDIR)$(ildir)" + @list='$(il_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(ilHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(ildir)/$$f'"; \ + $(ilHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(ildir)/$$f"; \ + done + +uninstall-ilHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(il_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(ildir)/$$f'"; \ + rm -f "$(DESTDIR)$(ildir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ildir)"; 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) + +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 + +info: info-am + +info-am: + +install-data-am: install-ilHEADERS + +install-dvi: install-dvi-am + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: 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-ilHEADERS uninstall-libLTLIBRARIES + +.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-ilHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-ilHEADERS \ + uninstall-libLTLIBRARIES + +# 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/libs/DevIL-1.7.8/ltmain.sh b/libs/DevIL-1.7.8/ltmain.sh new file mode 100644 index 00000000..e420facf --- /dev/null +++ b/libs/DevIL-1.7.8/ltmain.sh @@ -0,0 +1,6964 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 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. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.26 Debian 1.5.26-1ubuntu1" +TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" + +# Be Bourne compatible (taken from Autoconf:_AS_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 + +# 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 <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# 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 "$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" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# 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 () +{ + 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 -e '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_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 () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + 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 + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run 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 + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + 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 + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + 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" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + 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 have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + 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}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $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" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 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." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.[fF][09]?) xform=[fF][09]. ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + *.sx) xform=sx ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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 + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + 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" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + 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 $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "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." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </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." + + $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 + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </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." + + $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 + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + 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 + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$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" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$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 (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + 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 + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -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 + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + 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*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + 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*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$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*) + # 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 -framework System" + 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 + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -module) + module=yes + continue + ;; + + # -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* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @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*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + 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*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + 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 + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + 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. + libobjs="$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 + non_pic_objects="$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" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + 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\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + 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 test "X$duplicate_deps" = "Xyes" ; 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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; 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 + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + 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 + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$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" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + 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 (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + 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 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + 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 + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + 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 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # 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) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + 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 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # 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 + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + 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 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # 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 + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + 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 + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + 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" + # 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + 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 test "X$duplicate_deps" = "Xyes" ; 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 + *" $dir "*) ;; + *" $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 + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if 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 + realname="$2" + shift; 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*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + 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 module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; 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 + 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; 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 + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + 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; 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + 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 test "X$duplicate_deps" = "Xyes" ; 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) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$deplibdir/$depdepl" ; then + depdepl="$deplibdir/$depdepl" + elif test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + else + # Can't find it, oh well... + depdepl= + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + 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" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + case " $deplibs" in + *\ -l* | *\ -L*) + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; + esac + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # 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*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + 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 + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # 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="$2" + number_minor="$3" + number_revision="$4" + # + # 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) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + 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]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + 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 + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + 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 + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi + 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 + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + 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 + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + 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 + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + 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) + ;; + $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 + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + 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 "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -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*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-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. + $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} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + 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 \"$potent_lib\" 2>/dev/null \ + | ${SED} 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 + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + 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" | ${SED} -e "1s,^X,," -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 is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + 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 + + + # 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 + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + 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 + realname="$2" + shift; 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` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "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"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$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"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + 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 + $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:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # 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= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$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\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + 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 ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "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" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + 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\" + 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 + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(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 + $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 + $show "${rm}r $gentop" + $run ${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 + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run 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) + case " $deplibs" in + *\ -l* | *\ -L*) + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; + esac + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${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" + # $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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + 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 / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + 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*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$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 + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$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 arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # 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/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + 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*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + 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. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run 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" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + 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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + 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. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + 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 our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + 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 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#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 DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# 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 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#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); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +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; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +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; + + DEBUG("(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 * +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); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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 (taken from Autoconf:_AS_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 variable: + 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 >> $output "\ + + # 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 + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + 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 >> $output "\ + + # 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 $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + 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 >> $output "\ + # 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 >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + 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*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + 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" + 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" + 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 + # 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 + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$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 + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_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 + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$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= + 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 + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "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}\" || 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 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; 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" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + 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) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + 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) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# 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' + +# Libraries that this one depends upon. +dependency_libs='$dependency_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 + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # 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. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # 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. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + 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. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # 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 + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "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. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run 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 + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run 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 + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo 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. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + 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) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + 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. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && 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" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + 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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; 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 + 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 + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + 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 + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + 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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $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. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $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) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $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 (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # 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 + $show "$rm $rmfiles" + $run $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 + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [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 + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +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 \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [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: $modename [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 + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [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 + -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] + +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: $modename [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." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# 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 +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/libs/DevIL-1.7.8/m4/acx_pthread.m4 b/libs/DevIL-1.7.8/m4/acx_pthread.m4 new file mode 100644 index 00000000..eb09f5ac --- /dev/null +++ b/libs/DevIL-1.7.8/m4/acx_pthread.m4 @@ -0,0 +1,275 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/acx_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also link it with them as well. e.g. you should link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threads programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name +# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# LAST MODIFICATION +# +# 2008-04-12 +# +# COPYLEFT +# +# Copyright (c) 2008 Steven G. Johnson +# +# 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 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Macro Archive. When you make and +# distribute a modified version of the Autoconf Macro, you may extend this +# special exception to the GPL to apply to your modified version as well. + +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include ], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_TRY_LINK([#include ], [int attr=$attr; return attr;], + [attr_name=$attr; break]) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) + else + PTHREAD_CC=$CC + fi +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/libs/DevIL-1.7.8/m4/allegro.m4 b/libs/DevIL-1.7.8/m4/allegro.m4 new file mode 100644 index 00000000..8bbaeb8c --- /dev/null +++ b/libs/DevIL-1.7.8/m4/allegro.m4 @@ -0,0 +1,192 @@ +# Configure paths for Allegro +# Shamelessly stolen from libxml.a4 +# Jon Rafkind 2004-06-06 +# Adapted from: +# Configure paths for libXML +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_allegro([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for allegro, and define allegro_CFLAGS and allegro_LIBS +dnl +AC_DEFUN([AM_PATH_ALLEGRO],[ +AC_ARG_WITH(allegro-prefix, + [ --with-allegro-prefix=PFX Prefix where liballegro is installed (optional)], + ALLEGRO_CONFIG_prefix="$withval", ALLEGRO_CONFIG_prefix="") +AC_ARG_WITH(allegro-exec-prefix, + [ --with-allegro-exec-prefix=PFX Exec prefix where liballegro is installed (optional)], + ALLEGRO_CONFIG_exec_prefix="$withval", ALLEGRO_CONFIG_exec_prefix="") +AC_ARG_ENABLE(allegrotest, + [ --disable-allegrotest Do not try to compile and run a test LIBallegro program],, + enable_allegrotest=yes) + + if test x$ALLEGRO_CONFIG_exec_prefix != x ; then + ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --exec-prefix=$ALLEGRO_CONFIG_exec_prefix" + if test x${ALLEGRO_CONFIG+set} != xset ; then + ALLEGRO_CONFIG=$ALLEGRO_CONFIG_exec_prefix/bin/allegro-config + fi + fi + if test x$ALLEGRO_CONFIG_prefix != x ; then + ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --prefix=$ALLEGRO_CONFIG_prefix" + if test x${ALLEGRO_CONFIG+set} != xset ; then + ALLEGRO_CONFIG=$ALLEGRO_CONFIG_prefix/bin/allegro-config + fi + fi + + AC_PATH_PROG(ALLEGRO_CONFIG, allegro-config, no) + min_allegro_version=ifelse([$1], ,4.0.0,[$1]) + AC_MSG_CHECKING(for Allegro - version >= $min_allegro_version) + no_allegro="" + if test "$ALLEGRO_CONFIG" = "no" ; then + no_allegro=yes + else + allegro_CFLAGS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --cflags` + allegro_LIBS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --libs` + ALLEGRO_CONFIG_major_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ALLEGRO_CONFIG_minor_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ALLEGRO_CONFIG_micro_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_allegrotest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $allegro_CFLAGS" + LIBS="$allegro_LIBS $LIBS" +dnl +dnl Now check if the installed liballegro is sufficiently new. +dnl (Also sanity checks the results of allegro-config to some extent) +dnl + rm -f conf.allegrotest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int allegro_major_version, allegro_minor_version, allegro_micro_version; + int major, minor, micro; + char *tmp_version; + int tmp_int_version; + + system("touch conf.allegrotest"); + + /* Capture allegro-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_allegro_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from allegro-config\n", "$min_allegro_version"); + free(tmp_version); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + allegro_major_version = ALLEGRO_VERSION; + allegro_minor_version = ALLEGRO_SUB_VERSION; + allegro_micro_version = ALLEGRO_WIP_VERSION; + + /* Compare allegro-config output to the Allegro headers */ + if ((allegro_major_version != $ALLEGRO_CONFIG_major_version) || + (allegro_minor_version != $ALLEGRO_CONFIG_minor_version)) + + { + printf("*** Allegro header files (version %d.%d.%d) do not match\n", + allegro_major_version, allegro_minor_version, allegro_micro_version); + printf("*** allegro-config (version %d.%d.%d)\n", + $ALLEGRO_CONFIG_major_version, $ALLEGRO_CONFIG_minor_version, $ALLEGRO_CONFIG_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + /* TODO: + * This doesnt work! + */ + /* ALLEGRO_TEST_VERSION; */ + + /* Test that the library is greater than our minimum version */ + if (($ALLEGRO_CONFIG_major_version > major) || + (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version > minor)) || + (($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version == minor) && + ($ALLEGRO_CONFIG_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of Allegro (%d.%d.%d) was found.\n", + allegro_major_version, allegro_minor_version, allegro_micro_version); + printf("*** You need a version of Allegro newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** Allegro is always available from http://alleg.sf.net.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the allegro-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of Allegro, but you can also set the ALLEGRO_CONFIG environment to point to the\n"); + printf("*** correct copy of allegro-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} END_OF_MAIN() +],, no_allegro=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_allegro" = x ; then + AC_MSG_RESULT(yes (version $ALLEGRO_CONFIG_major_version.$ALLEGRO_CONFIG_minor_version.$ALLEGRO_CONFIG_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$ALLEGRO_CONFIG" = "no" ; then + echo "*** The allegro-config script installed by Allegro could not be found" + echo "*** If Allegro was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ALLEGRO_CONFIG environment variable to the" + echo "*** full path to allegro-config." + else + if test -f conf.allegrotest ; then + : + else + echo "*** Could not run Allegro test program, checking why..." + CFLAGS="$CFLAGS $allegro_CFLAGS" + LIBS="$LIBS $allegro_LIBS" + AC_TRY_LINK([ +#include +#include +], [ ALLEGRO_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding Allegro or finding the wrong" + echo "*** version of Allegro. If it is not finding Allegro, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means Allegro was incorrectly installed" + echo "*** or that you have moved Allegro since it was installed. In the latter case, you" + echo "*** may want to edit the allegro-config script: $ALLEGRO_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + allegro_CFLAGS="" + allegro_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(allegro_CFLAGS) + AC_SUBST(allegro_LIBS) + rm -f conf.allegrotest +]) diff --git a/libs/DevIL-1.7.8/m4/ax_check_gl.m4 b/libs/DevIL-1.7.8/m4/ax_check_gl.m4 new file mode 100644 index 00000000..08b9a39b --- /dev/null +++ b/libs/DevIL-1.7.8/m4/ax_check_gl.m4 @@ -0,0 +1,135 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_check_gl.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_GL +# +# DESCRIPTION +# +# Check for an OpenGL implementation. If GL is found, the required +# compiler and linker flags are included in the output variables +# "GL_CFLAGS" and "GL_LIBS", respectively. If no usable GL implementation +# is found, "no_gl" is set to "yes". +# +# If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the +# header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These +# preprocessor definitions may not be mutually exclusive. +# +# LAST MODIFICATION +# +# 2008-10-07 +# +# COPYLEFT +# +# Copyright (c) 2008 Braden McDaniel +# +# 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 haeceived a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Macro Archive. When you make and +# distribute a modified version of the Autoconf Macro, you may extend this +# special exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GL], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PATH_X])dnl +AC_REQUIRE([ACX_PTHREAD])dnl + +AC_LANG_PUSH([C]) +AX_LANG_COMPILER_MS +AS_IF([test X$ax_compiler_ms = Xno], + [GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm"]) + +# +# Use x_includes and x_libraries if they have been set (presumably by +# AC_PATH_X). +# +AS_IF([test "X$no_x" != "Xyes"], + [AS_IF([test -n "$x_includes"], + [GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"])] + AS_IF([test -n "$x_libraries"], + [GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"])) + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +AC_CHECK_HEADERS([windows.h]) + +m4_define([AX_CHECK_GL_PROGRAM], + [AC_LANG_PROGRAM([[ +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif]], + [[glBegin(0)]])]) + +AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl], +[ax_cv_check_gl_libgl="no" +case $host_cpu in + x86_64) ax_check_gl_libdir=lib64 ;; + *) ax_check_gl_libdir=lib ;; +esac +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lopengl32 -lGL" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib}"; break], + [ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break], + [ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break])])]) +done + +AS_IF([test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes], +[LIBS='-framework OpenGL' +AC_LINK_IFELSE([AX_CHECK_GL_PROGRAM], + [ax_cv_check_gl_libgl="$LIBS"])]) + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS}]) + +AS_IF([test "X$ax_cv_check_gl_libgl" = Xno], + [no_gl=yes; GL_CFLAGS=""; GL_LIBS=""], + [GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"]) +AC_LANG_POP([C]) + +AC_SUBST([GL_CFLAGS]) +AC_SUBST([GL_LIBS]) ]) diff --git a/libs/DevIL-1.7.8/m4/ax_check_glu.m4 b/libs/DevIL-1.7.8/m4/ax_check_glu.m4 new file mode 100644 index 00000000..5a31d45b --- /dev/null +++ b/libs/DevIL-1.7.8/m4/ax_check_glu.m4 @@ -0,0 +1,154 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_check_glu.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_GLU +# +# DESCRIPTION +# +# Check for GLU. If GLU is found, the required preprocessor and linker +# flags are included in the output variables "GLU_CFLAGS" and "GLU_LIBS", +# respectively. If no GLU implementation is found, "no_glu" is set to +# "yes". +# +# If the header "GL/glu.h" is found, "HAVE_GL_GLU_H" is defined. If the +# header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. These +# preprocessor definitions may not be mutually exclusive. +# +# Some implementations (in particular, some versions of Mac OS X) are +# known to treat the GLU tesselator callback function type as "GLvoid +# (*)(...)" rather than the standard "GLvoid (*)()". If the former +# condition is detected, this macro defines "HAVE_VARARGS_GLU_TESSCB". +# +# LAST MODIFICATION +# +# 2008-10-07 +# +# COPYLEFT +# +# Copyright (c) 2008 Braden McDaniel +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Macro Archive. When you make and +# distribute a modified version of the Autoconf Macro, you may extend this +# special exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GLU], +[AC_REQUIRE([AX_CHECK_GL])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +GLU_CFLAGS="${GL_CFLAGS}" + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +m4_define([AX_CHECK_GLU_PROGRAM], + [AC_LANG_PROGRAM([[ +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif]], + [[gluBeginCurve(0)]])]) + +AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu], +[ax_cv_check_glu_libglu="no" +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" + +# +# First, check for the possibility that everything we need is already in +# GL_LIBS. +# +LIBS="${GL_LIBS} ${ax_save_LIBS}" +# +# libGLU typically links with libstdc++ on POSIX platforms. +# However, setting the language to C++ means that test program +# source is named "conftest.cc"; and Microsoft cl doesn't know what +# to do with such a file. +# +AC_LANG_PUSH([C++]) +AS_IF([test X$ax_compiler_ms = Xyes], + [AC_LANG_PUSH([C])]) +AC_LINK_IFELSE( +[AX_CHECK_GLU_PROGRAM], +[ax_cv_check_glu_libglu=yes], +[LIBS="" +ax_check_libs="-lglu32 -lGLU" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE([AX_CHECK_GLU_PROGRAM], + [ax_cv_check_glu_libglu="${ax_try_lib}"; break]) +done +]) +AS_IF([test X$ax_compiler_ms = Xyes], + [AC_LANG_POP([C])]) +AC_LANG_POP([C++]) + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS}]) +AS_IF([test "X$ax_cv_check_glu_libglu" = Xno], + [no_glu=yes; GLU_CFLAGS=""; GLU_LIBS=""], + [AS_IF([test "X$ax_cv_check_glu_libglu" = Xyes], + [GLU_LIBS="$GL_LIBS"], + [GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"])]) +AC_SUBST([GLU_CFLAGS]) +AC_SUBST([GLU_LIBS]) + +# +# Some versions of Mac OS X include a broken interpretation of the GLU +# tesselation callback function signature. +# +AS_IF([test "X$ax_cv_check_glu_libglu" != Xno], +[AC_CACHE_CHECK([for varargs GLU tesselator callback function type], + [ax_cv_varargs_glu_tesscb], +[ax_cv_varargs_glu_tesscb=no +ax_save_CFLAGS="$CFLAGS" +CFLAGS="$GL_CFLAGS $CFLAGS" +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([[ +# ifdef HAVE_GL_GLU_H +# include +# else +# include +# endif]], + [[GLvoid (*func)(...); gluTessCallback(0, 0, func)]])], +[ax_cv_varargs_glu_tesscb=yes]) +CFLAGS="$ax_save_CFLAGS"]) +AS_IF([test X$ax_cv_varargs_glu_tesscb = Xyes], + [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], + [Use nonstandard varargs form for the GLU tesselator callback])])]) +]) diff --git a/libs/DevIL-1.7.8/m4/ax_check_glut.m4 b/libs/DevIL-1.7.8/m4/ax_check_glut.m4 new file mode 100644 index 00000000..418f46b6 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/ax_check_glut.m4 @@ -0,0 +1,117 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_check_glut.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_GLUT +# +# DESCRIPTION +# +# Check for GLUT. If GLUT is found, the required compiler and linker flags +# are included in the output variables "GLUT_CFLAGS" and "GLUT_LIBS", +# respectively. If GLUT is not found, "no_glut" is set to "yes". +# +# If the header "GL/glut.h" is found, "HAVE_GL_GLUT_H" is defined. If the +# header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. These +# preprocessor definitions may not be mutually exclusive. +# +# LAST MODIFICATION +# +# 2008-10-07 +# +# COPYLEFT +# +# Copyright (c) 2008 Braden McDaniel +# +# 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, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Macro Archive. When you make and +# distribute a modified version of the Autoconf Macro, you may extend this +# special exception to the GPL to apply to your modified version as well. + +AC_DEFUN([AX_CHECK_GLUT], +[AC_REQUIRE([AX_CHECK_GLU])dnl +AC_REQUIRE([AC_PATH_XTRA])dnl + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" +AC_CHECK_HEADERS([GL/glut.h GLUT/glut.h]) +CPPFLAGS="${ax_save_CPPFLAGS}" + +GLUT_CFLAGS=${GLU_CFLAGS} +GLUT_LIBS=${GLU_LIBS} + +m4_define([AX_CHECK_GLUT_PROGRAM], + [AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif]], + [[glutMainLoop()]])]) + +# +# If X is present, assume GLUT depends on it. +# +AS_IF([test X$no_x != Xyes], + [GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}"]) + +AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut], +[ax_cv_check_glut_libglut="no" +AC_LANG_PUSH(C) +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lglut32 -lglut" +for ax_lib in ${ax_check_libs}; do + AS_IF([test X$ax_compiler_ms = Xyes], + [ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`], + [ax_try_lib="${ax_lib}"]) + LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], + [ax_cv_check_glut_libglut="${ax_try_lib}"; break]) +done + +AS_IF([test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes], +[LIBS='-framework GLUT' +AC_LINK_IFELSE([AX_CHECK_GLUT_PROGRAM], + [ax_cv_check_glut_libglut="$LIBS"])]) + +CPPFLAGS="${ax_save_CPPFLAGS}" +LIBS="${ax_save_LIBS}" +AC_LANG_POP(C)]) + +AS_IF([test "X$ax_cv_check_glut_libglut" = Xno], + [no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS=""], + [GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}"]) + +AC_SUBST([GLUT_CFLAGS]) +AC_SUBST([GLUT_LIBS]) +])dnl diff --git a/libs/DevIL-1.7.8/m4/ax_lang_compiler_ms.m4 b/libs/DevIL-1.7.8/m4/ax_lang_compiler_ms.m4 new file mode 100644 index 00000000..3523621a --- /dev/null +++ b/libs/DevIL-1.7.8/m4/ax_lang_compiler_ms.m4 @@ -0,0 +1,38 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_lang_compiler_ms.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_LANG_COMPILER_MS +# +# DESCRIPTION +# +# Check whether the compiler for the current language is Microsoft. +# +# This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU Autoconf +# implementation. +# +# LAST MODIFICATION +# +# 2008-04-12 +# +# COPYLEFT +# +# Copyright (c) 2008 Braden McDaniel +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_LANG_COMPILER_MS], +[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler], + [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER + choke me +#endif +]])], + [ax_compiler_ms=yes], + [ax_compiler_ms=no]) +ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms +])]) diff --git a/libs/DevIL-1.7.8/m4/devil-api_checks.m4 b/libs/DevIL-1.7.8/m4/devil-api_checks.m4 new file mode 100644 index 00000000..13bc7e94 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/devil-api_checks.m4 @@ -0,0 +1,178 @@ + +dnl +dnl Checks for SDL presence, adds cflags to ILUT_CFLAGS and libs to ILUT_LIBS +dnl also sets use_sdl variable +dnl +AC_DEFUN([SETTLE_SDL], + [TEST_API([sdl]) + AS_IF([test "x$enable_sdl" = "xyes"], + [AM_PATH_SDL(1.2.5, + [use_sdl="yes"], + [use_sdl="no"]) ]) + AS_IF([test "x$use_sdl" = "xyes"], + [AC_DEFINE([ILUT_USE_SDL], + [], + [Support SDL API]) + ILUT_CFLAGS="$SDL_CFLAGS $ILUT_CFLAGS" + ILUT_LIBS="$SDL_LIBS $ILUT_LIBS" + SUPPORTED_API="$SUPPORTED_API SDL"]) ]) + +dnl +dnl Checks for OpenGL implementations, external macros from Autoconf macro archives used +dnl Checks for GL, GLU (needed for DevIL) and for GLUT (one of the examples uses this) +dnl sets use_ogl and have_glut variables +dnl +AC_DEFUN([SETTLE_OPENGL], + [TEST_API(opengl) + AS_IF([test "x$enable_opengl" = "xyes"], + [AX_CHECK_GL + AX_CHECK_GLU + AX_CHECK_GLUT + AS_IF([test "x$no_gl" != "xyes" -a "x$no_glu" != "xyes"], + [use_ogl="yes" + ILUT_LIBS="$GLU_LIBS $GL_LIBS $ILUT_LIBS" + AS_IF([test "x$no_glut" != "xyes"], + [have_glut="yes" + ILUT_LIBS="$GLUT_LIBS $ILUT_LIBS"]) + AC_DEFINE([ILUT_USE_OPENGL], + [1], + [Define if system supports OpenGL API]) + SUPPORTED_API="$SUPPORTED_API OpenGL"]) ]) ]) + +dnl +dnl The check for Allegro game programming library. +dnl The part before "official" AM_PATH_ALLEGRO is for unofficial autotools builds +dnl sets use_allegro variable +dnl +AC_DEFUN([SETTLE_ALLEGRO], +[TEST_API([allegro]) +AS_IF([test "x$enable_allegro" = "xyes"], +[AC_CHECK_HEADER([allegro.h], + [AC_CHECK_LIB([alleg], + [main], + [use_allegro="yes" + ILUT_LIBS="-lalleg $ILUT_LIBS"]) + AC_CHECK_LIB([allegro_unsharable], + [main], + [ILUT_LIBS="-lalleg_unsharable $ILUT_LIBS"]) + AC_CHECK_LIB([alleg42], + [main], + [use_allegro="yes" + ILUT_LIBS="-lalleg42 $ILUT_LIBS"]) ]) +AS_IF([test "x$use_allegro" != "xyes"], + [AM_PATH_ALLEGRO(4.2.0, + [use_allegro="yes" + ILUT_LIBS="$allegro_LIBS $ILUT_LIBS" + ILUT_CFLAGS="$allegro_CFLAGS $ILUT_CFLAGS"], + [use_allegro="no"]) ]) ]) +AS_IF([test "x$use_allegro" = "xyes"], + [AC_DEFINE([ILUT_USE_ALLEGRO], + [], + [Support Allegro API]) + SUPPORTED_API="$SUPPORTED_API Allegro"]) ]) + +dnl +dnl 32-bit Windows support +dnl checks for gdi32 lib presence +dnl sets use_w32 variable +dnl +AC_DEFUN([SETTLE_W32], + [TEST_API([w32]) + AS_IF([test "x$enable_w32" = "xyes"], + [AC_CHECK_LIB([gdi32], + [main], + [ILUT_LIBS="-lgdi32 $ILUT_LIBS" + use_w32="yes" + SUPPORTED_API="$SUPPORTED_API w32"]) ]) ]) + +dnl +dnl check for DirectX 8 +dnl sets use_directx8 variable +dnl +AC_DEFUN([SETTLE_DX8], +[TEST_API([directx8]) +AS_IF([test "x$enable_directx8" = "xyes"], + [AC_CHECK_HEADER([d3d8.h], + [AC_DEFINE([ILUT_USE_DIRECTX8],, + [Support DirectX8 API]) + use_directx8="yes" + SUPPORTED_API="$SUPPORTED_API DirectX8"]) ]) ]) + +dnl +dnl DirectX 9 +dnl sets use_directx9 variable +dnl +AC_DEFUN([SETTLE_DX9], +[TEST_API([directx9]) +AS_IF([test "x$enable_directx9" = "xyes"], + [AC_CHECK_HEADER([d3d9.h], + [AC_DEFINE([ILUT_USE_DIRECTX9],, + [Support DirectX9 API]) + use_directx9="yes" + SUPPORTED_API="$SUPPORTED_API DirectX9"]) ]) ]) + +dnl +dnl DirectX 10 +dnl sets use_directx10 variable +dnl +AC_DEFUN([SETTLE_DX10], +[TEST_API([directx10]) +AS_IF([test "x$enable_directx10" = "xyes"], + [AC_CHECK_HEADER([d3d10.h], + [AC_DEFINE([ILUT_USE_DIRECTX10],, + [Support DirectX10 API]) + use_directx10="yes" + SUPPORTED_API="$SUPPORTED_API DirectX10"]) ]) ]) +dnl +dnl Checks for X11 developement stuff and for XShm +dnl sets use_x11 and use_xshm vars +dnl +AC_DEFUN([SETTLE_X11], + [TEST_API([x11]) + AS_IF([test "x$enable_x11" = "xyes"], + [AC_CHECK_HEADER([X11/Xlib.h], + [use_x11="yes"], + [use_x11="no"]) + AC_CHECK_LIB([X11], + [main], + [dnl The use_x11 var is either "yes" already, or we don't want "no" to be overwritten + ILUT_LIBS="-lX11 $ILUT_LIBS"], + [use_x11="no"]) ]) + TEST_API([shm]) + AS_IF([test "x$enable_shm" = "xyes"], + [AC_CHECK_HEADER([X11/extensions/XShm.h], + [use_xshm="yes"], + [use_xshm="no"], + [[#include ]]) + AC_CHECK_LIB([Xext], + [main], + [use_shm="yes" + ILUT_LIBS="-lXext $ILUT_LIBS"], + [use_shm="no"]) ]) + TEST_API([render]) + AS_IF([test "x$enable_render" = "xyes"], + [AC_CHECK_HEADER([X11/extensions/Xrender.h], + [use_xrender="yes"], + [use_xrender="no"], + [[#include ]]) + AC_CHECK_LIB([Xrender], + [main], + [use_render="yes" + ILUT_LIBS="-lXrender $ILUT_LIBS"], + [use_render="no"]) ]) + + AS_IF([test "x$use_x11" != "xno"], + [AC_DEFINE([ILUT_USE_X11], + [1], + [Support X11 API]) + SUPPORTED_API="$SUPPORTED_API X11"]) + AS_IF([test "$use_xshm" = "yes"], + [AC_DEFINE([ILUT_USE_XSHM], + [], + [Support X11 XShm extension]) + SUPPORTED_API="$SUPPORTED_API XShm"]) + AS_IF([test "$use_xrender" = "yes"], + [AC_DEFINE([ILUT_USE_XRENDER], + [], + [Support X11 XRender extension]) + SUPPORTED_API="$SUPPORTED_API XRender"]) ]) diff --git a/libs/DevIL-1.7.8/m4/devil-definitions.m4 b/libs/DevIL-1.7.8/m4/devil-definitions.m4 new file mode 100644 index 00000000..7616e82b --- /dev/null +++ b/libs/DevIL-1.7.8/m4/devil-definitions.m4 @@ -0,0 +1,298 @@ + +AC_DEFUN([ADD_CFLAGS], + [GENERAL_CFLAGS="$GENERAL_CFLAGS $1"]) +dnl IL_CFLAGS="$IL_CFLAGS $1"]) +dnl ILU_CFLAGS="$ILU_CFLAGS $1" +dnl ILUT_CFLAGS="$ILUT_CFLAGS $1"]) +dnl IL_CFLAGS are present everywhere + + +dnl +dnl Check CPU Extensions +dnl +AC_DEFUN([TEST_EXT], + [AC_ARG_ENABLE([$6], + [AC_HELP_STRING([--enable-$6], + [Doesn't compile $1 support. Overrides general enable of ASM])], + [use_$1=$enable_$6 + test "x$enable_$6" = "xyes" && enable_asm="yes"], + [use_$1=test]) + AC_MSG_CHECKING([$1]) + AS_IF([test "$use_$1" = "yes"], + [AC_DEFINE([$4], + [1], + [$1 extension found]) + AC_DEFINE([VECTORMEM], + [1], + [Memory must be vector aligned]) + ADD_CFLAGS([$2]) + AC_MSG_RESULT([yes]) + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"$1 "], + [test "$use_$1" = "test" -a "x$enable_asm" = "xyes"], + [CFLAGS_TMP=$CFLAGS + CFLAGS="$CFLAGS $2" + AC_COMPILE_IFELSE([$5 + int main() + {$3;return 0;}], + [AC_DEFINE([$4], + [], + [$1 extension found]) + AC_DEFINE([VECTORMEM], + [], + [Memory must be vector aligned]) + ADD_CFLAGS([$2]) + AC_MSG_RESULT([yes]) + SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"$1 "], + [AC_MSG_RESULT([no]) ]) + CFLAGS="$CFLAGS_TMP"], + [AC_MSG_RESULT(disabled)]) ]) + +dnl +dnl Check CPU Assembly +dnl +dnl add test to have only an ASM for compilation +AC_DEFUN([TEST_ASM], + [AC_ARG_ENABLE([$4], + [AC_HELP_STRING([--enable-$4], + [Compile with $4 support])], + [use_$4=$enable_$4],[use_$4=test]) + AC_MSG_CHECKING([$4]) + AS_IF([test "$use_$4" = "yes"], + [SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"$2 " + AC_DEFINE([$3], + [], + [$2 assembly found]) + AC_MSG_RESULT([yes])], + [test "$use_$4" = "no"], + [AC_MSG_RESULT(no)], + [AS_CASE([$host_cpu], + [$1], + [SUPPORTED_EXTENSION=$SUPPORTED_EXTENSION"$2 " + AC_DEFINE([$3], + [], + [$2 assembly found]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) ]) ]) ]) + +dnl +dnl Setup Libraries +dnl SET_LIB([libname],[if-found],[if-not-found]) +dnl +AC_DEFUN([SET_LIB], + [AC_ARG_WITH([$1], + [AC_HELP_STRING([--with-$1=[[yes/no]]], + [Do wou want to use lib$1?])], + [], + [enable_$1="yes"]) + AS_IF([test "$enable_$1" = "yes"], + [AC_CHECK_LIB([$1], + [main], + [LIBS="-l$1 $LIBS" + support_$1="yes"], + [support_$1="no"]) + AS_IF([test "x$support_$1" = "xyes" -a -n '$2'], + [$2], + [test "x$support_$1" = "xno" -a -n '$3'], + [$3]) ]) ]) + +dnl +dnl Formats +dnl +dnl usage: +dnl TEST_FORMAT(, [, ])) +dnl +AC_DEFUN([TEST_FORMAT], + [AC_ARG_ENABLE([$1], + [AC_HELP_STRING([--enable-$1], + [Compile $1 support. $3 (default=yes) ])], + [], + [enable_$1="yes"]) + AS_IF([test $# -eq 4 -a "x$enable_$1" = "xyes"], + [$4]) + AC_MSG_CHECKING([whether we would like to have support for $1 format]) + AS_IF([test "x$enable_$1" = "xno" -o "x$lib_test_result" = "xno"], + [AC_MSG_RESULT([no]) + AC_DEFINE([IL_NO_$2], + [], + [$1 support ($3)])], + [AC_MSG_RESULT([yes]) + SUPPORTED_FORMATS="$SUPPORTED_FORMATS $2"]) + lib_test_result="" ]) + +dnl +dnl Adds a library to human-readable list of dependencies +dnl +dnl Usage: +dnl MAYBE_OPTIONAL_DEPENDENCY(, ) +dnl for example: +dnl MAYBE_OPTIONAL_DEPENDENCY([IL], [libjpeg]) +dnl MAYBE_OPTIONAL_DEPENDENCY([ILUT], [allegro]) +dnl +AC_DEFUN([MAYBE_OPTIONAL_DEPENDENCY], + [AS_IF([test "x$enable_modules" = "xyes"], + [$1_LIBS_OPTIONAL="${$1_LIBS_OPTIONAL} $2"], + [$1_LIBS_REQUIRED="${$1_LIBS_REQUIRED} $2"]) ]) + +dnl +dnl Check for libraries +dnl +dnl Usage: +dnl DEVIL_IL_LIB(, ) +dnl the is appended to IL_LIBS, sets have_ to yes/no +dnl Nothing else is done, see MAYBE_OPTIONAL_DEPENDENCY macro... +dnl +AC_DEFUN([DEVIL_IL_LIB], + [AC_CHECK_HEADER([$1], + [AC_CHECK_LIB([$2], + [main], + [IL_LIBS="-l$2 $IL_LIBS" + have_$2="yes"], + [have_$2="no"])], + [have_$2="no"]) ]) + +dnl +dnl Checks for squish library = GPU accelerated DXT compression +dnl Can be used along with nvidia texture tools +dnl +AC_DEFUN([DEVIL_CHECK_LIBSQUISH], + [DEVIL_IL_LIB([squish.h], + [squish]) + lib_test_result="$have_squish" + AS_IF([test "x$lib_test_result" = "xyes"], + [AC_DEFINE([IL_USE_DXTC_SQUISH], + [1], + [Define if you have libsquish installed]) + MAYBE_OPTIONAL_DEPENDENCY([IL], + [libsquish]) ]) ]) + +dnl +dnl Checks for nvidia texture tools library - GPU acceleration of DXT compression +dnl Can be used along with libsquish +dnl +AC_DEFUN([DEVIL_CHECK_NVIDIA_TEXTOOLS], + [DEVIL_IL_LIB([nvtt/nvtt.h], + [nvtt]) + lib_test_result="$have_nvtt" + AS_IF([test "x$lib_test_result" = "xyes"], + [AC_DEFINE([IL_USE_DXTC_NVIDIA], + [1], + [Define if you have nvidia texture tools library installed]) + MAYBE_OPTIONAL_DEPENDENCY([IL], + [libnvtt-nvidia_texture_tools]) ]) ]) + +AC_DEFUN([SETTLE_LCMS], +[AC_CHECK_LIB([lcms], + [main], + [have_lcms_lib="yes" + IL_LIBS="-llcms $IL_LIBS"]) +AC_CHECK_HEADER([lcms/lcms.h], + [have_lcms_h="yes"]) +AC_CHECK_HEADER([lcms.h], + [have_lcms_h="yes" + lcms_nodirinclude="yes"]) +AS_IF([test "x$lcms_nodirinclude" = "xyes"], + [AC_DEFINE([LCMS_NODIRINCLUDE], + [1], + [LCMS include without lcms/ support]) ]) +AS_IF([test "x$have_lcms_lib" = "xyes" -a "x$have_lcms_h" = "xyes"], + [have_lcms="yes" + IL_LIBS_REQUIRED="$IL_LIBS_REQUIRED lcms" + lib_test_result="yes"], + [lib_test_result="no"]) ]) + +AC_DEFUN([SETTLE_OPENEXR], + [PKG_CHECK_MODULES([OPENEXR], + [OpenEXR], + [have_openexr="yes"], + [have_openexr="no"]) + MAYBE_OPTIONAL_DEPENDENCY([IL], + [OpenEXR]) + IL_LIBS="$OPENEXR_LIBS $IL_LIBS" + IL_CFLAGS="$OPENEXR_CFLAGS $IL_CFLAGS" + lib_test_result="$have_openexr"]) + +AC_DEFUN([SETTLE_JPEG], + [DEVIL_IL_LIB([jpeglib.h], + [jpeg]) + AC_DEFINE([IL_USE_JPEGLIB_UNMODIFIED], + [1], + [Use libjpeg without modification. always enabled.]) + lib_test_result="$have_jpeg" + AS_IF([test "x$lib_test_result" = "xyes"], + [MAYBE_OPTIONAL_DEPENDENCY([IL], + [libjpeg]) ]) ]) + +AC_DEFUN([SETTLE_JASPER], + [DEVIL_IL_LIB([jasper/jasper.h], + [jasper]) + AS_IF([test "x$have_jasper" != "xyes"], + [DEVIL_IL_LIB([jasper/jasper.h], + [jp2]) + lib_test_result="$have_jp2" ], + [lib_test_result="yes"]) + AS_IF([test "x$lib_test_result" = "xyes"], + [MAYBE_OPTIONAL_DEPENDENCY([IL], + [JasPer]) ]) ]) + +AC_DEFUN([SETTLE_MNG], + [DEVIL_IL_LIB([libmng.h], + [mng]) + lib_test_result="$have_mng" + AS_IF([test "x$lib_test_result" = "xyes"], + [MAYBE_OPTIONAL_DEPENDENCY([IL], + [libmng]) ]) ]) + +AC_DEFUN([SETTLE_PNG], + [DEVIL_IL_LIB([png.h], + [png12]) + AS_IF([test "x$have_png12" = "xno"], + [DEVIL_IL_LIB([png.h], + [png]) + lib_test_result="$have_png"], + [lib_test_result="$have_png12"]) + AS_IF([test "x$lib_test_result" = "xyes"], + [MAYBE_OPTIONAL_DEPENDENCY([IL], + [libpng]) ]) ]) + +AC_DEFUN([SETTLE_TIFF], + [DEVIL_IL_LIB([tiffio.h], + [tiff]) + lib_test_result="$have_tiff" + AS_IF([test "x$lib_test_result" = "xyes"], + [MAYBE_OPTIONAL_DEPENDENCY([IL], + [libtiff]) ]) ]) + +dnl +dnl ILUT generic APIs checking +dnl +AC_DEFUN([TEST_API], + [AC_ARG_ENABLE([$1], + [AC_HELP_STRING([--enable-$1], + [Compiles $1 support for ILUT (default=yes) ])], + [], + [enable_$1="yes"]) ]) + +dnl Test for restrict c/c++ keyword +AC_DEFUN([DEVIL_CHECK_RESTRICT], + [AC_MSG_CHECKING([restrict keyword]) + AC_COMPILE_IFELSE([[void foo(void * restrict test){}]], + [AC_DEFINE([RESTRICT_KEYWORD], + [], + [restric keyword available]) + restrict_keyword="found" + AC_MSG_RESULT([yes]) ], + [AC_MSG_RESULT([no]) ]) ]) + +AC_DEFUN([DEVIL_CHECK_RESTRICT_GNU99], + [TMP_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -std=gnu99 -fgnu89-inline" + AC_MSG_CHECKING([restrict gnu99 keyword]) + AC_COMPILE_IFELSE([[void foo(void * restrict test){}]], + [AC_DEFINE([RESTRICT_KEYWORD], + [1], + [restric keyword available]) + AC_MSG_RESULT([yes]) + CFLAGS="$TMP_CFLAGS" + ADD_CFLAGS(-std=gnu99 -fgnu89-inline)], + [AC_MSG_RESULT([no]) + CFLAGS="$TMP_CFLAGS"]) ]) diff --git a/libs/DevIL-1.7.8/m4/devil-report.m4 b/libs/DevIL-1.7.8/m4/devil-report.m4 new file mode 100644 index 00000000..e10661e2 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/devil-report.m4 @@ -0,0 +1,51 @@ +AC_DEFUN([IL_REPORT], +[AC_MSG_NOTICE([+----------------------------------------+]) +AS_IF([test "x$enable_IL" = "xyes"], + [AC_MSG_NOTICE([\| IL library Supported formats \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([$SUPPORTED_FORMATS]) + AC_MSG_NOTICE([+----------------------------------------+]) + AC_MSG_NOTICE([\| IL library External libraries \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([Required libs: $IL_LIBS_REQUIRED]) + AS_IF([test "x$enable_modules" = "xyes"], + [AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([Optional libs: $IL_LIBS_OPTIONAL]) ]) ], + [AC_MSG_NOTICE([\| IL disabled (huh? good luck!) \|]) ]) ]) + +AC_DEFUN([ILU_REPORT], +[AC_MSG_NOTICE([+----------------------------------------+]) +AS_IF([test "x$enable_ILU" = "xyes"], + [AC_MSG_NOTICE([\| ILU part enabled \|]) ], + [AC_MSG_NOTICE([\| ILU part disabled \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([Pass --enable-ILU option to the configure script if you want to build ILU]) ]) ]) + +AC_DEFUN([ILUT_REPORT], +[AC_MSG_NOTICE([+----------------------------------------+]) +AS_IF([test "x$enable_ILUT" = "xyes"], + [AC_MSG_NOTICE([\| ILUT library Supported APIs \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([$SUPPORTED_API])], + [AC_MSG_NOTICE([\| ILUT part disabled \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([Pass --enable-ILUT option to the configure script if you want to build ILUT]) ]) ]) + +AC_DEFUN([EXTENSIONS_REPORT], +[AC_MSG_NOTICE([+----------------------------------------+]) + AC_MSG_NOTICE([\| Detected Machine Extensions \|]) +AC_MSG_NOTICE([+----------------------------------------+-------+]) +AC_MSG_NOTICE([$SUPPORTED_EXTENSION]) ]) + +AC_DEFUN([EXAMPLES_REPORT], +[AC_MSG_NOTICE([+----------------------------------------+]) +AS_IF([test "x$with_examples" = "xyes"], + [AC_MSG_NOTICE([\| Building examples \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([$EXAMPLES_TO_BUILD]) + AS_IF([test "x$build" != "x$host"], + [AC_MSG_NOTICE([Note: You may get some errors when cross-compiling when using OpenEXR, Allegro and/or SDL. So if you are cross-compiling and getting these errors (very likely if you use MingW), just pass --disable-exr, --disable-allegro or --disable-sdl to the configure script.]) ]) ], + [AC_MSG_NOTICE([\| Not building any examples \|]) + AC_MSG_NOTICE([+----------------------------------------+-------+]) + AC_MSG_NOTICE([Pass --with-examples option to the configure script if you want to build examples.]) ]) +AC_MSG_NOTICE([+----------------------------------------+]) ]) diff --git a/libs/DevIL-1.7.8/m4/libtool.m4 b/libs/DevIL-1.7.8/m4/libtool.m4 new file mode 100644 index 00000000..6e86e5b4 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/libtool.m4 @@ -0,0 +1,7325 @@ +# 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], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_quote(m4_if([$2], [], + m4_quote(lt_decl_tag_varnames), + m4_quote(m4_shift($@)))), + m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) +m4_define([_lt_decl_varnames_tagged], [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 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# 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" + if test "$GCC" = "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*) + # 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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +_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*) + 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_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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + 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*) + # 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' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + 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_name_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 + ;; + +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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_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*) + 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*) + # 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 IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _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' + ;; + icpc* | ecpc* ) + # Intel C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # 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*) + # 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 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)='-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*) + # 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 + icc* | ecc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _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*) + _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' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _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*) + # 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*) + # _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' ;; + 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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # 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*) + # 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 ${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(int foo(void) {}, + _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* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $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 + + # 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*) + # _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_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/libs/DevIL-1.7.8/m4/ltoptions.m4 b/libs/DevIL-1.7.8/m4/ltoptions.m4 new file mode 100644 index 00000000..e9701194 --- /dev/null +++ b/libs/DevIL-1.7.8/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*) + 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/libs/DevIL-1.7.8/m4/ltsugar.m4 b/libs/DevIL-1.7.8/m4/ltsugar.m4 new file mode 100644 index 00000000..0d258e07 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 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 5 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. +m4_define([lt_combine], +[m4_if([$2], [], [], + [m4_if([$4], [], [], + [lt_join(m4_quote(m4_default([$1], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], + [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), + [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl +]) + + +# 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/libs/DevIL-1.7.8/m4/ltversion.m4 b/libs/DevIL-1.7.8/m4/ltversion.m4 new file mode 100644 index 00000000..45cb1557 --- /dev/null +++ b/libs/DevIL-1.7.8/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 2976 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.4]) +m4_define([LT_PACKAGE_REVISION], [1.2976]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.4' +macro_revision='1.2976' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/libs/DevIL-1.7.8/m4/lt~obsolete.m4 b/libs/DevIL-1.7.8/m4/lt~obsolete.m4 new file mode 100644 index 00000000..637bb206 --- /dev/null +++ b/libs/DevIL-1.7.8/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/libs/DevIL-1.7.8/m4/pkg.m4 b/libs/DevIL-1.7.8/m4/pkg.m4 new file mode 100644 index 00000000..a0b9cd45 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/pkg.m4 @@ -0,0 +1,155 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# 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])dnl +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. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$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 + _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 + + ifelse([$4], , [AC_MSG_ERROR(dnl +[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 +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[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 .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES diff --git a/libs/DevIL-1.7.8/m4/sdl.m4 b/libs/DevIL-1.7.8/m4/sdl.m4 new file mode 100644 index 00000000..25581ea0 --- /dev/null +++ b/libs/DevIL-1.7.8/m4/sdl.m4 @@ -0,0 +1,181 @@ +# Configure paths for SDL +# Sam Lantinga 9/21/99 +# stolen from Manish Singh +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS +dnl +AC_DEFUN([AM_PATH_SDL], +[dnl +dnl Get the cflags and libraries from the sdl-config script +dnl +AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], + sdl_prefix="$withval", sdl_prefix="") +AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], + sdl_exec_prefix="$withval", sdl_exec_prefix="") +AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], + , enable_sdltest=yes) + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + min_sdl_version=ifelse([$1], ,0.11.0,$1) + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +dnl +dnl Now check if the installed SDL is sufficiently new. (Also sanity +dnl checks the results of sdl-config to some extent +dnl + rm -f conf.sdltest + AC_TRY_RUN([ +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + rm -f conf.sdltest +]) diff --git a/libs/DevIL-1.7.8/missing b/libs/DevIL-1.7.8/missing new file mode 100644 index 00000000..6a37006e --- /dev/null +++ b/libs/DevIL-1.7.8/missing @@ -0,0 +1,336 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing 0.4 - GNU automake" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1Help2man' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # 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 you do not seem to have it handy on your + system. 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 prerequirements 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 diff --git a/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.dev b/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.dev new file mode 100644 index 00000000..87474e75 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.dev @@ -0,0 +1,889 @@ +[Project] +FileName=IL.dev +Name=IL +UnitCount=84 +Type=3 +Ver=1 +ObjFiles= +Includes=C:\Libraries\DevIL\include;C:\Libraries\DevIL\src-IL\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler=-DBUILDING_DLL=1_@@_ +CppCompiler=-DBUILDING_DLL=1_@@_ +Linker=--no-export-all-symbols --add-stdcall-alias_@@_-lz_@@_-ltiff_@@_-lpng_@@_-ljpeg_@@_-lmng_@@_-llcms_@@_ +IsCpp=0 +Icon= +ExeOutput=..\..\..\lib +ObjectOutput=.objects +OverrideOutput=0 +OverrideOutputName=IL.dll +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 + +[Unit1] +FileName=..\..\..\include\IL\il.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\..\..\include\IL\config.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\..\..\include\IL\devil_internal_exports.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\..\..\src-IL\include\il_targa.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\..\..\src-IL\include\il_alloc.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\..\..\src-IL\include\il_bits.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\..\..\src-IL\include\il_bmp.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\..\..\src-IL\include\il_dcx.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\..\..\src-IL\include\il_dds.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\..\src-IL\include\il_doompal.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\..\..\src-IL\include\il_endian.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\..\src-IL\include\il_files.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\src-IL\include\il_gif.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\src-IL\include\il_hdr.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\..\src-IL\include\il_icon.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\..\src-IL\include\il_internal.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\..\src-IL\include\il_jpeg.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\..\src-IL\include\il_lif.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\..\src-IL\include\il_manip.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\..\src-IL\include\il_mdl.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\..\src-IL\include\il_pal.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\..\src-IL\include\il_pcx.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\..\src-IL\include\il_pic.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\..\..\src-IL\include\il_pnm.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\..\..\src-IL\include\il_psd.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit26] +FileName=..\..\..\src-IL\include\il_psp.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit27] +FileName=..\..\..\src-IL\include\il_q2pal.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit28] +FileName=..\..\..\src-IL\include\il_register.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit29] +FileName=..\..\..\src-IL\include\il_rle.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit30] +FileName=..\..\..\src-IL\include\il_sgi.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit31] +FileName=..\..\..\src-IL\include\il_stack.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit32] +FileName=..\..\..\src-IL\include\il_states.h +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit33] +FileName=..\..\..\src-IL\src\il_xpm.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit34] +FileName=..\..\..\src-IL\src\il_alloc.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit35] +FileName=..\..\..\src-IL\src\il_bits.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit36] +FileName=..\..\..\src-IL\src\il_bmp.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit37] +FileName=..\..\..\src-IL\src\il_convbuff.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit38] +FileName=..\..\..\src-IL\src\il_convert.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit39] +FileName=..\..\..\src-IL\src\il_cut.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit40] +FileName=..\..\..\src-IL\src\il_dcx.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit41] +FileName=..\..\..\src-IL\src\il_dds.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit42] +FileName=..\..\..\src-IL\src\il_dds-save.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit43] +FileName=..\..\..\src-IL\src\il_devil.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit44] +FileName=..\..\..\src-IL\src\il_doom.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit45] +FileName=..\..\..\src-IL\src\il_endian.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit46] +FileName=..\..\..\src-IL\src\il_error.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit47] +FileName=..\..\..\src-IL\src\il_fastconv.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit48] +FileName=..\..\..\src-IL\src\il_files.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit49] +FileName=..\..\..\src-IL\src\il_gif.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit50] +FileName=..\..\..\src-IL\src\il_hdr.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit51] +FileName=..\..\..\src-IL\src\il_header.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit52] +FileName=..\..\..\src-IL\src\il_icon.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit53] +FileName=..\..\..\src-IL\src\il_internal.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit54] +FileName=..\..\..\src-IL\src\il_io.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit55] +FileName=..\..\..\src-IL\src\il_jpeg.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit56] +FileName=..\..\..\src-IL\src\il_lif.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit57] +FileName=..\..\..\src-IL\src\il_main.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit58] +FileName=..\..\..\src-IL\src\il_manip.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit59] +FileName=..\..\..\src-IL\src\il_mdl.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit60] +FileName=..\..\..\src-IL\src\il_mng.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit61] +FileName=..\..\..\src-IL\src\il_neuquant.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit62] +FileName=..\..\..\src-IL\src\il_pal.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit63] +FileName=..\..\..\src-IL\src\il_pcd.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit64] +FileName=..\..\..\src-IL\src\il_pcx.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit65] +FileName=..\..\..\src-IL\src\il_pic.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit66] +FileName=..\..\..\src-IL\src\il_pix.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit67] +FileName=..\..\..\src-IL\src\il_png.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit68] +FileName=..\..\..\src-IL\src\il_pnm.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit69] +FileName=..\..\..\src-IL\src\il_profiles.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit70] +FileName=..\..\..\src-IL\src\il_psd.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit71] +FileName=..\..\..\src-IL\src\il_psp.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit72] +FileName=..\..\..\src-IL\src\il_pxr.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit73] +FileName=..\..\..\src-IL\src\il_quantizer.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit74] +FileName=..\..\..\src-IL\src\il_raw.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit75] +FileName=..\..\..\src-IL\src\il_rawdata.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit76] +FileName=..\..\..\src-IL\src\il_register.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit77] +FileName=..\..\..\src-IL\src\il_rle.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit78] +FileName=..\..\..\src-IL\src\il_sgi.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit79] +FileName=..\..\..\src-IL\src\il_stack.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit80] +FileName=..\..\..\src-IL\src\il_states.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit81] +FileName=..\..\..\src-IL\src\il_targa.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit82] +FileName=..\..\..\src-IL\src\il_tiff.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit83] +FileName=..\..\..\src-IL\src\il_utility.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit84] +FileName=..\..\..\src-IL\src\il_wal.c +CompileCpp=0 +Folder=IL +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.layout b/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.layout new file mode 100644 index 00000000..e84ee61d --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/IL/IL.layout @@ -0,0 +1,283 @@ +[Editor_0] +CursorCol=6 +CursorRow=105 +TopLine=75 +LeftChar=1 +Open=0 +Top=0 +[Editors] +Order= +Focused=-1 +[Editor_1] +Open=0 +Top=0 +[Editor_2] +Open=0 +Top=0 +[Editor_3] +Open=0 +Top=0 +[Editor_4] +Open=0 +Top=0 +[Editor_5] +Open=0 +Top=0 +[Editor_6] +Open=0 +Top=0 +[Editor_7] +Open=0 +Top=0 +[Editor_8] +Open=0 +Top=0 +[Editor_9] +Open=0 +Top=0 +[Editor_10] +Open=0 +Top=0 +[Editor_11] +Open=0 +Top=0 +[Editor_12] +Open=0 +Top=0 +[Editor_13] +Open=0 +Top=0 +[Editor_14] +Open=0 +Top=0 +[Editor_15] +Open=0 +Top=0 +CursorCol=5 +CursorRow=237 +TopLine=222 +LeftChar=1 +[Editor_16] +Open=0 +Top=0 +[Editor_17] +Open=0 +Top=0 +[Editor_18] +Open=0 +Top=0 +[Editor_19] +Open=0 +Top=0 +[Editor_20] +Open=0 +Top=0 +[Editor_21] +Open=0 +Top=0 +[Editor_22] +Open=0 +Top=0 +[Editor_23] +Open=0 +Top=0 +[Editor_24] +Open=0 +Top=0 +[Editor_25] +Open=0 +Top=0 +[Editor_26] +Open=0 +Top=0 +[Editor_27] +Open=0 +Top=0 +[Editor_28] +Open=0 +Top=0 +[Editor_29] +Open=0 +Top=0 +[Editor_30] +Open=0 +Top=0 +[Editor_31] +Open=0 +Top=0 +[Editor_32] +Open=0 +Top=0 +CursorCol=2 +CursorRow=24 +TopLine=1 +LeftChar=1 +[Editor_33] +Open=0 +Top=0 +[Editor_34] +Open=0 +Top=0 +[Editor_35] +Open=0 +Top=0 +[Editor_36] +Open=0 +Top=0 +[Editor_37] +Open=0 +Top=0 +[Editor_38] +Open=0 +Top=0 +[Editor_39] +Open=0 +Top=0 +[Editor_40] +Open=0 +Top=0 +[Editor_41] +Open=0 +Top=0 +[Editor_42] +Open=0 +Top=0 +CursorCol=92 +CursorRow=84 +TopLine=55 +LeftChar=1 +[Editor_43] +Open=0 +Top=0 +[Editor_44] +Open=0 +Top=0 +[Editor_45] +Open=0 +Top=0 +[Editor_46] +Open=0 +Top=0 +[Editor_47] +Open=0 +Top=0 +[Editor_48] +Open=0 +Top=0 +[Editor_49] +Open=0 +Top=0 +[Editor_50] +Open=0 +Top=0 +[Editor_51] +Open=0 +Top=0 +[Editor_52] +Open=0 +Top=0 +[Editor_53] +Open=0 +Top=0 +[Editor_54] +Open=0 +Top=0 +[Editor_55] +Open=0 +Top=0 +[Editor_56] +Open=0 +Top=0 +[Editor_57] +Open=0 +Top=0 +[Editor_58] +Open=0 +Top=0 +[Editor_59] +Open=0 +Top=0 +[Editor_60] +Open=0 +Top=0 +[Editor_61] +Open=0 +Top=0 +[Editor_62] +Open=0 +Top=0 +[Editor_63] +Open=0 +Top=0 +[Editor_64] +Open=0 +Top=0 +[Editor_65] +Open=0 +Top=0 +[Editor_66] +Open=0 +Top=0 +[Editor_67] +Open=0 +Top=0 +[Editor_68] +Open=0 +Top=0 +CursorCol=36 +CursorRow=26 +TopLine=1 +LeftChar=1 +[Editor_69] +Open=0 +Top=0 +[Editor_70] +Open=0 +Top=0 +[Editor_71] +Open=0 +Top=0 +CursorCol=2 +CursorRow=21 +TopLine=1 +LeftChar=1 +[Editor_72] +Open=0 +Top=0 +[Editor_73] +Open=0 +Top=0 +[Editor_74] +Open=0 +Top=0 +[Editor_75] +Open=0 +Top=0 +[Editor_76] +Open=0 +Top=0 +[Editor_77] +Open=0 +Top=0 +[Editor_78] +Open=0 +Top=0 +[Editor_79] +Open=0 +Top=0 +[Editor_80] +Open=0 +Top=0 +[Editor_81] +Open=0 +Top=0 +CursorCol=1 +CursorRow=348 +TopLine=331 +LeftChar=1 +[Editor_82] +Open=0 +Top=0 +[Editor_83] +Open=0 +Top=0 diff --git a/libs/DevIL-1.7.8/projects/DevCpp/IL/Makefile.win b/libs/DevIL-1.7.8/projects/DevCpp/IL/Makefile.win new file mode 100644 index 00000000..e1762fe1 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/IL/Makefile.win @@ -0,0 +1,186 @@ +# Project: IL +# Makefile created by Dev-C++ 4.9.8.10 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = .objects/il_xpm.o .objects/il_alloc.o .objects/il_bits.o .objects/il_bmp.o .objects/il_convbuff.o .objects/il_convert.o .objects/il_cut.o .objects/il_dcx.o .objects/il_dds.o .objects/il_dds-save.o .objects/il_devil.o .objects/il_doom.o .objects/il_endian.o .objects/il_error.o .objects/il_fastconv.o .objects/il_files.o .objects/il_gif.o .objects/il_hdr.o .objects/il_header.o .objects/il_icon.o .objects/il_internal.o .objects/il_io.o .objects/il_jpeg.o .objects/il_lif.o .objects/il_main.o .objects/il_manip.o .objects/il_mdl.o .objects/il_mng.o .objects/il_neuquant.o .objects/il_pal.o .objects/il_pcd.o .objects/il_pcx.o .objects/il_pic.o .objects/il_pix.o .objects/il_png.o .objects/il_pnm.o .objects/il_profiles.o .objects/il_psd.o .objects/il_psp.o .objects/il_pxr.o .objects/il_quantizer.o .objects/il_raw.o .objects/il_rawdata.o .objects/il_register.o .objects/il_rle.o .objects/il_sgi.o .objects/il_stack.o .objects/il_states.o .objects/il_targa.o .objects/il_tiff.o .objects/il_utility.o .objects/il_wal.o $(RES) +LINKOBJ = .objects/il_xpm.o .objects/il_alloc.o .objects/il_bits.o .objects/il_bmp.o .objects/il_convbuff.o .objects/il_convert.o .objects/il_cut.o .objects/il_dcx.o .objects/il_dds.o .objects/il_dds-save.o .objects/il_devil.o .objects/il_doom.o .objects/il_endian.o .objects/il_error.o .objects/il_fastconv.o .objects/il_files.o .objects/il_gif.o .objects/il_hdr.o .objects/il_header.o .objects/il_icon.o .objects/il_internal.o .objects/il_io.o .objects/il_jpeg.o .objects/il_lif.o .objects/il_main.o .objects/il_manip.o .objects/il_mdl.o .objects/il_mng.o .objects/il_neuquant.o .objects/il_pal.o .objects/il_pcd.o .objects/il_pcx.o .objects/il_pic.o .objects/il_pix.o .objects/il_png.o .objects/il_pnm.o .objects/il_profiles.o .objects/il_psd.o .objects/il_psp.o .objects/il_pxr.o .objects/il_quantizer.o .objects/il_raw.o .objects/il_rawdata.o .objects/il_register.o .objects/il_rle.o .objects/il_sgi.o .objects/il_stack.o .objects/il_states.o .objects/il_targa.o .objects/il_tiff.o .objects/il_utility.o .objects/il_wal.o $(RES) +LIBS = -L"C:/Dev-Cpp/lib" -L"C:/Libraries/libjpeg/lib" -L"C:/Libraries/libpng/lib" -L"C:/Libraries/libmng/lib" -L"C:/Libraries/tiff-v3.6.1/lib" -L"C:/Libraries/lcms/lib/DevCpp" -L"C:/Libraries/zlib/lib" --no-export-all-symbols --add-stdcall-alias -lz -ltiff -lpng -ljpeg -lmng -llcms +INCS = -I"C:/Dev-Cpp/include" -I"C:/Libraries/libjpeg" -I"C:/Libraries/libpng" -I"C:/Libraries/tiff-v3.6.1/libtiff" -I"C:/Libraries/libmng" -I"C:/Libraries/zlib" -I"C:/Libraries/lcms/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-IL/include" +CXXINCS = -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-IL/include" +BIN = ../../../lib/IL.dll +CXXFLAGS = $(CXXINCS)-DBUILDING_DLL=1 +CFLAGS = $(INCS)-DBUILDING_DLL=1 + +.PHONY: all all-before all-after clean clean-custom + +all: all-before ../../../lib/IL.dll all-after + + +clean: clean-custom + rm -f $(OBJ) $(BIN) + +DLLWRAP=dllwrap.exe +DEFFILE=../../../lib/libIL.def +STATICLIB=../../../lib/libIL.a + +$(BIN): $(LINKOBJ) + $(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN) + +.objects/il_xpm.o: ../../../src-IL/src/il_xpm.c + $(CC) -c ../../../src-IL/src/il_xpm.c -o .objects/il_xpm.o $(CFLAGS) + +.objects/il_alloc.o: ../../../src-IL/src/il_alloc.c + $(CC) -c ../../../src-IL/src/il_alloc.c -o .objects/il_alloc.o $(CFLAGS) + +.objects/il_bits.o: ../../../src-IL/src/il_bits.c + $(CC) -c ../../../src-IL/src/il_bits.c -o .objects/il_bits.o $(CFLAGS) + +.objects/il_bmp.o: ../../../src-IL/src/il_bmp.c + $(CC) -c ../../../src-IL/src/il_bmp.c -o .objects/il_bmp.o $(CFLAGS) + +.objects/il_convbuff.o: ../../../src-IL/src/il_convbuff.c + $(CC) -c ../../../src-IL/src/il_convbuff.c -o .objects/il_convbuff.o $(CFLAGS) + +.objects/il_convert.o: ../../../src-IL/src/il_convert.c + $(CC) -c ../../../src-IL/src/il_convert.c -o .objects/il_convert.o $(CFLAGS) + +.objects/il_cut.o: ../../../src-IL/src/il_cut.c + $(CC) -c ../../../src-IL/src/il_cut.c -o .objects/il_cut.o $(CFLAGS) + +.objects/il_dcx.o: ../../../src-IL/src/il_dcx.c + $(CC) -c ../../../src-IL/src/il_dcx.c -o .objects/il_dcx.o $(CFLAGS) + +.objects/il_dds.o: ../../../src-IL/src/il_dds.c + $(CC) -c ../../../src-IL/src/il_dds.c -o .objects/il_dds.o $(CFLAGS) + +.objects/il_dds-save.o: ../../../src-IL/src/il_dds-save.c + $(CC) -c ../../../src-IL/src/il_dds-save.c -o .objects/il_dds-save.o $(CFLAGS) + +.objects/il_devil.o: ../../../src-IL/src/il_devil.c + $(CC) -c ../../../src-IL/src/il_devil.c -o .objects/il_devil.o $(CFLAGS) + +.objects/il_doom.o: ../../../src-IL/src/il_doom.c + $(CC) -c ../../../src-IL/src/il_doom.c -o .objects/il_doom.o $(CFLAGS) + +.objects/il_endian.o: ../../../src-IL/src/il_endian.c + $(CC) -c ../../../src-IL/src/il_endian.c -o .objects/il_endian.o $(CFLAGS) + +.objects/il_error.o: ../../../src-IL/src/il_error.c + $(CC) -c ../../../src-IL/src/il_error.c -o .objects/il_error.o $(CFLAGS) + +.objects/il_fastconv.o: ../../../src-IL/src/il_fastconv.c + $(CC) -c ../../../src-IL/src/il_fastconv.c -o .objects/il_fastconv.o $(CFLAGS) + +.objects/il_files.o: ../../../src-IL/src/il_files.c + $(CC) -c ../../../src-IL/src/il_files.c -o .objects/il_files.o $(CFLAGS) + +.objects/il_gif.o: ../../../src-IL/src/il_gif.c + $(CC) -c ../../../src-IL/src/il_gif.c -o .objects/il_gif.o $(CFLAGS) + +.objects/il_hdr.o: ../../../src-IL/src/il_hdr.c + $(CC) -c ../../../src-IL/src/il_hdr.c -o .objects/il_hdr.o $(CFLAGS) + +.objects/il_header.o: ../../../src-IL/src/il_header.c + $(CC) -c ../../../src-IL/src/il_header.c -o .objects/il_header.o $(CFLAGS) + +.objects/il_icon.o: ../../../src-IL/src/il_icon.c + $(CC) -c ../../../src-IL/src/il_icon.c -o .objects/il_icon.o $(CFLAGS) + +.objects/il_internal.o: ../../../src-IL/src/il_internal.c + $(CC) -c ../../../src-IL/src/il_internal.c -o .objects/il_internal.o $(CFLAGS) + +.objects/il_io.o: ../../../src-IL/src/il_io.c + $(CC) -c ../../../src-IL/src/il_io.c -o .objects/il_io.o $(CFLAGS) + +.objects/il_jpeg.o: ../../../src-IL/src/il_jpeg.c + $(CC) -c ../../../src-IL/src/il_jpeg.c -o .objects/il_jpeg.o $(CFLAGS) + +.objects/il_lif.o: ../../../src-IL/src/il_lif.c + $(CC) -c ../../../src-IL/src/il_lif.c -o .objects/il_lif.o $(CFLAGS) + +.objects/il_main.o: ../../../src-IL/src/il_main.c + $(CC) -c ../../../src-IL/src/il_main.c -o .objects/il_main.o $(CFLAGS) + +.objects/il_manip.o: ../../../src-IL/src/il_manip.c + $(CC) -c ../../../src-IL/src/il_manip.c -o .objects/il_manip.o $(CFLAGS) + +.objects/il_mdl.o: ../../../src-IL/src/il_mdl.c + $(CC) -c ../../../src-IL/src/il_mdl.c -o .objects/il_mdl.o $(CFLAGS) + +.objects/il_mng.o: ../../../src-IL/src/il_mng.c + $(CC) -c ../../../src-IL/src/il_mng.c -o .objects/il_mng.o $(CFLAGS) + +.objects/il_neuquant.o: ../../../src-IL/src/il_neuquant.c + $(CC) -c ../../../src-IL/src/il_neuquant.c -o .objects/il_neuquant.o $(CFLAGS) + +.objects/il_pal.o: ../../../src-IL/src/il_pal.c + $(CC) -c ../../../src-IL/src/il_pal.c -o .objects/il_pal.o $(CFLAGS) + +.objects/il_pcd.o: ../../../src-IL/src/il_pcd.c + $(CC) -c ../../../src-IL/src/il_pcd.c -o .objects/il_pcd.o $(CFLAGS) + +.objects/il_pcx.o: ../../../src-IL/src/il_pcx.c + $(CC) -c ../../../src-IL/src/il_pcx.c -o .objects/il_pcx.o $(CFLAGS) + +.objects/il_pic.o: ../../../src-IL/src/il_pic.c + $(CC) -c ../../../src-IL/src/il_pic.c -o .objects/il_pic.o $(CFLAGS) + +.objects/il_pix.o: ../../../src-IL/src/il_pix.c + $(CC) -c ../../../src-IL/src/il_pix.c -o .objects/il_pix.o $(CFLAGS) + +.objects/il_png.o: ../../../src-IL/src/il_png.c + $(CC) -c ../../../src-IL/src/il_png.c -o .objects/il_png.o $(CFLAGS) + +.objects/il_pnm.o: ../../../src-IL/src/il_pnm.c + $(CC) -c ../../../src-IL/src/il_pnm.c -o .objects/il_pnm.o $(CFLAGS) + +.objects/il_profiles.o: ../../../src-IL/src/il_profiles.c + $(CC) -c ../../../src-IL/src/il_profiles.c -o .objects/il_profiles.o $(CFLAGS) + +.objects/il_psd.o: ../../../src-IL/src/il_psd.c + $(CC) -c ../../../src-IL/src/il_psd.c -o .objects/il_psd.o $(CFLAGS) + +.objects/il_psp.o: ../../../src-IL/src/il_psp.c + $(CC) -c ../../../src-IL/src/il_psp.c -o .objects/il_psp.o $(CFLAGS) + +.objects/il_pxr.o: ../../../src-IL/src/il_pxr.c + $(CC) -c ../../../src-IL/src/il_pxr.c -o .objects/il_pxr.o $(CFLAGS) + +.objects/il_quantizer.o: ../../../src-IL/src/il_quantizer.c + $(CC) -c ../../../src-IL/src/il_quantizer.c -o .objects/il_quantizer.o $(CFLAGS) + +.objects/il_raw.o: ../../../src-IL/src/il_raw.c + $(CC) -c ../../../src-IL/src/il_raw.c -o .objects/il_raw.o $(CFLAGS) + +.objects/il_rawdata.o: ../../../src-IL/src/il_rawdata.c + $(CC) -c ../../../src-IL/src/il_rawdata.c -o .objects/il_rawdata.o $(CFLAGS) + +.objects/il_register.o: ../../../src-IL/src/il_register.c + $(CC) -c ../../../src-IL/src/il_register.c -o .objects/il_register.o $(CFLAGS) + +.objects/il_rle.o: ../../../src-IL/src/il_rle.c + $(CC) -c ../../../src-IL/src/il_rle.c -o .objects/il_rle.o $(CFLAGS) + +.objects/il_sgi.o: ../../../src-IL/src/il_sgi.c + $(CC) -c ../../../src-IL/src/il_sgi.c -o .objects/il_sgi.o $(CFLAGS) + +.objects/il_stack.o: ../../../src-IL/src/il_stack.c + $(CC) -c ../../../src-IL/src/il_stack.c -o .objects/il_stack.o $(CFLAGS) + +.objects/il_states.o: ../../../src-IL/src/il_states.c + $(CC) -c ../../../src-IL/src/il_states.c -o .objects/il_states.o $(CFLAGS) + +.objects/il_targa.o: ../../../src-IL/src/il_targa.c + $(CC) -c ../../../src-IL/src/il_targa.c -o .objects/il_targa.o $(CFLAGS) + +.objects/il_tiff.o: ../../../src-IL/src/il_tiff.c + $(CC) -c ../../../src-IL/src/il_tiff.c -o .objects/il_tiff.o $(CFLAGS) + +.objects/il_utility.o: ../../../src-IL/src/il_utility.c + $(CC) -c ../../../src-IL/src/il_utility.c -o .objects/il_utility.o $(CFLAGS) + +.objects/il_wal.o: ../../../src-IL/src/il_wal.c + $(CC) -c ../../../src-IL/src/il_wal.c -o .objects/il_wal.o $(CFLAGS) diff --git a/libs/DevIL-1.7.8/projects/DevCpp/IL/libIL.def b/libs/DevIL-1.7.8/projects/DevCpp/IL/libIL.def new file mode 100644 index 00000000..e69de29b diff --git a/libs/DevIL-1.7.8/projects/DevCpp/ILU/ILU.dev b/libs/DevIL-1.7.8/projects/DevCpp/ILU/ILU.dev new file mode 100644 index 00000000..75fb6621 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/ILU/ILU.dev @@ -0,0 +1,299 @@ +[Project] +FileName=ILU.dev +Name=ILU +UnitCount=25 +Type=3 +Ver=1 +ObjFiles= +Includes=C:\Libraries\DevIL\include;C:\Libraries\DevIL\src-ILU\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../../lib/libIL.a_@@_ +IsCpp=0 +Icon= +ExeOutput=..\..\..\lib +ObjectOutput=.objects +OverrideOutput=0 +OverrideOutputName=ILU.a +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 + +[Unit1] +FileName=..\..\..\include\IL\ilu_region.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\..\..\include\IL\ilu.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\..\..\src-ILU\include\ilu_states.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\..\..\src-ILU\include\ilu_alloc.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\..\..\src-ILU\include\ilu_filter.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\..\..\src-ILU\include\ilu_internal.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\..\..\src-ILU\include\ilu_mipmap.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\..\..\src-ILU\include\ilu_region.h +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\..\..\src-ILU\src\ilu_utilities.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\..\src-ILU\src\ilu_alloc.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\..\..\src-ILU\src\ilu_error.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\..\src-ILU\src\ilu_filter.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\src-ILU\src\ilu_filter_rcg.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\src-ILU\src\ilu_internal.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit15] +FileName=..\..\..\src-ILU\src\ilu_main.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit16] +FileName=..\..\..\src-ILU\src\ilu_manip.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit17] +FileName=..\..\..\src-ILU\src\ilu_mipmap.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit18] +FileName=..\..\..\src-ILU\src\ilu_noise.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit19] +FileName=..\..\..\src-ILU\src\ilu_region.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit20] +FileName=..\..\..\src-ILU\src\ilu_rotate.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit21] +FileName=..\..\..\src-ILU\src\ilu_scale2d.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit22] +FileName=..\..\..\src-ILU\src\ilu_scale3d.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit23] +FileName=..\..\..\src-ILU\src\ilu_scale.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit24] +FileName=..\..\..\src-ILU\src\ilu_scaling.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit25] +FileName=..\..\..\src-ILU\src\ilu_states.c +CompileCpp=0 +Folder=ILU +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/libs/DevIL-1.7.8/projects/DevCpp/ILU/Makefile.win b/libs/DevIL-1.7.8/projects/DevCpp/ILU/Makefile.win new file mode 100644 index 00000000..a4c3b170 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/ILU/Makefile.win @@ -0,0 +1,81 @@ +# Project: ILU +# Makefile created by Dev-C++ 4.9.8.10 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = .objects/ilu_utilities.o .objects/ilu_alloc.o .objects/ilu_error.o .objects/ilu_filter.o .objects/ilu_filter_rcg.o .objects/ilu_internal.o .objects/ilu_main.o .objects/ilu_manip.o .objects/ilu_mipmap.o .objects/ilu_noise.o .objects/ilu_region.o .objects/ilu_rotate.o .objects/ilu_scale2d.o .objects/ilu_scale3d.o .objects/ilu_scale.o .objects/ilu_scaling.o .objects/ilu_states.o $(RES) +LINKOBJ = .objects/ilu_utilities.o .objects/ilu_alloc.o .objects/ilu_error.o .objects/ilu_filter.o .objects/ilu_filter_rcg.o .objects/ilu_internal.o .objects/ilu_main.o .objects/ilu_manip.o .objects/ilu_mipmap.o .objects/ilu_noise.o .objects/ilu_region.o .objects/ilu_rotate.o .objects/ilu_scale2d.o .objects/ilu_scale3d.o .objects/ilu_scale.o .objects/ilu_scaling.o .objects/ilu_states.o $(RES) +LIBS = -L"C:/Dev-Cpp/lib" -L"C:/Libraries/libjpeg/lib" -L"C:/Libraries/libpng/lib" -L"C:/Libraries/libmng/lib" -L"C:/Libraries/libtiff/lib" -L"C:/Libraries/lcms/lib/Dev-Cpp" ../../../lib/libIL.a +INCS = -I"C:/Dev-Cpp/include" -I"C:/Libraries/libjpeg" -I"C:/Libraries/libpng" -I"C:/Libraries/libtiff" -I"C:/Libraries/libmng" -I"C:/Libraries/zlib" -I"C:/Libraries/lcms/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-ILU/include" +CXXINCS = -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-ILU/include" +BIN = ../../../lib/ILU.dll +CXXFLAGS = $(CXXINCS) +CFLAGS = $(INCS) + +.PHONY: all all-before all-after clean clean-custom + +all: all-before ../../../lib/ILU.dll all-after + + +clean: clean-custom + rm -f $(OBJ) $(BIN) + +DLLWRAP=dllwrap.exe +DEFFILE=../../../lib/libILU.def +STATICLIB=../../../lib/libILU.a + +$(BIN): $(LINKOBJ) + $(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN) + +.objects/ilu_utilities.o: ../../../src-ILU/src/ilu_utilities.c + $(CC) -c ../../../src-ILU/src/ilu_utilities.c -o .objects/ilu_utilities.o $(CFLAGS) + +.objects/ilu_alloc.o: ../../../src-ILU/src/ilu_alloc.c + $(CC) -c ../../../src-ILU/src/ilu_alloc.c -o .objects/ilu_alloc.o $(CFLAGS) + +.objects/ilu_error.o: ../../../src-ILU/src/ilu_error.c + $(CC) -c ../../../src-ILU/src/ilu_error.c -o .objects/ilu_error.o $(CFLAGS) + +.objects/ilu_filter.o: ../../../src-ILU/src/ilu_filter.c + $(CC) -c ../../../src-ILU/src/ilu_filter.c -o .objects/ilu_filter.o $(CFLAGS) + +.objects/ilu_filter_rcg.o: ../../../src-ILU/src/ilu_filter_rcg.c + $(CC) -c ../../../src-ILU/src/ilu_filter_rcg.c -o .objects/ilu_filter_rcg.o $(CFLAGS) + +.objects/ilu_internal.o: ../../../src-ILU/src/ilu_internal.c + $(CC) -c ../../../src-ILU/src/ilu_internal.c -o .objects/ilu_internal.o $(CFLAGS) + +.objects/ilu_main.o: ../../../src-ILU/src/ilu_main.c + $(CC) -c ../../../src-ILU/src/ilu_main.c -o .objects/ilu_main.o $(CFLAGS) + +.objects/ilu_manip.o: ../../../src-ILU/src/ilu_manip.c + $(CC) -c ../../../src-ILU/src/ilu_manip.c -o .objects/ilu_manip.o $(CFLAGS) + +.objects/ilu_mipmap.o: ../../../src-ILU/src/ilu_mipmap.c + $(CC) -c ../../../src-ILU/src/ilu_mipmap.c -o .objects/ilu_mipmap.o $(CFLAGS) + +.objects/ilu_noise.o: ../../../src-ILU/src/ilu_noise.c + $(CC) -c ../../../src-ILU/src/ilu_noise.c -o .objects/ilu_noise.o $(CFLAGS) + +.objects/ilu_region.o: ../../../src-ILU/src/ilu_region.c + $(CC) -c ../../../src-ILU/src/ilu_region.c -o .objects/ilu_region.o $(CFLAGS) + +.objects/ilu_rotate.o: ../../../src-ILU/src/ilu_rotate.c + $(CC) -c ../../../src-ILU/src/ilu_rotate.c -o .objects/ilu_rotate.o $(CFLAGS) + +.objects/ilu_scale2d.o: ../../../src-ILU/src/ilu_scale2d.c + $(CC) -c ../../../src-ILU/src/ilu_scale2d.c -o .objects/ilu_scale2d.o $(CFLAGS) + +.objects/ilu_scale3d.o: ../../../src-ILU/src/ilu_scale3d.c + $(CC) -c ../../../src-ILU/src/ilu_scale3d.c -o .objects/ilu_scale3d.o $(CFLAGS) + +.objects/ilu_scale.o: ../../../src-ILU/src/ilu_scale.c + $(CC) -c ../../../src-ILU/src/ilu_scale.c -o .objects/ilu_scale.o $(CFLAGS) + +.objects/ilu_scaling.o: ../../../src-ILU/src/ilu_scaling.c + $(CC) -c ../../../src-ILU/src/ilu_scaling.c -o .objects/ilu_scaling.o $(CFLAGS) + +.objects/ilu_states.o: ../../../src-ILU/src/ilu_states.c + $(CC) -c ../../../src-ILU/src/ilu_states.c -o .objects/ilu_states.o $(CFLAGS) diff --git a/libs/DevIL-1.7.8/projects/DevCpp/ILUT/ILUT.dev b/libs/DevIL-1.7.8/projects/DevCpp/ILUT/ILUT.dev new file mode 100644 index 00000000..e2bc2ce0 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/ILUT/ILUT.dev @@ -0,0 +1,189 @@ +[Project] +FileName=ILUT.dev +Name=ILUT +UnitCount=14 +Type=3 +Ver=1 +ObjFiles= +Includes=C:\Libraries\DevIL\include;C:\Libraries\DevIL\src-ILUT\include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker=../../../lib/libIL.a_@@_../../../lib/libILU.a_@@_-lopengl32_@@_-lglu32_@@_-lgdi32_@@_ +IsCpp=0 +Icon= +ExeOutput=..\..\..\lib +ObjectOutput=.objects +OverrideOutput=0 +OverrideOutputName=ILUT.dll +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000 + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + +[Unit1] +FileName=..\..\..\include\IL\ilut.h +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\..\..\src-ILUT\include\ilut_states.h +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=..\..\..\src-ILUT\include\ilut_allegro.h +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=..\..\..\src-ILUT\include\ilut_internal.h +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=..\..\..\src-ILUT\include\ilut_opengl.h +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit6] +FileName=..\..\..\src-ILUT\src\ilut_win32.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit7] +FileName=..\..\..\src-ILUT\src\ilut_allegro.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit8] +FileName=..\..\..\src-ILUT\src\ilut_directx9.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit9] +FileName=..\..\..\src-ILUT\src\ilut_directx.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit10] +FileName=..\..\..\src-ILUT\src\ilut_internal.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit11] +FileName=..\..\..\src-ILUT\src\ilut_main.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit12] +FileName=..\..\..\src-ILUT\src\ilut_opengl.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit13] +FileName=..\..\..\src-ILUT\src\ilut_sdlsurface.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit14] +FileName=..\..\..\src-ILUT\src\ilut_states.c +CompileCpp=0 +Folder=ILUT +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/libs/DevIL-1.7.8/projects/DevCpp/ILUT/Makefile.win b/libs/DevIL-1.7.8/projects/DevCpp/ILUT/Makefile.win new file mode 100644 index 00000000..0f51b225 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DevCpp/ILUT/Makefile.win @@ -0,0 +1,57 @@ +# Project: ILUT +# Makefile created by Dev-C++ 4.9.8.10 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = .objects/ilut_win32.o .objects/ilut_allegro.o .objects/ilut_directx9.o .objects/ilut_directx.o .objects/ilut_internal.o .objects/ilut_main.o .objects/ilut_opengl.o .objects/ilut_sdlsurface.o .objects/ilut_states.o $(RES) +LINKOBJ = .objects/ilut_win32.o .objects/ilut_allegro.o .objects/ilut_directx9.o .objects/ilut_directx.o .objects/ilut_internal.o .objects/ilut_main.o .objects/ilut_opengl.o .objects/ilut_sdlsurface.o .objects/ilut_states.o $(RES) +LIBS = -L"C:/Dev-Cpp/lib" -L"C:/Libraries/libjpeg/lib" -L"C:/Libraries/libpng/lib" -L"C:/Libraries/libmng/lib" -L"C:/Libraries/libtiff/lib" -L"C:/Libraries/lcms/lib/Dev-Cpp" ../../../lib/libIL.a ../../../lib/libILU.a -lopengl32 -lglu32 -lgdi32 +INCS = -I"C:/Dev-Cpp/include" -I"C:/Libraries/libjpeg" -I"C:/Libraries/libpng" -I"C:/Libraries/libtiff" -I"C:/Libraries/libmng" -I"C:/Libraries/zlib" -I"C:/Libraries/lcms/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-ILUT/include" +CXXINCS = -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/Libraries/DevIL/include" -I"C:/Libraries/DevIL/src-ILUT/include" +BIN = ../../../lib/ILUT.dll +CXXFLAGS = $(CXXINCS) +CFLAGS = $(INCS) + +.PHONY: all all-before all-after clean clean-custom + +all: all-before ../../../lib/ILUT.dll all-after + + +clean: clean-custom + rm -f $(OBJ) $(BIN) + +DLLWRAP=dllwrap.exe +DEFFILE=../../../lib/libILUT.def +STATICLIB=../../../lib/libILUT.a + +$(BIN): $(LINKOBJ) + $(DLLWRAP) --output-def $(DEFFILE) --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN) + +.objects/ilut_win32.o: ../../../src-ILUT/src/ilut_win32.c + $(CC) -c ../../../src-ILUT/src/ilut_win32.c -o .objects/ilut_win32.o $(CFLAGS) + +.objects/ilut_allegro.o: ../../../src-ILUT/src/ilut_allegro.c + $(CC) -c ../../../src-ILUT/src/ilut_allegro.c -o .objects/ilut_allegro.o $(CFLAGS) + +.objects/ilut_directx9.o: ../../../src-ILUT/src/ilut_directx9.c + $(CC) -c ../../../src-ILUT/src/ilut_directx9.c -o .objects/ilut_directx9.o $(CFLAGS) + +.objects/ilut_directx.o: ../../../src-ILUT/src/ilut_directx.c + $(CC) -c ../../../src-ILUT/src/ilut_directx.c -o .objects/ilut_directx.o $(CFLAGS) + +.objects/ilut_internal.o: ../../../src-ILUT/src/ilut_internal.c + $(CC) -c ../../../src-ILUT/src/ilut_internal.c -o .objects/ilut_internal.o $(CFLAGS) + +.objects/ilut_main.o: ../../../src-ILUT/src/ilut_main.c + $(CC) -c ../../../src-ILUT/src/ilut_main.c -o .objects/ilut_main.o $(CFLAGS) + +.objects/ilut_opengl.o: ../../../src-ILUT/src/ilut_opengl.c + $(CC) -c ../../../src-ILUT/src/ilut_opengl.c -o .objects/ilut_opengl.o $(CFLAGS) + +.objects/ilut_sdlsurface.o: ../../../src-ILUT/src/ilut_sdlsurface.c + $(CC) -c ../../../src-ILUT/src/ilut_sdlsurface.c -o .objects/ilut_sdlsurface.o $(CFLAGS) + +.objects/ilut_states.o: ../../../src-ILUT/src/ilut_states.c + $(CC) -c ../../../src-ILUT/src/ilut_states.c -o .objects/ilut_states.o $(CFLAGS) diff --git a/libs/DevIL-1.7.8/projects/DotNet/AssemblyInfo.cpp b/libs/DevIL-1.7.8/projects/DotNet/AssemblyInfo.cpp new file mode 100644 index 00000000..46f20243 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/AssemblyInfo.cpp @@ -0,0 +1,58 @@ +#include "stdafx.h" + +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("DevIL.NET")]; +[assembly:AssemblyDescriptionAttribute("DevIL.NET - Image Library for .NET framework")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com)")]; +[assembly:AssemblyProductAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com)")]; +[assembly:AssemblyCopyrightAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com) - Released under BSD license")]; +[assembly:AssemblyTrademarkAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com) - Released under BSD license")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.1.*")]; + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project directory. +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly:AssemblyDelaySignAttribute(false)]; +[assembly:AssemblyKeyFileAttribute("")]; +[assembly:AssemblyKeyNameAttribute("")]; + diff --git a/libs/DevIL-1.7.8/projects/DotNet/COPYING.txt b/libs/DevIL-1.7.8/projects/DotNet/COPYING.txt new file mode 100644 index 00000000..767a6cf4 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/COPYING.txt @@ -0,0 +1,11 @@ +DevIL.NET +Copyright (c) 2005, Marco Mastropaolo +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of DevIL.NET nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.cpp b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.cpp new file mode 100644 index 00000000..3d11eb01 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.cpp @@ -0,0 +1,308 @@ +// DevIL.NET +// Copyright (c) 2005, Marco Mastropaolo +// All rights reserved. + +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: + +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of DevIL.NET nor the names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#using +#using +#include +#include "IL/il.h" +#include "IL/ilu.h" + +#undef LoadBitmap // brain damaged windows.h macros.. + +typedef ILboolean (*PFNILUSCALE)(ILuint Width, ILuint Height, ILuint Depth); +typedef ILvoid (*PFNILUIMAGEPARAMETER)(ILenum PName, ILenum Param); + + + +namespace DevIL +{ + class StringAutoMarshal + { + char* m_string; + + inline explicit StringAutoMarshal(const StringAutoMarshal& i_Source) : m_string(NULL) {} + inline StringAutoMarshal& operator= (const StringAutoMarshal& i_Source) {} + + public: + inline explicit StringAutoMarshal(const System::String __gc* i_strString) : m_string(NULL) + { + m_string = (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(const_cast(i_strString)); + } + + + inline ~StringAutoMarshal() + { + System::Runtime::InteropServices::Marshal::FreeHGlobal((void*)m_string); + } + + inline char* GetNativeString() + { + return m_string; + } + + inline operator char*() + { + return m_string; + } + }; + + public __value enum DevILScaleFilter + { + NEAREST = ILU_NEAREST, + LINEAR = ILU_LINEAR, + BILINEAR = ILU_BILINEAR, + BOX = ILU_SCALE_BOX, + TRIANGLE = ILU_SCALE_TRIANGLE, + BELL = ILU_SCALE_BELL, + BSPLINE = ILU_SCALE_BSPLINE, + LANCZOS3 = ILU_SCALE_LANCZOS3, + MITCHELL = ILU_SCALE_MITCHELL + }; + + public __value enum DevILScaleKind + { + DO_NOT_SCALE, + WIDTH_AND_HEIGHT, + WIDTH_ONLY, + HEIGHT_ONLY, + KEEPRATIO_USING_WIDTH, + KEEPRATIO_USING_HEIGHT + }; + + + public __value enum DevILErrorCode + { + OK = 0, + ILU_DLL_NOT_FOUND = 0x0001, + INVALID_ENUM = IL_INVALID_ENUM, + OUT_OF_MEMORY = IL_OUT_OF_MEMORY, + FORMAT_NOT_SUPPORTED = IL_FORMAT_NOT_SUPPORTED, + INTERNAL_ERROR = IL_INTERNAL_ERROR, + INVALID_VALUE = IL_INVALID_VALUE, + ILLEGAL_OPERATION = IL_ILLEGAL_OPERATION, + ILLEGAL_FILE_VALUE = IL_ILLEGAL_FILE_VALUE, + INVALID_FILE_HEADER = IL_INVALID_FILE_HEADER, + INVALID_PARAM = IL_INVALID_PARAM, + COULD_NOT_OPEN_FILE = IL_COULD_NOT_OPEN_FILE, + INVALID_EXTENSION = IL_INVALID_EXTENSION, + FILE_ALREADY_EXISTS = IL_FILE_ALREADY_EXISTS, + OUT_FORMAT_SAME = IL_OUT_FORMAT_SAME, + STACK_OVERFLOW = IL_STACK_OVERFLOW, + STACK_UNDERFLOW = IL_STACK_UNDERFLOW, + INVALID_CONVERSION = IL_INVALID_CONVERSION, + BAD_DIMENSIONS = IL_BAD_DIMENSIONS, + FILE_READ_ERROR = IL_FILE_READ_ERROR, + FILE_WRITE_ERROR = IL_FILE_WRITE_ERROR, + LIB_GIF_ERROR = IL_LIB_GIF_ERROR, + LIB_JPEG_ERROR = IL_LIB_JPEG_ERROR, + LIB_PNG_ERROR = IL_LIB_PNG_ERROR, + LIB_TIFF_ERROR = IL_LIB_TIFF_ERROR, + LIB_MNG_ERROR = IL_LIB_MNG_ERROR, + UNKNOWN_ERROR = IL_UNKNOWN_ERROR + }; + + + public __gc class DevIL + { + protected: + static ILuint s_iImageID = 0; + static bool s_bInitDone = false; + static bool s_bIluLoaded = false; + static DevILErrorCode s_eErrCode = OK; + static PFNILUSCALE pfnIluScale = NULL; + static PFNILUIMAGEPARAMETER pfnIluImageParameter = NULL; + static void LoadILU(); + public: + static System::Drawing::Bitmap __gc* LoadBitmap(System::String __gc* i_szFileName); + static System::Drawing::Bitmap __gc* LoadBitmapAndScale(System::String __gc* i_szFileName, + int i_iWidth, int i_iHeight, + DevILScaleFilter i_eFilter, DevILScaleKind i_eKind); + static bool SaveBitmap(System::String __gc* i_szFileName, System::Drawing::Bitmap __gc* i_poBitmap); + static DevILErrorCode GetErrorCode(); + }; +} + + + +void DevIL::DevIL::LoadILU() +{ + HMODULE hM = LoadLibrary("ILU.dll"); + + if (hM) + { + pfnIluScale = (PFNILUSCALE)GetProcAddress(hM, "iluScale"); + pfnIluImageParameter = (PFNILUIMAGEPARAMETER)GetProcAddress(hM, "iluImageParameter"); + s_bIluLoaded = (pfnIluScale != NULL) && (pfnIluImageParameter != NULL); + } +} + + + +System::Drawing::Bitmap __gc* DevIL::DevIL::LoadBitmap(System::String __gc* i_szFileName) +{ + return LoadBitmapAndScale(i_szFileName, 0, 0, NEAREST, DO_NOT_SCALE); +} + +DevIL::DevILErrorCode DevIL::DevIL::GetErrorCode() +{ + if (s_eErrCode == OK) + { + return DevILErrorCode(ilGetError()); + } + else + { + DevILErrorCode eErr = s_eErrCode; + s_eErrCode = OK; + return eErr; + } +} + +System::Drawing::Bitmap __gc* DevIL::DevIL::LoadBitmapAndScale(System::String __gc* i_szFileName, + int i_iWidth, int i_iHeight, + DevILScaleFilter i_eFilter, + DevILScaleKind i_eKind) +{ + if (!s_bInitDone) + { + ilInit(); + s_bInitDone = true; + } + ilGenImages(1, &s_iImageID); + ilBindImage(s_iImageID); + + if (0==ilLoadImage(StringAutoMarshal(i_szFileName))) + { + return NULL; + } + + int iW = ilGetInteger(IL_IMAGE_WIDTH); + int iH = ilGetInteger(IL_IMAGE_HEIGHT); + bool bResize = true; + + switch(i_eKind) + { + case WIDTH_AND_HEIGHT: + iW = i_iWidth; + iH = i_iHeight; + break; + case WIDTH_ONLY: + iW = i_iWidth; + break; + case HEIGHT_ONLY: + iH = i_iHeight; + break; + case KEEPRATIO_USING_WIDTH: + iH = int(double(iH) * double(i_iWidth) / double(iW)); + iW = i_iWidth; + break; + case KEEPRATIO_USING_HEIGHT: + iW = int(double(iW) * double(i_iHeight) / double(iH)); + iH = i_iHeight; + break; + case DO_NOT_SCALE: + bResize = false; + break; + default: + break; + } + + System::Drawing::Bitmap __gc* pBmp = __gc new System::Drawing::Bitmap(iW, iH, System::Drawing::Imaging::PixelFormat::Format32bppArgb); + + System::Drawing::Rectangle rect; rect.X = 0; rect.Y = 0; rect.Width = iW; rect.Height = iH; + + System::Drawing::Imaging::BitmapData __gc* pBd = pBmp->LockBits(rect, + System::Drawing::Imaging::ImageLockMode::WriteOnly, + System::Drawing::Imaging::PixelFormat::Format32bppArgb); + + void* pScan0 = (void*)(pBd->Scan0); + + // this is dangerous bc we ignore stride.. but it works and is FAST! ;) + + if (bResize) + { + if (!s_bIluLoaded) + { + LoadILU(); + } + + if (s_bIluLoaded) + { + pfnIluImageParameter(ILU_FILTER, (int)(i_eFilter)); + pfnIluScale(iW, iH, 1); + } + else + { + s_eErrCode = ILU_DLL_NOT_FOUND; + return NULL; + } + } + + ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE); // support for non 32bit images.. + ilCopyPixels(0, 0, 0, iW, iH, 1, IL_BGRA, IL_UNSIGNED_BYTE, pScan0); + + ilDeleteImages(1, &s_iImageID); + + pBmp->UnlockBits(pBd); + + return pBmp; +} + +bool DevIL::DevIL::SaveBitmap(System::String __gc* i_szFileName, System::Drawing::Bitmap __gc* i_poBitmap) +{ + if (!s_bInitDone) + { + ilInit(); + s_bInitDone = true; + } + ilGenImages(1, &s_iImageID); + ilBindImage(s_iImageID); + + int iW = i_poBitmap->get_Width(); + int iH = i_poBitmap->get_Height(); + + System::Drawing::Rectangle rect; rect.X = 0; rect.Y = 0; rect.Width = iW; rect.Height = iH; + + i_poBitmap->RotateFlip(System::Drawing::RotateFlipType::RotateNoneFlipY); + + System::Drawing::Imaging::BitmapData __gc* pBd = i_poBitmap->LockBits(rect, + System::Drawing::Imaging::ImageLockMode::ReadOnly, + System::Drawing::Imaging::PixelFormat::Format32bppArgb); + + void* pScan0 = (void*)(pBd->Scan0); + + bool bSuccess = 0!= ilTexImage(iW, iH, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, pScan0); + + if (!bSuccess) + { + return false; + } + + bool bRes = ilSaveImage(StringAutoMarshal(i_szFileName))!=0; + + ilDeleteImages(1, &s_iImageID); + + i_poBitmap->UnlockBits(pBd); + i_poBitmap->RotateFlip(System::Drawing::RotateFlipType::RotateNoneFlipY); + + return bRes; +} + diff --git a/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.sln b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.sln new file mode 100644 index 00000000..a569d448 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.sln @@ -0,0 +1,42 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL.NET", "DevIL.NET.vcproj", "{30D94686-D452-4A73-B59D-178288807EE5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThumbView", "..\ThumbView\ThumbView.csproj", "{1541F8B7-DBE4-490B-9E1A-8D0122339F09}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageViewCs", "..\ImageViewCs\ImageViewCs.csproj", "{C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageViewVb", "..\ImageViewVb\ImageViewVb.vbproj", "{F073580C-F355-4F4A-98B7-83D571B96B9E}" +EndProject +Global + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {30D94686-D452-4A73-B59D-178288807EE5}.Debug.ActiveCfg = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug.Build.0 = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release.ActiveCfg = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release.Build.0 = Release|Win32 + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug.ActiveCfg = Debug|.NET + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug.Build.0 = Debug|.NET + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release.ActiveCfg = Release|.NET + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release.Build.0 = Release|.NET + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug.ActiveCfg = Debug|.NET + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug.Build.0 = Debug|.NET + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release.ActiveCfg = Release|.NET + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release.Build.0 = Release|.NET + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug.ActiveCfg = Debug|.NET + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug.Build.0 = Debug|.NET + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release.ActiveCfg = Release|.NET + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release.Build.0 = Release|.NET + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.vcproj b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.vcproj new file mode 100644 index 00000000..ffa7b727 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/DevIL.NET.vcproj @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/App.ico b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/App.ico new file mode 100644 index 00000000..3a5525fd Binary files /dev/null and b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/App.ico differ diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/AssemblyInfo.cs b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/AssemblyInfo.cs new file mode 100644 index 00000000..177a4f0e --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj new file mode 100644 index 00000000..13797ee5 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj.user b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj.user new file mode 100644 index 00000000..4089d2bb --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/ImageViewCs.csproj.user @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.cs b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.cs new file mode 100644 index 00000000..95896d02 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.cs @@ -0,0 +1,247 @@ +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using System.Data; + +namespace ImageViewCs +{ + /// + /// Summary description for Form1. + /// + public class frmImageView : System.Windows.Forms.Form + { + private System.Windows.Forms.MainMenu mainMenu; + private System.Windows.Forms.PictureBox pictureBox; + private System.Windows.Forms.MenuItem mnuFile; + private System.Windows.Forms.MenuItem mnuFileOpen; + private System.Windows.Forms.MenuItem mnuFileSaveAs; + private System.Windows.Forms.MenuItem mnuFileSep1; + private System.Windows.Forms.MenuItem mnuFileExit; + private System.Windows.Forms.MenuItem mnuHelp; + private System.Windows.Forms.MenuItem mnuHelpAbout; + private System.Windows.Forms.Panel panel; + /// + /// Required designer variable. + /// + private System.ComponentModel.Container components = null; + + public frmImageView() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + + // + // TODO: Add any constructor code after InitializeComponent call + // + } + + /// + /// Clean up any resources being used. + /// + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.mainMenu = new System.Windows.Forms.MainMenu(); + this.mnuFile = new System.Windows.Forms.MenuItem(); + this.mnuFileOpen = new System.Windows.Forms.MenuItem(); + this.mnuFileSaveAs = new System.Windows.Forms.MenuItem(); + this.mnuFileSep1 = new System.Windows.Forms.MenuItem(); + this.mnuFileExit = new System.Windows.Forms.MenuItem(); + this.mnuHelp = new System.Windows.Forms.MenuItem(); + this.mnuHelpAbout = new System.Windows.Forms.MenuItem(); + this.panel = new System.Windows.Forms.Panel(); + this.pictureBox = new System.Windows.Forms.PictureBox(); + this.panel.SuspendLayout(); + this.SuspendLayout(); + // + // mainMenu + // + this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.mnuFile, + this.mnuHelp}); + // + // mnuFile + // + this.mnuFile.Index = 0; + this.mnuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.mnuFileOpen, + this.mnuFileSaveAs, + this.mnuFileSep1, + this.mnuFileExit}); + this.mnuFile.Text = "&File"; + // + // mnuFileOpen + // + this.mnuFileOpen.Index = 0; + this.mnuFileOpen.Text = "&Open..."; + this.mnuFileOpen.Click += new System.EventHandler(this.mnuFileOpen_Click); + // + // mnuFileSaveAs + // + this.mnuFileSaveAs.Index = 1; + this.mnuFileSaveAs.Text = "Save &as..."; + this.mnuFileSaveAs.Click += new System.EventHandler(this.mnuFileSaveAs_Click); + // + // mnuFileSep1 + // + this.mnuFileSep1.Index = 2; + this.mnuFileSep1.Text = "-"; + // + // mnuFileExit + // + this.mnuFileExit.Index = 3; + this.mnuFileExit.Text = "E&xit"; + this.mnuFileExit.Click += new System.EventHandler(this.mnuFileExit_Click); + // + // mnuHelp + // + this.mnuHelp.Index = 1; + this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.mnuHelpAbout}); + this.mnuHelp.Text = "&?"; + // + // mnuHelpAbout + // + this.mnuHelpAbout.Index = 0; + this.mnuHelpAbout.Text = "&About..."; + this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click); + // + // panel + // + this.panel.AutoScroll = true; + this.panel.Controls.AddRange(new System.Windows.Forms.Control[] { + this.pictureBox}); + this.panel.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(720, 414); + this.panel.TabIndex = 1; + // + // pictureBox + // + this.pictureBox.Name = "pictureBox"; + this.pictureBox.Size = new System.Drawing.Size(720, 414); + this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBox.TabIndex = 0; + this.pictureBox.TabStop = false; + // + // frmImageView + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(720, 414); + this.Controls.AddRange(new System.Windows.Forms.Control[] { + this.panel}); + this.Menu = this.mainMenu; + this.Name = "frmImageView"; + this.Text = "ImageView C#"; + this.panel.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.Run(new frmImageView()); + } + + private System.Drawing.Bitmap m_bmp; + + private void mnuFileOpen_Click(object sender, System.EventArgs e) + { + System.Windows.Forms.OpenFileDialog ofd = new System.Windows.Forms.OpenFileDialog(); + ofd.Filter = "All Image Files(*.BMP;*.CUT;*.DCX;*.DDS;*.ICO;*.GIF;*.JPG;*.LBM;*.LIF;*.MDL;*.PCD;*.PCX;*.PIC;*.PNG;*.PNM;*.PSD;*.PSP;*.RAW;*.SGI;*.TGA;*.TIF;*.WAL;*.ACT;*.PAL;)|*.BMP;*.CUT;*.DCX;*.DDS;*.ICO;*.GIF;*.JPG;*.LBM;*.LIF;*.MDL;*.PCD;*.PCX;*.PIC;*.PNG;*.PNM;*.PSD;*.PSP;*.RAW;*.SGI;*.TGA;*.TIF;*.WAL;*.ACT;*.PAL|All files (*.*)|*.*"; + ofd.Filter += "|BMP files (*.BMP)|*.BMP"; + ofd.Filter += "|CUT files (*.CUT)|*.CUT"; + ofd.Filter += "|DCX files (*.DCX)|*.DCX"; + ofd.Filter += "|DDS files (*.DDS)|*.DDS"; + ofd.Filter += "|ICO files (*.ICO)|*.ICO"; + ofd.Filter += "|GIF files (*.GIF)|*.GIF"; + ofd.Filter += "|JPG files (*.JPG)|*.JPG"; + ofd.Filter += "|LBM files (*.LBM)|*.LBM"; + ofd.Filter += "|LIF files (*.LIF)|*.LIF"; + ofd.Filter += "|MDL files (*.MDL)|*.MDL"; + ofd.Filter += "|PCD files (*.PCD)|*.PCD"; + ofd.Filter += "|PCX files (*.PCX)|*.PCX"; + ofd.Filter += "|PIC files (*.PIC)|*.PIC"; + ofd.Filter += "|PNG files (*.PNG)|*.PNG"; + ofd.Filter += "|PNM files (*.PNM)|*.PNM"; + ofd.Filter += "|PSD files (*.PSD)|*.PSD"; + ofd.Filter += "|PSP files (*.PSP)|*.PSP"; + ofd.Filter += "|RAW files (*.RAW)|*.RAW"; + ofd.Filter += "|SGI files (*.SGI)|*.SGI"; + ofd.Filter += "|TGA files (*.TGA)|*.TGA"; + ofd.Filter += "|TIF files (*.TIF)|*.TIF"; + ofd.Filter += "|WAL files (*.WAL)|*.WAL"; + ofd.Filter += "|ACT files (*.ACT)|*.ACT"; + ofd.Filter += "|PAL files (*.PAL)|*.PAL"; + ofd.Filter += "|All files (*.*)|*.*"; + + if (ofd.ShowDialog() == DialogResult.OK) + { + m_bmp = DevIL.DevIL.LoadBitmap(ofd.FileName); + if (m_bmp != null) + { + pictureBox.Image = m_bmp; + } + } + } + + private void mnuFileExit_Click(object sender, System.EventArgs e) + { + this.Close(); + } + + private void mnuHelpAbout_Click(object sender, System.EventArgs e) + { + MessageBox.Show("Program by Marco Mastropaolo\n\nThis is a C# example for the DevIL.NET library.\n\nhttp://www.mastropaolo.com", "About"); + } + + private void mnuFileSaveAs_Click(object sender, System.EventArgs e) + { + if (m_bmp != null) + { + System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog(); + sfd.Filter = "BMP format (*.BMP)|*.BMP"; + sfd.Filter += "|DDS format (*.DDS)|*.DDS"; + sfd.Filter += "|JPG format (*.JPG)|*.JPG"; + sfd.Filter += "|PCX format (*.PCX)|*.PCX"; + sfd.Filter += "|PNG format (*.PNG)|*.PNG"; + sfd.Filter += "|PNM format (*.PNM)|*.PNM"; + sfd.Filter += "|RAW format (*.RAW)|*.RAW"; + sfd.Filter += "|SGI format (*.SGI)|*.SGI"; + sfd.Filter += "|TGA format (*.TGA)|*.TGA"; + sfd.Filter += "|TIF format (*.TIF)|*.TIF"; + sfd.Filter += "|PAL format (*.PAL)|*.PAL"; + + if (sfd.ShowDialog() == DialogResult.OK) + { + DevIL.DevIL.SaveBitmap(sfd.FileName, m_bmp); + } + } + } + } +} diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.resx b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.resx new file mode 100644 index 00000000..6441bbaa --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewCs/frmImageView.resx @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + frmImageView + + \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/AssemblyInfo.vb b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/AssemblyInfo.vb new file mode 100644 index 00000000..92e12839 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/AssemblyInfo.vb @@ -0,0 +1,31 @@ +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj new file mode 100644 index 00000000..77715f85 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj.user b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj.user new file mode 100644 index 00000000..d3372fab --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/ImageViewVb.vbproj.user @@ -0,0 +1,48 @@ + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.resx b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.resx new file mode 100644 index 00000000..dc8d5467 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 159, 0 + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + Assembly + + + frmImageView + + \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.vb b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.vb new file mode 100644 index 00000000..a78f6af1 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/ImageViewVb/frmImageView.vb @@ -0,0 +1,184 @@ +Public Class frmImageView + Inherits System.Windows.Forms.Form + +#Region " Windows Form Designer generated code " + + Public Sub New() + MyBase.New() + + 'This call is required by the Windows Form Designer. + InitializeComponent() + + 'Add any initialization after the InitializeComponent() call + + End Sub + + 'Form overrides dispose to clean up the component list. + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + Friend WithEvents mainMenu As System.Windows.Forms.MainMenu + Friend WithEvents mnuFile As System.Windows.Forms.MenuItem + Friend WithEvents mnuFileOpen As System.Windows.Forms.MenuItem + Friend WithEvents mnuFileSaveAs As System.Windows.Forms.MenuItem + Friend WithEvents mnuFileSep1 As System.Windows.Forms.MenuItem + Friend WithEvents mnuFileExit As System.Windows.Forms.MenuItem + Friend WithEvents mnuHelp As System.Windows.Forms.MenuItem + Friend WithEvents mnuHelpAbout As System.Windows.Forms.MenuItem + Friend WithEvents pictureBox As System.Windows.Forms.PictureBox + Private Sub InitializeComponent() + Me.mainMenu = New System.Windows.Forms.MainMenu() + Me.mnuFile = New System.Windows.Forms.MenuItem() + Me.mnuFileOpen = New System.Windows.Forms.MenuItem() + Me.mnuFileSaveAs = New System.Windows.Forms.MenuItem() + Me.mnuFileSep1 = New System.Windows.Forms.MenuItem() + Me.mnuFileExit = New System.Windows.Forms.MenuItem() + Me.mnuHelp = New System.Windows.Forms.MenuItem() + Me.mnuHelpAbout = New System.Windows.Forms.MenuItem() + Me.pictureBox = New System.Windows.Forms.PictureBox() + Me.SuspendLayout() + ' + 'mainMenu + ' + Me.mainMenu.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile, Me.mnuHelp}) + ' + 'mnuFile + ' + Me.mnuFile.Index = 0 + Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFileOpen, Me.mnuFileSaveAs, Me.mnuFileSep1, Me.mnuFileExit}) + Me.mnuFile.Text = "&File" + ' + 'mnuFileOpen + ' + Me.mnuFileOpen.Index = 0 + Me.mnuFileOpen.Text = "&Open..." + ' + 'mnuFileSaveAs + ' + Me.mnuFileSaveAs.Index = 1 + Me.mnuFileSaveAs.Text = "Save &as..." + ' + 'mnuFileSep1 + ' + Me.mnuFileSep1.Index = 2 + Me.mnuFileSep1.Text = "-" + ' + 'mnuFileExit + ' + Me.mnuFileExit.Index = 3 + Me.mnuFileExit.Text = "E&xit" + ' + 'mnuHelp + ' + Me.mnuHelp.Index = 1 + Me.mnuHelp.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuHelpAbout}) + Me.mnuHelp.Text = "&?" + ' + 'mnuHelpAbout + ' + Me.mnuHelpAbout.Index = 0 + Me.mnuHelpAbout.Text = "&About..." + ' + 'pictureBox + ' + Me.pictureBox.Name = "pictureBox" + Me.pictureBox.Size = New System.Drawing.Size(720, 414) + Me.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize + Me.pictureBox.TabIndex = 1 + Me.pictureBox.TabStop = False + ' + 'frmImageView + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) + Me.ClientSize = New System.Drawing.Size(720, 434) + Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.pictureBox}) + Me.Menu = Me.mainMenu + Me.Name = "frmImageView" + Me.Text = "ImageView VB.NET" + Me.ResumeLayout(False) + + End Sub + +#End Region + + Private m_bmp As System.Drawing.Bitmap + + + Private Sub mnuFileOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileOpen.Click + Dim ofd As New System.Windows.Forms.OpenFileDialog() + ofd.Filter = "All Image Files(*.BMP;*.CUT;*.DCX;*.DDS;*.ICO;*.GIF;*.JPG;*.LBM;*.LIF;*.MDL;*.PCD;*.PCX;*.PIC;*.PNG;*.PNM;*.PSD;*.PSP;*.RAW;*.SGI;*.TGA;*.TIF;*.WAL;*.ACT;*.PAL;)|*.BMP;*.CUT;*.DCX;*.DDS;*.ICO;*.GIF;*.JPG;*.LBM;*.LIF;*.MDL;*.PCD;*.PCX;*.PIC;*.PNG;*.PNM;*.PSD;*.PSP;*.RAW;*.SGI;*.TGA;*.TIF;*.WAL;*.ACT;*.PAL|All files (*.*)|*.*" + ofd.Filter += "|BMP files (*.BMP)|*.BMP" + ofd.Filter += "|CUT files (*.CUT)|*.CUT" + ofd.Filter += "|DCX files (*.DCX)|*.DCX" + ofd.Filter += "|DDS files (*.DDS)|*.DDS" + ofd.Filter += "|ICO files (*.ICO)|*.ICO" + ofd.Filter += "|GIF files (*.GIF)|*.GIF" + ofd.Filter += "|JPG files (*.JPG)|*.JPG" + ofd.Filter += "|LBM files (*.LBM)|*.LBM" + ofd.Filter += "|LIF files (*.LIF)|*.LIF" + ofd.Filter += "|MDL files (*.MDL)|*.MDL" + ofd.Filter += "|PCD files (*.PCD)|*.PCD" + ofd.Filter += "|PCX files (*.PCX)|*.PCX" + ofd.Filter += "|PIC files (*.PIC)|*.PIC" + ofd.Filter += "|PNG files (*.PNG)|*.PNG" + ofd.Filter += "|PNM files (*.PNM)|*.PNM" + ofd.Filter += "|PSD files (*.PSD)|*.PSD" + ofd.Filter += "|PSP files (*.PSP)|*.PSP" + ofd.Filter += "|RAW files (*.RAW)|*.RAW" + ofd.Filter += "|SGI files (*.SGI)|*.SGI" + ofd.Filter += "|TGA files (*.TGA)|*.TGA" + ofd.Filter += "|TIF files (*.TIF)|*.TIF" + ofd.Filter += "|WAL files (*.WAL)|*.WAL" + ofd.Filter += "|ACT files (*.ACT)|*.ACT" + ofd.Filter += "|PAL files (*.PAL)|*.PAL" + ofd.Filter += "|All files (*.*)|*.*" + + If (ofd.ShowDialog() = DialogResult.OK) Then + m_bmp = DevIL.DevIL.LoadBitmap(ofd.FileName) + If Not (m_bmp Is Nothing) Then + pictureBox.Image = m_bmp + End If + End If + End Sub + + Private Sub mnuFileSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileSaveAs.Click + If Not (m_bmp Is Nothing) Then + Dim sfd As New System.Windows.Forms.SaveFileDialog() + sfd.Filter = "BMP format (*.BMP)|*.BMP" + sfd.Filter += "|DDS format (*.DDS)|*.DDS" + sfd.Filter += "|JPG format (*.JPG)|*.JPG" + sfd.Filter += "|PCX format (*.PCX)|*.PCX" + sfd.Filter += "|PNG format (*.PNG)|*.PNG" + sfd.Filter += "|PNM format (*.PNM)|*.PNM" + sfd.Filter += "|RAW format (*.RAW)|*.RAW" + sfd.Filter += "|SGI format (*.SGI)|*.SGI" + sfd.Filter += "|TGA format (*.TGA)|*.TGA" + sfd.Filter += "|TIF format (*.TIF)|*.TIF" + sfd.Filter += "|PAL format (*.PAL)|*.PAL" + + If (sfd.ShowDialog() = DialogResult.OK) Then + DevIL.DevIL.SaveBitmap(sfd.FileName, m_bmp) + End If + End If + End Sub + + Private Sub mnuFileExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click + Me.Close() + End Sub + + Private Sub mnuHelpAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHelpAbout.Click + MessageBox.Show("Program by Marco Mastropaolo\n\nThis is a VB.NET example for the DevIL.NET library.\n\nhttp://www.mastropaolo.com", "About") + End Sub +End Class diff --git a/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.sln b/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.sln new file mode 100644 index 00000000..29b3b065 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.sln @@ -0,0 +1,79 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL.NET", "DevIL.NET.vcproj", "{30D94686-D452-4A73-B59D-178288807EE5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThumbView", "..\ThumbView\ThumbView.csproj", "{1541F8B7-DBE4-490B-9E1A-8D0122339F09}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageViewCs", "..\ImageViewCs\ImageViewCs.csproj", "{C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageViewVb", "..\ImageViewVb\ImageViewVb.vbproj", "{F073580C-F355-4F4A-98B7-83D571B96B9E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Win32 = Debug|Win32 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|Win32 = Release|Win32 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|Win32.Build.0 = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Debug|x86.ActiveCfg = Debug|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|Any CPU.ActiveCfg = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|Mixed Platforms.Build.0 = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|Win32.ActiveCfg = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|Win32.Build.0 = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|x86.ActiveCfg = Release|Win32 + {30D94686-D452-4A73-B59D-178288807EE5}.Release|x86.Build.0 = Release|Win32 + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug|Win32.ActiveCfg = Debug|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug|x86.ActiveCfg = Debug|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release|Win32.ActiveCfg = Release|Any CPU + {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release|x86.ActiveCfg = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|Win32.ActiveCfg = Debug|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|x86.ActiveCfg = Debug|x86 + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug|x86.Build.0 = Debug|x86 + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|Any CPU.Build.0 = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|Win32.ActiveCfg = Release|Any CPU + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|x86.ActiveCfg = Release|x86 + {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release|x86.Build.0 = Release|x86 + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|Win32.ActiveCfg = Debug|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|x86.ActiveCfg = Debug|x86 + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug|x86.Build.0 = Debug|x86 + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|Any CPU.Build.0 = Release|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|Win32.ActiveCfg = Release|Any CPU + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|x86.ActiveCfg = Release|x86 + {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(DPCodeReviewSolutionGUID) = preSolution + DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.vcproj b/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.vcproj new file mode 100644 index 00000000..9feea9f5 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/DotNet/vcproj vs2005/DevIL.NET.vcproj @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/Mathematica/DevIL Interface.c b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Interface.c new file mode 100644 index 00000000..3b39874e --- /dev/null +++ b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Interface.c @@ -0,0 +1,90 @@ +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + int retval; + int image; + + ilInit(); + iluInit(); + ilutInit(); + + ilGenImages(1, &image); + ilBindImage(image); + ilOriginFunc(IL_ORIGIN_LOWER_LEFT); + + retval = MLMain(argc, argv); + + ilDeleteImages(1, &image); + + ilShutDown(); // Only need to shut down DevIL, not ILU or ILUT + + return retval; +} + +/*int f(int x, int y) +{ + return x+y; +} + + +void bits(int i) +{ + int a[32], k; + for(k=0; k<32; k++) { + a[k] = i%2; + i >>= 1; + if (i==0) break; + } + + if (k<32) k++; + MLPutInteger32List(stdlink, a, k); + return; +}*/ + +int mlLoad(char *Filename) +{ + int ret = ilLoadImage(Filename); + if (ilGetInteger(IL_ORIGIN_MODE) != IL_ORIGIN_UPPER_LEFT) + iluFlipImage(); + ilConvertImage(IL_RGBA, IL_DOUBLE); + return ret; +} + +int mlWidth(void) +{ + return ilGetInteger(IL_IMAGE_WIDTH); +} + +int mlHeight(void) +{ + return ilGetInteger(IL_IMAGE_HEIGHT); +} + +void mlData(void) +{ + /*int x, y, c; + int *Data; + ILubyte *OrigData = ilGetData(); + + Data = malloc(ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4 * sizeof(int)); + for (y = 0; y < ilGetInteger(IL_IMAGE_HEIGHT); y++) { + for (x = 0; x < ilGetInteger(IL_IMAGE_WIDTH); x++) { + for (c = 0; c < 4; c++) { + Data[y * ilGetInteger(IL_IMAGE_WIDTH) * 4 + x * 4 + c] = OrigData[y * ilGetInteger(IL_IMAGE_WIDTH) * 4 + x * 4 + c]; + } + } + } + + MLPutInteger32List(stdlink, Data, ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4); + + free(Data);*/ + + MLPutReal64List(stdlink, (ILdouble*)ilGetData(), ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4); + + return; +} + diff --git a/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.sln b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.sln new file mode 100644 index 00000000..5d4dcd1b --- /dev/null +++ b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL Mathematica", "DevIL Mathematica.vcproj", "{A73E8E53-2A08-405E-B462-E1541FE3E00F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Debug|Win32.Build.0 = Debug|Win32 + {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Release|Win32.ActiveCfg = Release|Win32 + {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.vcproj b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.vcproj new file mode 100644 index 00000000..2097af49 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/Mathematica/DevIL Mathematica.vcproj @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/Mathematica/DevIL.nb b/libs/DevIL-1.7.8/projects/Mathematica/DevIL.nb new file mode 100644 index 00000000..fcf9b329 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/Mathematica/DevIL.nb @@ -0,0 +1,142 @@ +(* Content-type: application/mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 6.0' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 145, 7] +NotebookDataLength[ 4305, 133] +NotebookOptionsPosition[ 3741, 109] +NotebookOutlinePosition[ 4105, 125] +CellTagsIndexPosition[ 4062, 122] +WindowFrame->Normal +ContainsDynamic->False*) + +(* Beginning of Notebook Content *) +Notebook[{ +Cell[BoxData[ + RowBox[{"link", " ", "=", " ", + RowBox[{ + "Install", "[", "\"\\"", + "]"}]}]], "Input", + CellChangeTimes->{{3.44382235517484*^9, 3.4438223572684565`*^9}}], + +Cell[BoxData[ + RowBox[{ + RowBox[{ + "Imagename", " ", "=", " ", + "\"\\""}], ";"}]], "Input", + CellChangeTimes->{{3.433336425992341*^9, 3.433336437270916*^9}, { + 3.433336500650648*^9, 3.4333365039531717`*^9}, {3.433336644044791*^9, + 3.433336644308446*^9}, {3.43333691883775*^9, 3.4333369191961255`*^9}, { + 3.4438223711542864`*^9, 3.4438223802972555`*^9}, {3.4438224311895065`*^9, + 3.443822433804573*^9}}], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + RowBox[{"If", "[", + RowBox[{ + RowBox[{ + RowBox[{"mlLoad", "[", "Imagename", "]"}], "\[Equal]", "1"}], ",", + "\[IndentingNewLine]", + RowBox[{"(", + RowBox[{ + RowBox[{"width", " ", "=", " ", + RowBox[{"mlWidth", "[", "1", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"height", "=", + RowBox[{"mlHeight", "[", "1", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"data", " ", "=", " ", + RowBox[{"mlData", "[", "1", "]"}]}], ";", "\[IndentingNewLine]", + RowBox[{"r", " ", "=", " ", + RowBox[{"Table", "[", + RowBox[{ + RowBox[{"Table", "[", + RowBox[{ + RowBox[{"Table", "[", + RowBox[{ + RowBox[{"data", "[", + RowBox[{"[", + RowBox[{ + RowBox[{"y", " ", "*", " ", "width", " ", "*", " ", "4"}], + " ", "+", " ", + RowBox[{"x", "*", "4"}], " ", "+", " ", "c"}], "]"}], "]"}], + ",", + RowBox[{"{", + RowBox[{"c", ",", "4"}], "}"}]}], "]"}], ",", + RowBox[{"{", + RowBox[{"x", ",", "0", ",", + RowBox[{"width", "-", "1"}]}], "}"}]}], "]"}], ",", + RowBox[{"{", + RowBox[{"y", ",", "0", ",", + RowBox[{"height", "-", "1"}]}], "}"}]}], "]"}]}], ";", + "\[IndentingNewLine]", + RowBox[{"image", " ", "=", + RowBox[{"Graphics", "[", + RowBox[{"Raster", "[", "r", "]"}], "]"}]}]}], ")"}], ",", + "\[IndentingNewLine]", + RowBox[{"Print", "[", "\"\\"", "]"}]}], "]"}], + ";"}]], "Input", + CellChangeTimes->{{3.433336299124484*^9, 3.433336308652195*^9}, { + 3.433336340650147*^9, 3.4333364425606165`*^9}, {3.4333365088102827`*^9, + 3.4333365154026337`*^9}, {3.433336600067137*^9, 3.4333366264160366`*^9}, + 3.4333370439234943`*^9}], + +Cell[BoxData["\<\"Could not load image.\"\>"], "Print", + CellChangeTimes->{3.4438224626357355`*^9, 3.443822636813064*^9}] +}, Open ]], + +Cell[BoxData[ + RowBox[{"Show", "[", "image", "]"}]], "Input", + CellChangeTimes->{{3.4333366309743385`*^9, 3.4333366324136996`*^9}}], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{"Uninstall", "[", "link", "]"}]], "Input"], + +Cell[BoxData["\<\"\\\"E:\\\\DevIL\\\\projects\\\\Mathematica\\\\devil.exe\\\"\ +\"\>"], "Output", + CellChangeTimes->{3.4438224816530733`*^9, 3.4438226422609577`*^9, + 3.4438227036476536`*^9}] +}, Open ]] +}, +WindowSize->{1161, 898}, +WindowMargins->{{54, Automatic}, {Automatic, -1}}, +ShowSelection->True, +FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (April 28, 2007)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[568, 21, 220, 5, 31, "Input"], +Cell[791, 28, 459, 9, 31, "Input"], +Cell[CellGroupData[{ +Cell[1275, 41, 1896, 47, 152, "Input"], +Cell[3174, 90, 121, 1, 23, "Print"] +}, Open ]], +Cell[3310, 94, 131, 2, 31, "Input"], +Cell[CellGroupData[{ +Cell[3466, 100, 65, 1, 31, "Input"], +Cell[3534, 103, 191, 3, 30, "Output"] +}, Open ]] +} +] +*) + +(* End of internal cache information *) diff --git a/libs/DevIL-1.7.8/projects/delphi/openil.pas b/libs/DevIL-1.7.8/projects/delphi/openil.pas new file mode 100644 index 00000000..262c9c2a --- /dev/null +++ b/libs/DevIL-1.7.8/projects/delphi/openil.pas @@ -0,0 +1,518 @@ +unit OpenIL; + +//------------------------------------------------------------------------------ +// +// ImageLib Sources +// Copyright (C) 2000-2003 by Denton Woods +// Last modified: 06/23/2002 <--Y2K Compliant! =] +// +// Filename: il/il.h +// +// Description: The main include file for DevIL +// +//------------------------------------------------------------------------------ + +{******************************************************************************} +{ Converted to Delphi by Alexander Blach (alexander@abee.de) } +{ Version: DevIL v1.6.6 } +{ Last modified: 08/08/2003 } +{******************************************************************************} + +interface +uses + Windows; + +//{$DEFINE IL_NO_BMP} +//{$DEFINE IL_NO_CUT} +//{$DEFINE IL_NO_CHEAD} +//{$DEFINE IL_NO_DCX} +//{$DEFINE IL_NO_DDS} +//{$DEFINE IL_NO_DOOM} +//{$DEFINE IL_NO_GIF} +//{$DEFINE IL_NO_ICO} +//{$DEFINE IL_NO_JPG} +//{$DEFINE IL_NO_LIF} +//{$DEFINE IL_NO_LBM} +//{$DEFINE IL_NO_MDL} +//{$DEFINE IL_NO_PCD} +//{$DEFINE IL_NO_PCX} +//{$DEFINE IL_NO_PIC} +//{$DEFINE IL_NO_PNG} +//{$DEFINE IL_NO_PNM} +//{$DEFINE IL_NO_PSD} +//{$DEFINE IL_NO_RAW} +//{$DEFINE IL_NO_SGI} +//{$DEFINE IL_NO_TGA} +//{$DEFINE IL_NO_TIF} +//{$DEFINE IL_NO_WAL} + +//{$DEFINE IL_USE_IJL} + +type + TILenum = LongWord; + TILboolean = Byte; + TILbitfield = LongWord; + TILbyte = ShortInt; + TILshort = SmallInt; + TILint = Integer; + TILsizei = Integer; + TILubyte = Byte; + TILushort = Word; + TILuint = LongWord; + TILfloat = Single; + TILclampf = Single; + TILdouble = Double; + TILclampd = Double; + + PILboolean = ^Byte; + PILbitfield = ^LongWord; + PILbyte = ^ShortInt; + PILshort = ^SmallInt; + PILint = ^Integer; + PILsizei = ^Integer; + PILubyte = ^Byte; + PILushort = ^Word; + PILuint = ^LongWord; + PILfloat = ^Single; + PILclampf = ^Single; + PILdouble = ^Double; + PILclampd = ^Double; + +const + IL_FALSE = 0; + IL_TRUE = 1; + + + // Matches OpenGL's right now. + IL_COLOUR_INDEX = $1900; + IL_COLOR_INDEX = $1900; + IL_RGB = $1907; + IL_RGBA = $1908; + IL_BGR = $80E0; + IL_BGRA = $80E1; + IL_LUMINANCE = $1909; + + + IL_BYTE = $1400; + IL_UNSIGNED_BYTE = $1401; + IL_SHORT = $1402; + IL_UNSIGNED_SHORT = $1403; + IL_INT = $1404; + IL_UNSIGNED_INT = $1405; + IL_FLOAT = $1406; + IL_DOUBLE = $140A; + + + IL_VENDOR = $1F00; + + +// +// IL-specific 's +// + + IL_VERSION_1_5_6 = 1; + IL_VERSION = 156; + IL_LOAD_EXT = $1F01; + IL_SAVE_EXT = $1F02; + + + +// Attribute Bits + IL_ORIGIN_BIT = $00000001; + IL_FILE_BIT = $00000002; + IL_PAL_BIT = $00000004; + IL_FORMAT_BIT = $00000008; + IL_TYPE_BIT = $00000010; + IL_COMPRESS_BIT = $00000020; + IL_LOADFAIL_BIT = $00000040; + IL_FORMAT_SPECIFIC_BIT = $00000080; + IL_ALL_ATTRIB_BITS = $000FFFFF; + + +// Palette types + IL_PAL_NONE = $0400; + IL_PAL_RGB24 = $0401; + IL_PAL_RGB32 = $0402; + IL_PAL_RGBA32 = $0403; + IL_PAL_BGR24 = $0404; + IL_PAL_BGR32 = $0405; + IL_PAL_BGRA32 = $0406; + + +// Image types + IL_TYPE_UNKNOWN = $0000; + IL_BMP = $0420; + IL_CUT = $0421; + IL_DOOM = $0422; + IL_DOOM_FLAT = $0423; + IL_ICO = $0424; + IL_JPG = $0424; + IL_LBM = $0426; + IL_PCD = $0427; + IL_PCX = $0428; + IL_PIC = $0429; + IL_PNG = $042A; + IL_PNM = $042B; + IL_SGI = $042C; + IL_TGA = $042D; + IL_TIF = $042E; + IL_CHEAD = $042F; + IL_RAW = $0430; + IL_MDL = $0431; + IL_WAL = $0432; + IL_LIF = $0434; + IL_MNG = $0435; + IL_JNG = $0435; + IL_GIF = $0436; + IL_DDS = $0437; + IL_DCX = $0438; + IL_PSD = $0439; + IL_EXIF = $043A; + IL_PSP = $043B; + IL_PIX = $043C; + IL_PXR = $043D; + IL_XPM = $043E; + + IL_JASC_PAL = $0475; + + +// Error Types + IL_NO_ERROR = $0000; + IL_INVALID_ENUM = $0501; + IL_OUT_OF_MEMORY = $0502; + IL_FORMAT_NOT_SUPPORTED = $0503; + IL_INTERNAL_ERROR = $0504; + IL_INVALID_VALUE = $0505; + IL_ILLEGAL_OPERATION = $0506; + IL_ILLEGAL_FILE_VALUE = $0507; + IL_INVALID_FILE_HEADER = $0508; + IL_INVALID_PARAM = $0509; + IL_COULD_NOT_OPEN_FILE = $050A; + IL_INVALID_EXTENSION = $050B; + IL_FILE_ALREADY_EXISTS = $050C; + IL_OUT_FORMAT_SAME = $050D; + IL_STACK_OVERFLOW = $050E; + IL_STACK_UNDERFLOW = $050F; + IL_INVALID_CONVERSION = $0510; + IL_BAD_DIMENSIONS = $0511; + IL_FILE_READ_ERROR = $0512; + + IL_LIB_GIF_ERROR = $05E1; + IL_LIB_JPEG_ERROR = $05E2; + IL_LIB_PNG_ERROR = $05E3; + IL_LIB_TIFF_ERROR = $05E4; + IL_LIB_MNG_ERROR = $05E5; + IL_UNKNOWN_ERROR = $05FF; + + +// Origin Definitions + IL_ORIGIN_SET = $0600; + IL_ORIGIN_LOWER_LEFT = $0601; + IL_ORIGIN_UPPER_LEFT = $0602; + IL_ORIGIN_MODE = $0603; + + +// Format and Type Mode Definitions + IL_FORMAT_SET = $0610; + IL_FORMAT_MODE = $0611; + IL_TYPE_SET = $0612; + IL_TYPE_MODE = $0613; + + +// File definitions + IL_FILE_OVERWRITE = $0620; + IL_FILE_MODE = $0621; + + +// Palette definitions + IL_CONV_PAL = $0630; + + +// Load fail definitions + IL_DEFAULT_ON_FAIL = $0632; + + +// Key colour definitions + IL_USE_KEY_COLOUR = $0635; + IL_USE_KEY_COLOR = $0635; + + +// Interlace definitions + IL_SAVE_INTERLACED = $0639; + IL_INTERLACE_MODE = $063A; + + +// Quantization definitions + IL_QUANTIZATION_MODE = $0640; + IL_WU_QUANT = $0641; + IL_NEU_QUANT = $0642; + IL_NEU_QUANT_SAMPLE = $0643; + + +// Hints + IL_FASTEST = $0660; + IL_LESS_MEM = $0661; + IL_DONT_CARE = $0662; + IL_MEM_SPEED_HINT = $0665; + IL_USE_COMPRESSION = $0666; + IL_NO_COMPRESSION = $0667; + IL_COMPRESSION_HINT = $0668; + + +// Subimage + IL_SUB_NEXT = $0680; + IL_SUB_MIPMAP = $0681; + IL_SUB_LAYER = $0682; + + +// Compression definitions (mostly for .oil) + IL_COMPRESS_MODE = $0700; + IL_COMPRESS_NONE = $0701; + IL_COMPRESS_RLE = $0702; + IL_COMPRESS_LZO = $0703; + IL_COMPRESS_ZLIB = $0704; + + +// File format-specific values + IL_TGA_CREATE_STAMP = $0710; + IL_JPG_QUALITY = $0711; + IL_PNG_INTERLACE = $0712; + IL_TGA_RLE = $0713; + IL_BMP_RLE = $0714; + IL_SGI_RLE = $0715; + IL_TGA_ID_STRING = $0717; + IL_TGA_AUTHNAME_STRING = $0718; + IL_TGA_AUTHCOMMENT_STRING = $0719; + IL_PNG_AUTHNAME_STRING = $071A; + IL_PNG_TITLE_STRING = $071B; + IL_PNG_DESCRIPTION_STRING = $071C; + IL_TIF_DESCRIPTION_STRING = $071D; + IL_TIF_HOSTCOMPUTER_STRING = $071E; + IL_TIF_DOCUMENTNAME_STRING = $071F; + IL_TIF_AUTHNAME_STRING = $0720; + IL_JPG_SAVE_FORMAT = $0721; + IL_CHEAD_HEADER_STRING = $0722; + IL_PCD_PICNUM = $0723; + + +// DXTC definitions + IL_DXTC_FORMAT = $0705; + IL_DXT1 = $0706; + IL_DXT2 = $0707; + IL_DXT3 = $0708; + IL_DXT4 = $0709; + IL_DXT5 = $070A; + IL_DXT_NO_COMP = $070B; + IL_KEEP_DXTC_DATA = $070C; + IL_DXTC_DATA_FORMAT = $070D; + + +// Cube map definitions + IL_CUBEMAP_POSITIVEX = $00000400; + IL_CUBEMAP_NEGATIVEX = $00000800; + IL_CUBEMAP_POSITIVEY = $00001000; + IL_CUBEMAP_NEGATIVEY = $00002000; + IL_CUBEMAP_POSITIVEZ = $00004000; + IL_CUBEMAP_NEGATIVEZ = $00008000; + + +// Values + IL_VERSION_NUM = $0DE2; + IL_IMAGE_WIDTH = $0DE4; + IL_IMAGE_HEIGHT = $0DE5; + IL_IMAGE_DEPTH = $0DE6; + IL_IMAGE_SIZE_OF_DATA = $0DE7; + IL_IMAGE_BPP = $0DE8; + IL_IMAGE_BYTES_PER_PIXEL = $0DE8; + IL_IMAGE_BITS_PER_PIXEL = $0DE9; + IL_IMAGE_FORMAT = $0DEA; + IL_IMAGE_TYPE = $0DEB; + IL_PALETTE_TYPE = $0DEC; + IL_PALETTE_SIZE = $0DED; + IL_PALETTE_BPP = $0DEE; + IL_PALETTE_NUM_COLS = $0DEF; + IL_PALETTE_BASE_TYPE = $0DF0; + IL_NUM_IMAGES = $0DF1; + IL_NUM_MIPMAPS = $0DF2; + IL_NUM_LAYERS = $0DF3; + IL_ACTIVE_IMAGE = $0DF4; + IL_ACTIVE_MIPMAP = $0DF5; + IL_ACTIVE_LAYER = $0DF6; + IL_CUR_IMAGE = $0DF7; + IL_IMAGE_DURATION = $0DF8; + IL_IMAGE_PLANESIZE = $0DF9; + IL_IMAGE_BPC = $0DFA; + IL_IMAGE_OFFX = $0DFB; + IL_IMAGE_OFFY = $0DFC; + IL_IMAGE_CUBEFLAGS = $0DFD; + + +const +{$IFDEF OPENIL_DEBUG} + OPENILDLL = 'DevIL-d.DLL'; +{$ELSE} + OPENILDLL = 'DevIL.DLL'; +{$ENDIF} + + IL_SEEK_SET = 0; + IL_SEEK_CUR = 1; + IL_SEEK_END = 2; + IL_EOF = -1; + +// Callback functions for file reading +type + TILHandle = Pointer; +// Callback functions for file reading + TfCloseRProc = procedure(Handle: TILHandle); stdcall; + TfEofProc = function(Handle: TILHandle): TILboolean; stdcall; + TfGetcProc = function(Handle: TILHandle): TILint; stdcall; + TfOpenRProc = function(FileName: PChar): TILHandle; stdcall; + TfReadProc = function(Buffer: Pointer; Size, Count: TILint; + Handle: TILHandle): TILint; stdcall; + TfSeekRProc = function(Handle: TILHandle; Offset, Origin: TILint): TILint; + stdcall; + TfTellRProc = function(Handle: TILHandle): TILint; stdcall; + +// Callback function for file writing + TfCloseWProc = procedure(Handle: TILHandle); stdcall; + TfOpenWProc = function(FileName: PChar): TILHandle; stdcall; + TfPutcProc = function(c: TILubyte; Handle: TILHandle): TILint; stdcall; + TfSeekWProc = function(Handle: TILHandle; Offset, Origin: TILint): TILint; + stdcall; + TfTellWProc = function(Handle: TILHandle): TILint; stdcall; + TfWriteProc = function(Buffer: Pointer; Size: TILuint; Count: TILuint; + Handle: TILHandle): TILint; stdcall; + +// Registered format procedures + TIL_LOADPROC = function(FileName: PChar): TILboolean; stdcall; + TIL_SAVEPROC = function(FileName: PChar): TILboolean; stdcall; + + +// ImageLib Functions +function ilActiveImage(Number: TILuint): TILboolean; stdcall; + external OPENILDLL; +function ilActiveLayer(Number: TILuint): TILboolean; stdcall; + external OPENILDLL; +function ilActiveMipmap(Number: TILuint): TILboolean; stdcall; + external OPENILDLL; +function ilApplyPal(FileName: PChar): TILboolean; stdcall; external OPENILDLL; +function ilApplyProfile(InProfile, OutProfile: PChar): TILboolean; stdcall; external OPENILDLL; +procedure ilBindImage(Image: TILuint); stdcall; external + OPENILDLL; +function ilBlit(Src: TILuint; DestX, DestY, DestZ: TILint; SrcX, SrcY, SrcZ, Width, Height, Depth: TILuint): TILboolean; stdcall; external OPENILDLL; +procedure ilClearColour(Red, Green, Blue, Alpha: TILclampf); stdcall; external OPENILDLL; +procedure ilClearColor(Red, Green, Blue, Alpha: TILclampf); stdcall; external OPENILDLL name 'ilClearColour'; +function ilClearImage: TILboolean; stdcall; external OPENILDLL; +function ilCloneCurImage: TILuint; stdcall; external OPENILDLL; +function ilCompressFunc(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilConvertImage(DestFormat, DestType: TILenum): TILboolean; stdcall; external + OPENILDLL; +function ilConvertPal(DestFormat: TILenum): TILboolean; stdcall; external + OPENILDLL; +function ilCopyImage(Src: TILuint): TILboolean; stdcall; external OPENILDLL; +procedure ilCopyPixels(XOff, YOff, ZOff, Width, Height, Depth: TILuint; + Format, _Type: TILenum; Data: Pointer); stdcall; external OPENILDLL; +procedure ilCreateSubImage(SubType: TILenum; Num: TILuint); stdcall; external OPENILDLL; +procedure ilDefaultImage; stdcall; external OPENILDLL; +procedure ilDeleteImages(Num: TILsizei; const Images: PILuint); stdcall; + external OPENILDLL; +function ilDisable(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilEnable(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilFormatFunc(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +procedure ilGenImages(Num: TILsizei; Images: PILuint); stdcall; external + OPENILDLL; +function ilGetAlpha(_Type: TILenum): PILubyte; stdcall; external OPENILDLL; +function ilGetBoolean(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +procedure ilGetBooleanv(Mode: TILenum; Param: PILboolean); stdcall; external + OPENILDLL; +function ilGetData: PILubyte; stdcall; external OPENILDLL; +function ilGetDXTCData(Buffer: PILubyte; BufferSize: TILuint; DXTCFormat: TILenum): + TILuint; stdcall; external OPENILDLL; +function ilGetError: TILenum; stdcall; external OPENILDLL; +function ilGetInteger(Mode: TILenum): TILint; stdcall; external OPENILDLL; +procedure ilGetIntegerv(Mode: TILenum; Param: PILint); stdcall; external + OPENILDLL; +function ilGetLumpPos: TILuint; stdcall; external OPENILDLL; +function ilGetPalette: PILubyte; stdcall; external OPENILDLL; +function ilGetString(StringName: TILenum): PChar; stdcall; external OPENILDLL; +procedure ilHint(Target, Mode: TILenum); stdcall; external OPENILDLL; +procedure ilInit; stdcall; external OPENILDLL; +function ilIsDisabled(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilIsEnabled(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilIsImage(Image: TILuint): TILboolean; stdcall; external OPENILDLL; +function ilIsValid(_Type: TILenum; FileName: PChar): TILboolean; stdcall; + external OPENILDLL; +function ilIsValidF(_Type: TILenum; _File: TILHandle): TILboolean; stdcall; + external OPENILDLL; +function ilIsValidL(_Type: TILenum; Lump: Pointer; Size: TILuint): TILboolean; + stdcall; external OPENILDLL; +procedure ilKeyColor(Red: TILubyte; Green: TILubyte; Blue: TILubyte; PalNum: TILubyte); + stdcall; external OPENILDLL name 'ilKeyColour'; +procedure ilKeyColour(Red: TILubyte; Green: TILubyte; Blue: TILubyte; PalNum: TILubyte); + stdcall; external OPENILDLL; +function ilLoad(_Type: TILenum; FileName: PChar): TILboolean; stdcall; + external OPENILDLL; +function ilLoadF(_Type: TILenum; _File: TILHandle): TILboolean; stdcall; + external OPENILDLL; +function ilLoadImage(FileName: PChar): TILboolean; stdcall; external OPENILDLL; +function ilLoadL(_Type: TILenum; Lump: Pointer; Size: TILuint): TILboolean; stdcall; + external OPENILDLL; +function ilLoadPal(FileName: PChar): TILboolean; stdcall; external OPENILDLL; +function ilOriginFunc(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilOverlayImage(Src: TILuint; XCoord, YCoord, ZCoord: TILint): + TILboolean; stdcall; external OPENILDLL; +procedure ilPopAttrib; stdcall; external OPENILDLL; +procedure ilPushAttrib(Bits: TILuint); stdcall; external OPENILDLL; +procedure ilRegisterFormat(Format: TILenum); stdcall; external OPENILDLL; +function ilRegisterLoad(Ext: PChar; Load: TIL_LOADPROC): TILboolean; stdcall; + external OPENILDLL; +function ilRegisterMipNum(Num: TILuint): TILboolean; stdcall; external OPENILDLL; +function ilRegisterNumImages(Num: TILuint): TILboolean; stdcall; + external OPENILDLL; +procedure ilRegisterOrigin(Origin: TILenum); stdcall; external OPENILDLL; +procedure ilRegisterPal(Pal: Pointer; Size: TILuint; _Type: TILenum); stdcall; + external OPENILDLL; +function ilRegisterSave(Ext: PChar; Save: TIL_SAVEPROC): TILboolean; stdcall; + external OPENILDLL; +procedure ilRegisterType(_Type: TILenum); stdcall; external OPENILDLL; +function ilRemoveLoad(Ext: PChar): TILboolean; stdcall; external OPENILDLL; +function ilRemoveSave(Ext: PChar): TILboolean; stdcall; external OPENILDLL; +procedure ilResetRead; stdcall; external OPENILDLL; +procedure ilResetWrite; stdcall; external OPENILDLL; +function ilSave(_Type: TILenum; FileName: PChar): TILboolean; stdcall; + external OPENILDLL; +function ilSaveF(_Type: TILenum; _File: TILHandle): TILboolean; stdcall; + external OPENILDLL; +function ilSaveImage(FileName: PChar): TILboolean; stdcall; external OPENILDLL; +function ilSaveL(_Type: TILenum; Lump: Pointer; Size: TILuint): TILboolean; + stdcall; external OPENILDLL; +function ilSavePal(FileName: PChar): TILboolean; stdcall; external + OPENILDLL; +function ilSetData(Data: Pointer): TILboolean; stdcall; external OPENILDLL; +function ilSetDuration(Duration: TILuint): TILboolean; stdcall; + external OPENILDLL; +procedure ilSetInteger(Mode: TILenum; Param: TILint); stdcall; external OPENILDLL; +procedure ilSetPixels(XOff, YOff, ZOff, Width, Height, Depth: TILuint; + Format, _Type: TILenum; Data: Pointer); stdcall; external OPENILDLL; +procedure ilSetRead(Open: TfOpenRProc; Close: TfCloseRProc; + Eof: TfEofProc; Getc: TfGetcProc; Read: TfReadProc; Seek: TfSeekRProc; + Tell: TfTellRProc); stdcall; external OPENILDLL; +procedure ilSetString(Mode: TILenum; Param: PChar); stdcall; external OPENILDLL; +procedure ilSetWrite(Open: TfOpenWProc; Close: TfCloseWProc; + Putc: TfPutcProc; Seek: TfSeekWProc; + Tell: TfTellWProc; Write: TfWriteProc); stdcall; external OPENILDLL; +function ilTexImage(Width, Height, Depth: TILuint; Bpp: TILubyte; Format, _Type: + TILenum; Data: Pointer): TILboolean; stdcall; external OPENILDLL; +function ilTypeFunc(Mode: TILenum): TILboolean; stdcall; external OPENILDLL; +function ilLoadData(FileName: PChar; Width, Height, Depth: TILuint; + Bpp: TILubyte): TILboolean; stdcall; external OPENILDLL; +function ilLoadDataF(_File: TILHandle; Width, Height, Depth: TILuint; + Bpp: TILubyte): TILboolean; stdcall; external OPENILDLL; +function ilLoadDataL(Lump: Pointer; Size: TILuint; Width, Height, Depth: TILuint; + Bpp: TILubyte): TILboolean; stdcall; external OPENILDLL; +function ilSaveData(FileName: PChar): TILboolean; stdcall; external OPENILDLL; + +implementation + +end. + diff --git a/libs/DevIL-1.7.8/projects/delphi/openilu.pas b/libs/DevIL-1.7.8/projects/delphi/openilu.pas new file mode 100644 index 00000000..bb7cad51 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/delphi/openilu.pas @@ -0,0 +1,176 @@ +unit OpenILU; + +//------------------------------------------------------------------------------ +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 06/23/2002 <--Y2K Compliant! =] +// +// Filename: il/ilu.h +// +// Description: The main include file for ILU +// +//------------------------------------------------------------------------------ + +{******************************************************************************} +{ Converted to Delphi by Alexander Blach (alexander@abee.de) } +{ Version: ILU v1.6.1 } +{ Last modified: 06/23/2002 } +{******************************************************************************} + + +interface +uses + OpenIL, + Windows; + +const + ILU_VERSION_1_5_6 = 1; + ILU_VERSION = 156; + + ILU_FILTER = $2600; + ILU_NEAREST = $2601; + ILU_LINEAR = $2602; + ILU_BILINEAR = $2603; + ILU_SCALE_BOX = $2604; + ILU_SCALE_TRIANGLE = $2605; + ILU_SCALE_BELL = $2606; + ILU_SCALE_BSPLINE = $2607; + ILU_SCALE_LANCZOS3 = $2608; + ILU_SCALE_MITCHELL = $2609; + + +// Error types +const + ILU_INVALID_ENUM = $0501; + ILU_OUT_OF_MEMORY = $0502; + ILU_INTERNAL_ERROR = $0504; + ILU_INVALID_VALUE = $0505; + ILU_ILLEGAL_OPERATION = $0506; + ILU_INVALID_PARAM = $0509; + +// Values +const + ILU_PLACEMENT = $0700; + ILU_LOWER_LEFT = $0701; + ILU_LOWER_RIGHT = $0702; + ILU_UPPER_LEFT = $0703; + ILU_UPPER_RIGHT = $0704; + ILU_CENTER = $0705; + ILU_CONVOLUTION_MATRIX = $0710; + ILU_VERSION_NUM = $0DE2; + +// Filters +const + ILU_FILTER_BLUR = $0803; + ILU_FILTER_GAUSSIAN_3x3 = $0804; + ILU_FILTER_GAUSSIAN_5x5 = $0805; + ILU_FILTER_EMBOSS1 = $0807; + ILU_FILTER_EMBOSS2 = $0808; + ILU_FILTER_LAPLACIAN1 = $080A; + ILU_FILTER_LAPLACIAN2 = $080B; + ILU_FILTER_LAPLACIAN3 = $080C; + ILU_FILTER_LAPLACIAN4 = $080D; + ILU_FILTER_SHARPEN1 = $080E; + ILU_FILTER_SHARPEN2 = $080F; + ILU_FILTER_SHARPEN3 = $0810; + +type + PILinfo = ^TILinfo; + TILinfo = record + Id: TILuint; // the image's id + Data: TILuint; // the image's data + Width: TILuint; // the image's width + Height: TILuint; // the image's height + Depth: TILuint; // the image's depth + Bpp: TILubyte; // bytes per pixel (not bits) of the image + SizeOfData: TILuint; // the total size of the data (in bytes) + Format: TILenum; // image format (in IL enum style) + _Type: TILenum; // image type (in IL enum style) + Origin: TILenum; // origin of the image + Palette: PILubyte; // the image's palette + PalType: TILenum; // palette type + PalSize: TILuint; // palette size + CubeFlags: TILenum; // flags for what cube map sides are present + NumNext: TILuint; // number of images following + NumMips: TILuint; // number of mipmaps + NumLayers: TILuint; // number of layers + end; + + + +const +{$IFDEF OPENIL_DEBUG} + ILUDLL = 'ILU-d.DLL'; +{$ELSE} + ILUDLL = 'ILU.DLL'; +{$ENDIF} + + +// ImageLib Utility Functions +function iluAlienify: TILboolean; stdcall; external ILUDLL; +function iluBitFilter1: TILboolean; stdcall; external ILUDLL; +function iluBitFilter2: TILboolean; stdcall; external ILUDLL; +function iluBitFilter3: TILboolean; stdcall; external ILUDLL; +function iluBlurAvg(Iter: TILuint): TILboolean; stdcall; external ILUDLL; +function iluBlurGaussian(Iter: TILuint): TILboolean; stdcall; external ILUDLL; +function iluBuildMipmaps: TILboolean; stdcall; external ILUDLL; +function iluColoursUsed: TILuint; stdcall; external ILUDLL; +function iluColorsUsed: TILuint; stdcall; external ILUDLL name 'iluColoursUsed'; +function iluCompareImage(Comp: TILuint): TILboolean; stdcall; external ILUDLL; +function iluContrast(Contrast: TILfloat): TILboolean; stdcall; external ILUDLL; +function iluCrop(XOff, YOff, ZOff, Width, Height, Depth: TILuint): TILboolean; + stdcall; external ILUDLL; +procedure iluDeleteImage(Id: TILuint); stdcall; external ILUDLL; +function iluEdgeDetectE: TILboolean; stdcall; external ILUDLL; +function iluEdgeDetectP: TILboolean; stdcall; external ILUDLL; +function iluEdgeDetectS: TILboolean; stdcall; external ILUDLL; +function iluEmboss: TILboolean; stdcall; external ILUDLL; +function iluEnlargeCanvas(Width, Height, Depth: TILuint): TILboolean; stdcall; + external ILUDLL; +function iluEnlargeImage(XDim, YDim, ZDim: TILfloat): TILboolean; stdcall; + external ILUDLL; +function iluEqualize: TILboolean; stdcall; external ILUDLL; +function iluErrorString(Error: TILenum): PChar; stdcall; external ILUDLL; +function iluFlipImage: TILboolean; stdcall; external ILUDLL; +function iluGammaCorrect(Gamma: TILfloat): TILboolean; stdcall; external ILUDLL; +function iluGenImage: TILuint; stdcall; external ILUDLL; +procedure iluGetImageInfo(Info: PILinfo); stdcall; external ILUDLL; +function iluGetInteger(Mode: TILenum): TILint; stdcall; external ILUDLL; +procedure iluGetIntegerv(Mode: TILenum; var Param: TILint); stdcall; external ILUDLL; +function iluGetString(StringName: TILenum): PChar; stdcall; external ILUDLL; +procedure iluImageParameter(PName, Param: TILenum); stdcall; external ILUDLL; +procedure iluInit; stdcall; external ILUDLL; +function iluInvertAlpha: TILboolean; stdcall; external ILUDLL; +function iluLoadImage(FileName: PChar): TILuint; stdcall; external ILUDLL; +function iluMirror: TILboolean; stdcall; external ILUDLL; +function iluNegative: TILboolean; stdcall; external ILUDLL; +function iluNoisify(Factor: TILubyte): TILboolean; stdcall; external ILUDLL; +function iluPixelize(PixSize: TILuint): TILboolean; stdcall; external ILUDLL; +//procedure iluRegionf(ULx, ULy, BRx, BRy: TILfloat); stdcall; external ILUDLL; +//procedure iluRegioni(ULx, ULy, BRx, BRy: TILuint); stdcall; external ILUDLL; +function iluReplaceColour(Red, Green, Blue: TILubyte; Tolerance: TILfloat): + TILboolean; stdcall; external ILUDLL; +function iluReplaceColor(Red, Green, Blue: TILubyte; Tolerance: TILfloat): + TILboolean; stdcall; external ILUDLL name 'iluReplaceColour'; +function iluRotate(Angle: TILfloat): TILboolean; stdcall; external ILUDLL; +function iluRotate3D(x, y, z, Angle: TILfloat): TILboolean; stdcall; + external ILUDLL; +function iluSaturate1f(Saturation: TILfloat): TILboolean; stdcall; external ILUDLL; +function iluSaturate4f(r, g, b, Saturation: TILfloat): TILboolean; stdcall; + external ILUDLL; +function iluScale(Width, Height, Depth: TILuint): TILboolean; + stdcall; external ILUDLL; +function iluScaleColours(r, g, b: TILfloat): TILboolean; stdcall; external ILUDLL; +function iluScaleColors(r, g, b: TILfloat): TILboolean; stdcall; + external ILUDLL name 'iluScaleColours'; +function iluSharpen(Factor: TILfloat; Iter: TILuint): TILboolean; stdcall; external + ILUDLL; +function iluSwapColours: TILboolean; stdcall; external ILUDLL; +function iluSwapColors: TILboolean; stdcall; external ILUDLL name 'iluSwapColours'; +function iluWave(Angle: TILfloat): TILboolean; stdcall; external ILUDLL; + +implementation + +end. + diff --git a/libs/DevIL-1.7.8/projects/delphi/openilut.pas b/libs/DevIL-1.7.8/projects/delphi/openilut.pas new file mode 100644 index 00000000..9c6a2a89 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/delphi/openilut.pas @@ -0,0 +1,167 @@ +unit OpenILUT; + +//------------------------------------------------------------------------------ +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 06/23/2002 <--Y2K Compliant! =] +// +// Filename: il/ilut.h +// +// Description: The main include file for ILUT +// +//------------------------------------------------------------------------------ + +{******************************************************************************} +{ Converted to Delphi by Alexander Blach (alexander@abee.de) } +{ Version: ILUT v1.6.1 } +{ Last modified: 06/23/2002 } +{ } +{ You will need the latest OpenGL units for Delphi. I recommend those on } +{ http://www.delphi3d.net } +{******************************************************************************} + + +interface + +// Note by ABee: I had to move this here so that I can look it up in "uses" +//{$DEFINE ILUT_USE_ALLEGRO) +{$DEFINE ILUT_USE_WIN32} +{$DEFINE ILUT_USE_OPENGL} + +uses + OpenIL, + OpenILU, +{$IFDEF ILUT_USE_OPENGL} + GL, + //OpenGL12, +{$ENDIF} + Windows; + + +const + ILUT_VERSION_1_5_6 = 1; + ILUT_VERSION = 156; + +const +// Attribute Bits + ILUT_OPENGL_BIT = $00000001; + ILUT_D3D_BIT = $00000002; + ILUT_ALL_ATTRIB_BITS = $000FFFFF; + +// Error Types + ILUT_INVALID_ENUM = $0501; + ILUT_OUT_OF_MEMORY = $0502; + ILUT_INVALID_VALUE = $0505; + ILUT_ILLEGAL_OPERATION = $0506; + ILUT_INVALID_PARAM = $0509; + ILUT_COULD_NOT_OPEN_FILE = $050A; + ILUT_STACK_OVERFLOW = $050E; + ILUT_STACK_UNDERFLOW = $050F; + ILUT_NOT_SUPPORTED = $0550; + + +// State Definitions + ILUT_PALETTE_MODE = $0600; + ILUT_OPENGL_CONV = $0610; + ILUT_D3D_MIPLEVELS = $0620; + ILUT_MAXTEX_WIDTH = $0630; + ILUT_MAXTEX_HEIGHT = $0631; + ILUT_MAXTEX_DEPTH = $0632; + ILUT_GL_USE_S3TC = $0634; + ILUT_D3D_USE_DXTC = $0634; + ILUT_GL_GEN_S3TC = $0635; + ILUT_D3D_GEN_DXTC = $0635; + ILUT_S3TC_FORMAT = $0705; + ILUT_DXTC_FORMAT = $0706; + + + +// Values + ILUT_VERSION_NUM = $0DE2; + + +const +{$IFDEF OPENIL_DEBUG} + ILUTDLL = 'ILUT-d.DLL'; +{$ELSE} + ILUTDLL = 'ILUT.DLL'; +{$ENDIF} + +// ImageLib Utility Toolkit Functions +function ilutDisable(Mode: TILenum): TILboolean; stdcall; external ILUTDLL; +function ilutEnable(Mode: TILenum): TILboolean; stdcall; external ILUTDLL; +function ilutGetBoolean(Mode: TILenum): TILboolean; stdcall; external + ILUTDLL; +procedure ilutGetBooleanv(Mode: TILenum; Param: PILboolean); stdcall; external + ILUTDLL; +function ilutGetInteger(Mode: TILenum): TILint; stdcall; external + ILUTDLL; +procedure ilutGetIntegerv(Mode: TILenum; Param: PILint); stdcall; external + ILUTDLL; +function ilutGetString(StringName: TILenum): PChar; stdcall; external ILUTDLL; +procedure ilutInit; stdcall; external ILUTDLL; +function ilutIsDisabled(Mode: TILenum): TILboolean; stdcall; external ILUTDLL; +function ilutIsEnabled(Mode: TILenum): TILboolean; stdcall; external ILUTDLL; +procedure ilutPopAttrib; stdcall; external ILUTDLL; +procedure ilutPushAttrib(Bits: TILuint); stdcall; external ILUTDLL; +procedure ilutSetInteger(Mode: TILenum; Param: TILint); stdcall; external ILUTDLL; + + +// The different rendering api's...more to be added later? +const + IL_OPENGL = 0; + IL_ALLEGRO = 1; + IL_WIN32 = 2; + +function ilutRenderer(Renderer: TILenum): TILboolean; stdcall; external ILUTDLL; + +// ImageLib Utility Toolkit's OpenGL Functions +{$IFDEF ILUT_USE_OPENGL} +function ilutGLBindTexImage: GLuint; stdcall; external ILUTDLL; +function ilutGLBindMipmaps: GLuint; stdcall; external ILUTDLL; +function ilutGLBuildMipmaps: TILboolean; stdcall; external ILUTDLL; +function ilutGLLoadImage(FileName: PChar): GLuint; stdcall; external ILUTDLL; +function ilutGLScreen: TILboolean; stdcall; external ILUTDLL; +function ilutGLScreenie: TILboolean; stdcall; external ILUTDLL; +function ilutGLSaveImage(FileName: PChar; TexID: GLuint): TILboolean; + stdcall; external ILUTDLL; +function ilutGLSetTex(TexID: GLuint): TILboolean; stdcall; external ILUTDLL; +function ilutGLTexImage(Level: GLuint): TILboolean; stdcall; external ILUTDLL; +{$ENDIF} + +// note by ABee: no Allegro in Delphi +// ImageLib Utility ToolKit's Allegro Functions +{$IFDEF ILUT_USE_ALLEGRO} +//function ilutConvertToAlleg(var Pal: PALETTE): PBitmap; stdcall; external +//ILUTDLL; +{$ENDIF} + +// ImageLib Utility Toolkit's Win32 (DirectX/GDI) Functions +{$IFDEF ILUT_USE_WIN32} +function ilutConvertToHBitmap(DC: HDC): HBITMAP; stdcall; external ILUTDLL; +procedure ilutGetBmpInfo(Info: PBitmapInfo); stdcall; external ILUTDLL; +function ilutGetHPal: HPalette; stdcall; external ILUTDLL; +function ilutGetPaddedData: PILubyte; stdcall; external ILUTDLL; +function ilutGetWinClipboard: TILboolean; stdcall; external ILUTDLL; +function ilutLoadResource(hInst: LongWord; ID: TILint; ResourceType: PChar; + _Type: TILenum): TILboolean; stdcall; external ILUTDLL; +function ilutSetHBitmap(Bitmap: HBITMAP): TILboolean; stdcall; external ILUTDLL; +function ilutSetHPal(Pal: HPALETTE): TILboolean; stdcall; external ILUTDLL; +function ilutSetWinClipboard: TILboolean; stdcall; external ILUTDLL; +function ilutWinLoadImage(FileName: PChar; DC: HDC): HBITMAP; stdcall; + external ILUTDLL; +function ilutWinLoadUrl(Url: PChar): TILboolean; stdcall; external ILUTDLL; +function ilutWinSaveImage(FileName: PChar; Bitmap: HBITMAP): TILboolean; + stdcall; external ILUTDLL; +{ + //#ifdef ILUT_USE_DIRECTX7 + // LPDIRECTDRAWSURFACE7 ILAPIENTRY ilutDX7Surface(char *FileName, LPDIRECTDRAW7 DDraw); + //#endif//ILUT_USE_DIRECTX7 +} +{$ENDIF} + +implementation + +end. + diff --git a/libs/DevIL-1.7.8/projects/delphi/readme.1st b/libs/DevIL-1.7.8/projects/delphi/readme.1st new file mode 100644 index 00000000..1fb95401 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/delphi/readme.1st @@ -0,0 +1,3 @@ +To debug Delphi apps with DevIL, you must define OPENIL_DEBUG and rebuild your project. Do not define OPENIL_DEBUG for release builds. Sorry for the inconvenience. + +- Denton Woods and Alexander Blach \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/djgpp/makefile b/libs/DevIL-1.7.8/projects/djgpp/makefile new file mode 100644 index 00000000..a9d3fd1b --- /dev/null +++ b/libs/DevIL-1.7.8/projects/djgpp/makefile @@ -0,0 +1,150 @@ +################################### +# Djgpp Makefile for DevIL # +# Last Modified: 07/13/2002 # +################################### + +# Uncomment any of the following lines to define them + +# Halts on warnings and errors +#WERROR=1 +# Turns on debugging options +#DEBUG=1 + + +.PHONY = baddjgpp badpath ilbad +#.PRECIOUS = $(OBJ)/%.o + + +# check that the DJGPP environment variable is set +ifndef DJDIR +baddjgpp: + @echo Your DJGPP environment variable is not set correctly! It should + @echo point to the djgpp.env file: see the djgpp readme.1st for details. +endif + +# check that djgpp/bin is pathed +ifeq ($(wildcard $(addsuffix /djasm.exe,$(subst ;, ,$(PATH)))),) +badpath: + @echo Your PATH is not set correctly! This must include the + @echo djgpp bin directory: see the djgpp readme.1st for details. +endif + +ifeq ($(wildcard ../../src-IL/src/il_devil.c),) +ilbad: + @echo Bad DevIL installation! You did not preserve the directory structure + @echo while unzipping it: did you remember to use the -d flag with pkunzip? +endif + + +#ifneq ($(wildcard $(DJDIR)/bin/rm.exe),) +RM = $(DJDIR)/bin/rm.exe +#else +RM = del +#endif + + +#Enables debugging features +ifdef DEBUG +DFLAGS = -DDEBUG +else +DFLAGS = +endif + + +ILDIR= ./../../src-IL/src +ILODIR= .\..\..\src-IL\src\obj +#ILLIB= ./../../lib/djgpp/libil.a +ILLIB= libil.a +ILDEST= $(DJDIR)/lib/libil.a +ILINC= $(DJDIR)/include/il/il.h +ILOBJ= $(ILODIR)/il_bits.o $(ILODIR)/il_bmp.o $(ILODIR)/il_convert.o $(ILODIR)/il_cut.o \ + $(ILODIR)/il_doom.o $(ILODIR)/il_endian.o $(ILODIR)/il_error.o \ + $(ILODIR)/il_header.o $(ILODIR)/il_stack.o $(ILODIR)/il_internal.o \ + $(ILODIR)/il_manip.o $(ILODIR)/il_main.o $(ILODIR)/il_devil.o \ + $(ILODIR)/il_pal.o $(ILODIR)/il_pcd.o $(ILODIR)/il_pcx.o $(ILODIR)/il_pic.o \ + $(ILODIR)/il_pnm.o $(ILODIR)/il_raw.o $(ILODIR)/il_register.o $(ILODIR)/il_rawdata.o \ + $(ILODIR)/il_rle.o $(ILODIR)/il_sgi.o $(ILODIR)/il_states.o \ + $(ILODIR)/il_targa.o $(ILODIR)/il_utility.o $(ILODIR)/il_io.o \ + $(ILODIR)/il_files.o $(ILODIR)/il_icon.o $(ILODIR)/il_wal.o \ + $(ILODIR)/il_mdl.o $(ILODIR)/il_quantizer.o $(ILODIR)/il_convbuff.o \ + $(ILODIR)/il_lif.o $(ILODIR)/il_alloc.o $(ILODIR)/il_dds.o $(ILODIR)/il_profiles.o \ + $(ILODIR)/il_dcx.o $(ILODIR)/il_psd.o $(ILODIR)/il_fastconv.o \ + $(ILODIR)/il_psp.o $(ILODIR)/il_dds-save.o $(ILODIR)/il_neuquant.o \ + $(ILODIR)/il_pix.o $(ILODIR)/il_pxr.o $(ILODIR)/il_xpm.o + + +ILUDIR= ./../../src-ILU/src +ILUODIR= .\..\..\src-ILU\src\obj +#ILULIB= ./../../lib/djgpp/libilu.a +ILULIB= libilu.a +ILUDEST= $(DJDIR)/lib/libilu.a +ILUINC= $(DJDIR)/include/il/ilu.h +ILUOBJ= $(ILUODIR)/ilu_error.o $(ILUODIR)/ilu_filter.o $(ILUODIR)/ilu_internal.o \ + $(ILUODIR)/ilu_manip.o $(ILUODIR)/ilu_mipmap.o $(ILUODIR)/ilu_filter_rcg.o \ + $(ILUODIR)/ilu_noise.o $(ILUODIR)/ilu_rotate.o $(ILUODIR)/ilu_scale.o \ + $(ILUODIR)/ilu_states.o $(ILUODIR)/ilu_utilities.o $(ILUODIR)/ilu_main.o \ + $(ILUODIR)/ilu_alloc.o $(ILUODIR)/ilu_scale2d.o $(ILUODIR)/ilu_scale3d.o \ + $(ILUODIR)/ilu_region.o + + +ILUTDIR= ./../../src-ILUT/src +ILUTODIR= .\..\..\src-ILUT\src\obj +#ILUTLIB= ./../../lib/djgpp/libilut.a +ILUTLIB= libilut.a +ILUTDEST= $(DJDIR)/lib/libilut.a +ILUTINC= $(DJDIR)/include/il/ilut.h +ILUTOBJ= $(ILUTODIR)/ilut_allegro.o $(ILUTODIR)/ilut_internal.o $(ILUTODIR)/ilut_main.o \ + $(ILUTODIR)/ilut_opengl.o $(ILUTODIR)/ilut_states.o + + +WFLAGS= -Wall -W -Wno-unused +ILFLAGS= -I./../../src-IL/include +ILUFLAGS= -I./../../src-ILU/include +ILUTFLAGS= -I./../../src-ILUT/include + + +all : compile_msg $(ILODIR) $(ILLIB) $(ILDEST) $(ILUODIR) $(ILULIB) $(ILUDEST) $(ILUTODIR) $(ILUTLIB) $(ILUTDEST) + @echo + @echo Done. + +compile_msg: + @echo DevIL is compiling...may take awhile. + +$(ILODIR)/%.o : $(ILDIR)/%.c + gcc $(ILFLAGS) $(WFLAGS) -c $< -o $@ -I..\..\include + +$(ILLIB): $(ILOBJ) + ar rs $(ILLIB) $(ILOBJ) + +# Need to find out how to make /include/il +$(ILDEST): $(ILLIB) + copy libil.a $(subst /,\,$(ILDEST)) + copy ..\..\include\il\il.h $(subst /,\,$(ILINC)) + +$(ILUODIR)/%.o : $(ILUDIR)/%.c + gcc $(ILUFLAGS) $(WFLAGS) -c $< -o $@ -I..\..\include + +$(ILULIB): $(ILUOBJ) + ar rs $(ILULIB) $(ILUOBJ) + +$(ILUDEST): $(ILULIB) + copy libilu.a $(subst /,\,$(ILUDEST)) + copy ..\..\include\il\ilu.h $(subst /,\,$(ILUINC)) + +$(ILUTODIR)/%.o : $(ILUTDIR)/%.c + gcc $(ILUTFLAGS) $(WFLAGS) -c $< -o $@ -I..\..\include + +$(ILUTLIB): $(ILUTOBJ) + ar rs $(ILUTLIB) $(ILUTOBJ) + +$(ILUTDEST): $(ILUTLIB) + copy libilut.a $(subst /,\,$(ILUTDEST)) + copy ..\..\include\il\ilut.h $(subst /,\,$(ILUTINC)) + +clean: +# RM -v $(ILODIR)/*.o +# RM -v $(ILUODIR)/*.o +# RM -v $(ILUTODIR)/*.o + del $(ILODIR)\*.o + del $(ILUODIR)\*.o + del $(ILUTODIR)\*.o diff --git a/libs/DevIL-1.7.8/projects/fortran/example.f b/libs/DevIL-1.7.8/projects/fortran/example.f new file mode 100644 index 00000000..9510a23c --- /dev/null +++ b/libs/DevIL-1.7.8/projects/fortran/example.f @@ -0,0 +1,5 @@ + program example + integer n + n = 1 + call ilFBindImage(n) + end diff --git a/libs/DevIL-1.7.8/projects/fortran/fortran_wrapper.c b/libs/DevIL-1.7.8/projects/fortran/fortran_wrapper.c new file mode 100644 index 00000000..1acf154d --- /dev/null +++ b/libs/DevIL-1.7.8/projects/fortran/fortran_wrapper.c @@ -0,0 +1,264 @@ +#include +#include +#include + +// NOTE! +// The biggest problem about using DevIL from Fortran is the +// fact that Fortran does arrays in column-major format. +// This wrapper does no conversions between the two! +// +// We are using DevIL return values as the first parameter. +// + + +// From http://www.ibiblio.org/pub/languages/fortran/ch1-11.html +// This is how Fortran passes strings. +struct descriptor /* VMS fixed length string */ +{ /* descriptor used in FORTRAN */ + unsigned short length; + unsigned char data_type, /* = 14 */ + dsc_class; /* = 1 */ + char *string_ptr; +}; + + +void ilFActiveImage_(int *RetVal, int *Number) +{ + *RetVal = ilActiveImage((unsigned int)*Number); + return; +} + +void ilFActiveLayer_(int *RetVal, int *Number) +{ + *RetVal = ilActiveImage((unsigned int)*Number); + return; +} + +void ilFActiveMipmap_(int *RetVal, int *Number) +{ + *RetVal = ilActiveImage((unsigned int)*Number); + return; +} + +void ilFApplyPal_(int *RetVal, struct descriptor *Desc) +{ + char *Filename = malloc(Desc->length + 1); + strncpy(Filename, Desc->string_ptr, Desc->length); + Filename[Desc->length] = 0; // Should really be NULL...getting a warning, though. + *RetVal = ilApplyPal(Filename); + + free(Filename); + return; +} + +void ilFBindImage_(int *Image) +{ + ilBindImage((unsigned int)*Image); + return; +} + +void ilFBlit_(int *RetVal, int *Source, int *DestX, int *DestY, int *DestZ, int *SrcX, int *SrcY, int *SrcZ, int *Width, int *Height, int *Depth) +{ + *RetVal = ilBlit(*Source, *DestX, *DestY, *DestZ, *SrcX, *SrcY, *SrcZ, *Width, *Height, *Depth); + return; +} + +void ilFClearColour_(float *Red, float *Green, float *Blue, float *Alpha) +{ + ilClearColour(*Red, *Green, *Blue, *Alpha); + return; +} + +void ilFClearImage_(int *RetVal) +{ + *RetVal = ilClearImage(); + return; +} + +void ilFCloneCurImage_(int *RetVal) +{ + *RetVal = ilCloneCurImage(); + return; +} + +void ilFCompressFunc_(int *RetVal, int *Mode) +{ + *RetVal = ilCompressFunc(*Mode); + return; +} + +void ilFConvertImage_(int *RetVal, int *DestFormat, int *DestType) +{ + *RetVal = ilConvertImage(*DestFormat, *DestType); + return; +} + +void ilFConvertPal_(int *RetVal, int *DestFormat) +{ + *RetVal = ilConvertPal(*DestFormat); +} + +void ilFCopyImage_(int *RetVal, int *Src) +{ + *RetVal = ilCopyImage(*Src); + return; +} + +void ilFCopyPixels_(int *RetVal, int *XOff, int *YOff, int *ZOff, int *Width, int *Height, int *Depth, int *Format, int *Type, void *Data) +{ + *RetVal = ilCopyPixels(*XOff, *YOff, *ZOff, *Width, *Height, *Depth, *Format, *Type, Data); + return; +} + +void ilFCreateSubImage_(int *RetVal, int *Type, int *Num) +{ + *RetVal = ilCreateSubImage(*Type, *Num); + return; +} + +void ilFDefaultImage_(int *RetVal) +{ + *RetVal = ilDefaultImage(); + return; +} + +void ilFDeleteImage_(int *Num) +{ + ilDeleteImage(*Num); + return; +} + +// Not sure how to do the arrays properly. +//void ilFDeleteImages_(int *Num, int **Images) +//{ +// ilDeleteImages(*Num, *Images); +//} + +void ilFDisable_(int *RetVal, int *Mode) +{ + *RetVal = ilDisable(*Mode); + return; +} + +void ilFEnable_(int *RetVal, int *Mode) +{ + *RetVal = ilEnable(*Mode); + return; +} + +void ilFFormatFunc_(int *RetVal, int *Mode) +{ + *RetVal = ilFormatFunc(*Mode); + return; +} + +// Not sure how to do the arrays properly. +//void ilFGenImages_(int *Num, int **Images) +//{ +// ilGenImages(*Num, *Images); +//} + +void ilFGenImage_(int *RetVal) +{ + *RetVal = ilGenImage(); + return; +} + +//void ilFGetAlpha_( + +void ilFGetBoolean_(int *RetVal, int *Mode) +{ + *RetVal = ilGetBoolean(*Mode); + return; +} + +void ilFGetBooleanv_(int *Mode, int *Param) +{ + ilGetBooleanv(*Mode, Param); + return; +} + +void ilFGetData_(char *RetVal) +{ + RetVal = ilGetData(); + return; +} + +// ilGetDXTCData + +void ilFGetError_(int *RetVal) +{ + *RetVal = ilGetError(); + return; +} + +void ilFGetInteger_(int *RetVal, int *Mode) +{ + *RetVal = ilGetInteger(*Mode); + return; +} + +void ilFGetIntegerv_(int *Mode, int *Param) +{ + ilGetIntegerv(*Mode, Param); + return; +} + +void ilFGetLumpPos_(int *RetVal) +{ + *RetVal = ilGetLumpPos(); + return; +} + +void ilFGetPalette_(char *RetVal) +{ + RetVal = ilGetPalette(); + return; +} + +//ilGetString + +void ilFInit_() +{ + ilInit(); + return; +} + +void ilFShutDown_() +{ + ilShutDown(); + return; +} + +void ilFLoadImage_(int *RetVal, struct descriptor *Desc) +{ + char *Filename = malloc(Desc->length + 1); + strncpy(Filename, Desc->string_ptr, Desc->length); + Filename[Desc->length] = 0; // Should really be NULL...getting a warning, though. + *RetVal = ilLoadImage(Filename); + + free(Filename); + return; +} + +void ilFSave_(int *RetVal, int *Type, struct descriptor *Desc) +{ + char *Filename = malloc(Desc->length + 1); + strncpy(Filename, Desc->string_ptr, Desc->length); + Filename[Desc->length] = 0; // Should really be NULL...getting a warning, though. + *RetVal = ilSave(*Type, Filename); + + free(Filename); + return; +} + +void ilFSaveImage_(int *RetVal, struct descriptor *Desc) +{ + char *Filename = malloc(Desc->length + 1); + strncpy(Filename, Desc->string_ptr, Desc->length); + Filename[Desc->length] = 0; // Should really be NULL...getting a warning, though. + *RetVal = ilSaveImage(Filename); + + free(Filename); + return; +} \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/msvc8/ImageLib Unicode.sln b/libs/DevIL-1.7.8/projects/msvc8/ImageLib Unicode.sln new file mode 100644 index 00000000..3cbceb79 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc8/ImageLib Unicode.sln @@ -0,0 +1,80 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILUT", "..\..\src-ILUT\msvc8\ILUT Unicode.vcproj", "{7D060DA4-F2FA-44CC-80BE-065024DD6CA9}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Text Files", "Solution Text Files", "{D80F24EB-FFDB-4DBA-9714-12B21BA8AF2E}" + ProjectSection(SolutionItems) = preProject + ..\..\AUTHORS = ..\..\AUTHORS + ..\..\ChangeLog = ..\..\ChangeLog + ..\..\CREDITS = ..\..\CREDITS + ..\..\Libraries.txt = ..\..\Libraries.txt + ..\..\MSVC++.txt = ..\..\MSVC++.txt + ..\..\NEWS = ..\..\NEWS + ..\..\README = ..\..\README + ..\..\README.unix = ..\..\README.unix + ..\..\README.win = ..\..\README.win + ..\..\TODO = ..\..\TODO + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IL", "..\..\src-IL\msvc8\IL Unicode.vcproj", "{B46B180B-6079-4CE6-8647-A7D712774255}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILU", "..\..\src-ILU\msvc8\ILU Unicode.vcproj", "{CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Windows Example", "..\..\examples\windows_example\windows_example-vc8.vcproj", "{0C074F70-FA8F-4D7B-BD37-DCEF0371361B}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9} = {7D060DA4-F2FA-44CC-80BE-065024DD6CA9} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.Build.0 = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.ActiveCfg = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.Build.0 = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.ActiveCfg = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.Build.0 = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.ActiveCfg = Release|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.Build.0 = Release|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.ActiveCfg = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.Build.0 = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.ActiveCfg = Release|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.Build.0 = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.ActiveCfg = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.Build.0 = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.ActiveCfg = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.Build.0 = Release|x64 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|Win32.Build.0 = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|x64.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|Win32.ActiveCfg = Release|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|Win32.Build.0 = Release|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc8/ImageLib.sln b/libs/DevIL-1.7.8/projects/msvc8/ImageLib.sln new file mode 100644 index 00000000..f4547e06 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc8/ImageLib.sln @@ -0,0 +1,80 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IL", "..\..\src-IL\msvc8\IL.vcproj", "{B46B180B-6079-4CE6-8647-A7D712774255}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILU", "..\..\src-ILU\msvc8\ILU.vcproj", "{CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILUT", "..\..\src-ILUT\msvc8\ILUT.vcproj", "{7D060DA4-F2FA-44CC-80BE-065024DD6CA9}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Text Files", "Solution Text Files", "{715E9AC5-0B73-40AC-8558-E17F848982A5}" + ProjectSection(SolutionItems) = preProject + ..\..\AUTHORS = ..\..\AUTHORS + ..\..\ChangeLog = ..\..\ChangeLog + ..\..\CREDITS = ..\..\CREDITS + ..\..\Libraries.txt = ..\..\Libraries.txt + ..\..\MSVC++.txt = ..\..\MSVC++.txt + ..\..\NEWS = ..\..\NEWS + ..\..\README.unix = ..\..\README.unix + ..\..\README.win = ..\..\README.win + ..\..\TODO = ..\..\TODO + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Dynamic|Win32 = Dynamic|Win32 + Dynamic|x64 = Dynamic|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.ActiveCfg = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.Build.0 = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.ActiveCfg = Release|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.Build.0 = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.ActiveCfg = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.Build.0 = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.ActiveCfg = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.Build.0 = Release|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.Build.0 = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.ActiveCfg = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.Build.0 = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|Win32.Build.0 = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|x64.ActiveCfg = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|x64.Build.0 = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.ActiveCfg = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.Build.0 = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.ActiveCfg = Release|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc8/x64 DLL Install.exe b/libs/DevIL-1.7.8/projects/msvc8/x64 DLL Install.exe new file mode 100644 index 00000000..f1ea360d Binary files /dev/null and b/libs/DevIL-1.7.8/projects/msvc8/x64 DLL Install.exe differ diff --git a/libs/DevIL-1.7.8/projects/msvc9/ImageLib Unicode.sln b/libs/DevIL-1.7.8/projects/msvc9/ImageLib Unicode.sln new file mode 100644 index 00000000..d2729308 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/ImageLib Unicode.sln @@ -0,0 +1,97 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IL Unicode", "..\..\src-IL\msvc9\IL Unicode.vcproj", "{B46B180B-6079-4CE6-8647-A7D712774255}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILU Unicode", "..\..\src-ILU\msvc9\ILU Unicode.vcproj", "{CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILUT Unicode", "..\..\src-ILUT\msvc9\ILUT Unicode.vcproj", "{1E0FF575-39C1-4A99-820F-8397E9D1351F}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Text Files", "Solution Text Files", "{F85596A4-DBF8-478C-9EBB-642D8E14DABD}" + ProjectSection(SolutionItems) = preProject + ..\..\AUTHORS = ..\..\AUTHORS + ..\..\ChangeLog = ..\..\ChangeLog + ..\..\CREDITS = ..\..\CREDITS + ..\..\libraries.txt = ..\..\libraries.txt + ..\..\MSVC++.txt = ..\..\MSVC++.txt + ..\..\NEWS = ..\..\NEWS + ..\..\README = ..\..\README + ..\..\README.unix = ..\..\README.unix + ..\..\README.win = ..\..\README.win + ..\..\TODO = ..\..\TODO + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Windows Example", "..\..\examples\windows_example\windows_example-vc9.vcproj", "{0C074F70-FA8F-4D7B-BD37-DCEF0371361B}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {1E0FF575-39C1-4A99-820F-8397E9D1351F} = {1E0FF575-39C1-4A99-820F-8397E9D1351F} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Dynamic|Win32 = Dynamic|Win32 + Dynamic|x64 = Dynamic|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.ActiveCfg = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.Build.0 = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.ActiveCfg = Release|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.Build.0 = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.ActiveCfg = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.Build.0 = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.ActiveCfg = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.Build.0 = Release|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Debug|Win32.Build.0 = Debug|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Debug|x64.ActiveCfg = Debug|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Debug|x64.Build.0 = Debug|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Dynamic|Win32.Build.0 = Debug|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Dynamic|x64.ActiveCfg = Debug|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Dynamic|x64.Build.0 = Debug|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Release|Win32.ActiveCfg = Release|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Release|Win32.Build.0 = Release|Win32 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Release|x64.ActiveCfg = Release|x64 + {1E0FF575-39C1-4A99-820F-8397E9D1351F}.Release|x64.Build.0 = Release|x64 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|Win32.Build.0 = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Debug|x64.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Dynamic|Win32.Build.0 = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Dynamic|x64.ActiveCfg = Debug|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|Win32.ActiveCfg = Release|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|Win32.Build.0 = Release|Win32 + {0C074F70-FA8F-4D7B-BD37-DCEF0371361B}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc9/ImageLib.sln b/libs/DevIL-1.7.8/projects/msvc9/ImageLib.sln new file mode 100644 index 00000000..22076fe6 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/ImageLib.sln @@ -0,0 +1,80 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IL", "..\..\src-IL\msvc9\IL.vcproj", "{B46B180B-6079-4CE6-8647-A7D712774255}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILU", "..\..\src-ILU\msvc9\ILU.vcproj", "{CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILUT", "..\..\src-ILUT\msvc9\ILUT.vcproj", "{7D060DA4-F2FA-44CC-80BE-065024DD6CA9}" + ProjectSection(ProjectDependencies) = postProject + {B46B180B-6079-4CE6-8647-A7D712774255} = {B46B180B-6079-4CE6-8647-A7D712774255} + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} = {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Text Files", "Solution Text Files", "{8613D7AA-0767-4567-87E5-E84C82F2FC93}" + ProjectSection(SolutionItems) = preProject + ..\..\AUTHORS = ..\..\AUTHORS + ..\..\ChangeLog = ..\..\ChangeLog + ..\..\CREDITS = ..\..\CREDITS + ..\..\libraries.txt = ..\..\libraries.txt + ..\..\MSVC++.txt = ..\..\MSVC++.txt + ..\..\NEWS = ..\..\NEWS + ..\..\README.unix = ..\..\README.unix + ..\..\README.win = ..\..\README.win + ..\..\TODO = ..\..\TODO + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Dynamic|Win32 = Dynamic|Win32 + Dynamic|x64 = Dynamic|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Debug|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|Win32.Build.0 = Debug|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.ActiveCfg = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Dynamic|x64.Build.0 = Debug|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.ActiveCfg = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|Win32.Build.0 = Release|Win32 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.ActiveCfg = Release|x64 + {B46B180B-6079-4CE6-8647-A7D712774255}.Release|x64.Build.0 = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Debug|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|Win32.Build.0 = Debug|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.ActiveCfg = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Dynamic|x64.Build.0 = Debug|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.ActiveCfg = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|Win32.Build.0 = Release|Win32 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.ActiveCfg = Release|x64 + {CCEBAA77-521A-4CC3-A4E0-C6B062FC2009}.Release|x64.Build.0 = Release|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|Win32.Build.0 = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.ActiveCfg = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Debug|x64.Build.0 = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|Win32.ActiveCfg = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|Win32.Build.0 = Debug|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|x64.ActiveCfg = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Dynamic|x64.Build.0 = Debug|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.ActiveCfg = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|Win32.Build.0 = Release|Win32 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.ActiveCfg = Release|x64 + {7D060DA4-F2FA-44CC-80BE-065024DD6CA9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.cpp b/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.cpp new file mode 100644 index 00000000..730059ac --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.cpp @@ -0,0 +1,127 @@ +//----------------------------------------------------------------------------- +// +// DevIL GDI+ Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/13/2002 <--Y2K Compliant! =] +// +// Filename: gdi+/devil-gdi+.cpp +// +// Description: GDI+ loading routines +// +//----------------------------------------------------------------------------- + +#include "stdafx.h" +#include "DevIL-GDI+.h" + + +// Basic Palette struct +typedef struct ILpal +{ + ILubyte *Palette; // the image palette (if any) + ILuint PalSize; // size of the palette (in bytes) + ILenum PalType; // the palette types below (0x0500 range) +} ILpal; + + +// The Fundamental Image struct +typedef struct ILimage +{ + ILuint Width; // the image's width + ILuint Height; // the image's height + ILuint Depth; // the image's depth + ILubyte Bpp; // bytes per pixel (now number of channels) + ILubyte Bpc; // bytes per channel + ILuint Bps; // bytes per scanline (components for IL) + ILubyte *Data; // the image data + ILuint SizeOfData; // the total size of the data (in bytes) + ILuint SizeOfPlane; // SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes) + ILenum Format; // image format (in IL enum style) + ILenum Type; // image type (in IL enum style) + ILenum Origin; // origin of the image + ILpal Pal; // palette details + ILuint Duration; // length of the time to display this "frame" + ILenum CubeFlags; // cube map flags for sides present in chain + struct ILimage *Mipmaps; // mipmapped versions of this image terminated by a NULL - usu. NULL + struct ILimage *Next; // next image in the chain - usu. NULL + struct ILimage *Layers; // subsequent layers in the chain - usu. NULL + ILuint NumNext; // number of images following this one (0 when not parent) + ILuint NumMips; // number of mipmaps (0 when not parent) + ILuint NumLayers; // number of layers (0 when not parent) + ILuint *AnimList; // animation list + ILuint AnimSize; // animation list size + ILvoid *Profile; // colour profile + ILuint ProfileSize; // colour profile size + ILuint OffX, OffY; // offset of the image +} ILimage; + +ILAPI ILimage* ILAPIENTRY iConvertImage(ILenum DestFormat, ILenum DestType); +ILAPI ILubyte* ILAPIENTRY iGetPaddedData(ILimage *Image); +ILAPI ILimage* ILAPIENTRY ilGetCurImage(void); +ILAPI ILvoid ILAPIENTRY ilCloseImage(ILimage *Image); +ILAPI ILvoid ILAPIENTRY iBindImageTemp(void); + + +// @TODO: Use 48-bit and 64-bit types. +Bitmap *ilutConvertToBitmap() +{ + Bitmap *Bmp = NULL; + ILubyte *Data = NULL; + ILimage *Image = NULL, *GdiCurImage = NULL; + + GdiCurImage = ilGetCurImage(); + if (GdiCurImage == NULL) { + return NULL; + } + + if (GdiCurImage->Format == IL_BGRA && GdiCurImage->Format == IL_UNSIGNED_BYTE) { + Image = GdiCurImage; + return new Bitmap(Image->Width, Image->Height, Image->Bps, PixelFormat32bppARGB, Image->Data); + } + else if (GdiCurImage->Format == IL_BGRA || GdiCurImage->Format == IL_RGBA) { + Image = iConvertImage(IL_BGRA, IL_UNSIGNED_BYTE); + if (Image == NULL) + return NULL; + Bmp = new Bitmap(Image->Width, Image->Height, Image->Bps, PixelFormat32bppARGB, Image->Data); + ilCloseImage(Image); + return Bmp; + } + else if (GdiCurImage->Format == IL_LUMINANCE && + (GdiCurImage->Type == IL_UNSIGNED_SHORT || GdiCurImage->Type == IL_SHORT)) { + Image = GdiCurImage; + return new Bitmap(Image->Width, Image->Height, Image->Bps, PixelFormat16bppGrayScale, Image->Data); + } + else if (GdiCurImage->Format == IL_LUMINANCE) { + Image = iConvertImage(IL_LUMINANCE, IL_UNSIGNED_SHORT); + if (Image == NULL) + return NULL; + Bmp = new Bitmap(Image->Width, Image->Height, Image->Bps, PixelFormat16bppGrayScale, Image->Data); + ilCloseImage(Image); + return Bmp; + } + else { + Image = iConvertImage(IL_BGR, IL_UNSIGNED_BYTE); + if (Image == NULL) + return NULL; + Bmp = new Bitmap(Image->Width, Image->Height, Image->Bps, PixelFormat24bppRGB, Image->Data); + ilCloseImage(Image); + return Bmp; + } + + return NULL; // Something really screwy has happened here... +} + + +Bitmap *ilutGDILoadImage(const ILstring FileName) +{ + Bitmap *Bmp; + + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return NULL; + + Bmp = ilutConvertToBitmap(); + + return Bmp; +} + + diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.h b/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.h new file mode 100644 index 00000000..1203db93 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/DevIL-GDI+.h @@ -0,0 +1,30 @@ +//----------------------------------------------------------------------------- +// +// DevIL GDI+ Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/13/2001 <--Y2K Compliant! =] +// +// Filename: gdi+/devil-gdi+.h +// +// Description: GDI+ CBitmap loading routines +// +//----------------------------------------------------------------------------- + + +#ifndef __gdi_il_h_ +#ifndef __GDI_IL_H__ + +#define __gdi_il_h_ +#define __GDI_IL_H__ + +#include +#include // Needed to #include +#include +#include +using namespace Gdiplus; + +Bitmap *ilutConvertToBitmap(); +Bitmap *ilutGDILoadImage(const ILstring FileName); + +#endif // __GDI_IL_H__ +#endif // __gdi_il_h__ diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.sln b/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.sln new file mode 100644 index 00000000..30b982b6 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GDI+", "GDI+.vcproj", "{3BE70721-42D4-42C3-A6C6-C01214CC2ABA}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {3BE70721-42D4-42C3-A6C6-C01214CC2ABA}.Debug.ActiveCfg = Debug|Win32 + {3BE70721-42D4-42C3-A6C6-C01214CC2ABA}.Debug.Build.0 = Debug|Win32 + {3BE70721-42D4-42C3-A6C6-C01214CC2ABA}.Release.ActiveCfg = Release|Win32 + {3BE70721-42D4-42C3-A6C6-C01214CC2ABA}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.vcproj b/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.vcproj new file mode 100644 index 00000000..e0357938 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/GDI+.vcproj @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.cpp b/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.cpp new file mode 100644 index 00000000..54e94485 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// GDI+.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.h b/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.h new file mode 100644 index 00000000..4ef8dc4f --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/gdi+/stdafx.h @@ -0,0 +1,10 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// TODO: reference additional headers your program requires here diff --git a/libs/DevIL-1.7.8/projects/msvc9/insdll.bat b/libs/DevIL-1.7.8/projects/msvc9/insdll.bat new file mode 100644 index 00000000..121023ca --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/insdll.bat @@ -0,0 +1,23 @@ +if "%ILNOCOPY%" == "" goto work +goto done + +:work + +if "%SystemRoot%" == "" goto isnotnt + +echo Copying %1 to %SystemRoot%\System32... +copy %1 %SystemRoot%\System32 +goto done + +:isnotnt +if "%WINDIR%" == "" goto isnot95 + +echo Copying %1 to %WINDIR%\System... +copy %1 %WINDIR%\System +goto done + +:isnot95 +echo *** Unrecognised platform! *** +goto done + +:done diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.cpp b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.cpp new file mode 100644 index 00000000..fc7f3103 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.cpp @@ -0,0 +1,130 @@ +//----------------------------------------------------------------------------- +// +// DevIL MFC Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/07/2002 <--Y2K Compliant! =] +// +// Filename: mfc/devil-mfc.cpp +// +// Description: MFC CBitmap loading routines +// +//----------------------------------------------------------------------------- + +#include "stdafx.h" +#include "DevIL-MFC.h" + + +// Basic Palette struct +typedef struct ILpal +{ + ILubyte *Palette; // the image palette (if any) + ILuint PalSize; // size of the palette (in bytes) + ILenum PalType; // the palette types below (0x0500 range) +} ILpal; + + +// The Fundamental Image struct +typedef struct ILimage +{ + ILuint Width; // the image's width + ILuint Height; // the image's height + ILuint Depth; // the image's depth + ILubyte Bpp; // bytes per pixel (now number of channels) + ILubyte Bpc; // bytes per channel + ILuint Bps; // bytes per scanline (components for IL) + ILubyte *Data; // the image data + ILuint SizeOfData; // the total size of the data (in bytes) + ILuint SizeOfPlane; // SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes) + ILenum Format; // image format (in IL enum style) + ILenum Type; // image type (in IL enum style) + ILenum Origin; // origin of the image + ILpal Pal; // palette details + ILuint Duration; // length of the time to display this "frame" + ILenum CubeFlags; // cube map flags for sides present in chain + struct ILimage *Mipmaps; // mipmapped versions of this image terminated by a NULL - usu. NULL + struct ILimage *Next; // next image in the chain - usu. NULL + struct ILimage *Layers; // subsequent layers in the chain - usu. NULL + ILuint NumNext; // number of images following this one (0 when not parent) + ILuint NumMips; // number of mipmaps (0 when not parent) + ILuint NumLayers; // number of layers (0 when not parent) + ILuint *AnimList; // animation list + ILuint AnimSize; // animation list size + ILvoid *Profile; // colour profile + ILuint ProfileSize; // colour profile size + ILuint OffX, OffY; // offset of the image +} ILimage; + +ILAPI ILimage* ILAPIENTRY iConvertImage(ILenum DestFormat, ILenum DestType); +ILAPI ILubyte* ILAPIENTRY iGetPaddedData(ILimage *Image); +ILAPI ILimage* ILAPIENTRY ilGetCurImage(void); +ILAPI ILvoid ILAPIENTRY ilCloseImage(ILimage *Image); +ILAPI ILvoid ILAPIENTRY iBindImageTemp(void); + + +CBitmap *ilutConvertToCBitmap() +{ + CBitmap *Bmp = NULL; + ILubyte *Data = NULL; + ILimage *Image = NULL, *MfcCurImage = NULL; + + Bmp = new CBitmap; + if (Bmp == NULL) + return NULL; + + MfcCurImage = ilGetCurImage(); + if (MfcCurImage == NULL) { + return NULL; + } + + if (MfcCurImage->Format == IL_BGRA && MfcCurImage->Format == IL_UNSIGNED_BYTE) { + Image = MfcCurImage; + } + else if (MfcCurImage->Format == IL_BGRA || MfcCurImage->Format == IL_RGBA) { + Image = iConvertImage(IL_BGRA, IL_UNSIGNED_BYTE); + if (Image == NULL) { + delete Bmp; + return NULL; + } + } + else { + Image = iConvertImage(IL_BGR, IL_UNSIGNED_BYTE); + if (Image == NULL) { + delete Bmp; + return NULL; + } + } + + Data = iGetPaddedData(Image); + if (Data == NULL) { + if (Image != MfcCurImage) + ilCloseImage(Image); + delete Bmp; + return NULL; + } + + if (!Bmp->CreateBitmap(Image->Width, Image->Height, 1, Image->Bpp << 3, Image->Data)) { + if (Image != MfcCurImage) + ilCloseImage(Image); + free(Data); + delete Bmp; + return NULL; + } + + return Bmp; +} + + +CBitmap *ilutMFCLoadImage(const ILstring FileName) +{ + CBitmap *Bmp; + + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return NULL; + + Bmp = ilutConvertToCBitmap(); + + return Bmp; +} + + diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsp b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsp new file mode 100644 index 00000000..dd0c0fae --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="DevIL_MFC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=DevIL_MFC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "DevIL-MFC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "DevIL-MFC.mak" CFG="DevIL_MFC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DevIL_MFC - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "DevIL_MFC - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "DevIL_MFC - Win32 Release" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 2 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "DevIL_MFC - Win32 Debug" + +# PROP BASE Use_MFC 2 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "DevIL_MFC - Win32 Release" +# Name "DevIL_MFC - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=".\DevIL-MFC.cpp" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=".\DevIL-MFC.h" +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\Readme.txt +# End Source File +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsw b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsw new file mode 100644 index 00000000..2adef877 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DevIL_MFC"=.\DevIL_MFC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.h b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.h new file mode 100644 index 00000000..8a7f8c23 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.h @@ -0,0 +1,35 @@ +//----------------------------------------------------------------------------- +// +// DevIL MFC Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/13/2002 <--Y2K Compliant! =] +// +// Filename: mfc/devil-mfc.h +// +// Description: MFC CBitmap loading routines +// +//----------------------------------------------------------------------------- + + +#ifndef __mfcil_h_ +#ifndef __MFCIL_H__ + +#define __mfcil_h_ +#define __MFCIL_H__ + +#include + +// Internal to IL but makes things easier for us: +struct ILimage; +ILAPI ILimage* ILAPIENTRY iConvertImage(ILenum DestFormat, ILenum DestType); +ILAPI ILubyte* ILAPIENTRY iGetPaddedData(ILimage *Image); +ILAPI ILimage* ILAPIENTRY ilGetCurImage(void); +ILAPI ILvoid ILAPIENTRY ilCloseImage(ILimage *Image); +ILAPI ILvoid ILAPIENTRY iBindImageTemp(void); + +// Functions for the static library. +CBitmap *ilutConvertToCBitmap(); +CBitmap *ilutMFCLoadImage(const ILstring FileName); + +#endif // __MFCIL_H__ +#endif // __mfcil_h__ diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.sln b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.sln new file mode 100644 index 00000000..6919c865 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL-MFC", "DevIL-MFC.vcproj", "{A5D0C1E9-A877-48AF-AF0A-E9795C5B9877}" +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + ConfigName.0 = Debug + ConfigName.1 = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {A5D0C1E9-A877-48AF-AF0A-E9795C5B9877}.Debug.ActiveCfg = Debug|Win32 + {A5D0C1E9-A877-48AF-AF0A-E9795C5B9877}.Debug.Build.0 = Debug|Win32 + {A5D0C1E9-A877-48AF-AF0A-E9795C5B9877}.Release.ActiveCfg = Release|Win32 + {A5D0C1E9-A877-48AF-AF0A-E9795C5B9877}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.vcproj b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.vcproj new file mode 100644 index 00000000..6f1b4d37 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/DevIL-MFC.vcproj @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.cpp b/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.cpp new file mode 100644 index 00000000..43be0c88 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// DevIL-MFC.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.h b/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.h new file mode 100644 index 00000000..83419e47 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/msvc9/mfc/stdafx.h @@ -0,0 +1,18 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#endif + +#include +#include // MFC core and standard components + +// TODO: reference additional headers your program requires here diff --git a/libs/DevIL-1.7.8/projects/msvc9/x64 DLL Install.exe b/libs/DevIL-1.7.8/projects/msvc9/x64 DLL Install.exe new file mode 100644 index 00000000..f1ea360d Binary files /dev/null and b/libs/DevIL-1.7.8/projects/msvc9/x64 DLL Install.exe differ diff --git a/libs/DevIL-1.7.8/projects/powerbasic/il.inc b/libs/DevIL-1.7.8/projects/powerbasic/il.inc new file mode 100644 index 00000000..e43f6968 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/il.inc @@ -0,0 +1,535 @@ +'----------------------------------------------------------------------------- +' +' ImageLib Sources +' Copyright (C) 2000-2002 by Denton Woods +' Last modified: 06/22/2002 <--Y2K Compliant! =] +' +' Filename: il/il.h +' +' Description: The main include file for DevIL +' +'----------------------------------------------------------------------------- +'----------------------------------------------------------------------------- +' +' Translated to Powerbasic by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 headers +' +' Filename: il.inc +' +' Description: PB main include file for DevIL +' +' For information on use and download of DevIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and DevIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + +' #ifndef __il_h_ +' #ifndef __IL_H__ + +' %__il_h_ +' %__IL_H__ + +' #ifdef __cplusplus +' extern "C" { +' #endif + +'%IL_NO_BMP +'%IL_NO_CUT +'%IL_NO_CHEAD +'%IL_NO_DDS +'%IL_NO_DOOM +'%IL_NO_ICO +'%IL_NO_JPG +'%IL_NO_LIF +'%IL_NO_LBM +'%IL_NO_MDL +'%IL_NO_PCD +'%IL_NO_PCX +'%IL_NO_PIC +'%IL_NO_PNG +'%IL_NO_PNM +'%IL_NO_RAW +'%IL_NO_SGI +'%IL_NO_TGA +'%IL_NO_TIF +'%IL_NO_WAL +'%IL_NO_DDS +'%IL_NO_DCX +'%IL_NO_PSD +'%IL_NO_PSP +'%IL_NO_PXR +'%IL_NO_RAW +'%IL_NO_SGI +'%IL_NO_TGA +'%IL_NO_TIF +'%IL_NO_WAL +'%IL_NO_XPM + +'%IL_USE_IJL ' Whether we use the Intel Jpeg Library (else use libjpeg). + + +' #ifdef _WIN32 +'%WIN32_LEAN_AND_MEAN ' Exclude rarely-used stuff from Windows headers +'#include +' #ifdef _MSC_VER +' #ifndef _IL_BUILD_LIBRARY +' #ifdef _DEBUG +' #pragma comment(lib, "devil-d.lib") +' #else +' #pragma comment(lib, "devil.lib") +' #endif'_DEBUG +' #endif'_IL_BUILD_LIBRARY +' #endif'_MSC_VER +' #endif'_WIN32 + +' #include + +' typedef unsigned int ILenum; +' typedef unsigned char ILboolean; +' typedef unsigned int ILbitfield; +' typedef char ILbyte; +' typedef short ILshort; +' typedef int ILint; +' typedef int ILsizei; +' typedef unsigned char ILubyte; +' typedef unsigned short ILushort; +' typedef unsigned int ILuint; +' typedef float ILfloat; +' typedef float ILclampf; +' typedef double ILdouble; +' typedef double ILclampd; +' typedef void ILvoid; + + +%IL_FALSE = 0 +%IL_TRUE = 1 + + +' Matches OpenGL's right now. +%IL_COLOUR_INDEX = &H1900& +%IL_COLOR_INDEX = &H1900& +%IL_RGB = &H1907& +%IL_RGBA = &H1908& +%IL_BGR = &H80E0& +%IL_BGRA = &H80E1& +%IL_LUMINANCE = &H1909& + + +%IL_BYTE = &H1400& +%IL_UNSIGNED_BYTE = &H1401& +%IL_SHORT = &H1402& +%IL_UNSIGNED_SHORT = &H1403& +%IL_INT = &H1404& +%IL_UNSIGNED_INT = &H1405& +%IL_FLOAT = &H1406& +%GL_DOUBLE = &H140A& + + +%IL_VENDOR = &H1F00& + + +' +' IL-specific #define's +' + +%IL_VERSION_1_5_6 = 1 +%IL_VERSION = 156 +%IL_LOAD_EXT = &H1F01& +%IL_SAVE_EXT = &H1F02& + + +' Attribute Bits +%IL_ORIGIN_BIT = &H00000001& +%IL_FILE_BIT = &H00000002& +%IL_PAL_BIT = &H00000004& +%IL_FORMAT_BIT = &H00000008& +%IL_TYPE_BIT = &H00000010& +%IL_COMPRESS_BIT = &H00000020& +%IL_LOADFAIL_BIT = &H00000040& +%IL_ALL_ATTRIB_BITS = &H000FFFFF& + + +' Palette types +%IL_PAL_NONE = &H0400& +%IL_PAL_RGB24 = &H0401& +%IL_PAL_RGB32 = &H0402& +%IL_PAL_RGBA32 = &H0403& +%IL_PAL_BGR24 = &H0404& +%IL_PAL_BGR32 = &H0405& +%IL_PAL_BGRA32 = &H0406& + + +' Image types +%IL_TYPE_UNKNOWN = &H0000& +%IL_BMP = &H0420& +%IL_CUT = &H0421& +%IL_DOOM = &H0422& +%IL_DOOM_FLAT = &H0423& +%IL_ICO = &H0424& +%IL_JPG = &H0425& +%IL_LBM = &H0426& +%IL_PCD = &H0427& +%IL_PCX = &H0428& +%IL_PIC = &H0429& +%IL_PNG = &H042A& +%IL_PNM = &H042B& +%IL_SGI = &H042C& +%IL_TGA = &H042D& +%IL_TIF = &H042E& +%IL_CHEAD = &H042F& +%IL_RAW = &H0430& +%IL_MDL = &H0431& +%IL_WAL = &H0432& +%IL_LIF = &H0434& +%IL_MNG = &H0435& +%IL_JNG = &H0435& +%IL_GIF = &H0436& +%IL_DDS = &H0437& +%IL_DCX = &H0438& +%IL_PSD = &H0439& +%IL_EXIF = &H043A& +%IL_PSP = &H043B& +%IL_PIX = &H043C& +%IL_PXR = &H043D& +%IL_XPM = &H043E& + +%IL_JASC_PAL = &H0475& + + +' Error Types +%IL_NO_ERROR = &H0000& +%IL_INVALID_ENUM = &H0501& +%IL_OUT_OF_MEMORY = &H0502& +%IL_FORMAT_NOT_SUPPORTED = &H0503& +%IL_INTERNAL_ERROR = &H0504& +%IL_INVALID_VALUE = &H0505& +%IL_ILLEGAL_OPERATION = &H0506& +%IL_ILLEGAL_FILE_VALUE = &H0507& +%IL_INVALID_FILE_HEADER = &H0508& +%IL_INVALID_PARAM = &H0509& +%IL_COULD_NOT_OPEN_FILE = &H050A& +%IL_INVALID_EXTENSION = &H050B& +%IL_FILE_ALREADY_EXISTS = &H050C& +%IL_OUT_FORMAT_SAME = &H050D& +%IL_STACK_OVERFLOW = &H050E& +%IL_STACK_UNDERFLOW = &H050F& +%IL_INVALID_CONVERSION = &H0510& +%IL_BAD_DIMENSIONS = &H0511& +%IL_FILE_READ_ERROR = &H0512& + +%IL_LIB_GIF_ERROR = &H05E1& +%IL_LIB_JPEG_ERROR = &H05E2& +%IL_LIB_PNG_ERROR = &H05E3& +%IL_LIB_TIFF_ERROR = &H05E4& +%IL_LIB_MNG_ERROR = &H05E5& +%IL_UNKNOWN_ERROR = &H05FF& + + +' Origin Definitions +%IL_ORIGIN_SET = &H0600& +%IL_ORIGIN_LOWER_LEFT = &H0601& +%IL_ORIGIN_UPPER_LEFT = &H0602& +%IL_ORIGIN_MODE = &H0603& + + +' Format and Type Mode Definitions +%IL_FORMAT_SET = &H0610& +%IL_FORMAT_MODE = &H0611& +%IL_TYPE_SET = &H0612& +%IL_TYPE_MODE = &H0613& + + +' File definitions +%IL_FILE_OVERWRITE = &H0620& +%IL_FILE_MODE = &H0621& + + +' Palette definitions +%IL_CONV_PAL = &H0630& + + +' Load fail definitions +%IL_DEFAULT_ON_FAIL = &H0632& + + +' Key colour definitions +%IL_USE_KEY_COLOUR = &H0635& +%IL_USE_KEY_COLOR = &H0635& + + +' Interlace definitions +%IL_SAVE_INTERLACED = &H0639& +%IL_INTERLACE_MODE = &H063A& + + +' Quantization definitions +%IL_QUANTIZATION_MODE = &H0640& +%IL_WU_QUANT = &H0641& +%IL_NEU_QUANT = &H0642& +%IL_NEU_QUANT_SAMPLE = &H0643& + + +' Hints +%IL_FASTEST = &H0660& +%IL_LESS_MEM = &H0661& +%IL_DONT_CARE = &H0662& +%IL_MEM_SPEED_HINT = &H0665& +%IL_USE_COMPRESSION = &H0666& +%IL_NO_COMPRESSION = &H0667& +%IL_COMPRESSION_HINT = &H0668& + + +' Subimage types +%IL_SUB_NEXT = &H0680& +%IL_SUB_MIPMAP = &H0681& +%IL_SUB_LAYER = &H0682& + + +' Compression definitions +%IL_COMPRESS_MODE = &H0700& +%IL_COMPRESS_NONE = &H0701& +%IL_COMPRESS_RLE = &H0702& +%IL_COMPRESS_LZO = &H0703& +%IL_COMPRESS_ZLIB = &H0704& + + +' File format-specific values +%IL_TGA_CREATE_STAMP = &H0710& +%IL_JPG_QUALITY = &H0711& +%IL_PNG_INTERLACE = &H0712& +%IL_TGA_RLE = &H0713& +%IL_BMP_RLE = &H0714& +%IL_SGI_RLE = &H0715& +%IL_TGA_CREATE_STAMP = &H0710& +%IL_JPG_QUALITY = &H0711& +%IL_PNG_INTERLACE = &H0712& +%IL_TGA_RLE = &H0713& +%IL_BMP_RLE = &H0714& +%IL_SGI_RLE = &H0715& +%IL_TGA_ID_STRING = &H0717& +%IL_TGA_AUTHNAME_STRING = &H0718& +%IL_TGA_AUTHCOMMENT_STRING = &H0719& +%IL_PNG_AUTHNAME_STRING = &H071A& +%IL_PNG_TITLE_STRING = &H071B& +%IL_PNG_DESCRIPTION_STRING = &H071C& +%IL_TIF_DESCRIPTION_STRING = &H071D& +%IL_TIF_HOSTCOMPUTER_STRING = &H071E& +%IL_TIF_DOCUMENTNAME_STRING = &H071F& +%IL_TIF_AUTHNAME_STRING = &H0720& +%IL_JPG_SAVE_FORMAT = &H0721& +%IL_CHEAD_HEADER_STRING = &H0722& +%IL_PCD_PICNUM = &H0723& + + +' DXTC definitions +%IL_DXTC_FORMAT = &H0705& +%IL_DXT1 = &H0706& +%IL_DXT2 = &H0707& +%IL_DXT3 = &H0708& +%IL_DXT4 = &H0709& +%IL_DXT5 = &H070A& +%IL_DXT_NO_COMP = &H070B& +%IL_KEEP_DXTC_DATA = &H070C& +%IL_DXTC_DATA_FORMAT = &H070D& + + +' Cube map definitions +%IL_CUBEMAP_POSITIVEX = &H00000400& +%IL_CUBEMAP_NEGATIVEX = &H00000800& +%IL_CUBEMAP_POSITIVEY = &H00001000& +%IL_CUBEMAP_NEGATIVEY = &H00002000& +%IL_CUBEMAP_POSITIVEZ = &H00004000& +%IL_CUBEMAP_NEGATIVEZ = &H00008000& + + +' Values +%IL_VERSION_NUM = &H0DE2& +%IL_IMAGE_WIDTH = &H0DE4& +%IL_IMAGE_HEIGHT = &H0DE5& +%IL_IMAGE_DEPTH = &H0DE6& +%IL_IMAGE_SIZE_OF_DATA = &H0DE7& +%IL_IMAGE_BPP = &H0DE8& +%IL_IMAGE_BYTES_PER_PIXEL = &H0DE8& +%IL_IMAGE_BITS_PER_PIXEL = &H0DE9& +%IL_IMAGE_FORMAT = &H0DEA& +%IL_IMAGE_TYPE = &H0DEB& +%IL_PALETTE_TYPE = &H0DEC& +%IL_PALETTE_SIZE = &H0DED& +%IL_PALETTE_BPP = &H0DEE& +%IL_PALETTE_NUM_COLS = &H0DEF& +%IL_PALETTE_BASE_TYPE = &H0DF0& +%IL_NUM_IMAGES = &H0DF1& +%IL_NUM_MIPMAPS = &H0DF2& +%IL_NUM_LAYERS = &H0DF3& +%IL_ACTIVE_IMAGE = &H0DF4& +%IL_ACTIVE_MIPMAP = &H0DF5& +%IL_ACTIVE_LAYER = &H0DF6& +%IL_CUR_IMAGE = &H0DF7& +%IL_IMAGE_DURATION = &H0DF8& + + +' +' Section shamelessly modified from the glut header. +' + +' This is from Win32's +' #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) +' = %ILAPIENTRY = __stdcall +' %IL_PACKSTRUCT +' #else +' %ILAPIENTRY +' = %IL_PACKSTRUCT = __attribute__ = ((packed)) +' #endif +' This is from Win32's and +' #if defined(__LCC__) +' = %ILAPI = __stdcall +' #elif _WIN32 +' #ifdef _IL_BUILD_LIBRARY +' = %ILAPI = __declspec(dllexport) +' #else +' = %ILAPI = __declspec(dllimport) +' #endif +' #else +' %ILAPI +' #endif + + +%IL_SEEK_SET = 0 +%IL_SEEK_CUR = 1 +%IL_SEEK_END = 2 +%IL_EOF = -1 + + +' Callback functions for file reading +' typedef void* ILHANDLE; +' typedef ILvoid (ILAPIENTRY *fCloseRProc) (ILHANDLE); +' typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE); +' typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE); +' typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (char*); +' typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE); +' typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint); +' typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE); + +' Callback functions for file writing +' typedef ILvoid (ILAPIENTRY *fCloseWProc) (ILHANDLE); +' typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (char*); +' typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE); +' typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint); +' typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE); +' typedef ILint (ILAPIENTRY *fWriteProc) (void*, ILuint, ILuint, ILHANDLE); + + +' Registered format procedures +' typedef ILboolean (ILAPIENTRY *IL_LOADPROC) (char*); +' typedef ILboolean (ILAPIENTRY *IL_SAVEPROC) (char*); + + +' ImageLib Functions +Declare Function ilActiveImage Lib "DevIL.dll" Alias "ilActiveImage" (ByVal pb_Number As Dword) As Byte +Declare Function ilActiveLayer Lib "DevIL.dll" Alias "ilActiveLayer" (ByVal pb_Number As Dword) As Byte +Declare Function ilActiveMipmap Lib "DevIL.dll" Alias "ilActiveMipmap" (ByVal pb_Number As Dword) As Byte +Declare Function ilApplyPal Lib "DevIL.dll" Alias "ilApplyPal" (ByRef pb_FileName As Asciiz) As Byte +Declare Function ilApplyProfile Lib "DevIL.dll" Alias "ilApplyProfile" (ByRef pb_InProfile +As Asciiz, ByRef pb_OutProfile As Asciiz) As Byte +Declare Sub ilBindImage Lib "DevIL.dll" Alias "ilBindImage" (ByVal pb_Image As Dword) +Declare Function ilBlit Lib "DevIL.dll" Alias "ilBlit" (ByVal pb_Src As Long, ByVal pb_DestX As Long, ByVal pb_DestY As Long, ByVal pb_DestZ as Dword, ByVal pb_SrcX As Dword, ByVal pb_SrcY As Dword, ByVal pb_SrcZ As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte +Declare Sub ilClearColour Lib "DevIL.dll" Alias "ilClearColour" (ByVal pb_Red As Single, ByVal pb_Green As Single, ByVal pb_Blue As Single, ByVal pb_Alpha As Single) +Declare Function ilClearImage Lib "DevIL.dll" Alias "ilClearImage" () As Byte +Declare Function ilCloneCurImage Lib "DevIL.dll" Alias "ilCloneCurImage" () As Dword +Declare Function ilCompressFunc Lib "DevIL.dll" Alias "ilCompressFunc" (ByVal pb_Mode As Dword) As Byte +Declare Function ilConvertImage Lib "DevIL.dll" Alias "ilConvertImage" (ByVal pb_DestFormat As Dword, ByVal pb_DestType As Dword) As Byte +Declare Function ilConvertPal Lib "DevIL.dll" Alias "ilConvertPal" (ByVal pb_DestFormat As Dword) As Byte +Declare Function ilCopyImage Lib "DevIL.dll" Alias "ilCopyImage" (ByVal pb_Src As Dword) As Byte +Declare Function ilCopyPixels Lib "DevIL.dll" Alias "ilCopyPixels" (ByVal pb_XOff As Dword, ByVal pb_YOff As Dword, ByVal pb_ZOff As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Format As Dword, ByVal pb_Type As Dword, ByRef pb_Data As Long) As Dword +Declare Function ilCreateSubImage Lib "DevIL.dll" Alias "ilCreateSubImage" (ByVal pb_Type As Dword, ByVal pb_Num As Dword) As Dword +Declare Function ilDefaultImage Lib "DevIL.dll" Alias "ilDefaultImage" () As Byte +Declare Sub ilDeleteImages Lib "DevIL.dll" Alias "ilDeleteImages" (ByVal pb_Num As Long, ByRef pb_Images As Dword) +Declare Function ilDisable Lib "DevIL.dll" Alias "ilDisable" (ByVal pb_Mode As Dword) As Byte +Declare Function ilEnable Lib "DevIL.dll" Alias "ilEnable" (ByVal pb_Mode As Dword) As Byte +Declare Function ilFormatFunc Lib "DevIL.dll" Alias "ilFormatFunc" (ByVal pb_Mode As Dword) As Byte +Declare Sub ilGenImages Lib "DevIL.dll" Alias "ilGenImages" (ByVal pb_Num As Long, ByRef pb_Images As Dword) +Declare Function ilGetAlpha Lib "DevIL.dll" Alias "ilGetAlpha" (ByVal pb_Type As Dword) As Long +Declare Function ilGetBoolean Lib "DevIL.dll" Alias "ilGetBoolean" (ByVal pb_Mode As Dword) As Byte +Declare Sub ilGetBooleanv Lib "DevIL.dll" Alias "ilGetBooleanv" (ByVal pb_Mode As Dword, ByRef pb_Param As Byte) +Declare Function ilGetData Lib "DevIL.dll" Alias "ilGetData" () As Long +Declare Function ilGetError Lib "DevIL.dll" Alias "ilGetError" () As Dword +Declare Function ilGetInteger Lib "DevIL.dll" Alias "ilGetInteger" (ByVal pb_Mode As Dword) As Long +Declare Sub ilGetIntegerv Lib "DevIL.dll" Alias "ilGetIntegerv" (ByVal pb_Mode As Dword, ByRef pb_Param As Long) +Declare Function ilGetLumpPos Lib "DevIL.dll" Alias "ilGetLumpPos" () As Dword +Declare Function ilGetPalette Lib "DevIL.dll" Alias "ilGetPalette" () As Long +Declare Function ilGetString Lib "DevIL.dll" Alias "ilGetString" (ByVal pb_StringName As Dword) As String +Declare Sub ilHint Lib "DevIL.dll" Alias "ilHint" (ByVal pb_Target As Dword, ByVal pb_Mode As Dword) +Declare Sub ilInit Lib "DevIL.dll" Alias "ilInit" () +Declare Function ilIsDisabled Lib "DevIL.dll" Alias "ilIsDisabled" (ByVal pb_Mode As Dword) As Byte +Declare Function ilIsEnabled Lib "DevIL.dll" Alias "ilIsEnabled" (ByVal pb_Mode As Dword) As Byte +Declare Function ilIsImage Lib "DevIL.dll" Alias "ilIsImage" (ByVal pb_Image As Dword) As Byte +Declare Function ilIsValid Lib "DevIL.dll" Alias "ilIsValid" (ByVal pb_Type As Dword, ByRef pb_FileName As Asciiz) As Byte +Declare Function ilIsValidF Lib "DevIL.dll" Alias "ilIsValidF" (ByVal pb_Type As Dword, ByVal pb_File As Long) As Byte +Declare Function ilIsValidL Lib "DevIL.dll" Alias "ilIsValidL" (ByVal pb_Type As Dword, ByRef pb_Lump As Long, ByVal pb_Size As Dword) As Byte +Declare Sub ilKeyColour Lib "DevIL.dll" Alias "ilKeyColour" (ByVal pb_Red As Single, ByVal pb_Green As Single, ByVal pb_Blue As Single, ByVal pb_Alpha As Single) +Declare Function ilLoad Lib "DevIL.dll" Alias "ilLoad" (ByVal pb_Type As Dword, ByRef pb_FileName As Asciiz) As Byte +Declare Function ilLoadF Lib "DevIL.dll" Alias "ilLoadF" (ByVal pb_Type As Dword, ByVal pb_File As Long) As Byte +Declare Function ilLoadImage Lib "DevIL.dll" Alias "ilLoadImage" (ByRef pb_FileName As Asciiz) As Byte +Declare Function ilLoadL Lib "DevIL.dll" Alias "ilLoadL" (ByVal pb_Type As Dword, ByRef pb_Lump As Long, ByVal pb_Size As Dword) As Byte +Declare Function ilLoadPal Lib "DevIL.dll" Alias "ilLoadPal" (ByRef pb_FileName As Asciiz) As Byte +Declare Function ilOriginFunc Lib "DevIL.dll" Alias "ilOriginFunc" (ByVal pb_Mode As Dword) As Byte +Declare Function ilOverlayImage Lib "DevIL.dll" Alias "ilOverlayImage" (ByVal pb_Src As Dword, ByVal pb_XCoord As Long, ByVal pb_YCoord As Long, ByVal pb_ZCoord As Long) As Byte +Declare Sub ilPopAttrib Lib "DevIL.dll" Alias "ilPopAttrib" () +Declare Sub ilPushAttrib Lib "DevIL.dll" Alias "ilPushAttrib" (ByVal pb_Bits As Dword) +Declare Sub ilRegisterFormat Lib "DevIL.dll" Alias "ilRegisterFormat" (ByVal pb_Format As Dword) +Declare Function ilRegisterLoad Lib "DevIL.dll" Alias "ilRegisterLoad" (ByRef pb_Ext As Asciiz, ByVal pb_Load As Dword) As Byte +Declare Function ilRegisterMipNum Lib "DevIL.dll" Alias "ilRegisterMipNum" (ByVal pb_Num As Dword) As Byte +Declare Function ilRegisterNumImages Lib "DevIL.dll" Alias "ilRegisterNumImages" (ByVal pb_Num As Dword) As Byte +Declare Sub ilRegisterOrigin Lib "DevIL.dll" Alias "ilRegisterOrigin" (ByVal pb_Origin As Dword) +Declare Sub ilRegisterPal Lib "DevIL.dll" Alias "ilRegisterPal" (ByRef pb_Pal As Long, ByVal pb_Size As Dword, ByVal pb_Type As Dword) +Declare Function ilRegisterSave Lib "DevIL.dll" Alias "ilRegisterSave" (ByRef pb_Ext As Asciiz, ByVal pb_Save As Dword) As Byte +Declare Sub ilRegisterType Lib "DevIL.dll" Alias "ilRegisterType" (ByVal pb_Type As Dword) +Declare Function ilRemoveLoad Lib "DevIL.dll" Alias "ilRemoveLoad" (ByRef pb_Ext As Asciiz) As Byte +Declare Function ilRemoveSave Lib "DevIL.dll" Alias "ilRemoveSave" (ByRef pb_Ext As Asciiz) As Byte +Declare Sub ilResetRead Lib "DevIL.dll" Alias "ilResetRead" () +Declare Sub ilResetWrite Lib "DevIL.dll" Alias "ilResetWrite" () +Declare Function ilSave Lib "DevIL.dll" Alias "ilSave" (ByVal pb_Type As Dword, ByRef pb_FileName As Asciiz) As Byte +Declare Function ilSaveF Lib "DevIL.dll" Alias "ilSaveF" (ByVal pb_Type As Dword, ByVal pb_File As Long) As Byte +Declare Function ilSaveImage Lib "DevIL.dll" Alias "ilSaveImage" (ByRef pb_FileName As Asciiz) As Byte +Declare Function ilSaveL Lib "DevIL.dll" Alias "ilSaveL" (ByVal pb_Type As Dword, ByRef pb_Lump As Long, ByVal pb_Size As Dword) As Byte +Declare Function ilSavePal Lib "DevIL.dll" Alias "ilSavePal" (ByRef pb_FileName As Asciiz) As Byte +Declare Function ilSetData Lib "DevIL.dll" Alias "ilSetData" (ByRef pb_Data As Long) As Byte +Declare Function ilSetDuration Lib "DevIL.dll" Alias "ilSetDuration" (ByVal pb_Duration As Dword) As Byte +Declare Sub ilSetInteger Lib "DevIL.dll" Alias "ilSetInteger" (ByVal pb_Mode As Dword, ByVal pb_Param As Dword) +Declare Sub ilSetPixels Lib "DevIL.dll" Alias "ilSetPixels" (ByVal pb_XOff As Dword, ByVal pb_YOff As Dword, ByVal pb_ZOff As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Format As Dword, ByVal pb_Type As _ +Dword, ByRef pb_Data As Long) +Declare Sub ilSetRead Lib "DevIL.dll" Alias "ilSetRead" (ByVal pb_fOpenRProc As Dword, ByVal pb_fCloseRProc As Dword, ByVal pb_fEofProc As Dword, ByVal pb_fGetcProc As Dword, ByVal pb_fReadProc As Dword, _ +ByVal pb_fSeekRProc As Dword, ByVal pb_fTellRProc As Dword) +Declare Sub ilSetWrite Lib "DevIL.dll" Alias "ilSetWrite" (ByVal pb_fOpenWProc As Dword, ByVal pb_fCloseWProc As Dword, ByVal pb_fPutcProc As Dword, ByVal pb_fSeekWProc As Dword, _ +ByVal pb_fTellWProc As Dword, ByVal pb_fWriteProc As Dword) +Declare Function ilTexImage Lib "DevIL.dll" Alias "ilTexImage" (ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Bpp As Byte, ByVal pb_Format As Dword, ByVal pb_Type As Dword, ByRef pb_Data As Long) As Byte +Declare Function ilTypeFunc Lib "DevIL.dll" Alias "ilTypeFunc" (ByVal pb_Mode As Dword) As Byte + +Declare Function ilLoadData Lib "DevIL.dll" Alias "ilLoadData" (ByRef pb_FileName As Asciiz, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Bpp As Byte) As Byte +Declare Function ilLoadDataF Lib "DevIL.dll" Alias "ilLoadDataF" (ByVal pb_File As Long, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Bpp As Byte) As Byte +Declare Function ilLoadDataL Lib "DevIL.dll" Alias "ilLoadDataL" (ByRef pb_Lump As Long, ByVal pb_Size As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword, ByVal pb_Bpp As Byte) As Byte +Declare Function ilSaveData Lib "DevIL.dll" Alias "ilSaveData" (ByRef pb_FileName As Asciiz) As Byte + +'%ilClearColor = ilClearColour +'%ilKeyColor = ilKeyColour + + +' #if (DJGPP || LINUX) +' static void GccMain() __attribute__((constructor)); +' #endif + + +' #ifdef __cplusplus +' } +' #endif + +' #endif /* __IL_H__ */ +' #endif /* __il_h_ */ diff --git a/libs/DevIL-1.7.8/projects/powerbasic/ilu.inc b/libs/DevIL-1.7.8/projects/powerbasic/ilu.inc new file mode 100644 index 00000000..c8826297 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/ilu.inc @@ -0,0 +1,188 @@ +'----------------------------------------------------------------------------- +' +' ImageLib Utility Sources +' Copyright (C) 2000-2002 by Denton Woods +' Last modified: 06/22/2002 <--Y2K Compliant! =] +' +' Filename: il/ilu.h +' +' Description: The main include file for OpenILU +' +'----------------------------------------------------------------------------- +'----------------------------------------------------------------------------- +' +' Translated to Powerbasic by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 headers +' +' Filename: ilu.inc +' +' Description: PB main include file for OpenILU +' +' For information on use and download of OpenIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and OpenIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + +' #ifndef __ilu_h_ +' #ifndef __ILU_H__ + +' %__ilu_h_ +' %__ILU_H__ + +' #include + +' #ifdef __cplusplus +' extern "C" { +' #endif + + +' #ifdef _WIN32 +' #ifdef _MSC_VER +' #ifndef _ILU_BUILD_LIBRARY +' #ifdef _DEBUG +' #pragma comment(lib, "ilu-d.lib") +' #else +' #pragma comment(lib, "ilu.lib") +' #endif'_DEBUG +' #endif'_ILU_BUILD_LIBRARY +' #endif'_MSC_VER +' #endif'_WIN32 + + +%ILU_VERSION_1_5_6 = 1 +%ILU_VERSION = 156 + + +%ILU_FILTER = &H2600& +%ILU_NEAREST = &H2601& +%ILU_LINEAR = &H2602& +%ILU_BILINEAR = &H2603& +%ILU_SCALE_BOX = &H2604& +%ILU_SCALE_TRIANGLE = &H2605& +%ILU_SCALE_BELL = &H2606& +%ILU_SCALE_BSPLINE = &H2607& +%ILU_SCALE_LANCZOS3 = &H2608& +%ILU_SCALE_MITCHELL = &H2609& + + +' Error types +%ILU_INVALID_ENUM = &H0501& +%ILU_OUT_OF_MEMORY = &H0502& +%ILU_INTERNAL_ERROR = &H0504& +%ILU_INVALID_VALUE = &H0505& +%ILU_ILLEGAL_OPERATION = &H0506& +%ILU_INVALID_PARAM = &H0509& + + +' Values +%ILU_PLACEMENT = &H0700& +%ILU_LOWER_LEFT = &H0701& +%ILU_LOWER_RIGHT = &H0702& +%ILU_UPPER_LEFT = &H0703& +%ILU_UPPER_RIGHT = &H0704& +%ILU_CENTER = &H0705& +%ILU_CONVOLUTION_MATRIX = &H0710& +%ILU_VERSION_NUM = &H0DE2& + + +' Filters +%ILU_FILTER_BLUR = &H0803& +%ILU_FILTER_GAUSSIAN_3x3 = &H0804& +%ILU_FILTER_GAUSSIAN_5X5 = &H0805& +%ILU_FILTER_EMBOSS1 = &H0807& +%ILU_FILTER_EMBOSS2 = &H0808& +%ILU_FILTER_LAPLACIAN1 = &H080A& +%ILU_FILTER_LAPLACIAN2 = &H080B& +%ILU_FILTER_LAPLACIAN3 = &H080C& +%ILU_FILTER_LAPLACIAN4 = &H080D& +%ILU_FILTER_SHARPEN1 = &H080E& +%ILU_FILTER_SHARPEN2 = &H080F& +%ILU_FILTER_SHARPEN3 = &H0810& + + +' typedef struct ILinfo +Type ILinfo Dword + iId As Dword'ILuint Id; ' the image's id + iData As Dword '(should this be Byte Ptr? )'ILubyte *Data; ' the image's data + iWidth As Dword 'ILuint Width; ' the image's width + iHeight As Dword 'ILuint Height; ' the image's height + iDepth As Dword 'ILuint Depth; ' the image's depth + iBpp As Byte'ILubyte Bpp; ' bytes per pixel (not bits) of the image + iSizeOfData As Dword 'ILuint SizeOfData; ' the total size of the data (in bytes) + iFormat As Dword 'ILenum Format; ' image format (in IL enum style) + iType As Dword 'ILenum Type; ' image type (in IL enum style) + iOrigin As Dword 'ILenum Origin; ' origin of the image + iPalette As Long 'ILubyte *Palette; ' the image's palette + iPalType As Dword 'ILenum PalType; ' palette type + iPalSize As Dword 'ILuint PalSize; ' palette size + iNumNext As Dword'ILuint NumNext; ' number of images following + iNumMips As Dword 'ILuint NumMips; ' number of mipmaps + iNumLayers As Dword'ILuint NumLayers; ' number of layers +End Type + + +' ImageLib Utility Functions +Declare Function iluAlienify Lib "ilu.dll" Alias "iluAlienify" () As Byte +Declare Function iluApplyProfile Lib "ilu.dll" Alias "iluApplyProfile" (ByRef pb_InProfile As Asciiz, ByRef pb_OutProfile As Asciiz) As Byte +Declare Function iluBlurAvg Lib "ilu.dll" Alias "iluBlurAvg" (ByVal pb_Iter As Dword) As Byte +Declare Function iluBlurGaussian Lib "ilu.dll" Alias "iluBlurGaussian" (ByVal pb_Iter As Dword) As Byte +Declare Function iluBuildMipmaps Lib "ilu.dll" Alias "iluBuildMipmaps" () As Byte +Declare Function iluColoursUsed Lib "ilu.dll" Alias "iluColoursUsed" () As Dword +Declare Function iluCompareImage Lib "ilu.dll" Alias "iluCompareImage" (ByVal pb_Comp As Dword) As Byte +Declare Function iluContrast Lib "ilu.dll" Alias "iluContrast" (ByVal pb_Contrast As Single) As Byte +Declare Function iluCrop Lib "ilu.dll" Alias "iluCrop" (ByVal pb_XOff As Dword, ByVal pb_YOff As Dword, ByVal pb_ZOff As Dword, ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte +Declare Sub iluDeleteImage Lib "ilu.dll" Alias "iluDeleteImage" (ByVal pb_Id As Dword) +Declare Function iluEdgeDetectE Lib "ilu.dll" Alias "iluEdgeDetectE" () As Byte +Declare Function iluEdgeDetectP Lib "ilu.dll" Alias "iluEdgeDetectP" () As Byte +Declare Function iluEdgeDetectS Lib "ilu.dll" Alias "iluEdgeDetectS" () As Byte +Declare Function iluEmboss Lib "ilu.dll" Alias "iluEmboss" () As Byte +Declare Function iluEnlargeCanvas Lib "ilu.dll" Alias "iluEnlargeCanvas" (ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte +Declare Function iluEnlargeImage Lib "ilu.dll" Alias "iluEnlargeImage" (ByVal pb_XDim As Single, ByVal pb_YDim As Single, ByVal pb_ZDim As Single) As Byte +Declare Function iluEqualize Lib "ilu.dll" Alias "iluEqualize" () As Byte +Declare Function iluErrorString Lib "ilu.dll" Alias "iluErrorString" (ByVal pb_Error As Dword) As String +Declare Function iluFlipImage Lib "ilu.dll" Alias "iluFlipImage" () As Byte +Declare Function iluGammaCorrect Lib "ilu.dll" Alias "iluGammaCorrect" (ByVal pb_Gamma As Single) As Byte +Declare Function iluGenImage Lib "ilu.dll" Alias "iluGenImage" () As Dword +Declare Sub iluGetImageInfo Lib "ilu.dll" Alias "iluGetImageInfo" (ByRef pb_Info As ILinfo) +Declare Function iluGetInteger Lib "ilu.dll" Alias "iluGetInteger" (ByVal pb_Mode As Dword) As Long +Declare Sub iluGetIntegerv Lib "ilu.dll" Alias "iluGetIntegerv" (ByVal pb_Mode As Dword, ByRef pb_Param As Long) +Declare Function iluGetString Lib "ilu.dll" Alias "iluGetString" (ByVal pb_StringName As Dword) As String +Declare Sub iluInit Lib "ilu.dll" Alias "iluInit" () +Declare Function iluInvertAlpha Lib "ilu.dll" Alias "iluInvertAlpha" () As Byte +Declare Function iluLoadImage Lib "ilu.dll" Alias "iluLoadImage" (ByRef pb_FileName As Asciiz) As Dword +Declare Sub iluImageParameter Lib "ilu.dll" Alias "iluImageParameter" (ByVal pb_PName As Dword, ByVal pb_Param As Dword) +Declare Function iluMirror Lib "ilu.dll" Alias "iluMirror" () As Byte +Declare Function iluNegative Lib "ilu.dll" Alias "iluNegative" () As Byte +Declare Function iluNoisify Lib "ilu.dll" Alias "iluNoisify" (ByVal pb_Tolerance As Single) As Byte +Declare Function iluPixelize Lib "ilu.dll" Alias "iluPixelize" (ByVal pb_PixSize As Dword) As Byte +'Declare Sub iluRegionf Lib "ilu.dll" Alias "iluRegionf" (ByVal pb_ULx As Single, ByVal pb_ULy As Single, ByVal pb_BRx As Single, ByVal pb_BRy As Single) +'Declare Sub iluRegioni Lib "ilu.dll" Alias "iluRegioni" (ByVal pb_ULx As Dword, ByVal pb_ULy As Dword, ByVal pb_BRx As Dword, ByVal pb_BRy As Dword) +Declare Function iluReplaceColour Lib "ilu.dll" Alias "iluReplaceColour" (ByVal pb_Red As Byte, ByVal pb_Green As Byte, ByVal pb_Blue As Byte, ByVal pb_Tolerance As Single) As Byte +Declare Function iluRotate Lib "ilu.dll" Alias "iluRotate" (ByVal pb_Angle As Single) As Byte +Declare Function iluRotate3D Lib "ilu.dll" Alias "iluRotate3D" (ByVal pb_x As Single, ByVal pb_y As Single, ByVal pb_z As Single, ByVal pb_Angle As Single) As Byte +Declare Function iluSaturate1f Lib "ilu.dll" Alias "iluSaturate1f" (ByVal pb_Saturation As Single) As Byte +Declare Function iluSaturate4f Lib "ilu.dll" Alias "iluSaturate4f" (ByVal pb_r As Single, ByVal pb_g As Single, ByVal pb_b As Single, ByVal pb_Saturation As Single) As Byte +Declare Function iluScale Lib "ilu.dll" Alias "iluScale" (ByVal pb_Width As Dword, ByVal pb_Height As Dword, ByVal pb_Depth As Dword) As Byte +Declare Function iluScaleColours Lib "ilu.dll" Alias "iluScaleColours" (ByVal pb_r As Single, ByVal pb_g As Single, ByVal pb_b As Single) As Byte +Declare Function iluSharpen Lib "ilu.dll" Alias "iluSharpen" (ByVal pb_Factor As Single, ByVal pb_Iter As Dword) As Byte +Declare Function iluSwapColours Lib "ilu.dll" Alias "iluSwapColours" () As Byte +Declare Function iluWave Lib "ilu.dll" Alias "iluWave" (ByVal pb_Angle As Single) As Byte + +'%iluColorsUsed = iluColoursUsed +'%iluSwapColors = iluSwapColours + + +' #ifdef __cplusplus +' } +' #endif + +' #endif /* __ILU_H__ */ +' #endif /* __ilu_h_ */ diff --git a/libs/DevIL-1.7.8/projects/powerbasic/ilut.inc b/libs/DevIL-1.7.8/projects/powerbasic/ilut.inc new file mode 100644 index 00000000..32518852 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/ilut.inc @@ -0,0 +1,212 @@ +'----------------------------------------------------------------------------- +' +' ImageLib Utility Toolkit Sources +' Copyright (C) 2000-2002 by Denton Woods +' Last modified: 06/22/2002 <--Y2K Compliant! =] +' +' Filename: il/ilut.h +' +' Description: The main include file for ILUT +' +'----------------------------------------------------------------------------- +'----------------------------------------------------------------------------- +' +' Translated to Powerbasic by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 headers +' +' Filename: ilut.inc +' +' Description: PB main include file for OpenILUT +' +' For information on use and download of DevIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and DevIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + + + + +#If Not %Def(%WINAPI) + #Include "win32api.inc" +#EndIf + + +' #ifndef __ilut_h_ +' #ifndef __ILUT_H__ + +' %__ilut_h_ +' %__ILUT_H__ + +' #include +' #include + +' #ifdef __cplusplus +' extern "C" { +' #endif + + +' #ifdef _WIN32 +' #ifdef _MSC_VER +' #ifndef _ILUT_BUILD_LIBRARY +' #ifdef _DEBUG +' #pragma comment(lib, "ilut-d.lib") +' #else +' #pragma comment(lib, "ilut.lib") +' #endif'_DEBUG +' #endif'_ILUT_BUILD_LIBRARY +' #endif'_MSC_VER +' #endif'_WIN32 + + +%ILUT_VERSION_1_5_6 = 1 +%ILUT_VERSION = 156 + + +' Attribute Bits +%ILUT_OPENGL_BIT = &H00000001& +%ILUT_D3D_BIT = &H00000002& +%ILUT_ALL_ATTRIB_BITS = &H000FFFFF& + + +' Error Types +%ILUT_INVALID_ENUM = &H0501& +%ILUT_OUT_OF_MEMORY = &H0502& +%ILUT_INVALID_VALUE = &H0505& +%ILUT_ILLEGAL_OPERATION = &H0506& +%ILUT_INVALID_PARAM = &H0509& +%ILUT_COULD_NOT_OPEN_FILE = &H050A& +%ILUT_STACK_OVERFLOW = &H050E& +%ILUT_STACK_UNDERFLOW = &H050F& +%ILUT_NOT_SUPPORTED = &H0550& + + +' State Definitions +%ILUT_PALETTE_MODE = &H0600& +%ILUT_OPENGL_CONV = &H0610& +%ILUT_D3D_MIPLEVELS = &H0620& +%ILUT_MAXTEX_WIDTH = &H0630& +%ILUT_MAXTEX_HEIGHT = &H0631& +%ILUT_MAXTEX_DEPTH = &H0632& +%ILUT_GL_USE_S3TC = &H0634 +%ILUT_D3D_USE_DXTC = &H0634 +%ILUT_GL_GEN_S3TC = &H0635 +%ILUT_D3D_GEN_DXTC = &H0635 +%ILUT_S3TC_FORMAT = &H0705 +%ILUT_DXTC_FORMAT = &H0706 + + +' Values +%ILUT_VERSION_NUM = &H0DE2& + + +' ImageLib Utility Toolkit Functions +Declare Function ilutDisable Lib "ilut.dll" Alias "ilutDisable" (ByVal pb_Mode As Dword) As Byte +Declare Function ilutEnable Lib "ilut.dll" Alias "ilutEnable" (ByVal pb_Mode As Dword) As Byte +Declare Function ilutGetBoolean Lib "ilut.dll" Alias "ilutGetBoolean" (ByVal pb_Mode As Dword) As Byte +Declare Sub ilutGetBooleanv Lib "ilut.dll" Alias "ilutGetBooleanv" (ByVal pb_Mode As Dword, ByRef pb_Param As Byte) +Declare Function ilutGetInteger Lib "ilut.dll" Alias "ilutGetInteger" (ByVal pb_Mode As Dword) As Long +Declare Sub ilutGetIntegerv Lib "ilut.dll" Alias "ilutGetIntegerv" (ByVal pb_Mode As Dword, ByRef pb_Param As Long) +Declare Function ilutGetString Lib "ilut.dll" Alias "ilutGetString" (ByVal pb_StringName As Dword) As Long +Declare Sub ilutInit Lib "ilut.dll" Alias "ilutInit" () +Declare Function ilutIsDisabled Lib "ilut.dll" Alias "ilutIsDisabled" (ByVal pb_Mode As Dword) As Byte +Declare Function ilutIsEnabled Lib "ilut.dll" Alias "ilutIsEnabled" (ByVal pb_Mode As Dword) As Byte +Declare Sub ilutPopAttrib Lib "ilut.dll" Alias "ilutPopAttrib" () +Declare Sub ilutPushAttrib Lib "ilut.dll" Alias "ilutPushAttrib" (ByVal pb_Bits As Dword) +Declare Sub ilutSetInteger Lib "ilut.dll" Alias "ilutSetInteger" (ByVal pb_Mode As Dword, ByVal pb_Param As Dword) + + +' #ifdef DJGPP +' %ILUT_USE_ALLEGRO +' #elif _WIN32 +' %ILUT_USE_WIN32 +' %ILUT_USE_OPENGL +' #else +' %ILUT_USE_OPENGL +' #endif + +'%ILUT_USE_ALLEGRO +'%ILUT_USE_WIN32 +'%ILUT_USE_OPENGL + + +' The different rendering api's...more to be added later? +%ILUT_OPENGL = 0 +%ILUT_ALLEGRO = 1 +%ILUT_WIN32 = 2 + + +Declare Function ilutRenderer Lib "ilut.dll" Alias "ilutRenderer" (ByVal pb_Renderer As Dword) As Byte + + +' ImageLib Utility Toolkit's OpenGL Functions +' #ifdef ILUT_USE_OPENGL +' #ifdef _MSC_VER +' %WIN32_LEAN_AND_MEAN +' #include +' #endif'_MSC_VER +' #include +' #include +' #include +' #ifdef _MSC_VER +' #pragma comment(lib, "opengl32.lib") +' #pragma comment(lib, "glu32.lib") +' #endif'_MSC_VER +Declare Function ilutGLBindTexImage Lib "ilut.dll" Alias "ilutGLBindTexImage" () As Dword +Declare Function ilutGLBindMipCompressed Lib "ilut.dll" Alias "ilutGLBindMipCompressed" () As Dword +Declare Function ilutGLBuildMipmaps Lib "ilut.dll" Alias "ilutGLBuildMipmaps" () As Byte +Declare Function ilutGLLoadImage Lib "ilut.dll" Alias "ilutGLLoadImage" (ByRef pb_FileName As Asciiz) As Dword +Declare Function ilutGLScreen Lib "ilut.dll" Alias "ilutGLScreen" () As Byte +Declare Function ilutGLScreenie Lib "ilut.dll" Alias "ilutGLScreenie" () As Byte +Declare Function ilutGLSaveImage Lib "ilut.dll" Alias "ilutGLSaveImage" (ByRef pb_FileName As Asciiz, ByVal pb_TexID As Dword) As Byte +Declare Function ilutGLSetTex Lib "ilut.dll" Alias "ilutGLSetTex" (ByVal pb_TexID As Dword) As Byte +Declare Function ilutGLTexImage Lib "ilut.dll" Alias "ilutGLTexImage" (ByVal pb_Level As Dword) As Byte +' #endif'ILUT_USE_OPENGL + + +' ImageLib Utility ToolKit's Allegro Functions +' #ifdef ILUT_USE_ALLEGRO +' #include +Declare Function ilutAllegLoadImage Lib "ilut.dll" Alias "ilutAllegLoadImage" (ByRef pb_FileName As Asciiz) As Long +'Declare Function ilutConvertToAlleg Lib "ilut.dll" Alias "ilutConvertToAlleg" (ByVal pb_Pal As PALETTE) As Long +' #endif'ILUT_USE_ALLEGRO + + +' ImageLib Utility Toolkit's Win32 (DirectX/GDI) Functions +' #ifdef ILUT_USE_WIN32 +' #ifdef _WIN32 +' %WIN32_LEAN_AND_MEAN +' #include +Declare Function ilutConvertToHBitmap Lib "ilut.dll" Alias "ilutConvertToHBitmap" (ByVal pb_hDC As Long) As Long +Declare Sub ilutGetBmpInfo Lib "ilut.dll" Alias "ilutGetBmpInfo" (ByRef pb_Info As BITMAPINFO) +Declare Function ilutGetHPal Lib "ilut.dll" Alias "ilutGetHPal" () As Long +Declare Function ilutGetPaddedData Lib "ilut.dll" Alias "ilutGetPaddedData" () As Long +Declare Function ilutGetWinClipboard Lib "ilut.dll" Alias "ilutGetWinClipboard" () As Byte +Declare Function ilutLoadResource Lib "ilut.dll" Alias "ilutLoadResource" (ByVal pb_hInst As Long, ByVal pb_ID As Long, ByRef pb_ResourceType As Asciiz, ByVal pb_Type As Dword) As Byte +Declare Function ilutSetHBitmap Lib "ilut.dll" Alias "ilutSetHBitmap" (ByVal pb_Bitmap As Long) As Byte +Declare Function ilutSetHPal Lib "ilut.dll" Alias "ilutSetHPal" (ByVal pb_Pal As Long) As Byte +Declare Function ilutSetWinClipboard Lib "ilut.dll" Alias "ilutSetWinClipboard" () As Byte +Declare Function ilutWinLoadImage Lib "ilut.dll" Alias "ilutWinLoadImage" (ByRef pb_FileName As Asciiz, ByVal pb_hDC As Long) As Long +Declare Function ilutWinLoadUrl Lib "ilut.dll" Alias "ilutWinLoadUrl" (ByRef pb_Url As Asciiz) As Byte +Declare Function ilutWinSaveImage Lib "ilut.dll" Alias "ilutWinSaveImage" (ByRef pb_FileName As Asciiz, ByVal pb_Bitmap As Long) As Byte + +' #ifdef ILUT_USE_DIRECTX7 +' LPDIRECTDRAWSURFACE7 ILAPIENTRY ilutDX7Surface(char *FileName, LPDIRECTDRAW7 DDraw); +' #endif'ILUT_USE_DIRECTX7 +' #endif'_WIN32 +' #endif'ILUT_USE_WIN32 + + +' #ifdef __cplusplus +' } +' #endif + +' #endif /* __ILUT_H__ */ +' #endif /* __ilut_h_ */ diff --git a/libs/DevIL-1.7.8/projects/powerbasic/imgconv.bas b/libs/DevIL-1.7.8/projects/powerbasic/imgconv.bas new file mode 100644 index 00000000..ed43d3f7 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/imgconv.bas @@ -0,0 +1,175 @@ +'----------------------------------------------------------------------------- +' Convert Image using DevIL +' DevIL Sample program using Powerbasic. +' +' by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 PB incs +' Filename: imgview.bas +' +' Released under the GNU Lesser General Public License: +' http://www.gnu.org/copyleft/lesser.html +' +' For information on use and download of DevIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and DevIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + + +#Register None +#Compile Exe "imgconv.exe" +Option Explicit + + +#Include "il.inc" +#Include "ilu.inc" +#Include "ilut.inc" + +$If Not %Def(%TRUE) + %TRUE = 1 + %FALSE = 0 +#EndIf + + + +$If Not %Def(%MAX_PATH ) + %MAX_PATH = 260 +#EndIf + +%OVERWRITE = %False '%True + +Function PbMain() As Long + + Local ILErr As Dword + Local info As ILinfo + Local ID As Dword + Local errString As Asciiz*1024 + Local Infile As Asciiz*%MAX_PATH + Local Outfile As Asciiz*%MAX_PATH + + Infile="C:\test.bmp" ' OBS: Change this ! + Outfile="C:\test.tga" ' OBS: Change this ! + + ilInit + + ilPushAttrib %IL_ALL_ATTRIB_BITS + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilPushAttrib" & $CRLF & errString + Exit Function + End If + + ilGenImages ByVal 1, ID + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilGenImages" & $CRLF & errString + Exit Function + End If + + + ilBindImage ID + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilBindImage" & $CRLF & errString + GoTo done + End If + +' ilEnable %IL_FORMAT_SET +' ilEnable %IL_ORIGIN_SET +' ilEnable %IL_TYPE_SET + +' ilFormatFunc %IL_RGB +' ilOriginFunc %IL_ORIGIN_LOWER_LEFT +' ilTypeFunc %IL_UNSIGNED_BYTE +' +' ilEnable %IL_CONV_PAL + +' Do +' ILErr = ilGetError() +' If ILErr<>0 Then +' errString = iluErrorString(ILErr) +' MsgBox "Error in ..Func or ilEnable" & $CRLF & errString +' End If +' Loop While (ILErr <> 0) + + + + ilLoadImage infile + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilLoadImage" & $CRLF & errString + GoTo done + End If + + ' unrem to test these effects. + +' iluRotate 50 +' iluPixelize 5 +' iluEnlargeImage 2,2,4 +' iluBlurGaussian 4 + +' Do +' ILErr = ilGetError() +' If ILErr<>0 Then +' errString = iluErrorString(ILErr) +' MsgBox "Error in Effect" & $CRLF & errString +' End If +' Loop While (ILErr <> 0) + + + + + + If %OVERWRITE=%True And ilIsDisabled(%IL_FILE_OVERWRITE) Then + ilEnable %IL_FILE_OVERWRITE + ilSaveImage outfile + 'ilDisable %IL_FILE_OVERWRITE ' done by ilPushAttrib/ilPopAttrib + Else + ilSaveImage outfile + + End If + + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilSaveImage" & $CRLF & errString + GoTo done + Else + MsgBox "Picture converted" + End If + +done: + ilDeleteImages 1 , ID + + ilPopAttrib + + + ' clear additional errors + Do + ILErr = ilGetError() + Loop While (ILErr <> 0) + + + + + +End Function + + + + + + + + \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/powerbasic/imginfo.bas b/libs/DevIL-1.7.8/projects/powerbasic/imginfo.bas new file mode 100644 index 00000000..e91634ee --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/imginfo.bas @@ -0,0 +1,216 @@ +'----------------------------------------------------------------------------- +' Get Image info using DevIL +' DevIL Sample program using Powerbasic. +' +' by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 PB incs +' Filename: imgview.bas +' +' Released under the GNU Lesser General Public License: +' http://www.gnu.org/copyleft/lesser.html +' +' For information on use and download of DevIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and DevIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + + +#Register None +#Compile Exe "imginfo.exe" +Option Explicit + + +#Include "il.inc" +#Include "ilu.inc" +#Include "ilut.inc" + + +Function OpenIL_TypeString(ByVal il_const As Dword) As String + + Select Case il_const + Case %IL_BYTE : Function = "IL_BYTE" + Case %IL_UNSIGNED_BYTE : Function = "IL_UNSIGNED_BYTE" + Case %IL_SHORT : Function = "IL_SHORT" + Case %IL_UNSIGNED_SHORT : Function = "IL_UNSIGNED_SHORT" + Case %IL_INT : Function = "IL_INT" + Case %IL_UNSIGNED_INT : Function = "IL_UNSIGNED_INT" + Case %IL_FLOAT : Function = "IL_FLOAT" + Case %GL_DOUBLE : Function = "GL_DOUBLE" + + Case Else : Function = "Type not defined" + + + End Select + +End Function + + + + +Function OpenIL_FormatString(ByVal il_const As Dword) As String + + Select Case il_const + Case %IL_COLOUR_INDEX : Function = "IL_COLOUR_INDEX" + Case %IL_COLOR_INDEX : Function = "IL_COLOR_INDEX" + Case %IL_RGB : Function = "IL_RGB" + Case %IL_RGBA : Function = "IL_RGBA" + Case %IL_BGR : Function = "IL_BGR" + Case %IL_BGRA : Function = "IL_BGRA" + Case %IL_LUMINANCE : Function = "IL_LUMINANCE" + + Case Else : Function = "Format not defined" + + + End Select + +End Function + + + +Function OpenIL_OriginString(ByVal il_const As Dword) As String + + ' Origin Definitions + Select Case il_const + Case %IL_ORIGIN_LOWER_LEFT : Function = "IL_ORIGIN_LOWER_LEFT" + Case %IL_ORIGIN_UPPER_LEFT : Function = "IL_ORIGIN_UPPER_LEFT" + + Case Else : Function = "Origin type not defined" + End Select + +End Function + + + +Function OpenIL_PalTypeString(ByVal il_const As Dword) As String + + ' Palette types + Select Case il_const + Case %IL_PAL_NONE : Function = "IL_PAL_NONE" + Case %IL_PAL_RGB24 : Function = "IL_PAL_RGB24" + Case %IL_PAL_RGB32 : Function = "IL_PAL_RGB32" + Case %IL_PAL_RGBA32 : Function = "IL_PAL_RGBA32" + Case %IL_PAL_BGR24 : Function = "IL_PAL_BGR24" + Case %IL_PAL_BGR32 : Function = "IL_PAL_BGR32" + Case %IL_PAL_BGRA32 : Function = "IL_PAL_BGRA32" + + Case Else : Function = "Pallete type not defined" + End Select + +End Function + + +Function PbMain() As Long + + Local ILErr As Dword + Local info As ILinfo + Local ID As Dword + Local errString As Asciiz*1024 + + + If Len(Command$)=0 Then + MsgBox "Usage: imginfo.exe filename" + Exit Function + End If + + ilInit + + ilGenImages ByVal 1, ID + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilGenImages" & $CRLF & errString + Exit Function + End If + + + ilBindImage ID + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilBindImage" & $CRLF & errString + GoTo done + End If + + + + ' ilEnable %IL_FORMAT_SET + ' ilEnable %IL_ORIGIN_SET + ' ilEnable %IL_TYPE_SET + ' + ' ilFormatFunc %IL_RGB + ' ilOriginFunc %IL_ORIGIN_LOWER_LEFT + ' ilTypeFunc %IL_UNSIGNED_BYTE + ' + ' ilEnable %IL_CONV_PAL + ' Do + ' ILErr = ilGetError() + ' Loop While (ILErr <> 0) + + + + + + ilLoadImage Command$ + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilLoadImage" & $CRLF & errString + GoTo done + End If + + + iluGetImageInfo info + ILErr=ilGetError() + If ILErr <> 0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in iluGetImageInfo" & $CRLF & errString + GoTo done + Else + + MsgBox "DevIL Image info: " & $CRLF & $CRLF & _ + "Id: " & $TAB & $TAB & Format$(info.iId) & $CRLF & _ + "Data Pointer" & $TAB & Format$(info.iData) & $CRLF & _ + "Width: " & $TAB & $TAB & Format$(info.iWidth) & $CRLF & _ + "Height: " & $TAB & $TAB & Format$(info.iHeight) & $CRLF & _ + "Depth: " & $TAB & $TAB & Format$(info.iDepth) & $CRLF & _ + "Bpp: " & $TAB & $TAB & Format$(info.iBpp) & $CRLF & _ + "SizeOfData: " & $TAB & Format$(info.iSizeOfData) & $CRLF & _ + "Format: " & $TAB & $TAB & OpenIL_FormatString(info.iFormat) & $CRLF & _ + "Type: " & $TAB & $TAB & OpenIL_TypeString(info.iType) & $CRLF & _ + "Origin: " & $TAB & $TAB & OpenIL_OriginString(info.iOrigin) & $CRLF & _ + "PalType: " & $TAB & $TAB & OpenIL_PalTypeString(info.iPalType) & $CRLF & _ + "PalSize: " & $TAB & $TAB & Format$(info.iPalSize) & $CRLF & _ + "NumNext: " & $TAB & Format$(info.iNumNext) & $CRLF & _ + "NumMips: " & $TAB & Format$(info.iNumMips) & $CRLF & _ + "NumLayers: " & $TAB & Format$(info.iNumLayers) + + End If + + + +done: + ilDeleteImages 1 , ID + + ' clear additional errors + Do + ILErr = ilGetError() + Loop While (ILErr <> 0) + + + +End Function + + + + + + + \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/powerbasic/imgview.bas b/libs/DevIL-1.7.8/projects/powerbasic/imgview.bas new file mode 100644 index 00000000..a8676170 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/powerbasic/imgview.bas @@ -0,0 +1,168 @@ +'----------------------------------------------------------------------------- +' Minimal Image viewer using DevIL +' DevIL Sample program using Powerbasic. +' +' by Peter Scheutz, Scheutz & Clementsen Design +' Web: http://www.scheutz.dk +' e-mail: sourcecode@scheutz.dk +' +' Last modified: 06/22/2002 +' Based on DevIL Ver. 1.6.1 PB incs +' Filename: imgview.bas +' +' Released under the GNU Lesser General Public License: +' http://www.gnu.org/copyleft/lesser.html +' +' For information on use and download of DevIL goto: http://openil.sourceforge.net/ +' (Get docs and "End User Package") +' +' Report errors in the Powerbasic includes to e-mail above. +' +' For general help on Powerbasic and DevIL, try the forums at: +' http://www.powerbasic.com +'----------------------------------------------------------------------------- + + +#Register None +#Compile Exe "imgview.exe" + +Option Explicit + +#Include "win32api.inc" + +#Include "il.inc" +#Include "ilu.inc" +#Include "ilut.inc" + + +Global hDCBmp As Long +Global pic As BITMAP + +CallBack Function mainCallback() + Local ps As PAINTSTRUCT + Local hDC As Long + Select Case CbMsg + Case %WM_PAINT + hDC = BeginPaint( CbHndl, ps ) + If hDCBmp<>0 Then + BitBlt hDC, 0, 0, pic.bmWidth, pic.bmHeight , hDCBmp, 0, 0, %SRCCOPY + End If + Call EndPaint( CbHndl, ps ) + + End Select + +End Function + + +Sub SetWindowClientSize (ByVal hWnd As Long,ByVal PixX As Long,ByVal PixY As Long) + ' set window by client size in pixels + ' centers window and clips to screen + + Local cRect As RECT + Local diffX As Long + Local diffY As Long + + + GetWindowRect hWnd,cRect + diffX=cRect.nRight-cRect.nLeft + diffY=cRect.nBottom-cRect.nTop + + GetClientRect hWnd,cRect + diffX=diffX-(cRect.nRight-cRect.nLeft) + diffY=diffY-(cRect.nBottom-cRect.nTop) + + PixX=PixX+diffX + PixY=PixY+diffY + + If PixX> GetSystemMetrics(%SM_CXSCREEN) Then PixX = GetSystemMetrics(%SM_CXSCREEN) + If PixY> GetSystemMetrics(%SM_CYSCREEN) Then PixY = GetSystemMetrics(%SM_CYSCREEN) + + SetWindowPos hWnd, 0, (GetSystemMetrics(%SM_CXSCREEN) - PixX) / 2, _ + (GetSystemMetrics(%SM_CYSCREEN) - PixY) / 2, PixX, PixY, 0 + + +End Sub + + + +Function PbMain() As Long + + Local ILErr As Dword + Local hBmp As Long + + Local hWnd As Long + Local hDC As Long + + Local hBmpOld As Long + Local errString As Asciiz*1024 + + + If Len(Command$)=0 Then + MsgBox "Usage: imgview.exe filename" + Exit Function + End If + + ilInit + + ilEnable %IL_FORMAT_SET + ilEnable %IL_ORIGIN_SET + ilEnable %IL_TYPE_SET + + ilFormatFunc %IL_RGB + ilOriginFunc %IL_ORIGIN_LOWER_LEFT + ilTypeFunc %IL_UNSIGNED_BYTE + + ilEnable %IL_CONV_PAL + + Do + ILErr = ilGetError() + If ILErr <>0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in Set or enable:" & $CRLF & errString + End If + Loop While (ILErr <> 0) + + + + + + Dialog New 0, "DevIL Mini imageviewer in PB " & Command$, , , 100, 100 , %WS_SYSMENU Or %WS_CAPTION To hWnd + hDC = getDC (hWnd) + If hDC<>0 Then + hBmp = ilutWinLoadImage (Command$,getDC (hWnd) ) + ILErr=ilGetError() + If ILErr<>0 Then + errString = iluErrorString(ILErr) + MsgBox "Error in ilutWinLoadImage:" & $CRLF & errString + Exit Function + Else + GetObject hBmp, SizeOf( pic ), pic + SetWindowClientSize hWnd ,pic.bmWidth, pic.bmHeight + + hDCBmp = CreateCompatibleDC( hDC ) + hBmpOld = SelectObject( hDCBmp, hBmp ) + + Dialog Show Modal hWnd Call mainCallback + End If + + + End If + + If hBmp < > 0 Then + SelectObject hDCBmp, hBmpOld + DeleteObject hBmp + hBmp = 0 + End If + + + + + +End Function + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/python/DevIL-Linux.py b/libs/DevIL-1.7.8/projects/python/DevIL-Linux.py new file mode 100644 index 00000000..bb2154e8 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/python/DevIL-Linux.py @@ -0,0 +1,628 @@ +from ctypes import * + +_libraries = {} +_libraries['/usr/lib/libIL.so'] = CDLL('/usr/lib/libIL.so') +STRING = c_char_p + + +ILboolean = c_ubyte +ILuint = c_uint +ilActiveImage = _libraries['/usr/lib/libIL.so'].ilActiveImage +ilActiveImage.restype = ILboolean +ilActiveImage.argtypes = [ILuint] +ilActiveLayer = _libraries['/usr/lib/libIL.so'].ilActiveLayer +ilActiveLayer.restype = ILboolean +ilActiveLayer.argtypes = [ILuint] +ilActiveMipmap = _libraries['/usr/lib/libIL.so'].ilActiveMipmap +ilActiveMipmap.restype = ILboolean +ilActiveMipmap.argtypes = [ILuint] +ilApplyPal = _libraries['/usr/lib/libIL.so'].ilApplyPal +ilApplyPal.restype = ILboolean +ilApplyPal.argtypes = [STRING] +ilApplyProfile = _libraries['/usr/lib/libIL.so'].ilApplyProfile +ilApplyProfile.restype = ILboolean +ilApplyProfile.argtypes = [STRING, STRING] +ilBindImage = _libraries['/usr/lib/libIL.so'].ilBindImage +ilBindImage.restype = None +ilBindImage.argtypes = [ILuint] +ILint = c_int +ilBlit = _libraries['/usr/lib/libIL.so'].ilBlit +ilBlit.restype = ILboolean +ilBlit.argtypes = [ILuint, ILint, ILint, ILint, ILuint, ILuint, ILuint, ILuint, ILuint, ILuint] +ILclampf = c_float +ilClearColour = _libraries['/usr/lib/libIL.so'].ilClearColour +ilClearColour.restype = None +ilClearColour.argtypes = [ILclampf, ILclampf, ILclampf, ILclampf] +ilClearImage = _libraries['/usr/lib/libIL.so'].ilClearImage +ilClearImage.restype = ILboolean +ilClearImage.argtypes = [] +ilCloneCurImage = _libraries['/usr/lib/libIL.so'].ilCloneCurImage +ilCloneCurImage.restype = ILuint +ilCloneCurImage.argtypes = [] +ILenum = c_uint +ilCompressFunc = _libraries['/usr/lib/libIL.so'].ilCompressFunc +ilCompressFunc.restype = ILboolean +ilCompressFunc.argtypes = [ILenum] +ilConvertImage = _libraries['/usr/lib/libIL.so'].ilConvertImage +ilConvertImage.restype = ILboolean +ilConvertImage.argtypes = [ILenum, ILenum] +ilConvertPal = _libraries['/usr/lib/libIL.so'].ilConvertPal +ilConvertPal.restype = ILboolean +ilConvertPal.argtypes = [ILenum] +ilCopyImage = _libraries['/usr/lib/libIL.so'].ilCopyImage +ilCopyImage.restype = ILboolean +ilCopyImage.argtypes = [ILuint] +ilCopyPixels = _libraries['/usr/lib/libIL.so'].ilCopyPixels +ilCopyPixels.restype = ILuint +ilCopyPixels.argtypes = [ILuint, ILuint, ILuint, ILuint, ILuint, ILuint, ILenum, ILenum, c_void_p] +ilCreateSubImage = _libraries['/usr/lib/libIL.so'].ilCreateSubImage +ilCreateSubImage.restype = ILuint +ilCreateSubImage.argtypes = [ILenum, ILuint] +ilDefaultImage = _libraries['/usr/lib/libIL.so'].ilDefaultImage +ilDefaultImage.restype = ILboolean +ilDefaultImage.argtypes = [] +ilDeleteImage = _libraries['/usr/lib/libIL.so'].ilDeleteImage +ilDeleteImage.restype = None +ilDeleteImage.argtypes = [ILuint] +size_t = c_ulong +ILsizei = size_t +ilDeleteImages = _libraries['/usr/lib/libIL.so'].ilDeleteImages +ilDeleteImages.restype = None +ilDeleteImages.argtypes = [ILsizei, POINTER(ILuint)] +ilDisable = _libraries['/usr/lib/libIL.so'].ilDisable +ilDisable.restype = ILboolean +ilDisable.argtypes = [ILenum] +ilEnable = _libraries['/usr/lib/libIL.so'].ilEnable +ilEnable.restype = ILboolean +ilEnable.argtypes = [ILenum] +ilFormatFunc = _libraries['/usr/lib/libIL.so'].ilFormatFunc +ilFormatFunc.restype = ILboolean +ilFormatFunc.argtypes = [ILenum] +ilGenImages = _libraries['/usr/lib/libIL.so'].ilGenImages +ilGenImages.restype = None +ilGenImages.argtypes = [ILsizei, POINTER(ILuint)] +ilGenImage = _libraries['/usr/lib/libIL.so'].ilGenImage +ilGenImage.restype = ILuint +ilGenImage.argtypes = [] +ILubyte = c_ubyte +ilGetAlpha = _libraries['/usr/lib/libIL.so'].ilGetAlpha +ilGetAlpha.restype = POINTER(ILubyte) +ilGetAlpha.argtypes = [ILenum] +ilGetBoolean = _libraries['/usr/lib/libIL.so'].ilGetBoolean +ilGetBoolean.restype = ILboolean +ilGetBoolean.argtypes = [ILenum] +ilGetBooleanv = _libraries['/usr/lib/libIL.so'].ilGetBooleanv +ilGetBooleanv.restype = None +ilGetBooleanv.argtypes = [ILenum, POINTER(ILboolean)] +ilGetData = _libraries['/usr/lib/libIL.so'].ilGetData +ilGetData.restype = POINTER(ILubyte) +ilGetData.argtypes = [] +ilGetDXTCData = _libraries['/usr/lib/libIL.so'].ilGetDXTCData +ilGetDXTCData.restype = ILuint +ilGetDXTCData.argtypes = [c_void_p, ILuint, ILenum] +ilGetError = _libraries['/usr/lib/libIL.so'].ilGetError +ilGetError.restype = ILenum +ilGetError.argtypes = [] +ilGetInteger = _libraries['/usr/lib/libIL.so'].ilGetInteger +ilGetInteger.restype = ILint +ilGetInteger.argtypes = [ILenum] +ilGetIntegerv = _libraries['/usr/lib/libIL.so'].ilGetIntegerv +ilGetIntegerv.restype = None +ilGetIntegerv.argtypes = [ILenum, POINTER(ILint)] +ilGetLumpPos = _libraries['/usr/lib/libIL.so'].ilGetLumpPos +ilGetLumpPos.restype = ILuint +ilGetLumpPos.argtypes = [] +ilGetPalette = _libraries['/usr/lib/libIL.so'].ilGetPalette +ilGetPalette.restype = POINTER(ILubyte) +ilGetPalette.argtypes = [] +ilGetString = _libraries['/usr/lib/libIL.so'].ilGetString +ilGetString.restype = STRING +ilGetString.argtypes = [ILenum] +ilHint = _libraries['/usr/lib/libIL.so'].ilHint +ilHint.restype = None +ilHint.argtypes = [ILenum, ILenum] +ilInit = _libraries['/usr/lib/libIL.so'].ilInit +ilInit.restype = None +ilInit.argtypes = [] +ilIsDisabled = _libraries['/usr/lib/libIL.so'].ilIsDisabled +ilIsDisabled.restype = ILboolean +ilIsDisabled.argtypes = [ILenum] +ilIsEnabled = _libraries['/usr/lib/libIL.so'].ilIsEnabled +ilIsEnabled.restype = ILboolean +ilIsEnabled.argtypes = [ILenum] +ILHANDLE = c_void_p +ilDetermineTypeF = _libraries['/usr/lib/libIL.so'].ilDetermineTypeF +ilDetermineTypeF.restype = ILenum +ilDetermineTypeF.argtypes = [ILHANDLE] +ilIsImage = _libraries['/usr/lib/libIL.so'].ilIsImage +ilIsImage.restype = ILboolean +ilIsImage.argtypes = [ILuint] +ilIsValid = _libraries['/usr/lib/libIL.so'].ilIsValid +ilIsValid.restype = ILboolean +ilIsValid.argtypes = [ILenum, STRING] +ilIsValidF = _libraries['/usr/lib/libIL.so'].ilIsValidF +ilIsValidF.restype = ILboolean +ilIsValidF.argtypes = [ILenum, ILHANDLE] +ilIsValidL = _libraries['/usr/lib/libIL.so'].ilIsValidL +ilIsValidL.restype = ILboolean +ilIsValidL.argtypes = [ILenum, c_void_p, ILuint] +ilKeyColour = _libraries['/usr/lib/libIL.so'].ilKeyColour +ilKeyColour.restype = None +ilKeyColour.argtypes = [ILclampf, ILclampf, ILclampf, ILclampf] +ilLoad = _libraries['/usr/lib/libIL.so'].ilLoad +ilLoad.restype = ILboolean +ilLoad.argtypes = [ILenum, STRING] +ilLoadF = _libraries['/usr/lib/libIL.so'].ilLoadF +ilLoadF.restype = ILboolean +ilLoadF.argtypes = [ILenum, ILHANDLE] +ilLoadImage = _libraries['/usr/lib/libIL.so'].ilLoadImage +ilLoadImage.restype = ILboolean +ilLoadImage.argtypes = [STRING] +ilLoadL = _libraries['/usr/lib/libIL.so'].ilLoadL +ilLoadL.restype = ILboolean +ilLoadL.argtypes = [ILenum, c_void_p, ILuint] +ilLoadPal = _libraries['/usr/lib/libIL.so'].ilLoadPal +ilLoadPal.restype = ILboolean +ilLoadPal.argtypes = [STRING] +ILdouble = c_double +ilModAlpha = _libraries['/usr/lib/libIL.so'].ilModAlpha +ilModAlpha.restype = None +ilModAlpha.argtypes = [ILdouble] +ilOriginFunc = _libraries['/usr/lib/libIL.so'].ilOriginFunc +ilOriginFunc.restype = ILboolean +ilOriginFunc.argtypes = [ILenum] +ilOverlayImage = _libraries['/usr/lib/libIL.so'].ilOverlayImage +ilOverlayImage.restype = ILboolean +ilOverlayImage.argtypes = [ILuint, ILint, ILint, ILint] +ilPopAttrib = _libraries['/usr/lib/libIL.so'].ilPopAttrib +ilPopAttrib.restype = None +ilPopAttrib.argtypes = [] +ilPushAttrib = _libraries['/usr/lib/libIL.so'].ilPushAttrib +ilPushAttrib.restype = None +ilPushAttrib.argtypes = [ILuint] +ilRegisterFormat = _libraries['/usr/lib/libIL.so'].ilRegisterFormat +ilRegisterFormat.restype = None +ilRegisterFormat.argtypes = [ILenum] +IL_LOADPROC = CFUNCTYPE(ILenum, STRING) +ilRegisterLoad = _libraries['/usr/lib/libIL.so'].ilRegisterLoad +ilRegisterLoad.restype = ILboolean +ilRegisterLoad.argtypes = [STRING, IL_LOADPROC] +ilRegisterMipNum = _libraries['/usr/lib/libIL.so'].ilRegisterMipNum +ilRegisterMipNum.restype = ILboolean +ilRegisterMipNum.argtypes = [ILuint] +ilRegisterNumImages = _libraries['/usr/lib/libIL.so'].ilRegisterNumImages +ilRegisterNumImages.restype = ILboolean +ilRegisterNumImages.argtypes = [ILuint] +ilRegisterOrigin = _libraries['/usr/lib/libIL.so'].ilRegisterOrigin +ilRegisterOrigin.restype = None +ilRegisterOrigin.argtypes = [ILenum] +ilRegisterPal = _libraries['/usr/lib/libIL.so'].ilRegisterPal +ilRegisterPal.restype = None +ilRegisterPal.argtypes = [c_void_p, ILuint, ILenum] +IL_SAVEPROC = CFUNCTYPE(ILenum, STRING) +ilRegisterSave = _libraries['/usr/lib/libIL.so'].ilRegisterSave +ilRegisterSave.restype = ILboolean +ilRegisterSave.argtypes = [STRING, IL_SAVEPROC] +ilRegisterType = _libraries['/usr/lib/libIL.so'].ilRegisterType +ilRegisterType.restype = None +ilRegisterType.argtypes = [ILenum] +ilRemoveLoad = _libraries['/usr/lib/libIL.so'].ilRemoveLoad +ilRemoveLoad.restype = ILboolean +ilRemoveLoad.argtypes = [STRING] +ilRemoveSave = _libraries['/usr/lib/libIL.so'].ilRemoveSave +ilRemoveSave.restype = ILboolean +ilRemoveSave.argtypes = [STRING] +ilResetMemory = _libraries['/usr/lib/libIL.so'].ilResetMemory +ilResetMemory.restype = None +ilResetMemory.argtypes = [] +ilResetRead = _libraries['/usr/lib/libIL.so'].ilResetRead +ilResetRead.restype = None +ilResetRead.argtypes = [] +ilResetWrite = _libraries['/usr/lib/libIL.so'].ilResetWrite +ilResetWrite.restype = None +ilResetWrite.argtypes = [] +ilSave = _libraries['/usr/lib/libIL.so'].ilSave +ilSave.restype = ILboolean +ilSave.argtypes = [ILenum, STRING] +ilSaveF = _libraries['/usr/lib/libIL.so'].ilSaveF +ilSaveF.restype = ILuint +ilSaveF.argtypes = [ILenum, ILHANDLE] +ilSaveImage = _libraries['/usr/lib/libIL.so'].ilSaveImage +ilSaveImage.restype = ILboolean +ilSaveImage.argtypes = [STRING] +ilSaveL = _libraries['/usr/lib/libIL.so'].ilSaveL +ilSaveL.restype = ILuint +ilSaveL.argtypes = [ILenum, c_void_p, ILuint] +ilSavePal = _libraries['/usr/lib/libIL.so'].ilSavePal +ilSavePal.restype = ILboolean +ilSavePal.argtypes = [STRING] +ilSetAlpha = _libraries['/usr/lib/libIL.so'].ilSetAlpha +ilSetAlpha.restype = ILboolean +ilSetAlpha.argtypes = [ILdouble] +ilSetData = _libraries['/usr/lib/libIL.so'].ilSetData +ilSetData.restype = ILboolean +ilSetData.argtypes = [c_void_p] +ilSetDuration = _libraries['/usr/lib/libIL.so'].ilSetDuration +ilSetDuration.restype = ILboolean +ilSetDuration.argtypes = [ILuint] +ilSetInteger = _libraries['/usr/lib/libIL.so'].ilSetInteger +ilSetInteger.restype = None +ilSetInteger.argtypes = [ILenum, ILint] +mAlloc = CFUNCTYPE(c_void_p, ILsizei) +mFree = CFUNCTYPE(None, c_void_p) +ilSetMemory = _libraries['/usr/lib/libIL.so'].ilSetMemory +ilSetMemory.restype = None +ilSetMemory.argtypes = [mAlloc, mFree] +ilSetPixels = _libraries['/usr/lib/libIL.so'].ilSetPixels +ilSetPixels.restype = None +ilSetPixels.argtypes = [ILint, ILint, ILint, ILuint, ILuint, ILuint, ILenum, ILenum, c_void_p] +fOpenRProc = CFUNCTYPE(ILHANDLE, STRING) +fCloseRProc = CFUNCTYPE(None, ILHANDLE) +fEofProc = CFUNCTYPE(ILboolean, ILHANDLE) +fGetcProc = CFUNCTYPE(ILint, ILHANDLE) +fReadProc = CFUNCTYPE(ILint, c_void_p, ILuint, ILuint, ILHANDLE) +fSeekRProc = CFUNCTYPE(ILint, ILHANDLE, ILint, ILint) +fTellRProc = CFUNCTYPE(ILint, ILHANDLE) +ilSetRead = _libraries['/usr/lib/libIL.so'].ilSetRead +ilSetRead.restype = None +ilSetRead.argtypes = [fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc] +ilSetString = _libraries['/usr/lib/libIL.so'].ilSetString +ilSetString.restype = None +ilSetString.argtypes = [ILenum, STRING] +fOpenWProc = CFUNCTYPE(ILHANDLE, STRING) +fCloseWProc = CFUNCTYPE(None, ILHANDLE) +fPutcProc = CFUNCTYPE(ILint, ILubyte, ILHANDLE) +fSeekWProc = CFUNCTYPE(ILint, ILHANDLE, ILint, ILint) +fTellWProc = CFUNCTYPE(ILint, ILHANDLE) +fWriteProc = CFUNCTYPE(ILint, c_void_p, ILuint, ILuint, ILHANDLE) +ilSetWrite = _libraries['/usr/lib/libIL.so'].ilSetWrite +ilSetWrite.restype = None +ilSetWrite.argtypes = [fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc] +ilShutDown = _libraries['/usr/lib/libIL.so'].ilShutDown +ilShutDown.restype = None +ilShutDown.argtypes = [] +ilTexImage = _libraries['/usr/lib/libIL.so'].ilTexImage +ilTexImage.restype = ILboolean +ilTexImage.argtypes = [ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, c_void_p] +ilTypeFromExt = _libraries['/usr/lib/libIL.so'].ilTypeFromExt +ilTypeFromExt.restype = ILenum +ilTypeFromExt.argtypes = [STRING] +ilTypeFunc = _libraries['/usr/lib/libIL.so'].ilTypeFunc +ilTypeFunc.restype = ILboolean +ilTypeFunc.argtypes = [ILenum] +ilLoadData = _libraries['/usr/lib/libIL.so'].ilLoadData +ilLoadData.restype = ILboolean +ilLoadData.argtypes = [STRING, ILuint, ILuint, ILuint, ILubyte] +ilLoadDataF = _libraries['/usr/lib/libIL.so'].ilLoadDataF +ilLoadDataF.restype = ILboolean +ilLoadDataF.argtypes = [ILHANDLE, ILuint, ILuint, ILuint, ILubyte] +ilLoadDataL = _libraries['/usr/lib/libIL.so'].ilLoadDataL +ilLoadDataL.restype = ILboolean +ilLoadDataL.argtypes = [c_void_p, ILuint, ILuint, ILuint, ILuint, ILubyte] +ilSaveData = _libraries['/usr/lib/libIL.so'].ilSaveData +ilSaveData.restype = ILboolean +ilSaveData.argtypes = [STRING] +IL_LIB_JPEG_ERROR = 1506 # Variable c_int +IL_FLOAT = 5126 # Variable c_int +IL_RXGB = 1807 # Variable c_int +IL_DOOM = 1058 # Variable c_int +IL_PAL_BIT = 4 # Variable c_int +IL_TYPE_SET = 1554 # Variable c_int +IL_NUM_MIPMAPS = 3570 # Variable c_int +IL_IMAGE_CUBEFLAGS = 3581 # Variable c_int +IL_STACK_UNDERFLOW = 1295 # Variable c_int +IL_SHORT = 5122 # Variable c_int +IL_KEEP_DXTC_DATA = 1804 # Variable c_int +IL_IMAGE_WIDTH = 3556 # Variable c_int +IL_DEFAULT_ON_FAIL = 1586 # Variable c_int +IL_ATI1N = 1808 # Variable c_int +IL_COMPRESS_LZO = 1795 # Variable c_int +IL_SEEK_END = 2 # Variable c_int +IL_MNG = 1077 # Variable c_int +IL_PSD = 1081 # Variable c_int +IL_DOUBLE = 5130 # Variable c_int +IL_JP2 = 1089 # Variable c_int +IL_PALETTE_BASE_TYPE = 3568 # Variable c_int +IL_CUBEMAP_POSITIVEZ = 16384 # Variable c_int +IL_CUBEMAP_POSITIVEY = 4096 # Variable c_int +IL_CUBEMAP_POSITIVEX = 1024 # Variable c_int +IL_PALETTE_NUM_COLS = 3567 # Variable c_int +IL_IMAGE_DURATION = 3576 # Variable c_int +IL_JPG_PROGRESSIVE = 1829 # Variable c_int +IL_OUT_FORMAT_SAME = 1293 # Variable c_int +IL_PCX = 1064 # Variable c_int +IL_HDR = 1087 # Variable c_int +IL_SUB_MIPMAP = 1665 # Variable c_int +IL_USE_COMPRESSION = 1638 # Variable c_int +IL_IMAGE_CHANNELS = 3583 # Variable c_int +IL_CUBEMAP_NEGATIVEZ = 32768 # Variable c_int +IL_CUBEMAP_NEGATIVEY = 8192 # Variable c_int +IL_CUBEMAP_NEGATIVEX = 2048 # Variable c_int +IL_IMAGE_BITS_PER_PIXEL = 3561 # Variable c_int +IL_TGA = 1069 # Variable c_int +IL_MEM_SPEED_HINT = 1637 # Variable c_int +IL_WU_QUANT = 1601 # Variable c_int +IL_INT = 5124 # Variable c_int +IL_LIB_JP2_ERROR = 1510 # Variable c_int +IL_MAX_QUANT_INDEXS = 1604 # Variable c_int +IL_3DC = 1806 # Variable c_int +IL_TYPE_UNKNOWN = 0 # Variable c_int +IL_TYPE_BIT = 16 # Variable c_int +IL_LOADFAIL_BIT = 64 # Variable c_int +IL_FILE_OVERWRITE = 1568 # Variable c_int +IL_FORMAT_SPECIFIC_BIT = 128 # Variable c_int +IL_CHEAD = 1071 # Variable c_int +IL_INVALID_FILE_HEADER = 1288 # Variable c_int +IL_RAW = 1072 # Variable c_int +IL_FILE_READ_ERROR = 1298 # Variable c_int +IL_ILLEGAL_OPERATION = 1286 # Variable c_int +IL_INTERLACE_MODE = 1594 # Variable c_int +IL_XPM = 1086 # Variable c_int +IL_LIB_TIFF_ERROR = 1508 # Variable c_int +IL_WDP = 1091 # Variable c_int +IL_LOAD_EXT = 7937 # Variable c_int +IL_PAL_RGB24 = 1025 # Variable c_int +IL_BMP_RLE = 1812 # Variable c_int +IL_COMPRESS_RLE = 1794 # Variable c_int +IL_ACTIVE_IMAGE = 3572 # Variable c_int +IL_IMAGE_DEPTH = 3558 # Variable c_int +IL_IMAGE_BYTES_PER_PIXEL = 3560 # Variable c_int +IL_ORIGIN_LOWER_LEFT = 1537 # Variable c_int +IL_USE_KEY_COLOR = 1589 # Variable c_int +IL_ACTIVE_LAYER = 3574 # Variable c_int +IL_GIF = 1078 # Variable c_int +IL_NEU_QUANT = 1602 # Variable c_int +IL_CONV_PAL = 1584 # Variable c_int +IL_DXT5 = 1802 # Variable c_int +IL_PNG_AUTHNAME_STRING = 1818 # Variable c_int +IL_DXT1 = 1798 # Variable c_int +IL_PAL_BGR32 = 1029 # Variable c_int +IL_DXT3 = 1800 # Variable c_int +IL_NUM_LAYERS = 3571 # Variable c_int +IL_BYTE = 5120 # Variable c_int +IL_PIX = 1084 # Variable c_int +IL_PIC = 1065 # Variable c_int +IL_JFIF = 1061 # Variable c_int +IL_PAL_BGRA32 = 1030 # Variable c_int +IL_ILLEGAL_FILE_VALUE = 1287 # Variable c_int +IL_UNSIGNED_BYTE = 5121 # Variable c_int +IL_FORMAT_MODE = 1553 # Variable c_int +IL_PALETTE_SIZE = 3565 # Variable c_int +IL_EXIF = 1082 # Variable c_int +IL_COMPRESSION_HINT = 1640 # Variable c_int +IL_INVALID_VALUE = 1285 # Variable c_int +IL_DCX = 1080 # Variable c_int +IL_DOOM_FLAT = 1059 # Variable c_int +IL_BAD_DIMENSIONS = 1297 # Variable c_int +IL_USE_KEY_COLOUR = 1589 # Variable c_int +IL_SGI_RLE = 1813 # Variable c_int +IL_UNKNOWN_ERROR = 1535 # Variable c_int +IL_VENDOR = 7936 # Variable c_int +IL_DONT_CARE = 1634 # Variable c_int +IL_COMPRESS_NONE = 1793 # Variable c_int +IL_COMPRESS_ZLIB = 1796 # Variable c_int +IL_BLIT_BLEND = 1590 # Variable c_int +IL_QUANTIZATION_MODE = 1600 # Variable c_int +IL_CUR_IMAGE = 3575 # Variable c_int +IL_INVALID_ENUM = 1281 # Variable c_int +IL_FORMAT_BIT = 8 # Variable c_int +IL_TIF_HOSTCOMPUTER_STRING = 1822 # Variable c_int +IL_BMP = 1056 # Variable c_int +IL_TIF_DESCRIPTION_STRING = 1821 # Variable c_int +IL_TIF_DOCUMENTNAME_STRING = 1823 # Variable c_int +IL_SUB_NEXT = 1664 # Variable c_int +IL_IMAGE_TYPE = 3563 # Variable c_int +IL_INVALID_PARAM = 1289 # Variable c_int +IL_ICNS = 1088 # Variable c_int +IL_ALPHA = 6411 # Variable c_int +IL_TGA_CREATE_STAMP = 1808 # Variable c_int +IL_PAL_BGR24 = 1028 # Variable c_int +IL_DXTC_DATA_FORMAT = 1805 # Variable c_int +IL_PSP = 1083 # Variable c_int +IL_TGA_ID_STRING = 1815 # Variable c_int +IL_IMAGE_SIZE_OF_DATA = 3559 # Variable c_int +IL_RGBA = 6408 # Variable c_int +IL_FORMAT_NOT_SUPPORTED = 1283 # Variable c_int +IL_FILE_MODE = 1569 # Variable c_int +IL_LBM = 1062 # Variable c_int +IL_ORIGIN_MODE = 1539 # Variable c_int +IL_TIF = 1070 # Variable c_int +IL_VERSION_NUM = 3554 # Variable c_int +IL_PALETTE_BPP = 3566 # Variable c_int +IL_LUMINANCE_ALPHA = 6410 # Variable c_int +IL_VERSION_1_7_5 = 1 # Variable c_int +IL_PAL_NONE = 1024 # Variable c_int +IL_PCD = 1063 # Variable c_int +IL_PAL_RGBA32 = 1027 # Variable c_int +IL_PXR = 1085 # Variable c_int +IL_NUM_IMAGES = 3569 # Variable c_int +IL_JPG_QUALITY = 1809 # Variable c_int +IL_FALSE = 0 # Variable c_int +IL_SEEK_CUR = 1 # Variable c_int +IL_SEEK_SET = 0 # Variable c_int +IL_JPG = 1061 # Variable c_int +IL_ORIGIN_SET = 1536 # Variable c_int +IL_DDS = 1079 # Variable c_int +IL_RGB = 6407 # Variable c_int +IL_TGA_RLE = 1811 # Variable c_int +IL_IMAGE_ORIGIN = 3582 # Variable c_int +IL_IMAGE_BPC = 3578 # Variable c_int +IL_COMPRESS_MODE = 1792 # Variable c_int +IL_COMPRESS_BIT = 32 # Variable c_int +IL_NEU_QUANT_SAMPLE = 1603 # Variable c_int +IL_JASC_PAL = 1141 # Variable c_int +IL_IMAGE_BPP = 3560 # Variable c_int +IL_HALF = 5131 # Variable c_int +IL_DXT2 = 1799 # Variable c_int +IL_NO_COMPRESSION = 1639 # Variable c_int +IL_COULD_NOT_OPEN_FILE = 1290 # Variable c_int +IL_PNM = 1067 # Variable c_int +IL_PNG = 1066 # Variable c_int +IL_TGA_AUTHCOMMENT_STRING = 1817 # Variable c_int +IL_JNG = 1077 # Variable c_int +IL_LUMINANCE = 6409 # Variable c_int +IL_ICO = 1060 # Variable c_int +IL_IMAGE_OFFX = 3579 # Variable c_int +IL_IMAGE_OFFY = 3580 # Variable c_int +IL_IMAGE_PLANESIZE = 3577 # Variable c_int +IL_ORIGIN_UPPER_LEFT = 1538 # Variable c_int +IL_TGA_AUTHNAME_STRING = 1816 # Variable c_int +IL_PCD_PICNUM = 1827 # Variable c_int +IL_TYPE_MODE = 1555 # Variable c_int +IL_SUB_LAYER = 1666 # Variable c_int +IL_CUT = 1057 # Variable c_int +IL_CHEAD_HEADER_STRING = 1826 # Variable c_int +IL_PNG_TITLE_STRING = 1819 # Variable c_int +IL_DXT_NO_COMP = 1803 # Variable c_int +IL_LIF = 1076 # Variable c_int +IL_DXTC_FORMAT = 1797 # Variable c_int +IL_TRUE = 1 # Variable c_int +IL_TIF_AUTHNAME_STRING = 1824 # Variable c_int +IL_WAL = 1074 # Variable c_int +IL_ACTIVE_MIPMAP = 3573 # Variable c_int +IL_PNG_DESCRIPTION_STRING = 1820 # Variable c_int +IL_INTERNAL_ERROR = 1284 # Variable c_int +IL_OUT_OF_MEMORY = 1282 # Variable c_int +IL_MDL = 1073 # Variable c_int +IL_IMAGE_HEIGHT = 3557 # Variable c_int +IL_PALETTE_TYPE = 3564 # Variable c_int +IL_BGR = 32992 # Variable c_int +IL_PNG_INTERLACE = 1810 # Variable c_int +IL_UNSIGNED_INT = 5125 # Variable c_int +IL_LIB_GIF_ERROR = 1505 # Variable c_int +IL_FILE_WRITE_ERROR = 1298 # Variable c_int +IL_ORIGIN_BIT = 1 # Variable c_int +IL_VTF = 1092 # Variable c_int +IL_INVALID_CONVERSION = 1296 # Variable c_int +IL_LESS_MEM = 1633 # Variable c_int +IL_LIB_PNG_ERROR = 1507 # Variable c_int +IL_SGI = 1068 # Variable c_int +IL_UNSIGNED_SHORT = 5123 # Variable c_int +IL_COLOUR_INDEX = 6400 # Variable c_int +IL_STACK_OVERFLOW = 1294 # Variable c_int +IL_FILE_ALREADY_EXISTS = 1292 # Variable c_int +IL_COLOR_INDEX = 6400 # Variable c_int +IL_BGRA = 32993 # Variable c_int +IL_PNG_ALPHA_INDEX = 1828 # Variable c_int +IL_EOF = -1 # Variable c_int +IL_JPG_SAVE_FORMAT = 1825 # Variable c_int +IL_LIB_MNG_ERROR = 1509 # Variable c_int +IL_INVALID_EXTENSION = 1291 # Variable c_int +IL_VERSION = 175 # Variable c_int +IL_IMAGE_FORMAT = 3562 # Variable c_int +IL_SAVE_EXT = 7938 # Variable c_int +IL_FILE_BIT = 2 # Variable c_int +IL_FORMAT_SET = 1552 # Variable c_int +IL_FASTEST = 1632 # Variable c_int +IL_EXR = 1090 # Variable c_int +IL_PAL_RGB32 = 1026 # Variable c_int +IL_DXT4 = 1801 # Variable c_int +IL_ALL_ATTRIB_BITS = 1048575 # Variable c_int +IL_SAVE_INTERLACED = 1593 # Variable c_int +IL_NO_ERROR = 0 # Variable c_int +__all__ = ['ilActiveImage', 'ILclampf', 'IL_PAL_RGB24', + 'IL_LIB_JPEG_ERROR', 'ilLoadImage', 'IL_VERSION_1_7_5', + 'IL_TIF_AUTHNAME_STRING', 'ilBindImage', + 'IL_TGA_CREATE_STAMP', 'IL_UNSIGNED_SHORT', 'ilConvertPal', + 'IL_PAL_BGR24', 'IL_FLOAT', 'ilLoad', 'IL_ACTIVE_MIPMAP', + 'size_t', 'ILHANDLE', 'IL_DOUBLE', 'IL_PALETTE_BASE_TYPE', + 'IL_NUM_IMAGES', 'IL_INTERNAL_ERROR', 'IL_LBM', + 'IL_PNG_DESCRIPTION_STRING', 'IL_CUBEMAP_POSITIVEZ', + 'IL_COMPRESSION_HINT', 'ilSetString', 'ilRemoveLoad', + 'IL_RXGB', 'IL_CUBEMAP_POSITIVEY', 'IL_NO_ERROR', + 'IL_LIB_TIFF_ERROR', 'fTellRProc', 'IL_TGA_ID_STRING', + 'IL_IMAGE_SIZE_OF_DATA', 'ILenum', 'IL_RGBA', + 'IL_TGA_AUTHNAME_STRING', 'fOpenRProc', 'IL_COMPRESS_NONE', + 'IL_JASC_PAL', 'IL_DOOM', 'IL_COMPRESS_RLE', 'IL_ICO', + 'IL_ACTIVE_IMAGE', 'ilRegisterMipNum', 'ilSetRead', + 'fEofProc', 'IL_PAL_BIT', 'ilLoadDataL', 'IL_PSP', + 'IL_TYPE_SET', 'IL_PNG_INTERLACE', 'IL_STACK_UNDERFLOW', + 'IL_VERSION_NUM', 'IL_FORMAT_NOT_SUPPORTED', 'ilSetMemory', + 'IL_IMAGE_DEPTH', 'IL_NUM_MIPMAPS', 'IL_SUB_LAYER', + 'IL_BAD_DIMENSIONS', 'IL_IMAGE_CUBEFLAGS', 'ilShutDown', + 'IL_ORIGIN_LOWER_LEFT', 'fCloseRProc', 'ilGetBoolean', + 'IL_ACTIVE_LAYER', 'IL_WAL', 'ilRegisterNumImages', + 'ILdouble', 'ilApplyProfile', 'IL_DXTC_DATA_FORMAT', + 'IL_FASTEST', 'IL_GIF', 'ilResetWrite', 'ilSaveData', + 'IL_KEEP_DXTC_DATA', 'ilGetIntegerv', 'ILuint', + 'IL_IMAGE_WIDTH', 'IL_PNG_ALPHA_INDEX', 'IL_SHORT', + 'IL_FILE_ALREADY_EXISTS', 'ilDeleteImages', 'IL_ATI1N', + 'ilOverlayImage', 'ilResetRead', 'IL_ORIGIN_MODE', + 'ILubyte', 'IL_NEU_QUANT', 'ilCompressFunc', + 'IL_COMPRESS_LZO', 'ilGetBooleanv', 'IL_FORMAT_SET', + 'IL_SEEK_END', 'IL_MNG', 'IL_IMAGE_TYPE', 'IL_PSD', + 'ilDeleteImage', 'IL_CONV_PAL', 'ilGetDXTCData', + 'IL_PAL_RGBA32', 'IL_TIF_DESCRIPTION_STRING', + 'IL_PALETTE_BPP', 'IL_JP2', 'ilClearImage', 'ilGetLumpPos', + 'IL_DXT1', 'IL_PAL_RGB32', 'IL_DXT3', 'IL_PIX', + 'IL_LESS_MEM', 'ilSaveF', 'IL_NUM_LAYERS', 'IL_BYTE', + 'IL_UNSIGNED_INT', 'IL_INVALID_EXTENSION', 'ilFormatFunc', + 'ilRegisterSave', 'ilLoadL', 'IL_CUBEMAP_POSITIVEX', + 'fGetcProc', 'IL_PAL_NONE', 'ilGetPalette', + 'IL_PALETTE_NUM_COLS', 'ilLoadF', 'IL_DXT4', + 'IL_IMAGE_BPC', 'ilTexImage', 'IL_PIC', 'ilGetString', + 'IL_COULD_NOT_OPEN_FILE', 'IL_FILE_WRITE_ERROR', 'IL_JFIF', + 'IL_IMAGE_DURATION', 'ilGetError', 'IL_PAL_BGRA32', + 'IL_JPG_PROGRESSIVE', 'IL_FILE_OVERWRITE', 'ILboolean', + 'ilSetInteger', 'IL_CHEAD_HEADER_STRING', + 'IL_COLOUR_INDEX', 'ilGenImages', 'IL_OUT_FORMAT_SAME', + 'IL_UNSIGNED_BYTE', 'IL_PCX', 'IL_HDR', 'ilPopAttrib', + 'IL_COLOR_INDEX', 'IL_MEM_SPEED_HINT', 'IL_JPG_QUALITY', + 'ilGetData', 'ilActiveLayer', 'IL_SUB_MIPMAP', 'IL_FALSE', + 'ilSetDuration', 'ilGetInteger', 'ilIsValid', + 'IL_LIB_GIF_ERROR', 'IL_USE_COMPRESSION', 'ilGetAlpha', + 'IL_FORMAT_SPECIFIC_BIT', 'IL_DXT2', 'IL_USE_KEY_COLOR', + 'IL_ILLEGAL_FILE_VALUE', 'IL_SEEK_CUR', 'fPutcProc', + 'IL_SEEK_SET', 'ILsizei', 'IL_IMAGE_CHANNELS', + 'ilApplyPal', 'IL_TRUE', 'fReadProc', 'IL_XPM', 'ilSave', + 'IL_JPG', 'IL_ORIGIN_BIT', 'IL_DEFAULT_ON_FAIL', 'mFree', + 'ilGenImage', 'IL_CUBEMAP_NEGATIVEZ', + 'IL_CUBEMAP_NEGATIVEY', 'IL_CUBEMAP_NEGATIVEX', 'IL_DCX', + 'ilRegisterLoad', 'IL_ORIGIN_SET', 'IL_DOOM_FLAT', + 'ilDefaultImage', 'IL_IMAGE_BYTES_PER_PIXEL', + 'IL_IMAGE_BITS_PER_PIXEL', 'IL_USE_KEY_COLOUR', + 'IL_IMAGE_FORMAT', 'IL_PNM', 'IL_PCD', 'ilIsDisabled', + 'IL_TGA', 'IL_BGR', 'IL_PALETTE_TYPE', 'IL_DDS', + 'fTellWProc', 'IL_SAVE_INTERLACED', 'IL_VENDOR', 'IL_EXIF', + 'IL_VERSION', 'IL_QUANTIZATION_MODE', 'fSeekWProc', + 'IL_IMAGE_HEIGHT', 'IL_MDL', 'IL_LOAD_EXT', + 'ilRegisterType', 'IL_UNKNOWN_ERROR', 'IL_STACK_OVERFLOW', + 'IL_LIF', 'IL_SGI_RLE', 'IL_WU_QUANT', 'IL_TGA_RLE', + 'IL_INT', 'IL_INTERLACE_MODE', 'IL_LIB_JP2_ERROR', + 'IL_FORMAT_MODE', 'fWriteProc', 'IL_EOF', 'IL_BGRA', + 'IL_COMPRESS_MODE', 'IL_COMPRESS_BIT', 'ILint', + 'ilCloneCurImage', 'ilRegisterFormat', + 'IL_ALL_ATTRIB_BITS', 'IL_NEU_QUANT_SAMPLE', + 'IL_DONT_CARE', 'IL_MAX_QUANT_INDEXS', 'IL_IMAGE_BPP', + 'IL_3DC', 'IL_TYPE_UNKNOWN', 'ilTypeFunc', 'mAlloc', + 'IL_ORIGIN_UPPER_LEFT', 'IL_PALETTE_SIZE', + 'ilCreateSubImage', 'ilIsEnabled', 'IL_PXR', 'ilSetPixels', + 'IL_FILE_MODE', 'ilSetAlpha', 'IL_COMPRESS_ZLIB', 'IL_RGB', + 'IL_TYPE_BIT', 'IL_BLIT_BLEND', 'IL_JPG_SAVE_FORMAT', + 'IL_LOADFAIL_BIT', 'fOpenWProc', 'IL_VTF', 'IL_SAVEPROC', + 'ilSaveImage', 'IL_LOADPROC', 'ilSavePal', 'IL_TIF', + 'IL_TGA_AUTHCOMMENT_STRING', 'IL_FORMAT_BIT', + 'IL_CUR_IMAGE', 'IL_CHEAD', 'IL_LUMINANCE', 'fCloseWProc', + 'ilCopyPixels', 'IL_IMAGE_OFFX', 'IL_IMAGE_OFFY', + 'IL_INVALID_FILE_HEADER', 'IL_IMAGE_PLANESIZE', + 'ilDisable', 'IL_INVALID_ENUM', 'ilOriginFunc', + 'ilRegisterOrigin', 'ilPushAttrib', 'ilSetWrite', + 'ilTypeFromExt', 'IL_TIF_HOSTCOMPUTER_STRING', 'IL_SGI', + 'IL_IMAGE_ORIGIN', 'ilCopyImage', 'ilEnable', + 'IL_PCD_PICNUM', 'IL_SAVE_EXT', 'IL_EXR', 'IL_PNG', + 'IL_FILE_BIT', 'IL_CUT', 'IL_BMP', 'IL_RAW', + 'IL_INVALID_CONVERSION', 'ilRegisterPal', 'IL_BMP_RLE', + 'ilBlit', 'IL_TIF_DOCUMENTNAME_STRING', 'IL_SUB_NEXT', + 'IL_TYPE_MODE', 'IL_PNG_AUTHNAME_STRING', + 'IL_FILE_READ_ERROR', 'ilRemoveSave', 'IL_LUMINANCE_ALPHA', + 'IL_ILLEGAL_OPERATION', 'IL_WDP', 'IL_DXT5', 'IL_JNG', + 'IL_NO_COMPRESSION', 'IL_PAL_BGR32', 'ilIsValidL', + 'ilLoadDataF', 'ilLoadData', 'fSeekRProc', + 'IL_LIB_MNG_ERROR', 'ilIsValidF', 'IL_PNG_TITLE_STRING', + 'ilDetermineTypeF', 'ilSaveL', 'ilSetData', 'ilInit', + 'IL_INVALID_PARAM', 'IL_LIB_PNG_ERROR', 'ilClearColour', + 'ilActiveMipmap', 'IL_DXT_NO_COMP', 'IL_OUT_OF_MEMORY', + 'ilLoadPal', 'ilModAlpha', 'IL_INVALID_VALUE', 'IL_ICNS', + 'IL_DXTC_FORMAT', 'IL_HALF', 'ilHint', 'ilIsImage', + 'ilConvertImage', 'IL_ALPHA', 'ilKeyColour', + 'ilResetMemory'] diff --git a/libs/DevIL-1.7.8/projects/python/DevIL-Windows.py b/libs/DevIL-1.7.8/projects/python/DevIL-Windows.py new file mode 100644 index 00000000..7a5b33c9 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/python/DevIL-Windows.py @@ -0,0 +1,631 @@ +from ctypes import * + +_stdcall_libraries = {} +_stdcall_libraries['DevIL'] = WinDLL('DevIL') +STRING = c_char_p + + +IL_LOAD_EXT = 7937 # Variable c_int +IL_TGA_CREATE_STAMP = 1808 # Variable c_int +IL_PAL_RGB24 = 1025 # Variable c_int +IL_LIB_JPEG_ERROR = 1506 # Variable c_int +IL_DXTC_DATA_FORMAT = 1805 # Variable c_int +IL_TIF_AUTHNAME_STRING = 1824 # Variable c_int +IL_PSP = 1083 # Variable c_int +IL_PALETTE_BASE_TYPE = 3568 # Variable c_int +IL_PAL_BGR24 = 1028 # Variable c_int +IL_WAL = 1074 # Variable c_int +IL_ACTIVE_MIPMAP = 3573 # Variable c_int +IL_PSD = 1081 # Variable c_int +IL_VERSION = 175 # Variable c_int +IL_NUM_IMAGES = 3569 # Variable c_int +IL_INTERNAL_ERROR = 1284 # Variable c_int +IL_FORMAT_SET = 1552 # Variable c_int +IL_PNG_DESCRIPTION_STRING = 1820 # Variable c_int +IL_COULD_NOT_OPEN_FILE = 1290 # Variable c_int +IL_SEEK_SET = 0 # Variable c_int +IL_RXGB = 1807 # Variable c_int +IL_TGA_ID_STRING = 1815 # Variable c_int +IL_IMAGE_SIZE_OF_DATA = 3559 # Variable c_int +IL_RGBA = 6408 # Variable c_int +IL_PALETTE_TYPE = 3564 # Variable c_int +IL_BGR = 32992 # Variable c_int +IL_DOOM = 1058 # Variable c_int +IL_COMPRESS_RLE = 1794 # Variable c_int +IL_ACTIVE_IMAGE = 3572 # Variable c_int +IL_PAL_BIT = 4 # Variable c_int +IL_TYPE_SET = 1554 # Variable c_int +IL_PNG_INTERLACE = 1810 # Variable c_int +IL_DXTC_FORMAT = 1797 # Variable c_int +IL_CUBEMAP_POSITIVEZ = 16384 # Variable c_int +IL_FORMAT_NOT_SUPPORTED = 1283 # Variable c_int +IL_IMAGE_DEPTH = 3558 # Variable c_int +IL_NUM_MIPMAPS = 3570 # Variable c_int +IL_IMAGE_BYTES_PER_PIXEL = 3560 # Variable c_int +IL_IMAGE_CUBEFLAGS = 3581 # Variable c_int +IL_STACK_UNDERFLOW = 1295 # Variable c_int +IL_ORIGIN_LOWER_LEFT = 1537 # Variable c_int +IL_USE_KEY_COLOR = 1589 # Variable c_int +IL_UNSIGNED_INT = 5125 # Variable c_int +IL_USE_KEY_COLOUR = 1589 # Variable c_int +IL_ILLEGAL_OPERATION = 1286 # Variable c_int +IL_GIF = 1078 # Variable c_int +IL_FLOAT = 5126 # Variable c_int +IL_KEEP_DXTC_DATA = 1804 # Variable c_int +IL_FILE_WRITE_ERROR = 1298 # Variable c_int +IL_IMAGE_WIDTH = 3556 # Variable c_int +IL_DEFAULT_ON_FAIL = 1586 # Variable c_int +IL_USE_COMPRESSION = 1638 # Variable c_int +IL_JASC_PAL = 1141 # Variable c_int +IL_LBM = 1062 # Variable c_int +IL_ORIGIN_MODE = 1539 # Variable c_int +IL_NEU_QUANT = 1602 # Variable c_int +IL_VENDOR = 7936 # Variable c_int +IL_ACTIVE_LAYER = 3574 # Variable c_int +IL_SEEK_END = 2 # Variable c_int +IL_MNG = 1077 # Variable c_int +IL_TIF = 1070 # Variable c_int +IL_INVALID_CONVERSION = 1296 # Variable c_int +IL_DOUBLE = 5130 # Variable c_int +IL_VERSION_NUM = 3554 # Variable c_int +IL_PAL_RGBA32 = 1027 # Variable c_int +IL_TIF_DESCRIPTION_STRING = 1821 # Variable c_int +IL_PALETTE_BPP = 3566 # Variable c_int +IL_IMAGE_DURATION = 3576 # Variable c_int +IL_JP2 = 1089 # Variable c_int +IL_DXT4 = 1801 # Variable c_int +IL_DXT1 = 1798 # Variable c_int +IL_PAL_BGR32 = 1029 # Variable c_int +IL_DXT3 = 1800 # Variable c_int +IL_PIX = 1084 # Variable c_int +IL_LESS_MEM = 1633 # Variable c_int +IL_NUM_LAYERS = 3571 # Variable c_int +IL_BYTE = 5120 # Variable c_int +IL_INVALID_EXTENSION = 1291 # Variable c_int +IL_CUBEMAP_POSITIVEY = 4096 # Variable c_int +IL_CUBEMAP_POSITIVEX = 1024 # Variable c_int +IL_PCD = 1063 # Variable c_int +IL_IMAGE_BPC = 3578 # Variable c_int +IL_PIC = 1065 # Variable c_int +IL_SUB_LAYER = 1666 # Variable c_int +IL_UNSIGNED_SHORT = 5123 # Variable c_int +IL_PAL_BGRA32 = 1030 # Variable c_int +IL_JPG_PROGRESSIVE = 1829 # Variable c_int +IL_FILE_OVERWRITE = 1568 # Variable c_int +IL_SAVE_INTERLACED = 1593 # Variable c_int +IL_COLOUR_INDEX = 6400 # Variable c_int +IL_ILLEGAL_FILE_VALUE = 1287 # Variable c_int +IL_OUT_FORMAT_SAME = 1293 # Variable c_int +IL_UNSIGNED_BYTE = 5121 # Variable c_int +IL_PCX = 1064 # Variable c_int +IL_HDR = 1087 # Variable c_int +IL_LIB_MNG_ERROR = 1509 # Variable c_int +IL_COLOR_INDEX = 6400 # Variable c_int +IL_STACK_OVERFLOW = 1294 # Variable c_int +IL_JPG_QUALITY = 1809 # Variable c_int +IL_VERSION_1_7_5 = 1 # Variable c_int +IL_SUB_MIPMAP = 1665 # Variable c_int +IL_FALSE = 0 # Variable c_int +IL_FORMAT_MODE = 1553 # Variable c_int +IL_LIB_GIF_ERROR = 1505 # Variable c_int +IL_EXIF = 1082 # Variable c_int +IL_PXR = 1085 # Variable c_int +IL_SEEK_CUR = 1 # Variable c_int +IL_OUT_OF_MEMORY = 1282 # Variable c_int +IL_IMAGE_TYPE = 3563 # Variable c_int +IL_IMAGE_CHANNELS = 3583 # Variable c_int +IL_TRUE = 1 # Variable c_int +IL_COMPRESSION_HINT = 1640 # Variable c_int +IL_FILE_ALREADY_EXISTS = 1292 # Variable c_int +IL_JPG = 1061 # Variable c_int +IL_ORIGIN_BIT = 1 # Variable c_int +IL_LIB_PNG_ERROR = 1507 # Variable c_int +IL_INVALID_VALUE = 1285 # Variable c_int +IL_CUBEMAP_NEGATIVEZ = 32768 # Variable c_int +IL_CUBEMAP_NEGATIVEX = 2048 # Variable c_int +IL_DCX = 1080 # Variable c_int +IL_ORIGIN_SET = 1536 # Variable c_int +IL_DOOM_FLAT = 1059 # Variable c_int +IL_BAD_DIMENSIONS = 1297 # Variable c_int +IL_IMAGE_BITS_PER_PIXEL = 3561 # Variable c_int +IL_ATI1N = 1808 # Variable c_int +IL_JFIF = 1061 # Variable c_int +IL_SUB_NEXT = 1664 # Variable c_int +IL_TGA = 1069 # Variable c_int +IL_MEM_SPEED_HINT = 1637 # Variable c_int +IL_DDS = 1079 # Variable c_int +IL_QUANTIZATION_MODE = 1600 # Variable c_int +IL_IMAGE_HEIGHT = 3557 # Variable c_int +IL_MDL = 1073 # Variable c_int +IL_INVALID_PARAM = 1289 # Variable c_int +IL_BGRA = 32993 # Variable c_int +IL_PNG_ALPHA_INDEX = 1828 # Variable c_int +IL_WU_QUANT = 1601 # Variable c_int +IL_TGA_RLE = 1811 # Variable c_int +IL_IMAGE_ORIGIN = 3582 # Variable c_int +IL_SGI_RLE = 1813 # Variable c_int +IL_EOF = -1 # Variable c_int +IL_UNKNOWN_ERROR = 1535 # Variable c_int +IL_COMPRESS_MODE = 1792 # Variable c_int +IL_COMPRESS_BIT = 32 # Variable c_int +IL_COMPRESS_LZO = 1795 # Variable c_int +IL_NEU_QUANT_SAMPLE = 1603 # Variable c_int +IL_DONT_CARE = 1634 # Variable c_int +IL_MAX_QUANT_INDEXS = 1604 # Variable c_int +IL_IMAGE_BPP = 3560 # Variable c_int +IL_IMAGE_PLANESIZE = 3577 # Variable c_int +IL_3DC = 1806 # Variable c_int +IL_TYPE_UNKNOWN = 0 # Variable c_int +IL_COMPRESS_NONE = 1793 # Variable c_int +IL_XPM = 1086 # Variable c_int +IL_ORIGIN_UPPER_LEFT = 1538 # Variable c_int +IL_PALETTE_SIZE = 3565 # Variable c_int +IL_SHORT = 5122 # Variable c_int +IL_FILE_MODE = 1569 # Variable c_int +IL_IMAGE_FORMAT = 3562 # Variable c_int +IL_COMPRESS_ZLIB = 1796 # Variable c_int +IL_RGB = 6407 # Variable c_int +IL_TYPE_BIT = 16 # Variable c_int +IL_BLIT_BLEND = 1590 # Variable c_int +IL_JPG_SAVE_FORMAT = 1825 # Variable c_int +IL_LOADFAIL_BIT = 64 # Variable c_int +IL_PNM = 1067 # Variable c_int +IL_VTF = 1092 # Variable c_int +IL_PAL_NONE = 1024 # Variable c_int +IL_FORMAT_SPECIFIC_BIT = 128 # Variable c_int +IL_PNG = 1066 # Variable c_int +IL_TGA_AUTHCOMMENT_STRING = 1817 # Variable c_int +IL_CUR_IMAGE = 3575 # Variable c_int +IL_JNG = 1077 # Variable c_int +IL_LUMINANCE = 6409 # Variable c_int +IL_ICO = 1060 # Variable c_int +IL_IMAGE_OFFX = 3579 # Variable c_int +IL_IMAGE_OFFY = 3580 # Variable c_int +IL_INVALID_FILE_HEADER = 1288 # Variable c_int +IL_INVALID_ENUM = 1281 # Variable c_int +IL_INT = 5124 # Variable c_int +IL_CHEAD = 1071 # Variable c_int +IL_FORMAT_BIT = 8 # Variable c_int +IL_CONV_PAL = 1584 # Variable c_int +IL_NO_COMPRESSION = 1639 # Variable c_int +IL_SGI = 1068 # Variable c_int +IL_LIB_JP2_ERROR = 1510 # Variable c_int +IL_SAVE_EXT = 7938 # Variable c_int +IL_EXR = 1090 # Variable c_int +IL_FILE_BIT = 2 # Variable c_int +IL_BMP = 1056 # Variable c_int +IL_RAW = 1072 # Variable c_int +IL_BMP_RLE = 1812 # Variable c_int +IL_TGA_AUTHNAME_STRING = 1816 # Variable c_int +IL_TIF_DOCUMENTNAME_STRING = 1823 # Variable c_int +IL_PCD_PICNUM = 1827 # Variable c_int +IL_TYPE_MODE = 1555 # Variable c_int +IL_FILE_READ_ERROR = 1298 # Variable c_int +IL_LUMINANCE_ALPHA = 6410 # Variable c_int +IL_FASTEST = 1632 # Variable c_int +IL_WDP = 1091 # Variable c_int +IL_DXT5 = 1802 # Variable c_int +IL_CUBEMAP_NEGATIVEY = 8192 # Variable c_int +IL_CUT = 1057 # Variable c_int +IL_PAL_RGB32 = 1026 # Variable c_int +IL_PNG_AUTHNAME_STRING = 1818 # Variable c_int +IL_INTERLACE_MODE = 1594 # Variable c_int +IL_CHEAD_HEADER_STRING = 1826 # Variable c_int +IL_PNG_TITLE_STRING = 1819 # Variable c_int +IL_ALL_ATTRIB_BITS = 1048575 # Variable c_int +IL_DXT_NO_COMP = 1803 # Variable c_int +IL_DXT2 = 1799 # Variable c_int +IL_LIF = 1076 # Variable c_int +IL_TIF_HOSTCOMPUTER_STRING = 1822 # Variable c_int +IL_ICNS = 1088 # Variable c_int +IL_HALF = 5131 # Variable c_int +IL_LIB_TIFF_ERROR = 1508 # Variable c_int +IL_ALPHA = 6411 # Variable c_int +IL_NO_ERROR = 0 # Variable c_int +IL_PALETTE_NUM_COLS = 3567 # Variable c_int +ILboolean = c_ubyte +ILuint = c_uint +ilActiveImage = _stdcall_libraries['DevIL'].ilActiveImage +ilActiveImage.restype = ILboolean +ilActiveImage.argtypes = [ILuint] +ilActiveLayer = _stdcall_libraries['DevIL'].ilActiveLayer +ilActiveLayer.restype = ILboolean +ilActiveLayer.argtypes = [ILuint] +ilActiveMipmap = _stdcall_libraries['DevIL'].ilActiveMipmap +ilActiveMipmap.restype = ILboolean +ilActiveMipmap.argtypes = [ILuint] +ilApplyPal = _stdcall_libraries['DevIL'].ilApplyPal +ilApplyPal.restype = ILboolean +ilApplyPal.argtypes = [STRING] +ilApplyProfile = _stdcall_libraries['DevIL'].ilApplyProfile +ilApplyProfile.restype = ILboolean +ilApplyProfile.argtypes = [STRING, STRING] +ilBindImage = _stdcall_libraries['DevIL'].ilBindImage +ilBindImage.restype = None +ilBindImage.argtypes = [ILuint] +ILint = c_int +ilBlit = _stdcall_libraries['DevIL'].ilBlit +ilBlit.restype = ILboolean +ilBlit.argtypes = [ILuint, ILint, ILint, ILint, ILuint, ILuint, ILuint, ILuint, ILuint, ILuint] +ILclampf = c_float +ilClearColour = _stdcall_libraries['DevIL'].ilClearColour +ilClearColour.restype = None +ilClearColour.argtypes = [ILclampf, ILclampf, ILclampf, ILclampf] +ilClearImage = _stdcall_libraries['DevIL'].ilClearImage +ilClearImage.restype = ILboolean +ilClearImage.argtypes = [] +ilCloneCurImage = _stdcall_libraries['DevIL'].ilCloneCurImage +ilCloneCurImage.restype = ILuint +ilCloneCurImage.argtypes = [] +ILenum = c_uint +ilCompressFunc = _stdcall_libraries['DevIL'].ilCompressFunc +ilCompressFunc.restype = ILboolean +ilCompressFunc.argtypes = [ILenum] +ilConvertImage = _stdcall_libraries['DevIL'].ilConvertImage +ilConvertImage.restype = ILboolean +ilConvertImage.argtypes = [ILenum, ILenum] +ilConvertPal = _stdcall_libraries['DevIL'].ilConvertPal +ilConvertPal.restype = ILboolean +ilConvertPal.argtypes = [ILenum] +ilCopyImage = _stdcall_libraries['DevIL'].ilCopyImage +ilCopyImage.restype = ILboolean +ilCopyImage.argtypes = [ILuint] +ilCopyPixels = _stdcall_libraries['DevIL'].ilCopyPixels +ilCopyPixels.restype = ILuint +ilCopyPixels.argtypes = [ILuint, ILuint, ILuint, ILuint, ILuint, ILuint, ILenum, ILenum, c_void_p] +ilCreateSubImage = _stdcall_libraries['DevIL'].ilCreateSubImage +ilCreateSubImage.restype = ILuint +ilCreateSubImage.argtypes = [ILenum, ILuint] +ilDefaultImage = _stdcall_libraries['DevIL'].ilDefaultImage +ilDefaultImage.restype = ILboolean +ilDefaultImage.argtypes = [] +ilDeleteImage = _stdcall_libraries['DevIL'].ilDeleteImage +ilDeleteImage.restype = None +ilDeleteImage.argtypes = [ILuint] +size_t = c_uint +ILsizei = size_t +ilDeleteImages = _stdcall_libraries['DevIL'].ilDeleteImages +ilDeleteImages.restype = None +ilDeleteImages.argtypes = [ILsizei, POINTER(ILuint)] +ilDisable = _stdcall_libraries['DevIL'].ilDisable +ilDisable.restype = ILboolean +ilDisable.argtypes = [ILenum] +ilEnable = _stdcall_libraries['DevIL'].ilEnable +ilEnable.restype = ILboolean +ilEnable.argtypes = [ILenum] +ilFormatFunc = _stdcall_libraries['DevIL'].ilFormatFunc +ilFormatFunc.restype = ILboolean +ilFormatFunc.argtypes = [ILenum] +ilGenImages = _stdcall_libraries['DevIL'].ilGenImages +ilGenImages.restype = None +ilGenImages.argtypes = [ILsizei, POINTER(ILuint)] +ilGenImage = _stdcall_libraries['DevIL'].ilGenImage +ilGenImage.restype = ILuint +ilGenImage.argtypes = [] +ILubyte = c_ubyte +ilGetAlpha = _stdcall_libraries['DevIL'].ilGetAlpha +ilGetAlpha.restype = POINTER(ILubyte) +ilGetAlpha.argtypes = [ILenum] +ilGetBoolean = _stdcall_libraries['DevIL'].ilGetBoolean +ilGetBoolean.restype = ILboolean +ilGetBoolean.argtypes = [ILenum] +ilGetBooleanv = _stdcall_libraries['DevIL'].ilGetBooleanv +ilGetBooleanv.restype = None +ilGetBooleanv.argtypes = [ILenum, POINTER(ILboolean)] +ilGetData = _stdcall_libraries['DevIL'].ilGetData +ilGetData.restype = POINTER(ILubyte) +ilGetData.argtypes = [] +ilGetDXTCData = _stdcall_libraries['DevIL'].ilGetDXTCData +ilGetDXTCData.restype = ILuint +ilGetDXTCData.argtypes = [c_void_p, ILuint, ILenum] +ilGetError = _stdcall_libraries['DevIL'].ilGetError +ilGetError.restype = ILenum +ilGetError.argtypes = [] +ilGetInteger = _stdcall_libraries['DevIL'].ilGetInteger +ilGetInteger.restype = ILint +ilGetInteger.argtypes = [ILenum] +ilGetIntegerv = _stdcall_libraries['DevIL'].ilGetIntegerv +ilGetIntegerv.restype = None +ilGetIntegerv.argtypes = [ILenum, POINTER(ILint)] +ilGetLumpPos = _stdcall_libraries['DevIL'].ilGetLumpPos +ilGetLumpPos.restype = ILuint +ilGetLumpPos.argtypes = [] +ilGetPalette = _stdcall_libraries['DevIL'].ilGetPalette +ilGetPalette.restype = POINTER(ILubyte) +ilGetPalette.argtypes = [] +ilGetString = _stdcall_libraries['DevIL'].ilGetString +ilGetString.restype = STRING +ilGetString.argtypes = [ILenum] +ilHint = _stdcall_libraries['DevIL'].ilHint +ilHint.restype = None +ilHint.argtypes = [ILenum, ILenum] +ilInit = _stdcall_libraries['DevIL'].ilInit +ilInit.restype = None +ilInit.argtypes = [] +ilIsDisabled = _stdcall_libraries['DevIL'].ilIsDisabled +ilIsDisabled.restype = ILboolean +ilIsDisabled.argtypes = [ILenum] +ilIsEnabled = _stdcall_libraries['DevIL'].ilIsEnabled +ilIsEnabled.restype = ILboolean +ilIsEnabled.argtypes = [ILenum] +ILHANDLE = c_void_p +ilDetermineTypeF = _stdcall_libraries['DevIL'].ilDetermineTypeF +ilDetermineTypeF.restype = ILenum +ilDetermineTypeF.argtypes = [ILHANDLE] +ilIsImage = _stdcall_libraries['DevIL'].ilIsImage +ilIsImage.restype = ILboolean +ilIsImage.argtypes = [ILuint] +ilIsValid = _stdcall_libraries['DevIL'].ilIsValid +ilIsValid.restype = ILboolean +ilIsValid.argtypes = [ILenum, STRING] +ilIsValidF = _stdcall_libraries['DevIL'].ilIsValidF +ilIsValidF.restype = ILboolean +ilIsValidF.argtypes = [ILenum, ILHANDLE] +ilIsValidL = _stdcall_libraries['DevIL'].ilIsValidL +ilIsValidL.restype = ILboolean +ilIsValidL.argtypes = [ILenum, c_void_p, ILuint] +ilKeyColour = _stdcall_libraries['DevIL'].ilKeyColour +ilKeyColour.restype = None +ilKeyColour.argtypes = [ILclampf, ILclampf, ILclampf, ILclampf] +ilLoad = _stdcall_libraries['DevIL'].ilLoad +ilLoad.restype = ILboolean +ilLoad.argtypes = [ILenum, STRING] +ilLoadF = _stdcall_libraries['DevIL'].ilLoadF +ilLoadF.restype = ILboolean +ilLoadF.argtypes = [ILenum, ILHANDLE] +ilLoadImage = _stdcall_libraries['DevIL'].ilLoadImage +ilLoadImage.restype = ILboolean +ilLoadImage.argtypes = [STRING] +ilLoadL = _stdcall_libraries['DevIL'].ilLoadL +ilLoadL.restype = ILboolean +ilLoadL.argtypes = [ILenum, c_void_p, ILuint] +ilLoadPal = _stdcall_libraries['DevIL'].ilLoadPal +ilLoadPal.restype = ILboolean +ilLoadPal.argtypes = [STRING] +ILdouble = c_double +ilModAlpha = _stdcall_libraries['DevIL'].ilModAlpha +ilModAlpha.restype = None +ilModAlpha.argtypes = [ILdouble] +ilOriginFunc = _stdcall_libraries['DevIL'].ilOriginFunc +ilOriginFunc.restype = ILboolean +ilOriginFunc.argtypes = [ILenum] +ilOverlayImage = _stdcall_libraries['DevIL'].ilOverlayImage +ilOverlayImage.restype = ILboolean +ilOverlayImage.argtypes = [ILuint, ILint, ILint, ILint] +ilPopAttrib = _stdcall_libraries['DevIL'].ilPopAttrib +ilPopAttrib.restype = None +ilPopAttrib.argtypes = [] +ilPushAttrib = _stdcall_libraries['DevIL'].ilPushAttrib +ilPushAttrib.restype = None +ilPushAttrib.argtypes = [ILuint] +ilRegisterFormat = _stdcall_libraries['DevIL'].ilRegisterFormat +ilRegisterFormat.restype = None +ilRegisterFormat.argtypes = [ILenum] +IL_LOADPROC = WINFUNCTYPE(ILenum, STRING) +ilRegisterLoad = _stdcall_libraries['DevIL'].ilRegisterLoad +ilRegisterLoad.restype = ILboolean +ilRegisterLoad.argtypes = [STRING, IL_LOADPROC] +ilRegisterMipNum = _stdcall_libraries['DevIL'].ilRegisterMipNum +ilRegisterMipNum.restype = ILboolean +ilRegisterMipNum.argtypes = [ILuint] +ilRegisterNumImages = _stdcall_libraries['DevIL'].ilRegisterNumImages +ilRegisterNumImages.restype = ILboolean +ilRegisterNumImages.argtypes = [ILuint] +ilRegisterOrigin = _stdcall_libraries['DevIL'].ilRegisterOrigin +ilRegisterOrigin.restype = None +ilRegisterOrigin.argtypes = [ILenum] +ilRegisterPal = _stdcall_libraries['DevIL'].ilRegisterPal +ilRegisterPal.restype = None +ilRegisterPal.argtypes = [c_void_p, ILuint, ILenum] +IL_SAVEPROC = WINFUNCTYPE(ILenum, STRING) +ilRegisterSave = _stdcall_libraries['DevIL'].ilRegisterSave +ilRegisterSave.restype = ILboolean +ilRegisterSave.argtypes = [STRING, IL_SAVEPROC] +ilRegisterType = _stdcall_libraries['DevIL'].ilRegisterType +ilRegisterType.restype = None +ilRegisterType.argtypes = [ILenum] +ilRemoveLoad = _stdcall_libraries['DevIL'].ilRemoveLoad +ilRemoveLoad.restype = ILboolean +ilRemoveLoad.argtypes = [STRING] +ilRemoveSave = _stdcall_libraries['DevIL'].ilRemoveSave +ilRemoveSave.restype = ILboolean +ilRemoveSave.argtypes = [STRING] +ilResetMemory = _stdcall_libraries['DevIL'].ilResetMemory +ilResetMemory.restype = None +ilResetMemory.argtypes = [] +ilResetRead = _stdcall_libraries['DevIL'].ilResetRead +ilResetRead.restype = None +ilResetRead.argtypes = [] +ilResetWrite = _stdcall_libraries['DevIL'].ilResetWrite +ilResetWrite.restype = None +ilResetWrite.argtypes = [] +ilSave = _stdcall_libraries['DevIL'].ilSave +ilSave.restype = ILboolean +ilSave.argtypes = [ILenum, STRING] +ilSaveF = _stdcall_libraries['DevIL'].ilSaveF +ilSaveF.restype = ILuint +ilSaveF.argtypes = [ILenum, ILHANDLE] +ilSaveImage = _stdcall_libraries['DevIL'].ilSaveImage +ilSaveImage.restype = ILboolean +ilSaveImage.argtypes = [STRING] +ilSaveL = _stdcall_libraries['DevIL'].ilSaveL +ilSaveL.restype = ILuint +ilSaveL.argtypes = [ILenum, c_void_p, ILuint] +ilSavePal = _stdcall_libraries['DevIL'].ilSavePal +ilSavePal.restype = ILboolean +ilSavePal.argtypes = [STRING] +ilSetAlpha = _stdcall_libraries['DevIL'].ilSetAlpha +ilSetAlpha.restype = ILboolean +ilSetAlpha.argtypes = [ILdouble] +ilSetData = _stdcall_libraries['DevIL'].ilSetData +ilSetData.restype = ILboolean +ilSetData.argtypes = [c_void_p] +ilSetDuration = _stdcall_libraries['DevIL'].ilSetDuration +ilSetDuration.restype = ILboolean +ilSetDuration.argtypes = [ILuint] +ilSetInteger = _stdcall_libraries['DevIL'].ilSetInteger +ilSetInteger.restype = None +ilSetInteger.argtypes = [ILenum, ILint] +mAlloc = WINFUNCTYPE(c_void_p, c_uint) +mFree = WINFUNCTYPE(None, c_void_p) +ilSetMemory = _stdcall_libraries['DevIL'].ilSetMemory +ilSetMemory.restype = None +ilSetMemory.argtypes = [mAlloc, mFree] +ilSetPixels = _stdcall_libraries['DevIL'].ilSetPixels +ilSetPixels.restype = None +ilSetPixels.argtypes = [ILint, ILint, ILint, ILuint, ILuint, ILuint, ILenum, ILenum, c_void_p] +fOpenRProc = WINFUNCTYPE(ILHANDLE, STRING) +fCloseRProc = WINFUNCTYPE(None, c_void_p) +fEofProc = WINFUNCTYPE(ILboolean, c_void_p) +fGetcProc = WINFUNCTYPE(ILint, c_void_p) +fReadProc = WINFUNCTYPE(ILint, c_void_p, c_uint, c_uint, c_void_p) +fSeekRProc = WINFUNCTYPE(ILint, c_void_p, c_int, c_int) +fTellRProc = WINFUNCTYPE(ILint, c_void_p) +ilSetRead = _stdcall_libraries['DevIL'].ilSetRead +ilSetRead.restype = None +ilSetRead.argtypes = [fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc] +ilSetString = _stdcall_libraries['DevIL'].ilSetString +ilSetString.restype = None +ilSetString.argtypes = [ILenum, STRING] +fOpenWProc = WINFUNCTYPE(ILHANDLE, STRING) +fCloseWProc = WINFUNCTYPE(None, c_void_p) +fPutcProc = WINFUNCTYPE(ILint, c_ubyte, c_void_p) +fSeekWProc = WINFUNCTYPE(ILint, c_void_p, c_int, c_int) +fTellWProc = WINFUNCTYPE(ILint, c_void_p) +fWriteProc = WINFUNCTYPE(ILint, c_void_p, c_uint, c_uint, c_void_p) +ilSetWrite = _stdcall_libraries['DevIL'].ilSetWrite +ilSetWrite.restype = None +ilSetWrite.argtypes = [fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc] +ilShutDown = _stdcall_libraries['DevIL'].ilShutDown +ilShutDown.restype = None +ilShutDown.argtypes = [] +ilTexImage = _stdcall_libraries['DevIL'].ilTexImage +ilTexImage.restype = ILboolean +ilTexImage.argtypes = [ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, c_void_p] +ilTypeFromExt = _stdcall_libraries['DevIL'].ilTypeFromExt +ilTypeFromExt.restype = ILenum +ilTypeFromExt.argtypes = [STRING] +ilTypeFunc = _stdcall_libraries['DevIL'].ilTypeFunc +ilTypeFunc.restype = ILboolean +ilTypeFunc.argtypes = [ILenum] +ilLoadData = _stdcall_libraries['DevIL'].ilLoadData +ilLoadData.restype = ILboolean +ilLoadData.argtypes = [STRING, ILuint, ILuint, ILuint, ILubyte] +ilLoadDataF = _stdcall_libraries['DevIL'].ilLoadDataF +ilLoadDataF.restype = ILboolean +ilLoadDataF.argtypes = [ILHANDLE, ILuint, ILuint, ILuint, ILubyte] +ilLoadDataL = _stdcall_libraries['DevIL'].ilLoadDataL +ilLoadDataL.restype = ILboolean +ilLoadDataL.argtypes = [c_void_p, ILuint, ILuint, ILuint, ILuint, ILubyte] +ilSaveData = _stdcall_libraries['DevIL'].ilSaveData +ilSaveData.restype = ILboolean +ilSaveData.argtypes = [STRING] +__all__ = ['IL_LOAD_EXT', 'IL_TGA_CREATE_STAMP', 'IL_PAL_RGB24', + 'IL_LIB_JPEG_ERROR', 'IL_DXTC_DATA_FORMAT', + 'IL_TIF_AUTHNAME_STRING', 'ilBindImage', 'IL_PSP', + 'ilConvertPal', 'IL_PAL_BGR24', 'IL_WAL', 'ilLoad', + 'IL_ACTIVE_MIPMAP', 'size_t', 'IL_PSD', 'IL_VERSION', + 'IL_NUM_IMAGES', 'IL_PNG_DESCRIPTION_STRING', + 'IL_INTERNAL_ERROR', 'IL_SEEK_SET', 'ilSetString', + 'ilRemoveLoad', 'IL_RXGB', 'IL_MDL', 'IL_NO_ERROR', + 'ILdouble', 'IL_TGA_ID_STRING', 'IL_IMAGE_SIZE_OF_DATA', + 'ILenum', 'IL_RGBA', 'IL_PALETTE_TYPE', 'fOpenRProc', + 'fReadProc', 'IL_BGR', 'IL_DOOM', 'IL_COMPRESS_RLE', + 'IL_ACTIVE_IMAGE', 'ilRegisterMipNum', 'ilLoadImage', + 'ilGenImages', 'ilSaveImage', 'IL_PAL_BIT', + 'IL_TGA_AUTHCOMMENT_STRING', 'ilLoadDataL', 'IL_TYPE_SET', + 'IL_PNG_INTERLACE', 'IL_DXTC_FORMAT', 'IL_RGB', + 'IL_FORMAT_NOT_SUPPORTED', 'ilSetMemory', 'ilClearImage', + 'IL_IMAGE_DEPTH', 'IL_NUM_MIPMAPS', 'ilModAlpha', + 'IL_BAD_DIMENSIONS', 'IL_IMAGE_CUBEFLAGS', + 'IL_STACK_UNDERFLOW', 'IL_ORIGIN_LOWER_LEFT', + 'IL_USE_KEY_COLOR', 'ilGetBoolean', 'IL_ACTIVE_LAYER', + 'ilRegisterNumImages', 'IL_SHORT', 'ilSave', + 'IL_UNSIGNED_INT', 'IL_FASTEST', 'IL_GIF', 'IL_FLOAT', + 'ilSaveData', 'IL_KEEP_DXTC_DATA', 'IL_FILE_WRITE_ERROR', + 'ILuint', 'IL_IMAGE_WIDTH', 'IL_DEFAULT_ON_FAIL', + 'ilLoadL', 'ilDeleteImages', 'IL_ATI1N', 'ilOverlayImage', + 'IL_LBM', 'IL_ORIGIN_MODE', 'ILubyte', 'IL_NEU_QUANT', + 'ilCompressFunc', 'IL_VENDOR', 'ilGetBooleanv', + 'ilSetAlpha', 'ilTypeFunc', 'IL_SEEK_END', 'IL_MNG', + 'IL_TIF', 'ILHANDLE', 'IL_DOUBLE', 'IL_VERSION_NUM', + 'ilGetDXTCData', 'IL_PAL_RGBA32', + 'IL_TIF_DESCRIPTION_STRING', 'IL_PALETTE_BPP', + 'ilResetRead', 'IL_JP2', 'IL_DXT4', 'ilLoadData', + 'ilGetLumpPos', 'IL_DXT1', 'IL_PAL_RGB32', 'IL_DXT3', + 'IL_PIX', 'IL_LESS_MEM', 'IL_PALETTE_BASE_TYPE', + 'IL_NUM_LAYERS', 'IL_BYTE', 'ilApplyProfile', + 'ilPopAttrib', 'fTellRProc', 'ilFormatFunc', + 'IL_CUBEMAP_POSITIVEZ', 'IL_CUBEMAP_POSITIVEY', + 'IL_CUBEMAP_POSITIVEX', 'fGetcProc', 'IL_PAL_NONE', + 'ilGetPalette', 'IL_JPG_PROGRESSIVE', 'ilLoadF', + 'fCloseRProc', 'IL_PIC', 'ilGetString', 'IL_LOADFAIL_BIT', + 'IL_UNSIGNED_SHORT', 'IL_JFIF', 'IL_IMAGE_DURATION', + 'ilGetError', 'IL_PAL_BGRA32', 'IL_PCD', 'IL_TGA', + 'ILboolean', 'ilSetInteger', 'ilIsValidF', + 'IL_COLOUR_INDEX', 'IL_ILLEGAL_FILE_VALUE', + 'IL_OUT_FORMAT_SAME', 'IL_UNSIGNED_BYTE', 'IL_PCX', + 'IL_HDR', 'ilGetAlpha', 'fTellWProc', 'IL_STACK_OVERFLOW', + 'IL_JPG_QUALITY', 'IL_VERSION_1_7_5', 'ilActiveLayer', + 'IL_SUB_MIPMAP', 'IL_FALSE', 'ilCopyPixels', + 'IL_FORMAT_MODE', 'ilIsValid', 'IL_LIB_GIF_ERROR', + 'ilRegisterSave', 'IL_USE_COMPRESSION', 'ilGetIntegerv', + 'IL_DXT2', 'IL_VTF', 'IL_PXR', 'IL_SEEK_CUR', 'IL_PNG', + 'ilShutDown', 'IL_OUT_OF_MEMORY', 'ILsizei', + 'IL_IMAGE_CHANNELS', 'ilApplyPal', 'IL_TRUE', + 'IL_COMPRESSION_HINT', 'IL_INVALID_VALUE', + 'IL_FILE_ALREADY_EXISTS', 'IL_JPG', 'mFree', 'ilGenImage', + 'IL_CUBEMAP_NEGATIVEZ', 'IL_CUBEMAP_NEGATIVEY', + 'IL_CUBEMAP_NEGATIVEX', 'IL_DCX', 'ilDisable', 'ilInit', + 'IL_ORIGIN_SET', 'IL_DOOM_FLAT', 'ilDefaultImage', + 'IL_IMAGE_BYTES_PER_PIXEL', 'IL_IMAGE_BITS_PER_PIXEL', + 'IL_USE_KEY_COLOUR', 'IL_SUB_NEXT', 'ilDetermineTypeF', + 'IL_PNM', 'ilIsDisabled', 'IL_LIB_PNG_ERROR', + 'IL_MEM_SPEED_HINT', 'IL_DDS', 'IL_COLOR_INDEX', 'IL_EXIF', + 'ilGetData', 'IL_JNG', 'IL_IMAGE_HEIGHT', 'ilLoadPal', + 'ilLoadDataF', 'IL_INVALID_FILE_HEADER', 'IL_BGRA', + 'ilSaveF', 'ilRegisterLoad', 'ilKeyColour', + 'IL_PNG_ALPHA_INDEX', 'IL_CONV_PAL', + 'IL_INVALID_EXTENSION', 'IL_TGA_RLE', 'IL_INT', + 'IL_IMAGE_ORIGIN', 'ilGetInteger', 'IL_IMAGE_BPC', + 'IL_EOF', 'IL_UNKNOWN_ERROR', 'IL_COMPRESS_MODE', + 'IL_COMPRESS_BIT', 'IL_ORIGIN_BIT', 'ilCloneCurImage', + 'ilRegisterFormat', 'ilSetWrite', 'ilActiveMipmap', + 'IL_NEU_QUANT_SAMPLE', 'IL_DONT_CARE', + 'IL_MAX_QUANT_INDEXS', 'IL_DXT_NO_COMP', 'IL_IMAGE_BPP', + 'ilBlit', 'IL_3DC', 'ilSetDuration', 'IL_TYPE_UNKNOWN', + 'IL_COMPRESS_NONE', 'mAlloc', 'ilActiveImage', + 'IL_PALETTE_SIZE', 'ilCreateSubImage', 'ilIsEnabled', + 'ilSetPixels', 'IL_FILE_MODE', 'ilTexImage', + 'IL_INVALID_ENUM', 'IL_COMPRESS_ZLIB', 'IL_SGI_RLE', + 'IL_TYPE_BIT', 'IL_BLIT_BLEND', 'IL_JPG_SAVE_FORMAT', + 'ilPushAttrib', 'IL_COULD_NOT_OPEN_FILE', + 'IL_FILE_OVERWRITE', 'IL_LIB_MNG_ERROR', 'IL_SAVEPROC', + 'IL_FORMAT_SPECIFIC_BIT', 'IL_QUANTIZATION_MODE', + 'ilSavePal', 'fSeekWProc', 'IL_SAVE_INTERLACED', + 'ilRegisterOrigin', 'IL_CUR_IMAGE', 'IL_WU_QUANT', + 'IL_LUMINANCE', 'fCloseWProc', 'IL_ICO', 'IL_IMAGE_OFFX', + 'IL_IMAGE_OFFY', 'IL_JASC_PAL', 'IL_IMAGE_PLANESIZE', + 'ilDeleteImage', 'IL_IMAGE_FORMAT', 'ilOriginFunc', + 'ilSetRead', 'IL_FORMAT_BIT', 'IL_ORIGIN_UPPER_LEFT', + 'IL_FILE_READ_ERROR', 'IL_NO_COMPRESSION', + 'IL_TIF_HOSTCOMPUTER_STRING', 'ilIsValidL', 'IL_SGI', + 'IL_LIB_JP2_ERROR', 'ilCopyImage', 'ilEnable', + 'ilRegisterType', 'IL_PCD_PICNUM', 'IL_SAVE_EXT', + 'IL_FILE_BIT', 'IL_BMP', 'IL_RAW', 'fEofProc', + 'ilRegisterPal', 'IL_BMP_RLE', 'IL_TGA_AUTHNAME_STRING', + 'IL_TIF_DOCUMENTNAME_STRING', 'IL_FORMAT_SET', + 'IL_TYPE_MODE', 'IL_SUB_LAYER', 'ilRemoveSave', + 'IL_LUMINANCE_ALPHA', 'IL_ILLEGAL_OPERATION', 'IL_EXR', + 'IL_DXT5', 'IL_CUT', 'IL_PAL_BGR32', + 'IL_PNG_AUTHNAME_STRING', 'IL_INTERLACE_MODE', + 'IL_IMAGE_TYPE', 'fSeekRProc', 'IL_CHEAD_HEADER_STRING', + 'fWriteProc', 'IL_PNG_TITLE_STRING', 'IL_COMPRESS_LZO', + 'ilSaveL', 'ilSetData', 'ilConvertImage', 'ILclampf', + 'ILint', 'IL_PALETTE_NUM_COLS', 'IL_INVALID_PARAM', + 'ilClearColour', 'ilTypeFromExt', 'fPutcProc', + 'IL_ALL_ATTRIB_BITS', 'IL_CHEAD', 'ilResetWrite', + 'IL_INVALID_CONVERSION', 'IL_LIF', 'IL_XPM', 'IL_ICNS', + 'IL_HALF', 'ilHint', 'fOpenWProc', 'ilIsImage', + 'IL_LIB_TIFF_ERROR', 'IL_ALPHA', 'IL_WDP', 'ilResetMemory', + 'IL_LOADPROC'] diff --git a/libs/DevIL-1.7.8/projects/python/DevIL.pyd b/libs/DevIL-1.7.8/projects/python/DevIL.pyd new file mode 100644 index 00000000..ac6e92b9 Binary files /dev/null and b/libs/DevIL-1.7.8/projects/python/DevIL.pyd differ diff --git a/libs/DevIL-1.7.8/projects/python/deviltest.py b/libs/DevIL-1.7.8/projects/python/deviltest.py new file mode 100644 index 00000000..3a07f2f3 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/python/deviltest.py @@ -0,0 +1,44 @@ +import pygame +from OpenGL.GL import * +from OpenGL.GLU import * +import DevIL + +pygame.init() +screen = pygame.display.set_mode((800, 600), pygame.OPENGL | pygame.DOUBLEBUF) +pygame.display.set_caption('Devil Test') + +glDisable(GL_DEPTH_TEST) +glMatrixMode(GL_PROJECTION) +glLoadIdentity() +gluOrtho2D(0, 800, 0, 600) +glMatrixMode(GL_MODELVIEW) +glLoadIdentity() +glEnable(GL_TEXTURE_2D) + +DevIL.ilInit() +DevIL.ilutRenderer(DevIL.ILUT_OPENGL) +texture = DevIL.ilutGLLoadImage('devil.gif') +glEnable(GL_TEXTURE_2D) +glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) +glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) +glBindTexture(GL_TEXTURE_2D, texture) + +while 1: + event = pygame.event.poll() + if event.type == pygame.QUIT: + break + + glClear(GL_COLOR_BUFFER_BIT) + + glBegin(GL_QUADS) + glTexCoord2f(0, 0); glVertex2f(-400, -400); + glTexCoord2f(5, 0); glVertex2f(1200, -400) + glTexCoord2f(5, 5); glVertex2f(1200, 1000) + glTexCoord2f(0, 5); glVertex2f(-400, 1000) + glEnd() + + glTranslatef(400, 300, 0) + glRotatef(0.5, 0, 0, 1) + glTranslatef(-400, -300, 0) + + pygame.display.flip() diff --git a/libs/DevIL-1.7.8/projects/python/readme.txt b/libs/DevIL-1.7.8/projects/python/readme.txt new file mode 100644 index 00000000..5ce50384 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/python/readme.txt @@ -0,0 +1,19 @@ +Versions of Python since 2.5 include ctypes, easily letting you interface directly with a Windows .dll or a Linux .so. Two .py files are included that let you do this: DevIL-Windows.py and DevIL-Linux.py. + +For more information on ctypes, visit http://starship.python.net/crew/theller/ctypes/ . + + + + + + + +Here is the text for the old version of the DevIL Python wrapper (still included at the moment): + +The test program require Pygame and PyOpenGL to work but +you don't need them to use the library. You can find the +needed package at: + +Pygame - http://www.pygame.org +PyOpenGL - http://pyopengl.sourceforge.net + diff --git a/libs/DevIL-1.7.8/projects/python/test.py b/libs/DevIL-1.7.8/projects/python/test.py new file mode 100644 index 00000000..0f8217ca --- /dev/null +++ b/libs/DevIL-1.7.8/projects/python/test.py @@ -0,0 +1,15 @@ +from DevIL import * + +ilInit() +image = ilGenImages(1) +ilBindImage(image) + +ilLoadImage('devil.gif') + +data = ilGetData() +for i in range(len(data)): + if data[i] == 255: + data[i] = 0 +ilSetData(data) + +ilSaveImage('test.tga') diff --git a/libs/DevIL-1.7.8/projects/visual basic/VBreadme.txt b/libs/DevIL-1.7.8/projects/visual basic/VBreadme.txt new file mode 100644 index 00000000..c28b9947 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/visual basic/VBreadme.txt @@ -0,0 +1,86 @@ +Using DevIL from Visual Basic 6.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +The idea: + +1) Start by installing the DLLs. + +2) In your VB-project, add the .BAS files that you need as modules. + +3) Just use the subs/functions and constants. + + + +The buts: + +1) DevIL's data types have been converted to native VB-types. This should generally + work alright, except that + + a) VB only knows unsigned bytes and signed integers/longs. So sometimes a value is + defined as signed in VB where it is actually unsigned, and vice-versa. + + b) DevIL's ILboolean type has been converted to byte. Don't treat these as VB + booleans; only use them to compare to IL_TRUE and IL_FALSE. + +2) Subs/functions that take a pointer to an array as parameter have been declared to + take a ByRef Element As ElementType. You should define an array of ElementType (not + array of variants!), and pass the first element to the function. The function will + then access the whole array. + + Example: Dim Names(2) As Long + ilGenImages 3, Names(0) ' Fills all 3 elements of Names + + (If you only use a single element, you do not really need an array. You can just + pass a variable of the element type.) + + The following subs/functions uses arrays of byte (binary data): + + ilCopyPixels (Outputs data. Make sure your array is big enough!) + ilIsValidL + ilLoadL + ilRegisterPal + ilSetPixels + ilTexImage + + ilTexImage is a special case, because you might want to pass it a null-pointer + instead of actual data. This cannot be done with the same VB declaration, so I've + made ilTexImage0 for this purpose. Pass ilTexImage0 a zero as the last parameter. + + Other functions that operate on arrays: + + ilDeleteImages array of long (image "names") + ilGenImages array of long (image "names") + +3) Functions that return pointers have been converted to return a long. But they are + effectively useless in VB. These are: + + ilGetData + ilGetPalette + ilGetString + iluErrorString + iluGetString + ilutGetString + ilutGetPaddedData + +4) ilutGetBmpInfo and all ilutD3D8-functions are not available. + +5) You will generally not be able to implement the call-back functions in VB, because + they must be able to handle pointers. But the call-back functions are only used if + you want to modify the way DevIL loads and saves images, and usually you won't need + to do that. + +6) The old VB-examples supplied by Timo Heister don't seem to work. I've yet to write + some new ones. + +7) The VB-headers have only seen minimal testing. Bugs may lure on the unwary. + (I'm especially nervous about iluGetImageInfo). + +8) The header-files are created specificly for VB 6.0. I very much doubt that they will + be of any use in VB.net. + + +Feel free to send me any comments. + + +Rune Kock (rune@vupti.com) \ No newline at end of file diff --git a/libs/DevIL-1.7.8/projects/visual basic/il.bas b/libs/DevIL-1.7.8/projects/visual basic/il.bas new file mode 100644 index 00000000..68fee2f2 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/visual basic/il.bas @@ -0,0 +1,378 @@ +Attribute VB_Name = "Module1" +'----------------------------------------------------------------------------- +' +' ImageLib Sources +' Copyright (C) 2000-2002 by Denton Woods +' Converted from il.h by Rune Kock (rune@vupti.com) +' based on the earlier conversion by Timo Heister (Timo-Heister@gmx.de) +' Last modified: 22 June 2002, based on il.h dated 06/22/2002 +' +' Filename: il.bas +' +' Description: The main include file for DevIL +' +'----------------------------------------------------------------------------- + + +' I've converted the types as follows. I have not dared use user-defined types, as I +' don't know how VB handles them internally. This means, unfortunately, that the headers +' are less informative than the original. So refer to il.h to see the original types. + +' ILenum long +' ILboolean byte +' ILbitfield long +' ILbyte byte +' ILshort integer +' ILint long +' ILsizei long +' ILubyte byte +' ILushort integer +' ILuint long +' ILfloat single +' ILclampf single +' ILdouble double +' ILclampd double +' ILvoid n/a + +Option Explicit + +Public Const IL_FALSE = 0 +Public Const IL_TRUE = 1 + + +' Matches OpenGL's right now. +Public Const IL_COLOUR_INDEX = &H1900 +Public Const IL_COLOR_INDEX = &H1900 +Public Const IL_RGB = &H1907 +Public Const IL_RGBA = &H1908 +Public Const IL_BGR = &H80E0 +Public Const IL_BGRA = &H80E1 +Public Const IL_LUMINANCE = &H1909 + +Public Const IL_BYTE = &H1400 +Public Const IL_UNSIGNED_BYTE = &H1401 +Public Const IL_SHORT = &H1402 +Public Const IL_UNSIGNED_SHORT = &H1403 +Public Const IL_INT = &H1404 +Public Const IL_UNSIGNED_INT = &H1405 +Public Const IL_FLOAT = &H1406 +Public Const IL_DOUBLE = &H140A + +Public Const IL_VENDOR = &H1F00 + + +' +' IL-specific public const's +' + +Public Const IL_VERSION_1_6_0 = 1 +Public Const IL_VERSION = 160 +Public Const IL_LOAD_EXT = &H1F01 +Public Const IL_SAVE_EXT = &H1F02 + + +' Attribute Bits +Public Const IL_ORIGIN_BIT = &H1 +Public Const IL_FILE_BIT = &H2 +Public Const IL_PAL_BIT = &H4 +Public Const IL_FORMAT_BIT = &H8 +Public Const IL_TYPE_BIT = &H10 +Public Const IL_COMPRESS_BIT = &H20 +Public Const IL_LOADFAIL_BIT = &H40 +Public Const IL_FORMAT_SPECIFIC_BIT = &H80 +Public Const IL_ALL_ATTRIB_BITS = &HFFFFF + +' Palette types +Public Const IL_PAL_NONE = &H400 +Public Const IL_PAL_RGB24 = &H401 +Public Const IL_PAL_RGB32 = &H402 +Public Const IL_PAL_RGBA32 = &H403 +Public Const IL_PAL_BGR24 = &H404 +Public Const IL_PAL_BGR32 = &H405 +Public Const IL_PAL_BGRA32 = &H406 + +' Image types +Public Const IL_TYPE_UNKNOWN = &H0 +Public Const IL_BMP = &H420 +Public Const IL_CUT = &H421 +Public Const IL_DOOM = &H422 +Public Const IL_DOOM_FLAT = &H423 +Public Const IL_ICO = &H424 +Public Const IL_JPG = &H425 +Public Const IL_LBM = &H426 +Public Const IL_PCD = &H427 +Public Const IL_PCX = &H428 +Public Const IL_PIC = &H429 +Public Const IL_PNG = &H42A +Public Const IL_PNM = &H42B +Public Const IL_SGI = &H42C +Public Const IL_TGA = &H42D +Public Const IL_TIF = &H42E +Public Const IL_CHEAD = &H42F +Public Const IL_RAW = &H430 +Public Const IL_MDL = &H431 +Public Const IL_WAL = &H432 +Public Const IL_OIL = &H433 +Public Const IL_LIF = &H434 +Public Const IL_MNG = &H435 +Public Const IL_JNG = &H435 +Public Const IL_GIF = &H436 +Public Const IL_DDS = &H437 +Public Const IL_DCX = &H438 +Public Const IL_PSD = &H439 +Public Const IL_EXIF = &H43A +Public Const IL_PSP = &H43B +Public Const IL_PIX = &H43C +Public Const IL_PXR = &H43D +Public Const IL_XPM = &H43E + +Public Const IL_JASC_PAL = &H475 + +' Error Types +Public Const IL_NO_ERROR = &H0 +Public Const IL_INVALID_ENUM = &H501 +Public Const IL_OUT_OF_MEMORY = &H502 +Public Const IL_FORMAT_NOT_SUPPORTED = &H503 +Public Const IL_INTERNAL_ERROR = &H504 +Public Const IL_INVALID_VALUE = &H505 +Public Const IL_ILLEGAL_OPERATION = &H506 +Public Const IL_ILLEGAL_FILE_VALUE = &H507 +Public Const IL_INVALID_FILE_HEADER = &H508 +Public Const IL_INVALID_PARAM = &H509 +Public Const IL_COULD_NOT_OPEN_FILE = &H50A +Public Const IL_INVALID_EXTENSION = &H50B +Public Const IL_FILE_ALREADY_EXISTS = &H50C +Public Const IL_OUT_FORMAT_SAME = &H50D +Public Const IL_STACK_OVERFLOW = &H50E +Public Const IL_STACK_UNDERFLOW = &H50F +Public Const IL_INVALID_CONVERSION = &H510 +Public Const IL_BAD_DIMENSIONS = &H511 +Public Const IL_FILE_READ_ERROR = &H512 + +Public Const IL_LIB_GIF_ERROR = &H5E1 +Public Const IL_LIB_JPEG_ERROR = &H5E2 +Public Const IL_LIB_PNG_ERROR = &H5E3 +Public Const IL_LIB_TIFF_ERROR = &H5E4 +Public Const IL_LIB_MNG_ERROR = &H5E5 +Public Const IL_UNKNOWN_ERROR = &H5FF + +' Origin Definitions +Public Const IL_ORIGIN_SET = &H600 +Public Const IL_ORIGIN_LOWER_LEFT = &H601 +Public Const IL_ORIGIN_UPPER_LEFT = &H602 +Public Const IL_ORIGIN_MODE = &H603 + +' Format and Type Mode Definitions +Public Const IL_FORMAT_SET = &H610 +Public Const IL_FORMAT_MODE = &H611 +Public Const IL_TYPE_SET = &H612 +Public Const IL_TYPE_MODE = &H613 + +' File definitions +Public Const IL_FILE_OVERWRITE = &H620 +Public Const IL_FILE_MODE = &H621 + +' Palette definitions +Public Const IL_CONV_PAL = &H630 + +' Load fail definitions +Public Const IL_DEFAULT_ON_FAIL = &H632 + +' Key colour definitions +Public Const IL_USE_KEY_COLOUR = &H635 +Public Const IL_USE_KEY_COLOR = &H635 + +' Interlace definitions +Public Const IL_SAVE_INTERLACED = &H639 +Public Const IL_INTERLACE_MODE = &H63A + +' Quantization definitions +Public Const IL_QUANTIZATION_MODE = &H640 +Public Const IL_WU_QUANT = &H641 +Public Const IL_NEU_QUANT = &H642 +Public Const IL_NEU_QUANT_SAMPLE = &H643 + +' Hints +Public Const IL_FASTEST = &H660 +Public Const IL_LESS_MEM = &H661 +Public Const IL_DONT_CARE = &H662 +Public Const IL_MEM_SPEED_HINT = &H665 +Public Const IL_USE_COMPRESSION = &H666 +Public Const IL_NO_COMPRESSION = &H667 +Public Const IL_COMPRESSION_HINT = &H668 + +' Subimage types +Public Const IL_SUB_NEXT = &H680 +Public Const IL_SUB_MIPMAP = &H681 +Public Const IL_SUB_LAYER = &H682 + +' Compression definitions (mostly for .oil) +Public Const IL_COMPRESS_MODE = &H700 +Public Const IL_COMPRESS_NONE = &H701 +Public Const IL_COMPRESS_RLE = &H702 +Public Const IL_COMPRESS_LZO = &H703 +Public Const IL_COMPRESS_ZLIB = &H704 + +' File format-specific values +Public Const IL_TGA_CREATE_STAMP = &H710 +Public Const IL_JPG_QUALITY = &H711 +Public Const IL_PNG_INTERLACE = &H712 +Public Const IL_TGA_RLE = &H713 +Public Const IL_BMP_RLE = &H714 +Public Const IL_SGI_RLE = &H715 +Public Const IL_TGA_ID_STRING = &H717 +Public Const IL_TGA_AUTHNAME_STRING = &H718 +Public Const IL_TGA_AUTHCOMMENT_STRING = &H719 +Public Const IL_PNG_AUTHNAME_STRING = &H71A +Public Const IL_PNG_TITLE_STRING = &H71B +Public Const IL_PNG_DESCRIPTION_STRING = &H71C +Public Const IL_TIF_DESCRIPTION_STRING = &H71D +Public Const IL_TIF_HOSTCOMPUTER_STRING = &H71E +Public Const IL_TIF_DOCUMENTNAME_STRING = &H71F +Public Const IL_TIF_AUTHNAME_STRING = &H720 +Public Const IL_JPG_SAVE_FORMAT = &H721 +Public Const IL_CHEAD_HEADER_STRING = &H722 +Public Const IL_PCD_PICNUM = &H723 + +' DXTC definitions +Public Const IL_DXTC_FORMAT = &H705 +Public Const IL_DXT1 = &H706 +Public Const IL_DXT2 = &H707 +Public Const IL_DXT3 = &H708 +Public Const IL_DXT4 = &H709 +Public Const IL_DXT5 = &H70A +Public Const IL_DXT_NO_COMP = &H70B +Public Const IL_KEEP_DXTC_DATA = &H70C +Public Const IL_DXTC_DATA_FORMAT = &H70D + +' Cube map definitions +Public Const IL_CUBEMAP_POSITIVEX = &H400 +Public Const IL_CUBEMAP_NEGATIVEX = &H800 +Public Const IL_CUBEMAP_POSITIVEY = &H1000 +Public Const IL_CUBEMAP_NEGATIVEY = &H2000 +Public Const IL_CUBEMAP_POSITIVEZ = &H4000 +Public Const IL_CUBEMAP_NEGATIVEZ = &H8000 + +' Values +Public Const IL_VERSION_NUM = &HDE2 +Public Const IL_IMAGE_WIDTH = &HDE4 +Public Const IL_IMAGE_HEIGHT = &HDE5 +Public Const IL_IMAGE_DEPTH = &HDE6 +Public Const IL_IMAGE_SIZE_OF_DATA = &HDE7 +Public Const IL_IMAGE_BPP = &HDE8 +Public Const IL_IMAGE_BYTES_PER_PIXEL = &HDE8 +Public Const IL_IMAGE_BITS_PER_PIXEL = &HDE9 +Public Const IL_IMAGE_FORMAT = &HDEA +Public Const IL_IMAGE_TYPE = &HDEB +Public Const IL_PALETTE_TYPE = &HDEC +Public Const IL_PALETTE_SIZE = &HDED +Public Const IL_PALETTE_BPP = &HDEE +Public Const IL_PALETTE_NUM_COLS = &HDEF +Public Const IL_PALETTE_BASE_TYPE = &HDF0 +Public Const IL_NUM_IMAGES = &HDF1 +Public Const IL_NUM_MIPMAPS = &HDF2 +Public Const IL_NUM_LAYERS = &HDF3 +Public Const IL_ACTIVE_IMAGE = &HDF4 +Public Const IL_ACTIVE_MIPMAP = &HDF5 +Public Const IL_ACTIVE_LAYER = &HDF6 +Public Const IL_CUR_IMAGE = &HDF7 +Public Const IL_IMAGE_DURATION = &HDF8 +Public Const IL_IMAGE_PLANESIZE = &HDF9 +Public Const IL_IMAGE_BPC = &HDFA +Public Const IL_IMAGE_OFFX = &HDFB +Public Const IL_IMAGE_OFFY = &HDFC +Public Const IL_IMAGE_CUBEFLAGS = &HDFD + +Public Const IL_SEEK_SET = 0 +Public Const IL_SEEK_CUR = 1 +Public Const IL_SEEK_END = 2 +Public Const IL_EOF = -1 + + +' ImageLib Functions +Public Declare Function ilActiveImage Lib "devil" (ByVal Number As Long) As Byte +Public Declare Function ilActiveLayer Lib "devil" (ByVal Number As Long) As Byte +Public Declare Function ilActiveMipmap Lib "devil" (ByVal Number As Long) As Byte +Public Declare Function ilApplyPal Lib "devil" (ByVal FileName As String) As Byte +Public Declare Function ilApplyProfile Lib "devil" (ByVal InProfile As String, ByVal OutProfile As String) As Byte +Public Declare Sub ilBindImage Lib "devil" (ByVal Image As Long) +Public Declare Function ilBlit Lib "devil" (ByVal Src As Long, ByVal DestX As Long, ByVal DestY As Long, ByVal DestZ As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal SrcZ As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long) As Byte +Public Declare Sub ilClearColour Lib "devil" (ByVal Red As Single, ByVal Green As Single, ByVal Blue As Single, ByVal Alpha As Single) +Public Declare Function ilClearImage Lib "devil" () As Byte +Public Declare Function ilCloneCurImage Lib "devil" () As Long +Public Declare Function ilCompressFunc Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilConvertImage Lib "devil" (ByVal DestFormat As Long, ByVal DestType As Long) As Byte +Public Declare Function ilConvertPal Lib "devil" (ByVal DestFormat As Long) As Byte +Public Declare Function ilCopyImage Lib "devil" (ByVal Src As Long) As Byte +Public Declare Sub ilCopyPixels Lib "devil" (ByVal XOff As Long, ByVal YOff As Long, ByVal ZOff As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal OutFormat As Long, ByVal OutType As Long, ByRef OutData As Byte) +Public Declare Function ilCreateSubImage Lib "devil" (ByVal IType As Long, ByVal Num As Long) As Long +Public Declare Function ilDefaultImage Lib "devil" () As Boolean +Public Declare Sub ilDeleteImages Lib "devil" (ByVal Num As Long, ByRef Images As Long) +Public Declare Function ilDisable Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilEnable Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilFormatFunc Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Sub ilGenImages Lib "devil" (ByVal Num As Long, ByRef Images As Long) +Public Declare Function ilGetBoolean Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Sub ilGetBooleanv Lib "devil" (ByVal Mode As Long, ByRef Param As Byte) +Public Declare Function ilGetData Lib "devil" () As Long +Public Declare Function ilGetError Lib "devil" () As Long +Public Declare Function ilGetInteger Lib "devil" (ByVal Mode As Long) As Long +Public Declare Sub ilGetIntegerv Lib "devil" (ByVal Mode As Long, ByRef Param As Long) +Public Declare Function ilGetLumpPos Lib "devil" () As Long +Public Declare Function ilGetPalette Lib "devil" () As Long +Public Declare Function ilGetString Lib "devil" (StringName As Long) As Long +Public Declare Sub ilHint Lib "devil" (ByVal Target As Long, ByVal Mode As Long) +Public Declare Sub ilInit Lib "devil" () +Public Declare Function ilIsDisabled Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilIsEnabled Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilIsImage Lib "devil" (ByVal Image As Long) As Byte +Public Declare Function ilIsValid Lib "devil" (ByVal IType As Long, ByVal FileName As String) As Byte +Public Declare Function ilIsValidF Lib "devil" (ByVal IType As Long, ByVal File As Long) As Byte +Public Declare Function ilIsValidL Lib "devil" (ByVal IType As Long, ByRef Lump As Byte, ByVal Size As Long) As Byte +Public Declare Sub ilKeyColour Lib "devil" (ByVal Red As Single, ByVal Green As Single, ByVal Blue As Single, ByVal Alpha As Single) +Public Declare Function ilLoad Lib "devil" (ByVal IType As Long, ByVal FileName As String) As Byte +Public Declare Function ilLoadF Lib "devil" (ByVal IType As Long, ByVal File As Long) As Byte +Public Declare Function ilLoadImage Lib "devil" (ByVal FileName As String) As Byte +Public Declare Function ilLoadL Lib "devil" (ByVal IType As Long, ByRef Lump As Byte, ByVal Size As Long) +Public Declare Function ilLoadPal Lib "devil" (ByVal FileName As String) As Byte +Public Declare Function ilOriginFunc Lib "devil" (ByVal Mode As Long) As Byte +Public Declare Function ilOverlayImage Lib "devil" (ByVal Src As Long, ByVal XCoord As Long, ByVal YCoord As Long, ByVal ZCoord As Long) As Byte +Public Declare Sub ilPopAttrib Lib "devil" () +Public Declare Sub ilPushAttrib Lib "devil" (ByVal Bits As Long) +Public Declare Sub ilRegisterFormat Lib "devil" (ByVal Format As Long) +Public Declare Function ilRegisterLoad Lib "devil" (ByVal Ext As String, ByVal LoadProc As Long) As Byte +Public Declare Function ilRegisterMipNum Lib "devil" (ByVal Num As Long) As Byte +Public Declare Function ilRegisterNumImages Lib "devil" (ByVal Num As Long) As Byte +Public Declare Sub ilRegisterOrigin Lib "devil" (ByVal Origin As Long) +Public Declare Sub ilRegisterPal Lib "devil" (ByRef Pal As Byte, ByVal Size As Long, ByVal IType As Long) +Public Declare Function ilRegisterSave Lib "devil" (ByVal Ext As String, ByVal SaveProc As Long) As Byte +Public Declare Sub ilRegisterType Lib "devil" (ByVal IType As Long) +Public Declare Function ilRemoveLoad Lib "devil" (ByVal Ext As String) As Byte +Public Declare Function ilRemoveSave Lib "devil" (ByVal Ext As String) As Byte +Public Declare Sub ilResetRead Lib "devil" () +Public Declare Sub ilResetWrite Lib "devil" () +Public Declare Function ilSave Lib "devil" (ByVal IType As Long, ByVal FileName As String) As Byte +Public Declare Function ilSaveF Lib "devil" (ByVal IType As Long, ByVal File As Long) As Byte +Public Declare Function ilSaveImage Lib "devil" (ByVal FileName As String) As Byte +Public Declare Function ilSaveL Lib "devil" (ByVal IType As Long, ByRef Lump As Byte, ByVal Size As Long) As Byte +Public Declare Function ilSavePal Lib "devil" (ByVal FileName As String) As Byte +Public Declare Function ilSetData Lib "devil" (ByRef Data As Byte) As Byte +Public Declare Function ilSetDuration Lib "devil" (ByVal Duration As Long) As Byte +Public Declare Sub ilSetInteger Lib "devil" (ByVal Mode As Long, ByVal Param As Long) +Public Declare Sub ilSetPixels Lib "devil" (ByVal XOff As Long, ByVal YOff As Long, ByVal ZOff As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Format As Long, ByVal IType As Long, ByRef Data As Byte) +Public Declare Sub ilSetRead Lib "devil" (ByVal fOpenRProc As Long, ByVal fCloseRProc As Long, ByVal fEofProc As Long, ByVal fGetcProc As Long, ByVal fReadProc As Long, ByVal fSeekRProc As Long, ByVal fTellRProc As Long) +Public Declare Sub ilSetString Lib "devil" (ByVal Mode As Long, ByVal FileName As String) +Public Declare Sub ilSetWrite Lib "devil" (ByVal fOpenWProc As Long, ByVal fCloseWProc As Long, ByVal fPutcProc As Long, ByVal fSeekWProc As Long, ByVal fTellWProc As Long, ByVal fWriteProc As Long) +Public Declare Function ilTexImage Lib "devil" (ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Bpp As Byte, ByVal Format As Long, ByVal IType As Long, ByRef Data As Byte) As Byte +Public Declare Function ilTexImage0 Lib "devil" Alias "ilTexImage" (ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Bpp As Byte, ByVal Format As Long, ByVal IType As Long, ByVal DataPointer As Long) As Byte +' used if you want to pass a NULL-pointer (zero). +Public Declare Function ilTypeFunc Lib "devil" (ByVal Mode As Long) As Byte + +Public Declare Function ilLoadData Lib "devil" (ByVal FileName As String, ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Bpp As Byte) As Byte +Public Declare Function ilLoadDataF Lib "devil" (ByVal File As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Bpp As Byte) As Byte +Public Declare Function ilLoadDataL Lib "devil" (ByRef Lump As Long, ByVal Size As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long, ByVal Bpp As Byte) As Byte +Public Declare Function ilSaveData Lib "devil" (ByVal FileName As String) As Byte + +' For all those weirdos that spell "colour" without the 'u'. +Public Declare Sub ilClearColor Lib "devil" Alias "ilClearColour" (ByVal Red As Single, ByVal Green As Single, ByVal Blue As Single, ByVal Alpha As Single) +Public Declare Sub ilKeyColor Lib "devil" Alias "ilKeyColour" (ByVal Red As Single, ByVal Green As Single, ByVal Blue As Single, ByVal Alpha As Single) diff --git a/libs/DevIL-1.7.8/projects/visual basic/ilu.bas b/libs/DevIL-1.7.8/projects/visual basic/ilu.bas new file mode 100644 index 00000000..7de6e558 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/visual basic/ilu.bas @@ -0,0 +1,162 @@ +Attribute VB_Name = "DevIL_manipulate" +'----------------------------------------------------------------------------- +' +' ImageLib Utility Sources +' Copyright (C) 2000-2002 by Denton Woods +' Converted from ilu.h by Rune Kock (rune@vupti.com) +' based on the earlier conversion by Timo Heister (Timo-Heister@gmx.de) +' Last modified: 22 June 2002, based on ilu.h dated 06/22/2002 +' +' Filename: ilu.bas +' +' Description: The main include file for ILU +' +'----------------------------------------------------------------------------- + +' I've converted the types as follows. I have not dared use user-defined types, as I +' don't know how VB handles them internally. This means, unfortunately, that the headers +' are less informative than the original. So refer to ilu.h to see the original types. + +' ILenum long +' ILboolean byte +' ILbitfield long +' ILbyte byte +' ILshort integer +' ILint long +' ILsizei long +' ILubyte byte +' ILushort integer +' ILuint long +' ILfloat single +' ILclampf single +' ILdouble double +' ILclampd double +' ILvoid n/a +' ILHANDLE long + + +Option Explicit + +Public Const ILU_VERSION_1_6_0 = 1 +Public Const ILU_VERSION = 160 + + +Public Const ILU_FILTER = &H2600 +Public Const ILU_NEAREST = &H2601 +Public Const ILU_LINEAR = &H2602 +Public Const ILU_BILINEAR = &H2603 +Public Const ILU_SCALE_BOX = &H2604 +Public Const ILU_SCALE_TRIANGLE = &H2605 +Public Const ILU_SCALE_BELL = &H2606 +Public Const ILU_SCALE_BSPLINE = &H2607 +Public Const ILU_SCALE_LANCZOS3 = &H2608 +Public Const ILU_SCALE_MITCHELL = &H2609 + + +' Error types +Public Const ILU_INVALID_ENUM = &H501 +Public Const ILU_OUT_OF_MEMORY = &H502 +Public Const ILU_INTERNAL_ERROR = &H504 +Public Const ILU_INVALID_VALUE = &H505 +Public Const ILU_ILLEGAL_OPERATION = &H506 +Public Const ILU_INVALID_PARAM = &H509 + + +' Values +Public Const ILU_PLACEMENT = &H700 +Public Const ILU_LOWER_LEFT = &H701 +Public Const ILU_LOWER_RIGHT = &H702 +Public Const ILU_UPPER_LEFT = &H703 +Public Const ILU_UPPER_RIGHT = &H704 +Public Const ILU_CENTER = &H705 +Public Const ILU_CONVOLUTION_MATRIX = &H710 +Public Const ILU_VERSION_NUM = &HDE2 + + +' Filters +Public Const ILU_FILTER_BLUR = &H803 +Public Const ILU_FILTER_GAUSSIAN_3x3 = &H804 +Public Const ILU_FILTER_GAUSSIAN_5X5 = &H805 +Public Const ILU_FILTER_EMBOSS1 = &H807 +Public Const ILU_FILTER_EMBOSS2 = &H808 +Public Const ILU_FILTER_LAPLACIAN1 = &H80A +Public Const ILU_FILTER_LAPLACIAN2 = &H80B +Public Const ILU_FILTER_LAPLACIAN3 = &H80C +Public Const ILU_FILTER_LAPLACIAN4 = &H80D +Public Const ILU_FILTER_SHARPEN1 = &H80E +Public Const ILU_FILTER_SHARPEN2 = &H80F +Public Const ILU_FILTER_SHARPEN3 = &H810 + + +Public Type ILinfo + ID As Long ' the image's id + DataPointer As Long ' pointer to the image's data (useless in VB) + width As Long ' the image's width + height As Long ' the image's height + Depth As Long ' the image's depth + Bpp As Byte ' bytes per pixel (not bits) of the image + SizeOfData As Long ' the total size of the data (in bytes) + Format As Long ' image format (in IL enum style) + IType As Long ' image type (in IL enum style) + Origin As Long ' origin of the image + PalettePointer As Long ' pointer to the image's palette (useless in VB) + PalType As Long ' palette type + PalSize As Long ' palette size + NumNext As Long ' number of images following + NumMips As Long ' number of mipmaps + NumLayers As Long ' number of layers +End Type + + +' ImageLib Utility Functions +Public Declare Function iluAlienify Lib "ilu" () As Byte +Public Declare Function iluBitFilter1 Lib "ilu" () As Byte +Public Declare Function iluBitFilter2 Lib "ilu" () As Byte +Public Declare Function iluBitFilter3 Lib "ilu" () As Byte +Public Declare Function iluBlurAvg Lib "ilu" (ByVal Iter As Long) As Byte +Public Declare Function iluBlurGaussian Lib "ilu" (ByVal Iter As Long) As Byte +Public Declare Function iluBuildMipmaps Lib "ilu" () As Byte +Public Declare Function iluColoursUsed Lib "ilu" () As Long +Public Declare Function iluCompareImage Lib "ilu" (ByVal Comp As Long) As Byte +Public Declare Function iluContrast Lib "ilu" (ByVal Contrast As Single) As Byte +Public Declare Function iluCrop Lib "ilu" (ByVal XOff As Long, ByVal YOff As Long, ByVal ZOff As Long, ByVal width As Long, ByVal height As Long, ByVal Depth As Long) As Byte +Public Declare Sub iluDeleteImage Lib "ilu" (ByVal ID As Long) +Public Declare Function iluEdgeDetectE Lib "ilu" () As Byte +Public Declare Function iluEdgeDetectP Lib "ilu" () As Byte +Public Declare Function iluEdgeDetectS Lib "ilu" () As Byte +Public Declare Function iluEmboss Lib "ilu" () As Byte +Public Declare Function iluEnlargeCanvas Lib "ilu" (ByVal width As Long, ByVal height As Long, ByVal Depth As Long) As Byte +Public Declare Function iluEnlargeImage Lib "ilu" (ByVal XDim As Single, ByVal YDim As Single, ByVal ZDim As Single) As Byte +Public Declare Function iluEqualize Lib "ilu" () As Byte +Public Declare Function iluErrorString Lib "ilu" (ByVal Error As Long) As Long +Public Declare Function iluFlipImage Lib "ilu" () As Byte +Public Declare Function iluGammaCorrect Lib "ilu" (ByVal Gamma As Single) As Byte +Public Declare Function iluGenImage Lib "ilu" () As Long +Public Declare Sub iluGetImageInfo Lib "ilu" (ByRef Info As ILinfo) +Public Declare Function iluGetInteger Lib "ilu" (ByVal Mode As Long) As Long +Public Declare Sub iluGetIntegerv Lib "ilu" (ByVal Mode As Long, ByRef Param As Long) +Public Declare Function iluGetString Lib "ilu" (ByVal StringName As Long) As Long +Public Declare Sub iluImageParameter Lib "ilu" (ByVal PName As Long, ByVal Param As Long) +Public Declare Sub iluInit Lib "ilu" () +Public Declare Function iluLoadImage Lib "ilu" (ByVal FileName As String) As Long +Public Declare Function iluMirror Lib "ilu" () As Byte +Public Declare Function iluNegative Lib "ilu" () As Byte +Public Declare Function iluNoisify Lib "ilu" (ByVal Tolerance As Single) As Byte +Public Declare Function iluPixelize Lib "ilu" (ByVal PixSize As Long) As Byte +' Public Declare Sub iluRegionf Lib "ilu" (ByVal ULx As Single, ByVal ULy As Single, ByVal BRx As Single, ByVal BRy As Single) +' Public Declare Sub iluRegioni Lib "ilu" (ByVal ULx As Long, ByVal ULy As Long, ByVal BRx As Long, ByVal BRy As Long) +Public Declare Function iluReplaceColour Lib "ilu" (ByVal Red As Byte, ByVal Green As Byte, ByVal Blue As Byte, ByVal Tolerance As Single) As Byte +Public Declare Function iluRotate Lib "ilu" (ByVal Angle As Single) As Byte +Public Declare Function iluRotate3D Lib "ilu" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal Angle As Single) As Byte +Public Declare Function iluSaturate1f Lib "ilu" (ByVal Saturation As Single) As Byte +Public Declare Function iluSaturate4f Lib "ilu" (ByVal r As Single, ByVal g As Single, ByVal b As Single, ByVal Saturation As Single) As Byte +Public Declare Function iluScale Lib "ilu" (ByVal width As Long, ByVal height As Long, ByVal Depth As Long) As Byte +Public Declare Function iluScaleColours Lib "ilu" (ByVal r As Single, ByVal g As Single, ByVal b As Single) As Byte +Public Declare Function iluSharpen Lib "ilu" (ByVal Factor As Single, ByVal Iter As Long) As Byte +Public Declare Function iluSwapColours Lib "ilu" () As Byte +Public Declare Function iluWave Lib "ilu" (ByVal Angle As Single) As Byte + +Public Declare Function iluColorsUsed Lib "ilu" Alias "iluColoursUsed" () As Long +Public Declare Function iluSwapColors Lib "ilu" Alias "iluSwapColours" () As Byte +Public Declare Function iluReplaceColor Lib "ilu" Alias "iluReplaceColour" (ByVal Red As Byte, ByVal Green As Byte, ByVal Blue As Byte, ByVal Tolerance As Single) As Byte +Public Declare Function iluScaleColors Lib "ilu" Alias "iluScaleColours" (ByVal r As Single, ByVal g As Single, ByVal b As Single) As Byte diff --git a/libs/DevIL-1.7.8/projects/visual basic/ilut.bas b/libs/DevIL-1.7.8/projects/visual basic/ilut.bas new file mode 100644 index 00000000..08e59eb5 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/visual basic/ilut.bas @@ -0,0 +1,156 @@ +Attribute VB_Name = "Module3" +'----------------------------------------------------------------------------- +' +' ImageLib Utility Toolkit Sources +' Copyright (C) 2000-2002 by Denton Woods +' Converted from ilut.h by Rune Kock (rune@vupti.com) +' based on the earlier conversion by Timo Heister (Timo-Heister@gmx.de) +' Last modified: 22 June 2002, based on ilut.h dated 06/22/2002 +' +' Filename: ilut.bas +' +' Description: The main include file for ILUT +' +'----------------------------------------------------------------------------- + +' I've converted the types as follows. I have not dared use user-defined types, as I +' don't know how VB handles them internally. This means, unfortunately, that the headers +' are less informative than the original. So refer to ilut.h to see the original types. + +' ILenum long +' ILboolean byte +' ILbitfield long +' ILbyte byte +' ILshort integer +' ILint long +' ILsizei long +' ILubyte byte +' ILushort integer +' ILuint long +' ILfloat single +' ILclampf single +' ILdouble double +' ILclampd double +' ILvoid n/a +' integer + + +Option Explicit + +Public Const ILUT_VERSION_1_6_0 = 1 +Public Const ILUT_VERSION = 160 + + +' Attribute Bits +Public Const ILUT_OPENGL_BIT = &H1 +Public Const ILUT_D3D_BIT = &H2 +Public Const ILUT_ALL_ATTRIB_BITS = &HFFFFF + + +' Error Types +Public Const ILUT_INVALID_ENUM = &H501 +Public Const ILUT_OUT_OF_MEMORY = &H502 +Public Const ILUT_INVALID_VALUE = &H505 +Public Const ILUT_ILLEGAL_OPERATION = &H506 +Public Const ILUT_INVALID_PARAM = &H509 +Public Const ILUT_COULD_NOT_OPEN_FILE = &H50A +Public Const ILUT_STACK_OVERFLOW = &H50E +Public Const ILUT_STACK_UNDERFLOW = &H50F +Public Const ILUT_NOT_SUPPORTED = &H550 + + +' State Definitions +Public Const ILUT_PALETTE_MODE = &H600 +Public Const ILUT_OPENGL_CONV = &H610 +Public Const ILUT_D3D_MIPLEVELS = &H620 +Public Const ILUT_MAXTEX_WIDTH = &H630 +Public Const ILUT_MAXTEX_HEIGHT = &H631 +Public Const ILUT_MAXTEX_DEPTH = &H632 +Public Const ILUT_GL_USE_S3TC = &H634 +Public Const ILUT_D3D_USE_DXTC = &H634 +Public Const ILUT_GL_GEN_S3TC = &H635 +Public Const ILUT_D3D_GEN_DXTC = &H635 +Public Const ILUT_S3TC_FORMAT = &H705 +Public Const ILUT_DXTC_FORMAT = &H706 + + +' Values +Public Const ILUT_VERSION_NUM = &HDE2 + + +' ImageLib Utility Toolkit Functions +Public Declare Function ilutDisable Lib "ilut" (ByVal Mode As Long) As Byte +Public Declare Function ilutEnable Lib "ilut" (ByVal Mode As Long) As Byte +Public Declare Function ilutGetBoolean Lib "ilut" (ByVal Mode As Long) As Byte +Public Declare Sub ilutGetBooleanv Lib "ilut" (ByVal Mode As Long, ByRef Param As Byte) +Public Declare Function ilutGetInteger Lib "ilut" (ByVal Mode As Long) As Long +Public Declare Sub ilutGetIntegerv Lib "ilut" (ByVal Mode As Long, ByRef Param As Long) +Public Declare Function ilutGetString Lib "ilut" (ByVal StringName As Long) As Long +Public Declare Sub ilutInit Lib "ilut" () +Public Declare Function ilutIsDisabled Lib "ilut" (ByVal Mode As Long) As Byte +Public Declare Function ilutIsEnabled Lib "ilut" (ByVal Mode As Long) As Byte +Public Declare Sub ilutPopAttrib Lib "ilut" () +Public Declare Sub ilutPushAttrib Lib "ilut" (ByVal Bits As Long) +Public Declare Sub ilutSetInteger Lib "ilut" (ByVal Mode As Long, ByVal Param As Long) + + +Public Const ILUT_USE_ALLEGRO = False +Public Const ILUT_USE_WIN32 = True +Public Const ILUT_USE_OPENGL = True + + +' The different rendering api's...more to be added later? +Public Const ILUT_OPENGL = 0 +Public Const ILUT_ALLEGRO = 1 +Public Const ILUT_WIN32 = 2 + + +Public Declare Function ilutRenderer Lib "ilut" (ByVal Renderer As Long) As Byte + + +' ImageLib Utility Toolkit's OpenGL Functions +Public Declare Function ilutGLBindTexImage Lib "ilut" () As Long +Public Declare Function ilutGLBindMipmaps Lib "ilut" () As Long +Public Declare Function ilutGLBuildMipmaps Lib "ilut" () As Byte +Public Declare Function ilutGLLoadImage Lib "ilut" (ByVal FileName As String) As Long +Public Declare Function ilutGLScreen Lib "ilut" () As Byte +Public Declare Function ilutGLScreenie Lib "ilut" () As Byte +Public Declare Function ilutGLSaveImage Lib "ilut" (ByVal FileName As String, ByVal TexID As Long) As Byte +Public Declare Function ilutGLSetTex Lib "ilut" (ByVal TexID As Long) As Byte +Public Declare Function ilutGLTexImage Lib "ilut" (ByVal Level As Long) As Byte + + +' Allegro and BeOS are probably irrelevant for VB, so they are left out... + + +' ImageLib Utility Toolkit's Win32 (DirectX/GDI) Functions +Public Declare Function ilutConvertToHBitmap Lib "ilut" (ByVal hDC As Integer) As Integer +' Public Declare Sub ilutGetBmpInfo Lib "ilut" (ByRef Info As BITMAPINFO) +' (The BITMAPINFO structure can probably not be ported to VB). +Public Declare Function ilutGetHPal Lib "ilut" () As Integer +Public Declare Function ilutGetPaddedData Lib "ilut" () As Long +Public Declare Function ilutGetWinClipboard Lib "ilut" () As Byte +Public Declare Function ilutLoadResource Lib "ilut" (ByVal hInst As Integer, ByVal ID As Long, ByVal ResourceType As String, ByVal IType As Long) As Byte +Public Declare Function ilutSetHBitmap Lib "ilut" (ByVal Bitmap As Integer) As Byte +Public Declare Function ilutSetHPal Lib "ilut" (ByVal Pal As Integer) As Byte +Public Declare Function ilutSetWinClipboard Lib "ilut" () As Byte +Public Declare Function ilutWinLoadImage Lib "ilut" (ByVal FileName As String, ByVal hDC As Integer) As Integer +Public Declare Function ilutWinLoadUrl Lib "ilut" (ByVal Url As String) As Byte +Public Declare Function ilutWinSaveImage Lib "ilut" (ByVal FileName As String, ByVal Bitmap As Integer) As Byte + +' The DirectX 8 functions below might not be compiled into the DLL, so I've not +' bothered figuring out whether VB can be fooled into handling all those pointers. +' ILAPI ILvoid ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels); +' ILAPI IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(IDirect3DDevice8 *Device); +' ILAPI IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(IDirect3DDevice8 *Device); +' ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(IDirect3DDevice8 *Device, char *FileName, IDirect3DTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(IDirect3DDevice8 *Device, char *FileName, IDirect3DVolumeTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DVolumeTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(IDirect3DDevice8 *Device, ILHANDLE File, IDirect3DTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(IDirect3DDevice8 *Device, ILHANDLE File, IDirect3DVolumeTexture8 **Texture); +' // These two are not tested yet. +' ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DTexture8 **Texture); +' ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DVolumeTexture8 **Texture); +' +' ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(IDirect3DDevice8 *Device, IDirect3DSurface8 *Surface); diff --git a/libs/DevIL-1.7.8/projects/win ce/IL/IL.vcp b/libs/DevIL-1.7.8/projects/win ce/IL/IL.vcp new file mode 100644 index 00000000..8a9443a8 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win ce/IL/IL.vcp @@ -0,0 +1,6436 @@ +# Microsoft eMbedded Visual Tools Project File - Name="DevIL" - Package Owner=<4> +# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02 +# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102 +# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502 +# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202 + +CFG=DevIL - Win32 (WCE MIPS) Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "IL.vcn". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "IL.vcn" CFG="DevIL - Win32 (WCE MIPS) Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "DevIL - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE "DevIL - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +# PROP ATL_Project 2 + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MIPSRel" +# PROP BASE Intermediate_Dir "MIPSRel" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "MIPSRel" +# PROP Intermediate_Dir "MIPSRel" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-IL\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MIPSDbg" +# PROP BASE Intermediate_Dir "MIPSDbg" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "MIPSDbg" +# PROP Intermediate_Dir "MIPSDbg" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-IL\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SH3Rel" +# PROP BASE Intermediate_Dir "SH3Rel" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "SH3Rel" +# PROP Intermediate_Dir "SH3Rel" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-IL\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SH3Dbg" +# PROP BASE Intermediate_Dir "SH3Dbg" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SH3Dbg" +# PROP Intermediate_Dir "SH3Dbg" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-IL\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ARMRel" +# PROP BASE Intermediate_Dir "ARMRel" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ARMRel" +# PROP Intermediate_Dir "ARMRel" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-IL\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ARMDbg" +# PROP BASE Intermediate_Dir "ARMDbg" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ARMDbg" +# PROP Intermediate_Dir "ARMDbg" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-IL\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "X86EMRel" +# PROP BASE Intermediate_Dir "X86EMRel" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "X86EMRel" +# PROP Intermediate_Dir "X86EMRel" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Gz /Oxs /c +# ADD CPP /nologo /W3 /I "..\..\..\src-IL\include" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Gz /Oxs /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "X86EMDbg" +# PROP BASE Intermediate_Dir "X86EMDbg" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "X86EMDbg" +# PROP Intermediate_Dir "X86EMDbg" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Gz /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-IL\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "DEVIL_EXPORTS" /YX /Gz /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ENDIF + +# Begin Target + +# Name "DevIL - Win32 (WCE MIPS) Release" +# Name "DevIL - Win32 (WCE MIPS) Debug" +# Name "DevIL - Win32 (WCE SH3) Release" +# Name "DevIL - Win32 (WCE SH3) Debug" +# Name "DevIL - Win32 (WCE ARM) Release" +# Name "DevIL - Win32 (WCE ARM) Debug" +# Name "DevIL - Win32 (WCE x86em) Release" +# Name "DevIL - Win32 (WCE x86em) Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_alloc.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_AL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_bits.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_BI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_bmp.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_BM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bmp.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_convbuff.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_CO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_convert.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_CON=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_cut.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_CU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_dcx.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_DC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dcx.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_dds-save.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_DD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_dds.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_DDS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_dds.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_devil.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_DE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_doom.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_DO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_doompal.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_endian.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_EN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_error.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_ER=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_fastconv.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_FA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_files.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_FI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_gif.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_gif.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_GI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_gif.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_header.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_HE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_icon.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_IC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_icon.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_internal.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_IN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_io.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_IO=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_jpeg.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\src\jpeglib.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_JP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_jpeg.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_JP=\ + "..\..\..\src-IL\src\jpeglib.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_lif.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + +NODEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_LI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_lif.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_main.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_MA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_manip.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_MAN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_mdl.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + +NODEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_MD=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_mdl.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_mng.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_MN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_neuquant.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_NE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pal.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + +NODEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_pal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pcd.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PC=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pcx.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + +NODEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PCX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pcx.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pic.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + +NODEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pic.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pix.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PIX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_png.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PN=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pnm.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + +NODEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PNM=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_pnm.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_profiles.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PR=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_psd.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + +NODEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PS=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psd.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_psp.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PSP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_psp.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_pxr.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_PX=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_quantizer.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_QU=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_raw.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_RA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_rawdata.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_RAW=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_register.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + +NODEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_RE=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_register.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_rle.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + +NODEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_RL=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_rle.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_sgi.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + +NODEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_SG=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_sgi.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_stack.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + +NODEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_ST=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_stack.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_states.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + +NODEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_STA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_states.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_targa.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + +NODEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_TA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_bits.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_targa.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_tiff.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + +NODEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_TI=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_utility.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + +NODEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_UT=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_wal.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + +# ADD CPP /I "..\src-IL\include" + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + +NODEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\config.h"\ + ".\L\il.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_WA=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + "..\..\..\src-IL\include\il_manip.h"\ + "..\..\..\src-IL\include\il_q2pal.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\il_xpm.c" + +!IF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Release" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE MIPS) Debug" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Release" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE SH3) Debug" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Release" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE ARM) Debug" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Release" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ELSEIF "$(CFG)" == "DevIL - Win32 (WCE x86em) Debug" + +DEP_CPP_IL_XP=\ + "..\..\..\src-IL\include\il_alloc.h"\ + "..\..\..\src-IL\include\il_endian.h"\ + "..\..\..\src-IL\include\il_error.h"\ + "..\..\..\src-IL\include\il_files.h"\ + "..\..\..\src-IL\include\il_internal.h"\ + + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\include\IL\config.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\include\il\il.h +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_alloc.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_bits.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_bmp.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_dcx.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_dds.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_doompal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_endian.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_error.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_files.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_gif.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_icon.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_internal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_jpeg.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_lif.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_manip.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_mdl.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_pal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_pcx.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_pic.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_pnm.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_psd.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_psp.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_q2pal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_register.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_rle.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_sgi.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_stack.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_states.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\include\il_targa.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-IL\src\resource.h" +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE="..\..\..\src-IL\src\resources\OpenIL Logo.ico" +# End Source File +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/projects/win ce/ILU/ILU.vcp b/libs/DevIL-1.7.8/projects/win ce/ILU/ILU.vcp new file mode 100644 index 00000000..b4aa5d3c --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win ce/ILU/ILU.vcp @@ -0,0 +1,2112 @@ +# Microsoft eMbedded Visual Tools Project File - Name="ILU" - Package Owner=<4> +# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02 +# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102 +# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502 +# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202 + +CFG=ILU - Win32 (WCE MIPS) Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ILU.VCN". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ILU.VCN" CFG="ILU - Win32 (WCE MIPS) Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ILU - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE "ILU - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +# PROP ATL_Project 2 + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MIPSRel" +# PROP BASE Intermediate_Dir "MIPSRel" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "MIPSRel" +# PROP Intermediate_Dir "MIPSRel" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILU\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MIPSDbg" +# PROP BASE Intermediate_Dir "MIPSDbg" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "MIPSDbg" +# PROP Intermediate_Dir "MIPSDbg" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILU\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SH3Rel" +# PROP BASE Intermediate_Dir "SH3Rel" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "SH3Rel" +# PROP Intermediate_Dir "SH3Rel" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILU\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SH3Dbg" +# PROP BASE Intermediate_Dir "SH3Dbg" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SH3Dbg" +# PROP Intermediate_Dir "SH3Dbg" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILU\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ARMRel" +# PROP BASE Intermediate_Dir "ARMRel" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ARMRel" +# PROP Intermediate_Dir "ARMRel" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILU\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ARMDbg" +# PROP BASE Intermediate_Dir "ARMDbg" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ARMDbg" +# PROP Intermediate_Dir "ARMDbg" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILU\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILU_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "X86EMRel" +# PROP BASE Intermediate_Dir "X86EMRel" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "X86EMRel" +# PROP Intermediate_Dir "X86EMRel" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Gz /Oxs /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILU\include" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Gz /Oxs /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "X86EMDbg" +# PROP BASE Intermediate_Dir "X86EMDbg" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "X86EMDbg" +# PROP Intermediate_Dir "X86EMDbg" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Gz /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILU\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "ILU_EXPORTS" /YX /Gz /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ENDIF + +# Begin Target + +# Name "ILU - Win32 (WCE MIPS) Release" +# Name "ILU - Win32 (WCE MIPS) Debug" +# Name "ILU - Win32 (WCE SH3) Release" +# Name "ILU - Win32 (WCE SH3) Debug" +# Name "ILU - Win32 (WCE ARM) Release" +# Name "ILU - Win32 (WCE ARM) Debug" +# Name "ILU - Win32 (WCE x86em) Release" +# Name "ILU - Win32 (WCE x86em) Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_alloc.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_error.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_E=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_filter.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_filter.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_F=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_filter_rcg.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_FI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_internal.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_I=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_main.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_M=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_manip.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_mipmap.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_mipmap.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_MI=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_noise.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_N=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_rotate.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_R=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_scale.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_S=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_scale2d.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SC=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_scale3d.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCA=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_scaling.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_SCAL=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_states.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + "..\..\..\src-ILU\include\ilu_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_ST=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\ilu_utilities.c" + +!IF "$(CFG)" == "ILU - Win32 (WCE MIPS) Release" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Release" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE SH3) Debug" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Release" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE ARM) Debug" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Release" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILU - Win32 (WCE x86em) Debug" + +DEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\ilu_alloc.h"\ + "..\..\..\src-ILU\include\ilu_error.h"\ + "..\..\..\src-ILU\include\ilu_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + +NODEP_CPP_ILU_U=\ + "..\..\..\src-ILU\include\config.h"\ + + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\include\il\ilu.h +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_alloc.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_error.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_filter.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_internal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_mipmap.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\include\ilu_states.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILU\src\resource.h" +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/projects/win ce/ILUT/ILUT.vcp b/libs/DevIL-1.7.8/projects/win ce/ILUT/ILUT.vcp new file mode 100644 index 00000000..405dba26 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win ce/ILUT/ILUT.vcp @@ -0,0 +1,809 @@ +# Microsoft eMbedded Visual Tools Project File - Name="ILUT" - Package Owner=<4> +# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02 +# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102 +# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502 +# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202 + +CFG=ILUT - Win32 (WCE MIPS) Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ILUT.VCN". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ILUT.VCN" CFG="ILUT - Win32 (WCE MIPS) Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ILUT - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +# PROP ATL_Project 2 + +!IF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "MIPSRel" +# PROP BASE Intermediate_Dir "MIPSRel" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "MIPSRel" +# PROP Intermediate_Dir "MIPSRel" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILUT\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "MIPSDbg" +# PROP BASE Intermediate_Dir "MIPSDbg" +# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "MIPSDbg" +# PROP Intermediate_Dir "MIPSDbg" +# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r +CPP=clmips.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILUT\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "SH3Rel" +# PROP BASE Intermediate_Dir "SH3Rel" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "SH3Rel" +# PROP Intermediate_Dir "SH3Rel" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILUT\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "SH3Dbg" +# PROP BASE Intermediate_Dir "SH3Dbg" +# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "SH3Dbg" +# PROP Intermediate_Dir "SH3Dbg" +# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r +CPP=shcl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILUT\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ARMRel" +# PROP BASE Intermediate_Dir "ARMRel" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ARMRel" +# PROP Intermediate_Dir "ARMRel" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILUT\include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Oxs /M$(CECrtMT) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ARMDbg" +# PROP BASE Intermediate_Dir "ARMDbg" +# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ARMDbg" +# PROP Intermediate_Dir "ARMDbg" +# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r +CPP=clarm.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILUT\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /M$(CECrtMTDebug) /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM +# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "X86EMRel" +# PROP BASE Intermediate_Dir "X86EMRel" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "X86EMRel" +# PROP Intermediate_Dir "X86EMRel" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Gz /Oxs /c +# ADD CPP /nologo /W3 /I "..\..\..\src-ILUT\include" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Gz /Oxs /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "X86EMDbg" +# PROP BASE Intermediate_Dir "X86EMDbg" +# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "X86EMDbg" +# PROP Intermediate_Dir "X86EMDbg" +# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}" +# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Gz /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\src-ILUT\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /Gz /c +MTL=midl.exe +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 +# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86 + +!ENDIF + +# Begin Target + +# Name "ILUT - Win32 (WCE MIPS) Release" +# Name "ILUT - Win32 (WCE MIPS) Debug" +# Name "ILUT - Win32 (WCE SH3) Release" +# Name "ILUT - Win32 (WCE SH3) Debug" +# Name "ILUT - Win32 (WCE ARM) Release" +# Name "ILUT - Win32 (WCE ARM) Debug" +# Name "ILUT - Win32 (WCE x86em) Release" +# Name "ILUT - Win32 (WCE x86em) Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE="..\..\..\src-ILUT\src\ilut_internal.c" + +!IF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Release" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Release" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Debug" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Release" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Debug" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Release" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Debug" + +DEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\src\ilut_main.c" + +!IF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Release" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Release" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Debug" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Release" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Debug" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Release" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Debug" + +DEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_M=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\src\ilut_states.c" + +!IF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Release" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Release" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Debug" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Release" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Debug" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Release" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Debug" + +DEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + "..\..\..\src-ILUT\include\ilut_opengl.h"\ + "..\..\..\src-ILUT\include\ilut_states.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_S=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\src\ilut_win32.c" + +!IF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Release" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE MIPS) Debug" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Release" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE SH3) Debug" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Release" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE ARM) Debug" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"il\config.h"\ + {$(INCLUDE)}"il\il.h"\ + {$(INCLUDE)}"il\ilu.h"\ + {$(INCLUDE)}"il\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Release" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ELSEIF "$(CFG)" == "ILUT - Win32 (WCE x86em) Debug" + +DEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\ilut_error.h"\ + "..\..\..\src-ILUT\include\ilut_internal.h"\ + {$(INCLUDE)}"IL\il.h"\ + {$(INCLUDE)}"IL\ilu.h"\ + {$(INCLUDE)}"IL\ilut.h"\ + +NODEP_CPP_ILUT_W=\ + "..\..\..\src-ILUT\include\config.h"\ + + +!ENDIF + +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\include\il\ilut.h +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\include\ilut_error.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\include\ilut_internal.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\include\ilut_states.h" +# End Source File +# Begin Source File + +SOURCE="..\..\..\src-ILUT\src\resource.h" +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/projects/win ce/WinCE.vcw b/libs/DevIL-1.7.8/projects/win ce/WinCE.vcw new file mode 100644 index 00000000..587fba5b --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win ce/WinCE.vcw @@ -0,0 +1,83 @@ +Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "DevIL"=.\IL\IL.vcp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "ILU"=.\ILU\ILU.VCP - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name DevIL + End Project Dependency +}}} + +############################################################################### + +Project: "ILUT"=.\ILUT\ILUT.VCP - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name DevIL + End Project Dependency + Begin Project Dependency + Project_Dep_Name ILU + End Project Dependency +}}} + +############################################################################### + +Project: "Test WinCE"=".\Test WinCE\Test WinCE.vcp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name DevIL + End Project Dependency + Begin Project Dependency + Project_Dep_Name ILU + End Project Dependency + Begin Project Dependency + Project_Dep_Name ILUT + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/DevIL-1.7.8/projects/win mobile/vc9/IL/IL.vcproj b/libs/DevIL-1.7.8/projects/win mobile/vc9/IL/IL.vcproj new file mode 100644 index 00000000..d4ee00a5 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win mobile/vc9/IL/IL.vcproj @@ -0,0 +1,1450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/win mobile/vc9/ILU/ILU.vcproj b/libs/DevIL-1.7.8/projects/win mobile/vc9/ILU/ILU.vcproj new file mode 100644 index 00000000..2799ae17 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win mobile/vc9/ILU/ILU.vcproj @@ -0,0 +1,1075 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/win mobile/vc9/ILUT/ILUT.vcproj b/libs/DevIL-1.7.8/projects/win mobile/vc9/ILUT/ILUT.vcproj new file mode 100644 index 00000000..3f74414a --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win mobile/vc9/ILUT/ILUT.vcproj @@ -0,0 +1,1053 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/projects/win mobile/vc9/ImageLib Mobile.sln b/libs/DevIL-1.7.8/projects/win mobile/vc9/ImageLib Mobile.sln new file mode 100644 index 00000000..bcd6c176 --- /dev/null +++ b/libs/DevIL-1.7.8/projects/win mobile/vc9/ImageLib Mobile.sln @@ -0,0 +1,125 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IL", "IL\IL.vcproj", "{90BA58CA-EF30-492C-BE9F-4164E4616ED4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILU", "ILU\ILU.vcproj", "{8F8666D6-C5C4-4DC8-942E-066B09E90DEE}" + ProjectSection(ProjectDependencies) = postProject + {90BA58CA-EF30-492C-BE9F-4164E4616ED4} = {90BA58CA-EF30-492C-BE9F-4164E4616ED4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ILUT", "ILUT\ILUT.vcproj", "{FE7A3430-01D7-4821-AE97-BD882D7C00DE}" + ProjectSection(ProjectDependencies) = postProject + {90BA58CA-EF30-492C-BE9F-4164E4616ED4} = {90BA58CA-EF30-492C-BE9F-4164E4616ED4} + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE} = {8F8666D6-C5C4-4DC8-942E-066B09E90DEE} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) + Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4) + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) + Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4) + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {90BA58CA-EF30-492C-BE9F-4164E4616ED4}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {8F8666D6-C5C4-4DC8-942E-066B09E90DEE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {FE7A3430-01D7-4821-AE97-BD882D7C00DE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/DevIL-1.7.8/projects/xcode/DevIL.xcode/project.pbxproj b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcode/project.pbxproj new file mode 100644 index 00000000..85150f1b --- /dev/null +++ b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcode/project.pbxproj @@ -0,0 +1,3055 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 014CEA520018CE5811CA2923 = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + OTHER_CFLAGS = "-DHAVE_CONFIG_H -maltivec"; + OTHER_CPLUSPLUSFLAGS = "-DHAVE_CONFIG_H -maltivec"; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 014CEA530018CE5811CA2923 = { + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//010 +//011 +//012 +//013 +//014 +//080 +//081 +//082 +//083 +//084 + 08FB7793FE84155DC02AAC07 = { + buildSettings = { + }; + buildStyles = ( + 014CEA520018CE5811CA2923, + 014CEA530018CE5811CA2923, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 08FB7794FE84155DC02AAC07; + projectDirPath = ""; + targets = ( + A36D10E8080E8E5D0012BB8B, + A3009525080E7F6E003DEA28, + A3009514080E7F44003DEA28, + A3009519080E7F51003DEA28, + A36D10F5080E8FD80012BB8B, + ); + }; + 08FB7794FE84155DC02AAC07 = { + children = ( + A38C3BE30818FAB2008EE126, + A36D1100080E91B20012BB8B, + A32D489B0810233E008510AC, + A32D490A08102417008510AC, + A30E01C208101A1700B16732, + A33D1D86080E969A00FEBAC9, + A3009534080E8006003DEA28, + 1AB674ADFE9D54B511CA2CBB, + ); + isa = PBXGroup; + name = DevIL; + refType = 4; + sourceTree = ""; + }; +//080 +//081 +//082 +//083 +//084 +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 + 1AB674ADFE9D54B511CA2CBB = { + children = ( + A3009526080E7F6E003DEA28, + A3009515080E7F44003DEA28, + A300951A080E7F51003DEA28, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 +//A30 +//A31 +//A32 +//A33 +//A34 + A3009511080E7F44003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D48E10810234E008510AC, + A32D48E20810234E008510AC, + A32D48E30810234E008510AC, + A32D48E40810234E008510AC, + A32D48E50810234E008510AC, + A32D48E60810234E008510AC, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009512080E7F44003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D48C408102349008510AC, + A32D48C508102349008510AC, + A32D48C608102349008510AC, + A32D48C708102349008510AC, + A32D48C808102349008510AC, + A32D48C908102349008510AC, + A32D48CA08102349008510AC, + A32D48CB08102349008510AC, + A32D48CC08102349008510AC, + A32D48CD08102349008510AC, + A32D48CE08102349008510AC, + A32D48CF08102349008510AC, + A32D48D008102349008510AC, + A32D48D108102349008510AC, + A32D48D208102349008510AC, + A32D48D308102349008510AC, + A32D48D408102349008510AC, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009513080E7F44003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D48FD081023D6008510AC, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009514080E7F44003DEA28 = { + buildPhases = ( + A3009511080E7F44003DEA28, + A3009512080E7F44003DEA28, + A3009513080E7F44003DEA28, + ); + buildRules = ( + ); + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILU; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + A36D0EE0080E81800012BB8B, + ); + isa = PBXNativeTarget; + name = libILU; + productName = libILU; + productReference = A3009515080E7F44003DEA28; + productType = "com.apple.product-type.library.dynamic"; + }; + A3009515080E7F44003DEA28 = { + explicitFileType = "compiled.mach-o.dylib"; + includeInIndex = 0; + isa = PBXFileReference; + path = libILU.dylib; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + A3009516080E7F51003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D49630810244F008510AC, + A32D49640810244F008510AC, + A32D49650810244F008510AC, + A32D49660810244F008510AC, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009517080E7F51003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D49680810244F008510AC, + A32D49690810244F008510AC, + A32D496A0810244F008510AC, + A32D496B0810244F008510AC, + A32D496C0810244F008510AC, + A32D496D0810244F008510AC, + A32D496E0810244F008510AC, + A32D496F0810244F008510AC, + A32D49700810244F008510AC, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009518080E7F51003DEA28 = { + buildActionMask = 2147483647; + files = ( + A32D490508102403008510AC, + A32D490608102405008510AC, + A33D1E4A080EA43E00FEBAC9, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009519080E7F51003DEA28 = { + buildPhases = ( + A3009516080E7F51003DEA28, + A3009517080E7F51003DEA28, + A3009518080E7F51003DEA28, + ); + buildRules = ( + ); + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILUT; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + A36D0EE2080E81850012BB8B, + A36D0EE4080E81850012BB8B, + ); + isa = PBXNativeTarget; + name = libILUT; + productName = libILUT; + productReference = A300951A080E7F51003DEA28; + productType = "com.apple.product-type.library.dynamic"; + }; + A300951A080E7F51003DEA28 = { + explicitFileType = "compiled.mach-o.dylib"; + includeInIndex = 0; + isa = PBXFileReference; + path = libILUT.dylib; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + A3009522080E7F6E003DEA28 = { + buildActionMask = 2147483647; + files = ( + A36D1123080E92150012BB8B, + A36D1124080E92150012BB8B, + A36D1125080E92150012BB8B, + A36D1126080E92150012BB8B, + A36D1127080E92150012BB8B, + A36D1128080E92150012BB8B, + A36D1129080E92150012BB8B, + A36D112A080E92150012BB8B, + A36D112B080E92150012BB8B, + A36D112C080E92150012BB8B, + A36D112D080E92150012BB8B, + A36D112E080E92150012BB8B, + A36D112F080E92150012BB8B, + A36D1130080E92150012BB8B, + A36D1131080E92150012BB8B, + A36D1132080E92150012BB8B, + A36D1133080E92150012BB8B, + A36D1134080E92150012BB8B, + A36D1135080E92150012BB8B, + A36D1136080E92150012BB8B, + A36D1137080E92150012BB8B, + A36D1138080E92150012BB8B, + A36D1139080E92150012BB8B, + A36D113A080E92150012BB8B, + A36D113B080E92150012BB8B, + A36D113C080E92150012BB8B, + A36D113D080E92150012BB8B, + A36D113E080E92150012BB8B, + A36D113F080E92150012BB8B, + A36D1171080E95D60012BB8B, + A36D1172080E95D60012BB8B, + A36D1173080E95D60012BB8B, + A36D1174080E95D60012BB8B, + A36D1175080E95D60012BB8B, + A36D1176080E95D60012BB8B, + A36D1177080E95D60012BB8B, + A39B3C50081C1E6000115B25, + A38C3BE70818FAB2008EE126, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009523080E7F6E003DEA28 = { + buildActionMask = 2147483647; + files = ( + A36D10A6080E84D80012BB8B, + A36D10A7080E84D80012BB8B, + A36D10A8080E84D80012BB8B, + A36D10A9080E84D80012BB8B, + A36D10AA080E84D80012BB8B, + A36D10AB080E84D80012BB8B, + A36D10AC080E84D80012BB8B, + A36D10AD080E84D80012BB8B, + A36D10AE080E84D80012BB8B, + A36D10AF080E84D80012BB8B, + A36D10B0080E84D80012BB8B, + A36D10B1080E84D80012BB8B, + A36D10B2080E84D80012BB8B, + A36D10B3080E84D80012BB8B, + A36D10B4080E84D80012BB8B, + A36D10B5080E84D80012BB8B, + A36D10B6080E84D80012BB8B, + A36D10B7080E84D80012BB8B, + A36D10B8080E84D80012BB8B, + A36D10B9080E84D80012BB8B, + A36D10BA080E84D80012BB8B, + A36D10BB080E84D80012BB8B, + A36D10BC080E84D80012BB8B, + A36D10BD080E84D80012BB8B, + A36D10BE080E84D80012BB8B, + A36D10BF080E84D80012BB8B, + A36D10C0080E84D80012BB8B, + A36D10C1080E84D80012BB8B, + A36D10C2080E84D80012BB8B, + A36D10C3080E84D80012BB8B, + A36D10C4080E84D80012BB8B, + A36D10C5080E84D80012BB8B, + A36D10C6080E84D80012BB8B, + A36D10C7080E84D80012BB8B, + A36D10C8080E84D80012BB8B, + A36D10C9080E84D80012BB8B, + A36D10CA080E84D80012BB8B, + A36D10CB080E84D80012BB8B, + A36D10CC080E84D80012BB8B, + A36D10CD080E84D80012BB8B, + A36D10CE080E84D80012BB8B, + A36D10CF080E84D80012BB8B, + A36D10D0080E84D80012BB8B, + A36D10D1080E84D80012BB8B, + A36D10D2080E84D80012BB8B, + A36D10D3080E84D80012BB8B, + A36D10D4080E84D80012BB8B, + A36D10D5080E84D80012BB8B, + A36D10D6080E84D80012BB8B, + A36D10D7080E84D80012BB8B, + A36D10D8080E84D80012BB8B, + A36D10D9080E84D80012BB8B, + A39B3C4F081C1E5100115B25, + A38C3BE60818FAB2008EE126, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009524080E7F6E003DEA28 = { + buildActionMask = 2147483647; + files = ( + A35C9C84080EB93900CCD137, + A35C9C85080EB93900CCD137, + A35C9CAB080EBA5100CCD137, + A33E80950810140D00578C1B, + A33E80A00810145F00578C1B, + A33E80AB081014BF00578C1B, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A3009525080E7F6E003DEA28 = { + buildPhases = ( + A3009522080E7F6E003DEA28, + A3009523080E7F6E003DEA28, + A3009524080E7F6E003DEA28, + A36D10E3080E856E0012BB8B, + ); + buildRules = ( + ); + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_MODEL_PPC64 = NO; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = "\"/Users/dario/Desktop/DevIL o /src-IL/src/.libs\" /sw/lib"; + LIBRARY_STYLE = DYNAMIC; + OTHER_CFLAGS = "-I../../include -I../Include"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libIL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = libIL; + productName = libIL; + productReference = A3009526080E7F6E003DEA28; + productType = "com.apple.product-type.library.dynamic"; + }; + A3009526080E7F6E003DEA28 = { + explicitFileType = "compiled.mach-o.dylib"; + includeInIndex = 0; + isa = PBXFileReference; + path = libIL.dylib; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + A3009534080E8006003DEA28 = { + children = ( + A30B34870818DB400067D04E, + A30B34880818DB400067D04E, + A30B34890818DB400067D04E, + A30B348A0818DB400067D04E, + A30B348B0818DB400067D04E, + A30B348C0818DB400067D04E, + A30B348D0818DB400067D04E, + A30B349E0818DB5C0067D04E, + A35E96760823F02E0061C1C7, + A30B348E0818DB400067D04E, + A30B348F0818DB400067D04E, + A30B34900818DB400067D04E, + A30B34910818DB400067D04E, + A30B34920818DB400067D04E, + A30B34930818DB400067D04E, + A30B34940818DB400067D04E, + A30B34820818DB240067D04E, + ); + isa = PBXGroup; + name = Docs; + refType = 4; + sourceTree = ""; + }; + A30B34820818DB240067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = AUTHORS; + path = /Users/dario/Desktop/Developer/Projects/DevIL/cvsroot/DevIL/AUTHORS; + refType = 0; + sourceTree = ""; + }; + A30B34870818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = TODO; + path = ../../TODO; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34880818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + name = autogen.sh; + path = ../../autogen.sh; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34890818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = COPYING; + path = ../../COPYING; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348A0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = README.win; + path = ../../README.win; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348B0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = README.unix; + path = ../../README.unix; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348C0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = README.macosx; + path = ../../README.macosx; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348D0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = README; + path = ../../README; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348E0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = NEWS; + path = ../../NEWS; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B348F0818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = ../../Makefile.am; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34900818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = ChangeLog; + path = ../../ChangeLog; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34910818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = BUGS; + path = ../../BUGS; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34920818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Libraries.txt; + path = ../../Libraries.txt; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34930818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = INSTALL; + path = ../../INSTALL; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B34940818DB400067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = CREDITS; + path = ../../CREDITS; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30B349E0818DB5C0067D04E = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = configure.in; + path = ../../configure.in; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A30E01C208101A1700B16732 = { + children = ( + A33E80AA081014BF00578C1B, + A33E809F0810145F00578C1B, + A33E80930810140D00578C1B, + A35C9CAA080EBA5100CCD137, + A35C9C81080EB93900CCD137, + A35C9C82080EB93900CCD137, + A33D1E37080EA43A00FEBAC9, + ); + isa = PBXGroup; + name = Libraries; + refType = 4; + sourceTree = ""; + }; + A32D489B0810233E008510AC = { + children = ( + A38C3C170818FC42008EE126, + A32D48D60810234E008510AC, + A32D489C08102349008510AC, + ); + isa = PBXGroup; + name = ILU; + refType = 4; + sourceTree = ""; + }; + A32D489C08102349008510AC = { + children = ( + A32D48B008102349008510AC, + A32D48B108102349008510AC, + A32D48B208102349008510AC, + A32D48B308102349008510AC, + A32D48B408102349008510AC, + A32D48B508102349008510AC, + A32D48B608102349008510AC, + A32D48B708102349008510AC, + A32D48B808102349008510AC, + A32D48B908102349008510AC, + A32D48BA08102349008510AC, + A32D48BB08102349008510AC, + A32D48BC08102349008510AC, + A32D48BD08102349008510AC, + A32D48BE08102349008510AC, + A32D48BF08102349008510AC, + A32D48C008102349008510AC, + ); + isa = PBXGroup; + name = src; + path = "../../src-ILU/src"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A32D48B008102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_alloc.c; + refType = 4; + sourceTree = ""; + }; + A32D48B108102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_error.c; + refType = 4; + sourceTree = ""; + }; + A32D48B208102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_filter.c; + refType = 4; + sourceTree = ""; + }; + A32D48B308102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_filter_rcg.c; + refType = 4; + sourceTree = ""; + }; + A32D48B408102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_internal.c; + refType = 4; + sourceTree = ""; + }; + A32D48B508102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_main.c; + refType = 4; + sourceTree = ""; + }; + A32D48B608102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_manip.c; + refType = 4; + sourceTree = ""; + }; + A32D48B708102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_mipmap.c; + refType = 4; + sourceTree = ""; + }; + A32D48B808102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_noise.c; + refType = 4; + sourceTree = ""; + }; + A32D48B908102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_region.c; + refType = 4; + sourceTree = ""; + }; + A32D48BA08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_rotate.c; + refType = 4; + sourceTree = ""; + }; + A32D48BB08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_scale.c; + refType = 4; + sourceTree = ""; + }; + A32D48BC08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_scale2d.c; + refType = 4; + sourceTree = ""; + }; + A32D48BD08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_scale3d.c; + refType = 4; + sourceTree = ""; + }; + A32D48BE08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_scaling.c; + refType = 4; + sourceTree = ""; + }; + A32D48BF08102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_states.c; + refType = 4; + sourceTree = ""; + }; + A32D48C008102349008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilu_utilities.c; + refType = 4; + sourceTree = ""; + }; + A32D48C408102349008510AC = { + fileRef = A32D48B008102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48C508102349008510AC = { + fileRef = A32D48B108102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48C608102349008510AC = { + fileRef = A32D48B208102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48C708102349008510AC = { + fileRef = A32D48B308102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48C808102349008510AC = { + fileRef = A32D48B408102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48C908102349008510AC = { + fileRef = A32D48B508102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CA08102349008510AC = { + fileRef = A32D48B608102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CB08102349008510AC = { + fileRef = A32D48B708102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CC08102349008510AC = { + fileRef = A32D48B808102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CD08102349008510AC = { + fileRef = A32D48B908102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CE08102349008510AC = { + fileRef = A32D48BA08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48CF08102349008510AC = { + fileRef = A32D48BB08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D008102349008510AC = { + fileRef = A32D48BC08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D108102349008510AC = { + fileRef = A32D48BD08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D208102349008510AC = { + fileRef = A32D48BE08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D308102349008510AC = { + fileRef = A32D48BF08102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D408102349008510AC = { + fileRef = A32D48C008102349008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D48D60810234E008510AC = { + children = ( + A32D48D80810234E008510AC, + A32D48D90810234E008510AC, + A32D48DA0810234E008510AC, + A32D48DB0810234E008510AC, + A32D48DC0810234E008510AC, + A32D48DD0810234E008510AC, + ); + isa = PBXGroup; + name = include; + path = "/Users/dario/Desktop/Developer/Projects/DevIL/cvsroot/DevIL/src-ILU/include"; + refType = 0; + sourceTree = ""; + }; + A32D48D80810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_alloc.h; + refType = 4; + sourceTree = ""; + }; + A32D48D90810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_filter.h; + refType = 4; + sourceTree = ""; + }; + A32D48DA0810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_internal.h; + refType = 4; + sourceTree = ""; + }; + A32D48DB0810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_mipmap.h; + refType = 4; + sourceTree = ""; + }; + A32D48DC0810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_region.h; + refType = 4; + sourceTree = ""; + }; + A32D48DD0810234E008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilu_states.h; + refType = 4; + sourceTree = ""; + }; + A32D48E10810234E008510AC = { + fileRef = A32D48D80810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48E20810234E008510AC = { + fileRef = A32D48D90810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48E30810234E008510AC = { + fileRef = A32D48DA0810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48E40810234E008510AC = { + fileRef = A32D48DB0810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48E50810234E008510AC = { + fileRef = A32D48DC0810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48E60810234E008510AC = { + fileRef = A32D48DD0810234E008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D48FD081023D6008510AC = { + fileRef = A3009526080E7F6E003DEA28; + isa = PBXBuildFile; + settings = { + }; + }; + A32D490508102403008510AC = { + fileRef = A3009526080E7F6E003DEA28; + isa = PBXBuildFile; + settings = { + }; + }; + A32D490608102405008510AC = { + fileRef = A3009515080E7F44003DEA28; + isa = PBXBuildFile; + settings = { + }; + }; + A32D490A08102417008510AC = { + children = ( + A38C3C1F0818FC55008EE126, + A32D49420810244F008510AC, + A32D494B0810244F008510AC, + ); + isa = PBXGroup; + name = ILUT; + refType = 4; + sourceTree = ""; + }; + A32D49420810244F008510AC = { + children = ( + A32D49440810244F008510AC, + A32D49450810244F008510AC, + A32D49460810244F008510AC, + A32D49470810244F008510AC, + ); + isa = PBXGroup; + name = include; + path = "../../src-ILUT/include"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A32D49440810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilut_allegro.h; + refType = 4; + sourceTree = ""; + }; + A32D49450810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilut_internal.h; + refType = 4; + sourceTree = ""; + }; + A32D49460810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilut_opengl.h; + refType = 4; + sourceTree = ""; + }; + A32D49470810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ilut_states.h; + refType = 4; + sourceTree = ""; + }; + A32D494B0810244F008510AC = { + children = ( + A32D49570810244F008510AC, + A32D49580810244F008510AC, + A32D49590810244F008510AC, + A32D495A0810244F008510AC, + A32D495B0810244F008510AC, + A32D495C0810244F008510AC, + A32D495D0810244F008510AC, + A32D495E0810244F008510AC, + A32D495F0810244F008510AC, + ); + isa = PBXGroup; + name = src; + path = "../../src-ILUT/src"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A32D49570810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_allegro.c; + refType = 4; + sourceTree = ""; + }; + A32D49580810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_directx.c; + refType = 4; + sourceTree = ""; + }; + A32D49590810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_directx9.c; + refType = 4; + sourceTree = ""; + }; + A32D495A0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_internal.c; + refType = 4; + sourceTree = ""; + }; + A32D495B0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_main.c; + refType = 4; + sourceTree = ""; + }; + A32D495C0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_opengl.c; + refType = 4; + sourceTree = ""; + }; + A32D495D0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_sdlsurface.c; + refType = 4; + sourceTree = ""; + }; + A32D495E0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_states.c; + refType = 4; + sourceTree = ""; + }; + A32D495F0810244F008510AC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = ilut_win32.c; + refType = 4; + sourceTree = ""; + }; + A32D49630810244F008510AC = { + fileRef = A32D49440810244F008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D49640810244F008510AC = { + fileRef = A32D49450810244F008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D49650810244F008510AC = { + fileRef = A32D49460810244F008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D49660810244F008510AC = { + fileRef = A32D49470810244F008510AC; + isa = PBXBuildFile; + settings = { + }; + }; + A32D49680810244F008510AC = { + fileRef = A32D49570810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D49690810244F008510AC = { + fileRef = A32D49580810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496A0810244F008510AC = { + fileRef = A32D49590810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496B0810244F008510AC = { + fileRef = A32D495A0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496C0810244F008510AC = { + fileRef = A32D495B0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496D0810244F008510AC = { + fileRef = A32D495C0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496E0810244F008510AC = { + fileRef = A32D495D0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D496F0810244F008510AC = { + fileRef = A32D495E0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A32D49700810244F008510AC = { + fileRef = A32D495F0810244F008510AC; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A33D1D86080E969A00FEBAC9 = { + children = ( + A36D115F080E95D60012BB8B, + A36D1165080E95D60012BB8B, + A36D1166080E95D60012BB8B, + A36D1167080E95D60012BB8B, + A36D1168080E95D60012BB8B, + A36D116C080E95D60012BB8B, + A36D116E080E95D60012BB8B, + ); + isa = PBXGroup; + name = Includes; + refType = 4; + sourceTree = ""; + }; + A33D1E37080EA43A00FEBAC9 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = OpenGL.framework; + path = /System/Library/Frameworks/OpenGL.framework; + refType = 0; + sourceTree = ""; + }; + A33D1E4A080EA43E00FEBAC9 = { + fileRef = A33D1E37080EA43A00FEBAC9; + isa = PBXBuildFile; + settings = { + }; + }; + A33E80930810140D00578C1B = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = libjpeg.dylib; + path = /usr/local/lib/libjpeg.62.0.0.dylib; + refType = 0; + sourceTree = ""; + }; + A33E80950810140D00578C1B = { + fileRef = A33E80930810140D00578C1B; + isa = PBXBuildFile; + settings = { + }; + }; + A33E809F0810145F00578C1B = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = libmng.dylib; + path = /usr/local/lib/libmng.1.0.0.dylib; + refType = 0; + sourceTree = ""; + }; + A33E80A00810145F00578C1B = { + fileRef = A33E809F0810145F00578C1B; + isa = PBXBuildFile; + settings = { + }; + }; + A33E80AA081014BF00578C1B = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = liblcms.dylib; + path = /sw/lib/liblcms.1.0.14.dylib; + refType = 0; + sourceTree = ""; + }; + A33E80AB081014BF00578C1B = { + fileRef = A33E80AA081014BF00578C1B; + isa = PBXBuildFile; + settings = { + }; + }; + A35C9C81080EB93900CCD137 = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = libpng.dylib; + path = /usr/local/lib/libpng.3.1.2.8.dylib; + refType = 0; + sourceTree = ""; + }; + A35C9C82080EB93900CCD137 = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = libtiff.dylib; + path = /usr/local/lib/libtiff.3.7.2.dylib; + refType = 0; + sourceTree = ""; + }; + A35C9C84080EB93900CCD137 = { + fileRef = A35C9C81080EB93900CCD137; + isa = PBXBuildFile; + settings = { + }; + }; + A35C9C85080EB93900CCD137 = { + fileRef = A35C9C82080EB93900CCD137; + isa = PBXBuildFile; + settings = { + }; + }; + A35C9CAA080EBA5100CCD137 = { + isa = PBXFileReference; + lastKnownFileType = "compiled.mach-o.dylib"; + name = libz.dylib; + path = /usr/lib/libz.1.dylib; + refType = 0; + sourceTree = ""; + }; + A35C9CAB080EBA5100CCD137 = { + fileRef = A35C9CAA080EBA5100CCD137; + isa = PBXBuildFile; + settings = { + }; + }; + A35E96760823F02E0061C1C7 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + name = configure; + path = ../../configure; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D0EDF080E81800012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D0EE0080E81800012BB8B = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28; + targetProxy = A36D0EDF080E81800012BB8B; + }; + A36D0EE1080E81850012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D0EE2080E81850012BB8B = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28; + targetProxy = A36D0EE1080E81850012BB8B; + }; + A36D0EE3080E81850012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009514080E7F44003DEA28; + remoteInfo = libILU; + }; + A36D0EE4080E81850012BB8B = { + isa = PBXTargetDependency; + target = A3009514080E7F44003DEA28; + targetProxy = A36D0EE3080E81850012BB8B; + }; + A36D106F080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_alloc.c; + refType = 4; + sourceTree = ""; + }; + A36D1070080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_bits.c; + refType = 4; + sourceTree = ""; + }; + A36D1071080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_bmp.c; + refType = 4; + sourceTree = ""; + }; + A36D1072080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_convbuff.c; + refType = 4; + sourceTree = ""; + }; + A36D1073080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_convert.c; + refType = 4; + sourceTree = ""; + }; + A36D1074080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_cut.c; + refType = 4; + sourceTree = ""; + }; + A36D1075080E84D70012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_dcx.c; + refType = 4; + sourceTree = ""; + }; + A36D1076080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = "il_dds-save.c"; + refType = 4; + sourceTree = ""; + }; + A36D1077080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_dds.c; + refType = 4; + sourceTree = ""; + }; + A36D1078080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_devil.c; + refType = 4; + sourceTree = ""; + }; + A36D1079080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_doom.c; + refType = 4; + sourceTree = ""; + }; + A36D107A080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_endian.c; + refType = 4; + sourceTree = ""; + }; + A36D107B080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_error.c; + refType = 4; + sourceTree = ""; + }; + A36D107C080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_fastconv.c; + refType = 4; + sourceTree = ""; + }; + A36D107D080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_files.c; + refType = 4; + sourceTree = ""; + }; + A36D107E080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_gif.c; + refType = 4; + sourceTree = ""; + }; + A36D107F080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_hdr.c; + refType = 4; + sourceTree = ""; + }; + A36D1080080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_header.c; + refType = 4; + sourceTree = ""; + }; + A36D1081080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_icon.c; + refType = 4; + sourceTree = ""; + }; + A36D1082080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_internal.c; + refType = 4; + sourceTree = ""; + }; + A36D1083080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_io.c; + refType = 4; + sourceTree = ""; + }; + A36D1084080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_jpeg.c; + refType = 4; + sourceTree = ""; + }; + A36D1085080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_lif.c; + refType = 4; + sourceTree = ""; + }; + A36D1086080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_main.c; + refType = 4; + sourceTree = ""; + }; + A36D1087080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_manip.c; + refType = 4; + sourceTree = ""; + }; + A36D1088080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_mdl.c; + refType = 4; + sourceTree = ""; + }; + A36D1089080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_mng.c; + refType = 4; + sourceTree = ""; + }; + A36D108A080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_neuquant.c; + refType = 4; + sourceTree = ""; + }; + A36D108B080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pal.c; + refType = 4; + sourceTree = ""; + }; + A36D108C080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pcd.c; + refType = 4; + sourceTree = ""; + }; + A36D108D080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pcx.c; + refType = 4; + sourceTree = ""; + }; + A36D108E080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pic.c; + refType = 4; + sourceTree = ""; + }; + A36D108F080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pix.c; + refType = 4; + sourceTree = ""; + }; + A36D1090080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_png.c; + refType = 4; + sourceTree = ""; + }; + A36D1091080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pnm.c; + refType = 4; + sourceTree = ""; + }; + A36D1092080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_profiles.c; + refType = 4; + sourceTree = ""; + }; + A36D1093080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_psd.c; + refType = 4; + sourceTree = ""; + }; + A36D1094080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_psp.c; + refType = 4; + sourceTree = ""; + }; + A36D1095080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_pxr.c; + refType = 4; + sourceTree = ""; + }; + A36D1096080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_quantizer.c; + refType = 4; + sourceTree = ""; + }; + A36D1097080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_raw.c; + refType = 4; + sourceTree = ""; + }; + A36D1098080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_rawdata.c; + refType = 4; + sourceTree = ""; + }; + A36D1099080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_register.c; + refType = 4; + sourceTree = ""; + }; + A36D109A080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_rle.c; + refType = 4; + sourceTree = ""; + }; + A36D109B080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_sgi.c; + refType = 4; + sourceTree = ""; + }; + A36D109C080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_stack.c; + refType = 4; + sourceTree = ""; + }; + A36D109D080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_states.c; + refType = 4; + sourceTree = ""; + }; + A36D109E080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_targa.c; + refType = 4; + sourceTree = ""; + }; + A36D109F080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_tiff.c; + refType = 4; + sourceTree = ""; + }; + A36D10A0080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_utility.c; + refType = 4; + sourceTree = ""; + }; + A36D10A1080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_wal.c; + refType = 4; + sourceTree = ""; + }; + A36D10A2080E84D80012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = il_xpm.c; + refType = 4; + sourceTree = ""; + }; + A36D10A6080E84D80012BB8B = { + fileRef = A36D106F080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10A7080E84D80012BB8B = { + fileRef = A36D1070080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10A8080E84D80012BB8B = { + fileRef = A36D1071080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10A9080E84D80012BB8B = { + fileRef = A36D1072080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AA080E84D80012BB8B = { + fileRef = A36D1073080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AB080E84D80012BB8B = { + fileRef = A36D1074080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AC080E84D80012BB8B = { + fileRef = A36D1075080E84D70012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AD080E84D80012BB8B = { + fileRef = A36D1076080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AE080E84D80012BB8B = { + fileRef = A36D1077080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10AF080E84D80012BB8B = { + fileRef = A36D1078080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B0080E84D80012BB8B = { + fileRef = A36D1079080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B1080E84D80012BB8B = { + fileRef = A36D107A080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B2080E84D80012BB8B = { + fileRef = A36D107B080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B3080E84D80012BB8B = { + fileRef = A36D107C080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B4080E84D80012BB8B = { + fileRef = A36D107D080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B5080E84D80012BB8B = { + fileRef = A36D107E080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B6080E84D80012BB8B = { + fileRef = A36D107F080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B7080E84D80012BB8B = { + fileRef = A36D1080080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B8080E84D80012BB8B = { + fileRef = A36D1081080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10B9080E84D80012BB8B = { + fileRef = A36D1082080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BA080E84D80012BB8B = { + fileRef = A36D1083080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BB080E84D80012BB8B = { + fileRef = A36D1084080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BC080E84D80012BB8B = { + fileRef = A36D1085080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BD080E84D80012BB8B = { + fileRef = A36D1086080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BE080E84D80012BB8B = { + fileRef = A36D1087080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10BF080E84D80012BB8B = { + fileRef = A36D1088080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C0080E84D80012BB8B = { + fileRef = A36D1089080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C1080E84D80012BB8B = { + fileRef = A36D108A080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C2080E84D80012BB8B = { + fileRef = A36D108B080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C3080E84D80012BB8B = { + fileRef = A36D108C080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C4080E84D80012BB8B = { + fileRef = A36D108D080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C5080E84D80012BB8B = { + fileRef = A36D108E080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C6080E84D80012BB8B = { + fileRef = A36D108F080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C7080E84D80012BB8B = { + fileRef = A36D1090080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C8080E84D80012BB8B = { + fileRef = A36D1091080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10C9080E84D80012BB8B = { + fileRef = A36D1092080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CA080E84D80012BB8B = { + fileRef = A36D1093080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CB080E84D80012BB8B = { + fileRef = A36D1094080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CC080E84D80012BB8B = { + fileRef = A36D1095080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CD080E84D80012BB8B = { + fileRef = A36D1096080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CE080E84D80012BB8B = { + fileRef = A36D1097080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10CF080E84D80012BB8B = { + fileRef = A36D1098080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D0080E84D80012BB8B = { + fileRef = A36D1099080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D1080E84D80012BB8B = { + fileRef = A36D109A080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D2080E84D80012BB8B = { + fileRef = A36D109B080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D3080E84D80012BB8B = { + fileRef = A36D109C080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D4080E84D80012BB8B = { + fileRef = A36D109D080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D5080E84D80012BB8B = { + fileRef = A36D109E080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D6080E84D80012BB8B = { + fileRef = A36D109F080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D7080E84D80012BB8B = { + fileRef = A36D10A0080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D8080E84D80012BB8B = { + fileRef = A36D10A1080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10D9080E84D80012BB8B = { + fileRef = A36D10A2080E84D80012BB8B; + isa = PBXBuildFile; + settings = { + COMPILER_FLAGS = "-I../../include"; + }; + }; + A36D10DB080E85070012BB8B = { + children = ( + A36D106F080E84D70012BB8B, + A36D1070080E84D70012BB8B, + A36D1071080E84D70012BB8B, + A36D1072080E84D70012BB8B, + A36D1073080E84D70012BB8B, + A36D1074080E84D70012BB8B, + A36D1075080E84D70012BB8B, + A36D1076080E84D80012BB8B, + A36D1077080E84D80012BB8B, + A36D1078080E84D80012BB8B, + A36D1079080E84D80012BB8B, + A36D107A080E84D80012BB8B, + A36D107B080E84D80012BB8B, + A36D107C080E84D80012BB8B, + A36D107D080E84D80012BB8B, + A36D107E080E84D80012BB8B, + A36D107F080E84D80012BB8B, + A36D1080080E84D80012BB8B, + A36D1081080E84D80012BB8B, + A36D1082080E84D80012BB8B, + A36D1083080E84D80012BB8B, + A36D1084080E84D80012BB8B, + A36D1085080E84D80012BB8B, + A36D1086080E84D80012BB8B, + A36D1087080E84D80012BB8B, + A36D1088080E84D80012BB8B, + A36D1089080E84D80012BB8B, + A36D108A080E84D80012BB8B, + A36D108B080E84D80012BB8B, + A36D108C080E84D80012BB8B, + A36D108D080E84D80012BB8B, + A36D108E080E84D80012BB8B, + A36D108F080E84D80012BB8B, + A36D1090080E84D80012BB8B, + A36D1091080E84D80012BB8B, + A36D1092080E84D80012BB8B, + A36D1093080E84D80012BB8B, + A36D1094080E84D80012BB8B, + A36D1095080E84D80012BB8B, + A36D1096080E84D80012BB8B, + A36D1097080E84D80012BB8B, + A36D1098080E84D80012BB8B, + A36D1099080E84D80012BB8B, + A36D109A080E84D80012BB8B, + A36D109B080E84D80012BB8B, + A36D109C080E84D80012BB8B, + A36D109D080E84D80012BB8B, + A36D109E080E84D80012BB8B, + A36D109F080E84D80012BB8B, + A36D10A0080E84D80012BB8B, + A36D10A1080E84D80012BB8B, + A36D10A2080E84D80012BB8B, + ); + isa = PBXGroup; + name = src; + path = "../../src-IL/src"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D10E3080E856E0012BB8B = { + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + isa = PBXShellScriptBuildPhase; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ""; + }; + A36D10E7080E8E5D0012BB8B = { + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + isa = PBXShellScriptBuildPhase; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "# get to the root of the installation\ncd ../../\n\n# check if configure script is available or generate it\nif [ ! -x configure ] ; then\n\t./autogen.sh\nfi\n\n# call configuration script\nif [ |\n./configure\n\n# successfull exit\nexit $?\n"; + }; + A36D10E8080E8E5D0012BB8B = { + buildPhases = ( + A36D10E7080E8E5D0012BB8B, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Configure; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + ); + isa = PBXAggregateTarget; + name = Configure; + productName = Configure; + }; + A36D10F4080E8FD80012BB8B = { + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + isa = PBXShellScriptBuildPhase; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\ncd build\nsudo cp libIL.dylib libILU.dylib libILUT.dylib /usr/local/lib\nif [ $? -ne 0 ] ; then\n\techo \"Failure installing the libraries\"\n\texit 1\nfi\nsudo cp usr/local/include/* /usr/local/include/\nif [ $? -ne 0 ] ; then\n\techo \"Failure installing the includes\"\n\texit 1\nfi\nexit 0"; + }; + A36D10F5080E8FD80012BB8B = { + buildPhases = ( + A36D10F4080E8FD80012BB8B, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Install; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + A36D10F9080E8FE80012BB8B, + A36D10FB080E8FE80012BB8B, + A36D10FD080E8FE80012BB8B, + ); + isa = PBXAggregateTarget; + name = Install; + productName = Install; + }; + A36D10F8080E8FE80012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D10F9080E8FE80012BB8B = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28; + targetProxy = A36D10F8080E8FE80012BB8B; + }; + A36D10FA080E8FE80012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009514080E7F44003DEA28; + remoteInfo = libILU; + }; + A36D10FB080E8FE80012BB8B = { + isa = PBXTargetDependency; + target = A3009514080E7F44003DEA28; + targetProxy = A36D10FA080E8FE80012BB8B; + }; + A36D10FC080E8FE80012BB8B = { + containerPortal = 08FB7793FE84155DC02AAC07; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = A3009519080E7F51003DEA28; + remoteInfo = libILUT; + }; + A36D10FD080E8FE80012BB8B = { + isa = PBXTargetDependency; + target = A3009519080E7F51003DEA28; + targetProxy = A36D10FC080E8FE80012BB8B; + }; + A36D1100080E91B20012BB8B = { + children = ( + A38C3C0A0818FC10008EE126, + A36D1101080E92150012BB8B, + A36D10DB080E85070012BB8B, + ); + isa = PBXGroup; + name = IL; + path = ""; + refType = 4; + sourceTree = ""; + }; + A36D1101080E92150012BB8B = { + children = ( + A36D1103080E92150012BB8B, + A36D1104080E92150012BB8B, + A36D1105080E92150012BB8B, + A36D1106080E92150012BB8B, + A36D1107080E92150012BB8B, + A36D1108080E92150012BB8B, + A36D1109080E92150012BB8B, + A36D110A080E92150012BB8B, + A36D110B080E92150012BB8B, + A36D110C080E92150012BB8B, + A36D110D080E92150012BB8B, + A36D110E080E92150012BB8B, + A36D110F080E92150012BB8B, + A36D1110080E92150012BB8B, + A36D1111080E92150012BB8B, + A36D1112080E92150012BB8B, + A36D1113080E92150012BB8B, + A36D1114080E92150012BB8B, + A36D1115080E92150012BB8B, + A36D1116080E92150012BB8B, + A36D1117080E92150012BB8B, + A36D1118080E92150012BB8B, + A36D1119080E92150012BB8B, + A36D111A080E92150012BB8B, + A36D111B080E92150012BB8B, + A36D111C080E92150012BB8B, + A36D111D080E92150012BB8B, + A36D111E080E92150012BB8B, + A36D111F080E92150012BB8B, + ); + isa = PBXGroup; + name = include; + path = "../../src-IL/include"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1103080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_alloc.h; + refType = 4; + sourceTree = ""; + }; + A36D1104080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_bits.h; + refType = 4; + sourceTree = ""; + }; + A36D1105080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_bmp.h; + refType = 4; + sourceTree = ""; + }; + A36D1106080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_dcx.h; + refType = 4; + sourceTree = ""; + }; + A36D1107080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_dds.h; + refType = 4; + sourceTree = ""; + }; + A36D1108080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_doompal.h; + refType = 4; + sourceTree = ""; + }; + A36D1109080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_endian.h; + refType = 4; + sourceTree = ""; + }; + A36D110A080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_files.h; + refType = 4; + sourceTree = ""; + }; + A36D110B080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_gif.h; + refType = 4; + sourceTree = ""; + }; + A36D110C080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_hdr.h; + refType = 4; + sourceTree = ""; + }; + A36D110D080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_icon.h; + refType = 4; + sourceTree = ""; + }; + A36D110E080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_internal.h; + refType = 4; + sourceTree = ""; + }; + A36D110F080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_jpeg.h; + refType = 4; + sourceTree = ""; + }; + A36D1110080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_lif.h; + refType = 4; + sourceTree = ""; + }; + A36D1111080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_manip.h; + refType = 4; + sourceTree = ""; + }; + A36D1112080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_mdl.h; + refType = 4; + sourceTree = ""; + }; + A36D1113080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_pal.h; + refType = 4; + sourceTree = ""; + }; + A36D1114080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_pcx.h; + refType = 4; + sourceTree = ""; + }; + A36D1115080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_pic.h; + refType = 4; + sourceTree = ""; + }; + A36D1116080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_pnm.h; + refType = 4; + sourceTree = ""; + }; + A36D1117080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_psd.h; + refType = 4; + sourceTree = ""; + }; + A36D1118080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_psp.h; + refType = 4; + sourceTree = ""; + }; + A36D1119080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_q2pal.h; + refType = 4; + sourceTree = ""; + }; + A36D111A080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_register.h; + refType = 4; + sourceTree = ""; + }; + A36D111B080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_rle.h; + refType = 4; + sourceTree = ""; + }; + A36D111C080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_sgi.h; + refType = 4; + sourceTree = ""; + }; + A36D111D080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_stack.h; + refType = 4; + sourceTree = ""; + }; + A36D111E080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_states.h; + refType = 4; + sourceTree = ""; + }; + A36D111F080E92150012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = il_targa.h; + refType = 4; + sourceTree = ""; + }; + A36D1123080E92150012BB8B = { + fileRef = A36D1103080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1124080E92150012BB8B = { + fileRef = A36D1104080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1125080E92150012BB8B = { + fileRef = A36D1105080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1126080E92150012BB8B = { + fileRef = A36D1106080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1127080E92150012BB8B = { + fileRef = A36D1107080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1128080E92150012BB8B = { + fileRef = A36D1108080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1129080E92150012BB8B = { + fileRef = A36D1109080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112A080E92150012BB8B = { + fileRef = A36D110A080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112B080E92150012BB8B = { + fileRef = A36D110B080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112C080E92150012BB8B = { + fileRef = A36D110C080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112D080E92150012BB8B = { + fileRef = A36D110D080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112E080E92150012BB8B = { + fileRef = A36D110E080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D112F080E92150012BB8B = { + fileRef = A36D110F080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1130080E92150012BB8B = { + fileRef = A36D1110080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1131080E92150012BB8B = { + fileRef = A36D1111080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1132080E92150012BB8B = { + fileRef = A36D1112080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1133080E92150012BB8B = { + fileRef = A36D1113080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1134080E92150012BB8B = { + fileRef = A36D1114080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1135080E92150012BB8B = { + fileRef = A36D1115080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1136080E92150012BB8B = { + fileRef = A36D1116080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1137080E92150012BB8B = { + fileRef = A36D1117080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1138080E92150012BB8B = { + fileRef = A36D1118080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1139080E92150012BB8B = { + fileRef = A36D1119080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113A080E92150012BB8B = { + fileRef = A36D111A080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113B080E92150012BB8B = { + fileRef = A36D111B080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113C080E92150012BB8B = { + fileRef = A36D111C080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113D080E92150012BB8B = { + fileRef = A36D111D080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113E080E92150012BB8B = { + fileRef = A36D111E080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D113F080E92150012BB8B = { + fileRef = A36D111F080E92150012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D115F080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = ilut.h; + path = ../../include/IL/ilut.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1165080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = ilu_region.h; + path = ../../include/IL/ilu_region.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1166080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = config.h; + path = ../../include/IL/config.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1167080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = il.h; + path = ../../include/IL/il.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1168080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = ilu.h; + path = ../../include/IL/ilu.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D116C080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = devil_internal_exports.h; + path = ../../include/IL/devil_internal_exports.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D116E080E95D60012BB8B = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = il_wrap.h; + path = ../../include/IL/il_wrap.h; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A36D1171080E95D60012BB8B = { + fileRef = A36D115F080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A36D1172080E95D60012BB8B = { + fileRef = A36D1165080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1173080E95D60012BB8B = { + fileRef = A36D1166080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A36D1174080E95D60012BB8B = { + fileRef = A36D1167080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A36D1175080E95D60012BB8B = { + fileRef = A36D1168080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A36D1176080E95D60012BB8B = { + fileRef = A36D116C080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + }; + }; + A36D1177080E95D60012BB8B = { + fileRef = A36D116E080E95D60012BB8B; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A38C3BE30818FAB2008EE126 = { + children = ( + A39B3BAE081C18DF00115B25, + A39B3BAC081C189200115B25, + A39B3BAD081C189200115B25, + A38C3BE40818FAB2008EE126, + A38C3BE50818FAB2008EE126, + ); + isa = PBXGroup; + name = altivec; + path = ../../altivec; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A38C3BE40818FAB2008EE126 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = altivec_common.c; + refType = 4; + sourceTree = ""; + }; + A38C3BE50818FAB2008EE126 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = altivec_common.h; + refType = 4; + sourceTree = ""; + }; + A38C3BE60818FAB2008EE126 = { + fileRef = A38C3BE40818FAB2008EE126; + isa = PBXBuildFile; + settings = { + }; + }; + A38C3BE70818FAB2008EE126 = { + fileRef = A38C3BE50818FAB2008EE126; + isa = PBXBuildFile; + settings = { + }; + }; + A38C3C0A0818FC10008EE126 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = "../../src-IL/src/Makefile.am"; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + A38C3C170818FC42008EE126 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = "../../src-ILU/src/Makefile.am"; + refType = 4; + sourceTree = ""; + }; + A38C3C1F0818FC55008EE126 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = "../../src-ILUT/src/Makefile.am"; + refType = 4; + sourceTree = ""; + }; + A39B3BAC081C189200115B25 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = altivec_typeconversion.h; + refType = 4; + sourceTree = ""; + }; + A39B3BAD081C189200115B25 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = altivec_typeconversion.c; + refType = 4; + sourceTree = ""; + }; + A39B3BAE081C18DF00115B25 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = altivec.h; + refType = 4; + sourceTree = ""; + }; + A39B3C4F081C1E5100115B25 = { + fileRef = A39B3BAD081C189200115B25; + isa = PBXBuildFile; + settings = { + }; + }; + A39B3C50081C1E6000115B25 = { + fileRef = A39B3BAC081C189200115B25; + isa = PBXBuildFile; + settings = { + }; + }; + }; + rootObject = 08FB7793FE84155DC02AAC07; +} diff --git a/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.mode1v3 b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.mode1v3 new file mode 100644 index 00000000..d1b374fa --- /dev/null +++ b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.mode1v3 @@ -0,0 +1,1400 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + EACAFE730E79369B0024FAE4 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 08FB7794FE84155DC02AAC07 + A36D1100080E91B20012BB8B + 1C37FBAC04509CD000000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 445}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 463}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 118 210 788 504 0 0 1024 746 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + Makefile.am + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + Makefile.am + _historyCapacity + 0 + bookmark + EAF51F730F2FD80A00264BE8 + history + + EACAFF130E793EC20024FAE4 + EAF51F470F2FCF1E00264BE8 + EAF51F480F2FCF1E00264BE8 + EAF51F490F2FCF1E00264BE8 + EAF51F4A0F2FCF1E00264BE8 + EAF51F4B0F2FCF1E00264BE8 + EAF51F4C0F2FCF1E00264BE8 + EAF51F6C0F2FD7F000264BE8 + EAF51F6D0F2FD7F000264BE8 + + prevStack + + EACAFF150E793EC20024FAE4 + EAF51F4E0F2FCF1E00264BE8 + EAF51F4F0F2FCF1E00264BE8 + EAF51F500F2FCF1E00264BE8 + EAF51F510F2FCF1E00264BE8 + EAF51F520F2FCF1E00264BE8 + EAF51F530F2FCF1E00264BE8 + EAF51F6E0F2FD7F000264BE8 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {580, 137}} + RubberWindowFrame + 118 210 788 504 0 0 1024 746 + + Module + PBXNavigatorGroup + Proportion + 137pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 142}, {580, 321}} + RubberWindowFrame + 118 210 788 504 0 0 1024 746 + + Module + XCDetailModule + Proportion + 321pt + + + Proportion + 580pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + EAF51F700F2FD7F000264BE8 + 1CE0B1FE06471DED0097A5F4 + EAF51F710F2FD7F000264BE8 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + /Users/dwoods/DevIL/projects/xcode/DevIL.xcodeproj + + WindowString + 118 210 788 504 0 0 1024 746 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {1024, 0}} + RubberWindowFrame + 0 126 1024 620 0 0 1024 746 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 5}, {1024, 574}} + RubberWindowFrame + 0 126 1024 620 0 0 1024 746 + + Module + PBXBuildResultsModule + Proportion + 574pt + + + Proportion + 579pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + EACAFE6C0E7936800024FAE4 + EA942B3E0E7943B200D95BD5 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 0 126 1024 620 0 0 1024 746 + WindowToolGUID + EACAFE6C0E7936800024FAE4 + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.find + IsVertical + + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {781, 113}} + RubberWindowFrame + 82 206 781 470 0 0 1024 746 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 113pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{0, 118}, {781, 311}} + RubberWindowFrame + 82 206 781 470 0 0 1024 746 + + Module + PBXProjectFindModule + Proportion + 311pt + + + Proportion + 429pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + + TableOfContents + + 1C530D57069F1CE1000CFCEE + EACAFE890E7937050024FAE4 + EACAFE8A0E7937050024FAE4 + 1CDD528C0622207200134675 + 1CD0528E0623707200166675 + + WindowString + 82 206 781 470 0 0 1024 746 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 250}} + RubberWindowFrame + 516 632 650 250 0 0 1680 1027 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 650 41 650 250 0 0 1280 1002 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.projectFormatConflicts + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + EACAFE900E7937320024FAE4 + + GeometryConfiguration + + Frame + {{0, 0}, {472, 302}} + RubberWindowFrame + 139 369 472 322 0 0 1024 746 + + Module + XCProjectFormatConflictsModule + Proportion + 302pt + + + Proportion + 302pt + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + + TableOfContents + + EACAFE910E7937320024FAE4 + EACAFE920E7937320024FAE4 + EACAFE900E7937320024FAE4 + + WindowContentMinSize + 450 300 + WindowString + 139 369 472 322 0 0 1024 746 + WindowToolGUID + EACAFE910E7937320024FAE4 + WindowToolIsVisible + + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.pbxuser b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.pbxuser new file mode 100644 index 00000000..da18276e --- /dev/null +++ b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/dwoods.pbxuser @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + activeBuildConfigurationName = Development; + activeTarget = A36D10E8080E8E5D0012BB8B /* Configure */; + addToTargets = ( + A3009514080E7F44003DEA28 /* libILU */, + ); + codeSenseManager = EACAFE600E7936340024FAE4 /* Code sense */; + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 341, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID; + PBXFileTableDataSourceColumnWidthsKey = ( + 16, + 200, + 50, + 281, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXSymbolsDataSource_SymbolTypeIconID, + PBXSymbolsDataSource_SymbolNameID, + PBXSymbolsDataSource_SymbolTypeID, + PBXSymbolsDataSource_ReferenceNameID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 301, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 254793687; + PBXWorkspaceStateSaveDate = 254793687; + }; + perUserProjectItems = { + EACAFF130E793EC20024FAE4 /* PBXTextBookmark */ = EACAFF130E793EC20024FAE4 /* PBXTextBookmark */; + EACAFF150E793EC20024FAE4 /* PBXTextBookmark */ = EACAFF150E793EC20024FAE4 /* PBXTextBookmark */; + EAF51F470F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F470F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F480F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F480F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F490F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F490F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F4A0F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F4A0F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F4B0F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F4B0F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F4C0F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F4C0F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F4E0F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F4E0F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F4F0F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F4F0F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F500F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F500F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F510F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F510F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F520F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F520F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F530F2FCF1E00264BE8 /* PBXTextBookmark */ = EAF51F530F2FCF1E00264BE8 /* PBXTextBookmark */; + EAF51F6C0F2FD7F000264BE8 /* PBXTextBookmark */ = EAF51F6C0F2FD7F000264BE8 /* PBXTextBookmark */; + EAF51F6D0F2FD7F000264BE8 /* PBXBookmark */ = EAF51F6D0F2FD7F000264BE8 /* PBXBookmark */; + EAF51F6E0F2FD7F000264BE8 /* PBXTextBookmark */ = EAF51F6E0F2FD7F000264BE8 /* PBXTextBookmark */; + EAF51F730F2FD80A00264BE8 /* PBXTextBookmark */ = EAF51F730F2FD80A00264BE8 /* PBXTextBookmark */; + }; + sourceControlManager = EACAFE5F0E7936340024FAE4 /* Source Control */; + userBuildSettings = { + }; + }; + A3009514080E7F44003DEA28 /* libILU */ = { + activeExec = 0; + }; + A3009519080E7F51003DEA28 /* libILUT */ = { + activeExec = 0; + }; + A3009525080E7F6E003DEA28 /* libIL */ = { + activeExec = 0; + }; + A32D48B108102349008510AC /* ilu_error.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 924}}"; + sepNavSelRange = "{377, 27}"; + sepNavVisRange = "{0, 0}"; + sepNavWindowFrame = "{{15, 63}, {750, 683}}"; + }; + }; + A32D48B908102349008510AC /* ilu_region.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 4214}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 530}"; + }; + }; + A32D48BE08102349008510AC /* ilu_scaling.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 6748}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 121}"; + }; + }; + A32D48DC0810234E008510AC /* ilu_region.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 406}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{302, 291}"; + }; + }; + A32D49450810244F008510AC /* ilut_internal.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 1148}}"; + sepNavSelRange = "{499, 29}"; + sepNavVisRange = "{313, 331}"; + }; + }; + A36D106F080E84D70012BB8B /* il_alloc.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 3696}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 424}"; + sepNavWindowFrame = "{{38, 162}, {750, 558}}"; + }; + }; + A36D1071080E84D70012BB8B /* il_bmp.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {963, 14140}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 644}"; + }; + }; + A36D1073080E84D70012BB8B /* il_convert.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1056, 14588}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 506}"; + }; + }; + A36D1077080E84D80012BB8B /* il_dds.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {963, 38976}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{515, 1011}"; + sepNavWindowFrame = "{{107, 99}, {750, 558}}"; + }; + }; + A36D107E080E84D80012BB8B /* il_gif.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 11004}}"; + sepNavSelRange = "{4532, 50}"; + sepNavVisRange = "{80, 164}"; + sepNavWindowFrame = "{{15, 63}, {750, 683}}"; + }; + }; + A36D1094080E84D80012BB8B /* il_psp.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {963, 9716}}"; + sepNavSelRange = "{6707, 12}"; + sepNavVisRange = "{6322, 579}"; + sepNavWindowFrame = "{{15, 63}, {750, 683}}"; + }; + }; + A36D109E080E84D80012BB8B /* il_targa.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 13160}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 216}"; + }; + }; + A36D10A1080E84D80012BB8B /* il_wal.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {486, 2478}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 403}"; + sepNavWindowFrame = "{{15, 183}, {750, 558}}"; + }; + }; + A36D10E8080E8E5D0012BB8B /* Configure */ = { + activeExec = 0; + }; + A36D10F5080E8FD80012BB8B /* Install */ = { + activeExec = 0; + }; + A36D110E080E92150012BB8B /* il_internal.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {691, 6006}}"; + sepNavSelRange = "{732, 0}"; + sepNavVisRange = "{529, 1030}"; + sepNavWindowFrame = "{{61, 61}, {750, 685}}"; + }; + }; + A36D1111080E92150012BB8B /* il_manip.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {963, 3108}}"; + sepNavSelRange = "{1199, 0}"; + sepNavVisRange = "{757, 531}"; + }; + }; + A36D115F080E95D60012BB8B /* ilut.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {660, 5544}}"; + sepNavSelRange = "{7444, 58}"; + sepNavVisRange = "{7422, 187}"; + sepNavWindowFrame = "{{15, 67}, {750, 679}}"; + }; + }; + A36D1165080E95D60012BB8B /* ilu_region.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 322}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 248}"; + }; + }; + A36D1166080E95D60012BB8B /* config.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {691, 1918}}"; + sepNavSelRange = "{1126, 0}"; + sepNavVisRange = "{529, 701}"; + sepNavWindowFrame = "{{15, 76}, {750, 670}}"; + }; + }; + A36D1167080E95D60012BB8B /* il.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 8428}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 422}"; + sepNavWindowFrame = "{{15, 56}, {750, 685}}"; + }; + }; + A36D1168080E95D60012BB8B /* ilu.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 2772}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{111, 229}"; + }; + }; + A36D116C080E95D60012BB8B /* devil_internal_exports.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {720, 2240}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 205}"; + sepNavWindowFrame = "{{84, 120}, {750, 558}}"; + }; + }; + A38C3C170818FC42008EE126 /* Makefile.am */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 224}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 423}"; + sepNavWindowFrame = "{{15, 64}, {750, 682}}"; + }; + }; + EACAFE5F0E7936340024FAE4 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + }; + }; + EACAFE600E7936340024FAE4 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + EACAFF130E793EC20024FAE4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A32D48B108102349008510AC /* ilu_error.c */; + name = "ilu_error.c: 14"; + rLen = 27; + rLoc = 377; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + EACAFF150E793EC20024FAE4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A32D48B108102349008510AC /* ilu_error.c */; + name = "ilu_error.c: 14"; + rLen = 27; + rLoc = 377; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 6104}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 216}"; + }; + }; + EAF51F470F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D107E080E84D80012BB8B /* il_gif.c */; + name = "il_gif.c: 214"; + rLen = 50; + rLoc = 4532; + rType = 0; + vrLen = 164; + vrLoc = 80; + }; + EAF51F480F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D1168080E95D60012BB8B /* ilu.h */; + name = "ilu.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 229; + vrLoc = 111; + }; + EAF51F490F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D115F080E95D60012BB8B /* ilut.h */; + name = "ilut.h: 268"; + rLen = 58; + rLoc = 7444; + rType = 0; + vrLen = 187; + vrLoc = 7422; + }; + EAF51F4A0F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D1165080E95D60012BB8B /* ilu_region.h */; + name = "ilu_region.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 248; + vrLoc = 0; + }; + EAF51F4B0F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D109E080E84D80012BB8B /* il_targa.c */; + name = "il_targa.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 216; + vrLoc = 0; + }; + EAF51F4C0F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A32D48BE08102349008510AC /* ilu_scaling.c */; + name = "ilu_scaling.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 121; + vrLoc = 0; + }; + EAF51F4E0F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D107E080E84D80012BB8B /* il_gif.c */; + name = "il_gif.c: 214"; + rLen = 50; + rLoc = 4532; + rType = 0; + vrLen = 164; + vrLoc = 80; + }; + EAF51F4F0F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D1168080E95D60012BB8B /* ilu.h */; + name = "ilu.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 229; + vrLoc = 111; + }; + EAF51F500F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D115F080E95D60012BB8B /* ilut.h */; + name = "ilut.h: 268"; + rLen = 58; + rLoc = 7444; + rType = 0; + vrLen = 187; + vrLoc = 7422; + }; + EAF51F510F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D1165080E95D60012BB8B /* ilu_region.h */; + name = "ilu_region.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 248; + vrLoc = 0; + }; + EAF51F520F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A36D109E080E84D80012BB8B /* il_targa.c */; + name = "il_targa.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 216; + vrLoc = 0; + }; + EAF51F530F2FCF1E00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A32D48BE08102349008510AC /* ilu_scaling.c */; + name = "ilu_scaling.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 121; + vrLoc = 0; + }; + EAF51F6C0F2FD7F000264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */; + name = "il_exr.cpp: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 216; + vrLoc = 0; + }; + EAF51F6D0F2FD7F000264BE8 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = A38C3C170818FC42008EE126 /* Makefile.am */; + }; + EAF51F6E0F2FD7F000264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */; + name = "il_exr.cpp: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 216; + vrLoc = 0; + }; + EAF51F730F2FD80A00264BE8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = A38C3C170818FC42008EE126 /* Makefile.am */; + name = "Makefile.am: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 423; + vrLoc = 0; + }; +} diff --git a/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/project.pbxproj b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/project.pbxproj new file mode 100644 index 00000000..60dcf6bd --- /dev/null +++ b/libs/DevIL-1.7.8/projects/xcode/DevIL.xcodeproj/project.pbxproj @@ -0,0 +1,1573 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXAggregateTarget section */ + A36D10E8080E8E5D0012BB8B /* Configure */ = { + isa = PBXAggregateTarget; + buildConfigurationList = EACAFE5A0E7936340024FAE4 /* Build configuration list for PBXAggregateTarget "Configure" */; + buildPhases = ( + A36D10E7080E8E5D0012BB8B /* ShellScript */, + ); + dependencies = ( + ); + name = Configure; + productName = Configure; + }; + A36D10F5080E8FD80012BB8B /* Install */ = { + isa = PBXAggregateTarget; + buildConfigurationList = EACAFE5E0E7936340024FAE4 /* Build configuration list for PBXAggregateTarget "Install" */; + buildPhases = ( + A36D10F4080E8FD80012BB8B /* ShellScript */, + ); + dependencies = ( + A36D10F9080E8FE80012BB8B /* PBXTargetDependency */, + A36D10FB080E8FE80012BB8B /* PBXTargetDependency */, + A36D10FD080E8FE80012BB8B /* PBXTargetDependency */, + ); + name = Install; + productName = Install; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + A32D48C408102349008510AC /* ilu_alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B008102349008510AC /* ilu_alloc.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48C508102349008510AC /* ilu_error.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B108102349008510AC /* ilu_error.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48C608102349008510AC /* ilu_filter.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B208102349008510AC /* ilu_filter.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48C708102349008510AC /* ilu_filter_rcg.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B308102349008510AC /* ilu_filter_rcg.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48C808102349008510AC /* ilu_internal.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B408102349008510AC /* ilu_internal.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48C908102349008510AC /* ilu_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B508102349008510AC /* ilu_main.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CA08102349008510AC /* ilu_manip.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B608102349008510AC /* ilu_manip.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CB08102349008510AC /* ilu_mipmap.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B708102349008510AC /* ilu_mipmap.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CC08102349008510AC /* ilu_noise.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B808102349008510AC /* ilu_noise.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CD08102349008510AC /* ilu_region.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48B908102349008510AC /* ilu_region.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CE08102349008510AC /* ilu_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BA08102349008510AC /* ilu_rotate.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48CF08102349008510AC /* ilu_scale.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BB08102349008510AC /* ilu_scale.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48D008102349008510AC /* ilu_scale2d.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BC08102349008510AC /* ilu_scale2d.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48D108102349008510AC /* ilu_scale3d.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BD08102349008510AC /* ilu_scale3d.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48D208102349008510AC /* ilu_scaling.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BE08102349008510AC /* ilu_scaling.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48D308102349008510AC /* ilu_states.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48BF08102349008510AC /* ilu_states.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48D408102349008510AC /* ilu_utilities.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D48C008102349008510AC /* ilu_utilities.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D48E20810234E008510AC /* ilu_filter.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D48D90810234E008510AC /* ilu_filter.h */; }; + A32D48E30810234E008510AC /* ilu_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D48DA0810234E008510AC /* ilu_internal.h */; }; + A32D48E40810234E008510AC /* ilu_mipmap.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D48DB0810234E008510AC /* ilu_mipmap.h */; }; + A32D48E50810234E008510AC /* ilu_region.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D48DC0810234E008510AC /* ilu_region.h */; }; + A32D48E60810234E008510AC /* ilu_states.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D48DD0810234E008510AC /* ilu_states.h */; }; + A32D48FD081023D6008510AC /* libIL.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A3009526080E7F6E003DEA28 /* libIL.dylib */; }; + A32D490508102403008510AC /* libIL.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A3009526080E7F6E003DEA28 /* libIL.dylib */; }; + A32D490608102405008510AC /* libILU.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A3009515080E7F44003DEA28 /* libILU.dylib */; }; + A32D49630810244F008510AC /* ilut_allegro.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D49440810244F008510AC /* ilut_allegro.h */; }; + A32D49640810244F008510AC /* ilut_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D49450810244F008510AC /* ilut_internal.h */; }; + A32D49650810244F008510AC /* ilut_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D49460810244F008510AC /* ilut_opengl.h */; }; + A32D49660810244F008510AC /* ilut_states.h in Headers */ = {isa = PBXBuildFile; fileRef = A32D49470810244F008510AC /* ilut_states.h */; }; + A32D49680810244F008510AC /* ilut_allegro.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D49570810244F008510AC /* ilut_allegro.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D49690810244F008510AC /* ilut_directx.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D49580810244F008510AC /* ilut_directx.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496A0810244F008510AC /* ilut_directx9.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D49590810244F008510AC /* ilut_directx9.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496B0810244F008510AC /* ilut_internal.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495A0810244F008510AC /* ilut_internal.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496C0810244F008510AC /* ilut_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495B0810244F008510AC /* ilut_main.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496D0810244F008510AC /* ilut_opengl.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495C0810244F008510AC /* ilut_opengl.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496E0810244F008510AC /* ilut_sdlsurface.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495D0810244F008510AC /* ilut_sdlsurface.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D496F0810244F008510AC /* ilut_states.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495E0810244F008510AC /* ilut_states.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A32D49700810244F008510AC /* ilut_win32.c in Sources */ = {isa = PBXBuildFile; fileRef = A32D495F0810244F008510AC /* ilut_win32.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A33D1E4A080EA43E00FEBAC9 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A33D1E37080EA43A00FEBAC9 /* OpenGL.framework */; }; + A35C9CAB080EBA5100CCD137 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A35C9CAA080EBA5100CCD137 /* libz.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + A36D10A6080E84D80012BB8B /* il_alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D106F080E84D70012BB8B /* il_alloc.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10A7080E84D80012BB8B /* il_bits.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1070080E84D70012BB8B /* il_bits.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10A8080E84D80012BB8B /* il_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1071080E84D70012BB8B /* il_bmp.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10A9080E84D80012BB8B /* il_convbuff.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1072080E84D70012BB8B /* il_convbuff.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AA080E84D80012BB8B /* il_convert.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1073080E84D70012BB8B /* il_convert.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AB080E84D80012BB8B /* il_cut.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1074080E84D70012BB8B /* il_cut.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AC080E84D80012BB8B /* il_dcx.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1075080E84D70012BB8B /* il_dcx.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AD080E84D80012BB8B /* il_dds-save.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1076080E84D80012BB8B /* il_dds-save.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AE080E84D80012BB8B /* il_dds.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1077080E84D80012BB8B /* il_dds.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10AF080E84D80012BB8B /* il_devil.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1078080E84D80012BB8B /* il_devil.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B0080E84D80012BB8B /* il_doom.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1079080E84D80012BB8B /* il_doom.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B1080E84D80012BB8B /* il_endian.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107A080E84D80012BB8B /* il_endian.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B2080E84D80012BB8B /* il_error.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107B080E84D80012BB8B /* il_error.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B3080E84D80012BB8B /* il_fastconv.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107C080E84D80012BB8B /* il_fastconv.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B4080E84D80012BB8B /* il_files.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107D080E84D80012BB8B /* il_files.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B5080E84D80012BB8B /* il_gif.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107E080E84D80012BB8B /* il_gif.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B6080E84D80012BB8B /* il_hdr.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D107F080E84D80012BB8B /* il_hdr.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B7080E84D80012BB8B /* il_header.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1080080E84D80012BB8B /* il_header.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B8080E84D80012BB8B /* il_icon.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1081080E84D80012BB8B /* il_icon.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10B9080E84D80012BB8B /* il_internal.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1082080E84D80012BB8B /* il_internal.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BA080E84D80012BB8B /* il_io.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1083080E84D80012BB8B /* il_io.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BB080E84D80012BB8B /* il_jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1084080E84D80012BB8B /* il_jpeg.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BC080E84D80012BB8B /* il_lif.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1085080E84D80012BB8B /* il_lif.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BD080E84D80012BB8B /* il_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1086080E84D80012BB8B /* il_main.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BE080E84D80012BB8B /* il_manip.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1087080E84D80012BB8B /* il_manip.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10BF080E84D80012BB8B /* il_mdl.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1088080E84D80012BB8B /* il_mdl.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C0080E84D80012BB8B /* il_mng.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1089080E84D80012BB8B /* il_mng.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C1080E84D80012BB8B /* il_neuquant.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108A080E84D80012BB8B /* il_neuquant.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C2080E84D80012BB8B /* il_pal.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108B080E84D80012BB8B /* il_pal.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C3080E84D80012BB8B /* il_pcd.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108C080E84D80012BB8B /* il_pcd.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C4080E84D80012BB8B /* il_pcx.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108D080E84D80012BB8B /* il_pcx.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C5080E84D80012BB8B /* il_pic.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108E080E84D80012BB8B /* il_pic.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C6080E84D80012BB8B /* il_pix.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D108F080E84D80012BB8B /* il_pix.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C7080E84D80012BB8B /* il_png.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1090080E84D80012BB8B /* il_png.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C8080E84D80012BB8B /* il_pnm.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1091080E84D80012BB8B /* il_pnm.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10C9080E84D80012BB8B /* il_profiles.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1092080E84D80012BB8B /* il_profiles.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CA080E84D80012BB8B /* il_psd.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1093080E84D80012BB8B /* il_psd.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CB080E84D80012BB8B /* il_psp.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1094080E84D80012BB8B /* il_psp.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CC080E84D80012BB8B /* il_pxr.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1095080E84D80012BB8B /* il_pxr.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CD080E84D80012BB8B /* il_quantizer.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1096080E84D80012BB8B /* il_quantizer.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CE080E84D80012BB8B /* il_raw.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1097080E84D80012BB8B /* il_raw.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10CF080E84D80012BB8B /* il_rawdata.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1098080E84D80012BB8B /* il_rawdata.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D0080E84D80012BB8B /* il_register.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D1099080E84D80012BB8B /* il_register.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D1080E84D80012BB8B /* il_rle.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109A080E84D80012BB8B /* il_rle.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D2080E84D80012BB8B /* il_sgi.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109B080E84D80012BB8B /* il_sgi.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D3080E84D80012BB8B /* il_stack.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109C080E84D80012BB8B /* il_stack.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D4080E84D80012BB8B /* il_states.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109D080E84D80012BB8B /* il_states.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D5080E84D80012BB8B /* il_targa.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109E080E84D80012BB8B /* il_targa.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D6080E84D80012BB8B /* il_tiff.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D109F080E84D80012BB8B /* il_tiff.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D7080E84D80012BB8B /* il_utility.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D10A0080E84D80012BB8B /* il_utility.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D8080E84D80012BB8B /* il_wal.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D10A1080E84D80012BB8B /* il_wal.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D10D9080E84D80012BB8B /* il_xpm.c in Sources */ = {isa = PBXBuildFile; fileRef = A36D10A2080E84D80012BB8B /* il_xpm.c */; settings = {COMPILER_FLAGS = "-I../../include"; }; }; + A36D1123080E92150012BB8B /* il_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1103080E92150012BB8B /* il_alloc.h */; }; + A36D1124080E92150012BB8B /* il_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1104080E92150012BB8B /* il_bits.h */; }; + A36D1125080E92150012BB8B /* il_bmp.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1105080E92150012BB8B /* il_bmp.h */; }; + A36D1126080E92150012BB8B /* il_dcx.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1106080E92150012BB8B /* il_dcx.h */; }; + A36D1127080E92150012BB8B /* il_dds.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1107080E92150012BB8B /* il_dds.h */; }; + A36D1128080E92150012BB8B /* il_doompal.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1108080E92150012BB8B /* il_doompal.h */; }; + A36D1129080E92150012BB8B /* il_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1109080E92150012BB8B /* il_endian.h */; }; + A36D112A080E92150012BB8B /* il_files.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110A080E92150012BB8B /* il_files.h */; }; + A36D112B080E92150012BB8B /* il_gif.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110B080E92150012BB8B /* il_gif.h */; }; + A36D112C080E92150012BB8B /* il_hdr.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110C080E92150012BB8B /* il_hdr.h */; }; + A36D112D080E92150012BB8B /* il_icon.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110D080E92150012BB8B /* il_icon.h */; }; + A36D112E080E92150012BB8B /* il_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110E080E92150012BB8B /* il_internal.h */; }; + A36D112F080E92150012BB8B /* il_jpeg.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D110F080E92150012BB8B /* il_jpeg.h */; }; + A36D1130080E92150012BB8B /* il_lif.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1110080E92150012BB8B /* il_lif.h */; }; + A36D1131080E92150012BB8B /* il_manip.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1111080E92150012BB8B /* il_manip.h */; }; + A36D1132080E92150012BB8B /* il_mdl.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1112080E92150012BB8B /* il_mdl.h */; }; + A36D1133080E92150012BB8B /* il_pal.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1113080E92150012BB8B /* il_pal.h */; }; + A36D1134080E92150012BB8B /* il_pcx.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1114080E92150012BB8B /* il_pcx.h */; }; + A36D1135080E92150012BB8B /* il_pic.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1115080E92150012BB8B /* il_pic.h */; }; + A36D1136080E92150012BB8B /* il_pnm.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1116080E92150012BB8B /* il_pnm.h */; }; + A36D1137080E92150012BB8B /* il_psd.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1117080E92150012BB8B /* il_psd.h */; }; + A36D1138080E92150012BB8B /* il_psp.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1118080E92150012BB8B /* il_psp.h */; }; + A36D1139080E92150012BB8B /* il_q2pal.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1119080E92150012BB8B /* il_q2pal.h */; }; + A36D113A080E92150012BB8B /* il_register.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111A080E92150012BB8B /* il_register.h */; }; + A36D113B080E92150012BB8B /* il_rle.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111B080E92150012BB8B /* il_rle.h */; }; + A36D113C080E92150012BB8B /* il_sgi.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111C080E92150012BB8B /* il_sgi.h */; }; + A36D113D080E92150012BB8B /* il_stack.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111D080E92150012BB8B /* il_stack.h */; }; + A36D113E080E92150012BB8B /* il_states.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111E080E92150012BB8B /* il_states.h */; }; + A36D113F080E92150012BB8B /* il_targa.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D111F080E92150012BB8B /* il_targa.h */; }; + A36D1173080E95D60012BB8B /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1166080E95D60012BB8B /* config.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A36D1174080E95D60012BB8B /* il.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D1167080E95D60012BB8B /* il.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A36D1176080E95D60012BB8B /* devil_internal_exports.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D116C080E95D60012BB8B /* devil_internal_exports.h */; }; + A36D1177080E95D60012BB8B /* il_wrap.h in Headers */ = {isa = PBXBuildFile; fileRef = A36D116E080E95D60012BB8B /* il_wrap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EAF51F360F2FB9FE00264BE8 /* il_exr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */; }; + EAF51F370F2FB9FE00264BE8 /* il_icns.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2B0F2FB9FE00264BE8 /* il_icns.c */; }; + EAF51F380F2FB9FE00264BE8 /* il_iff.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2C0F2FB9FE00264BE8 /* il_iff.c */; }; + EAF51F390F2FB9FE00264BE8 /* il_jp2.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2D0F2FB9FE00264BE8 /* il_jp2.c */; }; + EAF51F3A0F2FB9FE00264BE8 /* il_nvidia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2E0F2FB9FE00264BE8 /* il_nvidia.cpp */; }; + EAF51F3B0F2FB9FE00264BE8 /* il_size.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F2F0F2FB9FE00264BE8 /* il_size.c */; }; + EAF51F3C0F2FB9FE00264BE8 /* il_squish.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F300F2FB9FE00264BE8 /* il_squish.cpp */; }; + EAF51F3D0F2FB9FE00264BE8 /* il_sun.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F310F2FB9FE00264BE8 /* il_sun.c */; }; + EAF51F3E0F2FB9FE00264BE8 /* il_tpl.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F320F2FB9FE00264BE8 /* il_tpl.c */; }; + EAF51F3F0F2FB9FE00264BE8 /* il_vtf.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F330F2FB9FE00264BE8 /* il_vtf.c */; }; + EAF51F400F2FB9FE00264BE8 /* il_wbmp.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F340F2FB9FE00264BE8 /* il_wbmp.c */; }; + EAF51F410F2FB9FE00264BE8 /* il_wdp.c in Sources */ = {isa = PBXBuildFile; fileRef = EAF51F350F2FB9FE00264BE8 /* il_wdp.c */; }; + EAF51F590F2FCF5400264BE8 /* ilu_err-arabic.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F580F2FCF5400264BE8 /* ilu_err-arabic.h */; }; + EAF51F5F0F2FCF6A00264BE8 /* ilu_err-dutch.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F5A0F2FCF6A00264BE8 /* ilu_err-dutch.h */; }; + EAF51F600F2FCF6A00264BE8 /* ilu_err-english.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F5B0F2FCF6A00264BE8 /* ilu_err-english.h */; }; + EAF51F610F2FCF6A00264BE8 /* ilu_err-german.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F5C0F2FCF6A00264BE8 /* ilu_err-german.h */; }; + EAF51F620F2FCF6A00264BE8 /* ilu_err-japanese.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F5D0F2FCF6A00264BE8 /* ilu_err-japanese.h */; }; + EAF51F630F2FCF6A00264BE8 /* ilu_err-spanish.h in Headers */ = {isa = PBXBuildFile; fileRef = EAF51F5E0F2FCF6A00264BE8 /* ilu_err-spanish.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A36D0EDF080E81800012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D0EE1080E81850012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D0EE3080E81850012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009514080E7F44003DEA28; + remoteInfo = libILU; + }; + A36D10F8080E8FE80012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009525080E7F6E003DEA28; + remoteInfo = libIL; + }; + A36D10FA080E8FE80012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009514080E7F44003DEA28; + remoteInfo = libILU; + }; + A36D10FC080E8FE80012BB8B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A3009519080E7F51003DEA28; + remoteInfo = libILUT; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + A3009515080E7F44003DEA28 /* libILU.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libILU.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A300951A080E7F51003DEA28 /* libILUT.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libILUT.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A3009526080E7F6E003DEA28 /* libIL.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libIL.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A30B34820818DB240067D04E /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = AUTHORS; path = /Users/dario/Desktop/Developer/Projects/DevIL/cvsroot/DevIL/AUTHORS; sourceTree = ""; }; + A30B34870818DB400067D04E /* TODO */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = TODO; path = ../../TODO; sourceTree = SOURCE_ROOT; }; + A30B34880818DB400067D04E /* autogen.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; name = autogen.sh; path = ../../autogen.sh; sourceTree = SOURCE_ROOT; }; + A30B34890818DB400067D04E /* COPYING */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = COPYING; path = ../../COPYING; sourceTree = SOURCE_ROOT; }; + A30B348A0818DB400067D04E /* README.win */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = README.win; path = ../../README.win; sourceTree = SOURCE_ROOT; }; + A30B348B0818DB400067D04E /* README.unix */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = README.unix; path = ../../README.unix; sourceTree = SOURCE_ROOT; }; + A30B348C0818DB400067D04E /* README.macosx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = README.macosx; path = ../../README.macosx; sourceTree = SOURCE_ROOT; }; + A30B348D0818DB400067D04E /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = README; path = ../../README; sourceTree = SOURCE_ROOT; }; + A30B348E0818DB400067D04E /* NEWS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = NEWS; path = ../../NEWS; sourceTree = SOURCE_ROOT; }; + A30B348F0818DB400067D04E /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Makefile.am; path = ../../Makefile.am; sourceTree = SOURCE_ROOT; }; + A30B34900818DB400067D04E /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = ChangeLog; path = ../../ChangeLog; sourceTree = SOURCE_ROOT; }; + A30B34910818DB400067D04E /* BUGS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS; path = ../../BUGS; sourceTree = SOURCE_ROOT; }; + A30B34920818DB400067D04E /* Libraries.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Libraries.txt; path = ../../Libraries.txt; sourceTree = SOURCE_ROOT; }; + A30B34930818DB400067D04E /* INSTALL */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = INSTALL; path = ../../INSTALL; sourceTree = SOURCE_ROOT; }; + A30B34940818DB400067D04E /* CREDITS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS; path = ../../CREDITS; sourceTree = SOURCE_ROOT; }; + A30B349E0818DB5C0067D04E /* configure.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = configure.in; path = ../../configure.in; sourceTree = SOURCE_ROOT; }; + A32D48B008102349008510AC /* ilu_alloc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_alloc.c; sourceTree = ""; }; + A32D48B108102349008510AC /* ilu_error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_error.c; sourceTree = ""; }; + A32D48B208102349008510AC /* ilu_filter.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_filter.c; sourceTree = ""; }; + A32D48B308102349008510AC /* ilu_filter_rcg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_filter_rcg.c; sourceTree = ""; }; + A32D48B408102349008510AC /* ilu_internal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_internal.c; sourceTree = ""; }; + A32D48B508102349008510AC /* ilu_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_main.c; sourceTree = ""; }; + A32D48B608102349008510AC /* ilu_manip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_manip.c; sourceTree = ""; }; + A32D48B708102349008510AC /* ilu_mipmap.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_mipmap.c; sourceTree = ""; }; + A32D48B808102349008510AC /* ilu_noise.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_noise.c; sourceTree = ""; }; + A32D48B908102349008510AC /* ilu_region.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_region.c; sourceTree = ""; }; + A32D48BA08102349008510AC /* ilu_rotate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_rotate.c; sourceTree = ""; }; + A32D48BB08102349008510AC /* ilu_scale.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_scale.c; sourceTree = ""; }; + A32D48BC08102349008510AC /* ilu_scale2d.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_scale2d.c; sourceTree = ""; }; + A32D48BD08102349008510AC /* ilu_scale3d.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_scale3d.c; sourceTree = ""; }; + A32D48BE08102349008510AC /* ilu_scaling.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_scaling.c; sourceTree = ""; }; + A32D48BF08102349008510AC /* ilu_states.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_states.c; sourceTree = ""; }; + A32D48C008102349008510AC /* ilu_utilities.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilu_utilities.c; sourceTree = ""; }; + A32D48D80810234E008510AC /* include */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = folder; name = include; path = "../../src-ILU/include"; sourceTree = SOURCE_ROOT; }; + A32D48D90810234E008510AC /* ilu_filter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_filter.h; path = "../../src-ILU/include/ilu_filter.h"; sourceTree = SOURCE_ROOT; }; + A32D48DA0810234E008510AC /* ilu_internal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_internal.h; path = "../../src-ILU/include/ilu_internal.h"; sourceTree = SOURCE_ROOT; }; + A32D48DB0810234E008510AC /* ilu_mipmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_mipmap.h; path = "../../src-ILU/include/ilu_mipmap.h"; sourceTree = SOURCE_ROOT; }; + A32D48DC0810234E008510AC /* ilu_region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_region.h; path = "../../src-ILU/include/ilu_region.h"; sourceTree = SOURCE_ROOT; }; + A32D48DD0810234E008510AC /* ilu_states.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_states.h; path = "../../src-ILU/include/ilu_states.h"; sourceTree = SOURCE_ROOT; }; + A32D49440810244F008510AC /* ilut_allegro.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ilut_allegro.h; sourceTree = ""; }; + A32D49450810244F008510AC /* ilut_internal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ilut_internal.h; sourceTree = ""; }; + A32D49460810244F008510AC /* ilut_opengl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ilut_opengl.h; sourceTree = ""; }; + A32D49470810244F008510AC /* ilut_states.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ilut_states.h; sourceTree = ""; }; + A32D49570810244F008510AC /* ilut_allegro.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_allegro.c; sourceTree = ""; }; + A32D49580810244F008510AC /* ilut_directx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_directx.c; sourceTree = ""; }; + A32D49590810244F008510AC /* ilut_directx9.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_directx9.c; sourceTree = ""; }; + A32D495A0810244F008510AC /* ilut_internal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_internal.c; sourceTree = ""; }; + A32D495B0810244F008510AC /* ilut_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_main.c; sourceTree = ""; }; + A32D495C0810244F008510AC /* ilut_opengl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_opengl.c; sourceTree = ""; }; + A32D495D0810244F008510AC /* ilut_sdlsurface.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_sdlsurface.c; sourceTree = ""; }; + A32D495E0810244F008510AC /* ilut_states.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_states.c; sourceTree = ""; }; + A32D495F0810244F008510AC /* ilut_win32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ilut_win32.c; sourceTree = ""; }; + A33D1E37080EA43A00FEBAC9 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; + A33E80930810140D00578C1B /* libjpeg.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libjpeg.dylib; path = /usr/local/lib/libjpeg.62.0.0.dylib; sourceTree = ""; }; + A33E809F0810145F00578C1B /* libmng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libmng.dylib; path = /usr/local/lib/libmng.1.0.0.dylib; sourceTree = ""; }; + A33E80AA081014BF00578C1B /* liblcms.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = liblcms.dylib; path = /sw/lib/liblcms.1.0.14.dylib; sourceTree = ""; }; + A35C9C81080EB93900CCD137 /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpng.dylib; path = /usr/local/lib/libpng.3.1.2.8.dylib; sourceTree = ""; }; + A35C9C82080EB93900CCD137 /* libtiff.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtiff.dylib; path = /usr/local/lib/libtiff.3.7.2.dylib; sourceTree = ""; }; + A35C9CAA080EBA5100CCD137 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.1.dylib; sourceTree = ""; }; + A35E96760823F02E0061C1C7 /* configure */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; name = configure; path = ../../configure; sourceTree = SOURCE_ROOT; }; + A36D106F080E84D70012BB8B /* il_alloc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_alloc.c; sourceTree = ""; }; + A36D1070080E84D70012BB8B /* il_bits.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_bits.c; sourceTree = ""; }; + A36D1071080E84D70012BB8B /* il_bmp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_bmp.c; sourceTree = ""; }; + A36D1072080E84D70012BB8B /* il_convbuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_convbuff.c; sourceTree = ""; }; + A36D1073080E84D70012BB8B /* il_convert.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_convert.c; sourceTree = ""; }; + A36D1074080E84D70012BB8B /* il_cut.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_cut.c; sourceTree = ""; }; + A36D1075080E84D70012BB8B /* il_dcx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_dcx.c; sourceTree = ""; }; + A36D1076080E84D80012BB8B /* il_dds-save.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "il_dds-save.c"; sourceTree = ""; }; + A36D1077080E84D80012BB8B /* il_dds.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_dds.c; sourceTree = ""; }; + A36D1078080E84D80012BB8B /* il_devil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_devil.c; sourceTree = ""; }; + A36D1079080E84D80012BB8B /* il_doom.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_doom.c; sourceTree = ""; }; + A36D107A080E84D80012BB8B /* il_endian.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_endian.c; sourceTree = ""; }; + A36D107B080E84D80012BB8B /* il_error.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_error.c; sourceTree = ""; }; + A36D107C080E84D80012BB8B /* il_fastconv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_fastconv.c; sourceTree = ""; }; + A36D107D080E84D80012BB8B /* il_files.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_files.c; sourceTree = ""; }; + A36D107E080E84D80012BB8B /* il_gif.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_gif.c; sourceTree = ""; }; + A36D107F080E84D80012BB8B /* il_hdr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_hdr.c; sourceTree = ""; }; + A36D1080080E84D80012BB8B /* il_header.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_header.c; sourceTree = ""; }; + A36D1081080E84D80012BB8B /* il_icon.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_icon.c; sourceTree = ""; }; + A36D1082080E84D80012BB8B /* il_internal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_internal.c; sourceTree = ""; }; + A36D1083080E84D80012BB8B /* il_io.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_io.c; sourceTree = ""; }; + A36D1084080E84D80012BB8B /* il_jpeg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_jpeg.c; sourceTree = ""; }; + A36D1085080E84D80012BB8B /* il_lif.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_lif.c; sourceTree = ""; }; + A36D1086080E84D80012BB8B /* il_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_main.c; sourceTree = ""; }; + A36D1087080E84D80012BB8B /* il_manip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_manip.c; sourceTree = ""; }; + A36D1088080E84D80012BB8B /* il_mdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_mdl.c; sourceTree = ""; }; + A36D1089080E84D80012BB8B /* il_mng.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_mng.c; sourceTree = ""; }; + A36D108A080E84D80012BB8B /* il_neuquant.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_neuquant.c; sourceTree = ""; }; + A36D108B080E84D80012BB8B /* il_pal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pal.c; sourceTree = ""; }; + A36D108C080E84D80012BB8B /* il_pcd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pcd.c; sourceTree = ""; }; + A36D108D080E84D80012BB8B /* il_pcx.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pcx.c; sourceTree = ""; }; + A36D108E080E84D80012BB8B /* il_pic.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pic.c; sourceTree = ""; }; + A36D108F080E84D80012BB8B /* il_pix.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pix.c; sourceTree = ""; }; + A36D1090080E84D80012BB8B /* il_png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_png.c; sourceTree = ""; }; + A36D1091080E84D80012BB8B /* il_pnm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pnm.c; sourceTree = ""; }; + A36D1092080E84D80012BB8B /* il_profiles.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_profiles.c; sourceTree = ""; }; + A36D1093080E84D80012BB8B /* il_psd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_psd.c; sourceTree = ""; }; + A36D1094080E84D80012BB8B /* il_psp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_psp.c; sourceTree = ""; }; + A36D1095080E84D80012BB8B /* il_pxr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_pxr.c; sourceTree = ""; }; + A36D1096080E84D80012BB8B /* il_quantizer.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_quantizer.c; sourceTree = ""; }; + A36D1097080E84D80012BB8B /* il_raw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_raw.c; sourceTree = ""; }; + A36D1098080E84D80012BB8B /* il_rawdata.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_rawdata.c; sourceTree = ""; }; + A36D1099080E84D80012BB8B /* il_register.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_register.c; sourceTree = ""; }; + A36D109A080E84D80012BB8B /* il_rle.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_rle.c; sourceTree = ""; }; + A36D109B080E84D80012BB8B /* il_sgi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_sgi.c; sourceTree = ""; }; + A36D109C080E84D80012BB8B /* il_stack.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_stack.c; sourceTree = ""; }; + A36D109D080E84D80012BB8B /* il_states.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_states.c; sourceTree = ""; }; + A36D109E080E84D80012BB8B /* il_targa.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_targa.c; sourceTree = ""; }; + A36D109F080E84D80012BB8B /* il_tiff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_tiff.c; sourceTree = ""; }; + A36D10A0080E84D80012BB8B /* il_utility.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_utility.c; sourceTree = ""; }; + A36D10A1080E84D80012BB8B /* il_wal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_wal.c; sourceTree = ""; }; + A36D10A2080E84D80012BB8B /* il_xpm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = il_xpm.c; sourceTree = ""; }; + A36D1103080E92150012BB8B /* il_alloc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_alloc.h; sourceTree = ""; }; + A36D1104080E92150012BB8B /* il_bits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_bits.h; sourceTree = ""; }; + A36D1105080E92150012BB8B /* il_bmp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_bmp.h; sourceTree = ""; }; + A36D1106080E92150012BB8B /* il_dcx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_dcx.h; sourceTree = ""; }; + A36D1107080E92150012BB8B /* il_dds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_dds.h; sourceTree = ""; }; + A36D1108080E92150012BB8B /* il_doompal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_doompal.h; sourceTree = ""; }; + A36D1109080E92150012BB8B /* il_endian.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_endian.h; sourceTree = ""; }; + A36D110A080E92150012BB8B /* il_files.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_files.h; sourceTree = ""; }; + A36D110B080E92150012BB8B /* il_gif.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_gif.h; sourceTree = ""; }; + A36D110C080E92150012BB8B /* il_hdr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_hdr.h; sourceTree = ""; }; + A36D110D080E92150012BB8B /* il_icon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_icon.h; sourceTree = ""; }; + A36D110E080E92150012BB8B /* il_internal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_internal.h; sourceTree = ""; }; + A36D110F080E92150012BB8B /* il_jpeg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_jpeg.h; sourceTree = ""; }; + A36D1110080E92150012BB8B /* il_lif.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_lif.h; sourceTree = ""; }; + A36D1111080E92150012BB8B /* il_manip.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_manip.h; sourceTree = ""; }; + A36D1112080E92150012BB8B /* il_mdl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_mdl.h; sourceTree = ""; }; + A36D1113080E92150012BB8B /* il_pal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_pal.h; sourceTree = ""; }; + A36D1114080E92150012BB8B /* il_pcx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_pcx.h; sourceTree = ""; }; + A36D1115080E92150012BB8B /* il_pic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_pic.h; sourceTree = ""; }; + A36D1116080E92150012BB8B /* il_pnm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_pnm.h; sourceTree = ""; }; + A36D1117080E92150012BB8B /* il_psd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_psd.h; sourceTree = ""; }; + A36D1118080E92150012BB8B /* il_psp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_psp.h; sourceTree = ""; }; + A36D1119080E92150012BB8B /* il_q2pal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_q2pal.h; sourceTree = ""; }; + A36D111A080E92150012BB8B /* il_register.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_register.h; sourceTree = ""; }; + A36D111B080E92150012BB8B /* il_rle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_rle.h; sourceTree = ""; }; + A36D111C080E92150012BB8B /* il_sgi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_sgi.h; sourceTree = ""; }; + A36D111D080E92150012BB8B /* il_stack.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_stack.h; sourceTree = ""; }; + A36D111E080E92150012BB8B /* il_states.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_states.h; sourceTree = ""; }; + A36D111F080E92150012BB8B /* il_targa.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = il_targa.h; sourceTree = ""; }; + A36D115F080E95D60012BB8B /* ilut.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilut.h; path = ../../include/IL/ilut.h; sourceTree = SOURCE_ROOT; }; + A36D1165080E95D60012BB8B /* ilu_region.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu_region.h; path = ../../include/IL/ilu_region.h; sourceTree = SOURCE_ROOT; }; + A36D1166080E95D60012BB8B /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../include/IL/config.h; sourceTree = SOURCE_ROOT; }; + A36D1167080E95D60012BB8B /* il.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = il.h; path = ../../include/IL/il.h; sourceTree = SOURCE_ROOT; }; + A36D1168080E95D60012BB8B /* ilu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ilu.h; path = ../../include/IL/ilu.h; sourceTree = SOURCE_ROOT; }; + A36D116C080E95D60012BB8B /* devil_internal_exports.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = devil_internal_exports.h; path = ../../include/IL/devil_internal_exports.h; sourceTree = SOURCE_ROOT; }; + A36D116E080E95D60012BB8B /* il_wrap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = il_wrap.h; path = ../../include/IL/il_wrap.h; sourceTree = SOURCE_ROOT; }; + A38C3BE40818FAB2008EE126 /* altivec_common.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = altivec_common.c; sourceTree = ""; }; + A38C3BE50818FAB2008EE126 /* altivec_common.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = altivec_common.h; sourceTree = ""; }; + A38C3C0A0818FC10008EE126 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Makefile.am; path = "../../src-IL/src/Makefile.am"; sourceTree = SOURCE_ROOT; }; + A38C3C170818FC42008EE126 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Makefile.am; path = "../../src-ILU/src/Makefile.am"; sourceTree = ""; }; + A38C3C1F0818FC55008EE126 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Makefile.am; path = "../../src-ILUT/src/Makefile.am"; sourceTree = ""; }; + A39B3BAC081C189200115B25 /* altivec_typeconversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = altivec_typeconversion.h; sourceTree = ""; }; + A39B3BAD081C189200115B25 /* altivec_typeconversion.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = altivec_typeconversion.c; sourceTree = ""; }; + A39B3BAE081C18DF00115B25 /* altivec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = altivec.h; sourceTree = ""; }; + EA942B270E79433800D95BD5 /* ilu_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ilu_alloc.h; path = "../../src-ILU/include/ilu_alloc.h"; sourceTree = SOURCE_ROOT; }; + EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = il_exr.cpp; sourceTree = ""; }; + EAF51F2B0F2FB9FE00264BE8 /* il_icns.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_icns.c; sourceTree = ""; }; + EAF51F2C0F2FB9FE00264BE8 /* il_iff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_iff.c; sourceTree = ""; }; + EAF51F2D0F2FB9FE00264BE8 /* il_jp2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_jp2.c; sourceTree = ""; }; + EAF51F2E0F2FB9FE00264BE8 /* il_nvidia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = il_nvidia.cpp; sourceTree = ""; }; + EAF51F2F0F2FB9FE00264BE8 /* il_size.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_size.c; sourceTree = ""; }; + EAF51F300F2FB9FE00264BE8 /* il_squish.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = il_squish.cpp; sourceTree = ""; }; + EAF51F310F2FB9FE00264BE8 /* il_sun.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_sun.c; sourceTree = ""; }; + EAF51F320F2FB9FE00264BE8 /* il_tpl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_tpl.c; sourceTree = ""; }; + EAF51F330F2FB9FE00264BE8 /* il_vtf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_vtf.c; sourceTree = ""; }; + EAF51F340F2FB9FE00264BE8 /* il_wbmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_wbmp.c; sourceTree = ""; }; + EAF51F350F2FB9FE00264BE8 /* il_wdp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = il_wdp.c; sourceTree = ""; }; + EAF51F580F2FCF5400264BE8 /* ilu_err-arabic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-arabic.h"; path = "../../src-ILU/include/ilu_error/ilu_err-arabic.h"; sourceTree = SOURCE_ROOT; }; + EAF51F5A0F2FCF6A00264BE8 /* ilu_err-dutch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-dutch.h"; path = "../../src-ILU/include/ilu_error/ilu_err-dutch.h"; sourceTree = SOURCE_ROOT; }; + EAF51F5B0F2FCF6A00264BE8 /* ilu_err-english.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-english.h"; path = "../../src-ILU/include/ilu_error/ilu_err-english.h"; sourceTree = SOURCE_ROOT; }; + EAF51F5C0F2FCF6A00264BE8 /* ilu_err-german.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-german.h"; path = "../../src-ILU/include/ilu_error/ilu_err-german.h"; sourceTree = SOURCE_ROOT; }; + EAF51F5D0F2FCF6A00264BE8 /* ilu_err-japanese.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-japanese.h"; path = "../../src-ILU/include/ilu_error/ilu_err-japanese.h"; sourceTree = SOURCE_ROOT; }; + EAF51F5E0F2FCF6A00264BE8 /* ilu_err-spanish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ilu_err-spanish.h"; path = "../../src-ILU/include/ilu_error/ilu_err-spanish.h"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A3009513080E7F44003DEA28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D48FD081023D6008510AC /* libIL.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009518080E7F51003DEA28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D490508102403008510AC /* libIL.dylib in Frameworks */, + A32D490608102405008510AC /* libILU.dylib in Frameworks */, + A33D1E4A080EA43E00FEBAC9 /* OpenGL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009524080E7F6E003DEA28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A35C9CAB080EBA5100CCD137 /* libz.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* DevIL */ = { + isa = PBXGroup; + children = ( + A38C3BE30818FAB2008EE126 /* altivec */, + A36D1100080E91B20012BB8B /* IL */, + A32D489B0810233E008510AC /* ILU */, + A32D490A08102417008510AC /* ILUT */, + A30E01C208101A1700B16732 /* Libraries */, + A33D1D86080E969A00FEBAC9 /* Includes */, + A3009534080E8006003DEA28 /* Docs */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = DevIL; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + A3009526080E7F6E003DEA28 /* libIL.dylib */, + A3009515080E7F44003DEA28 /* libILU.dylib */, + A300951A080E7F51003DEA28 /* libILUT.dylib */, + ); + name = Products; + sourceTree = ""; + }; + A3009534080E8006003DEA28 /* Docs */ = { + isa = PBXGroup; + children = ( + A30B34870818DB400067D04E /* TODO */, + A30B34880818DB400067D04E /* autogen.sh */, + A30B34890818DB400067D04E /* COPYING */, + A30B348A0818DB400067D04E /* README.win */, + A30B348B0818DB400067D04E /* README.unix */, + A30B348C0818DB400067D04E /* README.macosx */, + A30B348D0818DB400067D04E /* README */, + A30B349E0818DB5C0067D04E /* configure.in */, + A35E96760823F02E0061C1C7 /* configure */, + A30B348E0818DB400067D04E /* NEWS */, + A30B348F0818DB400067D04E /* Makefile.am */, + A30B34900818DB400067D04E /* ChangeLog */, + A30B34910818DB400067D04E /* BUGS */, + A30B34920818DB400067D04E /* Libraries.txt */, + A30B34930818DB400067D04E /* INSTALL */, + A30B34940818DB400067D04E /* CREDITS */, + A30B34820818DB240067D04E /* AUTHORS */, + ); + name = Docs; + sourceTree = ""; + }; + A30E01C208101A1700B16732 /* Libraries */ = { + isa = PBXGroup; + children = ( + A33E80AA081014BF00578C1B /* liblcms.dylib */, + A33E809F0810145F00578C1B /* libmng.dylib */, + A33E80930810140D00578C1B /* libjpeg.dylib */, + A35C9CAA080EBA5100CCD137 /* libz.dylib */, + A35C9C81080EB93900CCD137 /* libpng.dylib */, + A35C9C82080EB93900CCD137 /* libtiff.dylib */, + A33D1E37080EA43A00FEBAC9 /* OpenGL.framework */, + ); + name = Libraries; + sourceTree = ""; + }; + A32D489B0810233E008510AC /* ILU */ = { + isa = PBXGroup; + children = ( + A38C3C170818FC42008EE126 /* Makefile.am */, + A32D48D60810234E008510AC /* include */, + A32D489C08102349008510AC /* src */, + ); + name = ILU; + sourceTree = ""; + }; + A32D489C08102349008510AC /* src */ = { + isa = PBXGroup; + children = ( + A32D48B008102349008510AC /* ilu_alloc.c */, + A32D48B108102349008510AC /* ilu_error.c */, + A32D48B208102349008510AC /* ilu_filter.c */, + A32D48B308102349008510AC /* ilu_filter_rcg.c */, + A32D48B408102349008510AC /* ilu_internal.c */, + A32D48B508102349008510AC /* ilu_main.c */, + A32D48B608102349008510AC /* ilu_manip.c */, + A32D48B708102349008510AC /* ilu_mipmap.c */, + A32D48B808102349008510AC /* ilu_noise.c */, + A32D48B908102349008510AC /* ilu_region.c */, + A32D48BA08102349008510AC /* ilu_rotate.c */, + A32D48BB08102349008510AC /* ilu_scale.c */, + A32D48BC08102349008510AC /* ilu_scale2d.c */, + A32D48BD08102349008510AC /* ilu_scale3d.c */, + A32D48BE08102349008510AC /* ilu_scaling.c */, + A32D48BF08102349008510AC /* ilu_states.c */, + A32D48C008102349008510AC /* ilu_utilities.c */, + ); + name = src; + path = "../../src-ILU/src"; + sourceTree = SOURCE_ROOT; + }; + A32D48D60810234E008510AC /* include */ = { + isa = PBXGroup; + children = ( + EAF51F570F2FCF3A00264BE8 /* ilu_error */, + EA942B270E79433800D95BD5 /* ilu_alloc.h */, + A32D48D80810234E008510AC /* include */, + A32D48D90810234E008510AC /* ilu_filter.h */, + A32D48DA0810234E008510AC /* ilu_internal.h */, + A32D48DB0810234E008510AC /* ilu_mipmap.h */, + A32D48DC0810234E008510AC /* ilu_region.h */, + A32D48DD0810234E008510AC /* ilu_states.h */, + ); + name = include; + path = "/Users/dario/Desktop/Developer/Projects/DevIL/cvsroot/DevIL/src-ILU/include"; + sourceTree = ""; + }; + A32D490A08102417008510AC /* ILUT */ = { + isa = PBXGroup; + children = ( + A38C3C1F0818FC55008EE126 /* Makefile.am */, + A32D49420810244F008510AC /* include */, + A32D494B0810244F008510AC /* src */, + ); + name = ILUT; + sourceTree = ""; + }; + A32D49420810244F008510AC /* include */ = { + isa = PBXGroup; + children = ( + A32D49440810244F008510AC /* ilut_allegro.h */, + A32D49450810244F008510AC /* ilut_internal.h */, + A32D49460810244F008510AC /* ilut_opengl.h */, + A32D49470810244F008510AC /* ilut_states.h */, + ); + name = include; + path = "../../src-ILUT/include"; + sourceTree = SOURCE_ROOT; + }; + A32D494B0810244F008510AC /* src */ = { + isa = PBXGroup; + children = ( + A32D49570810244F008510AC /* ilut_allegro.c */, + A32D49580810244F008510AC /* ilut_directx.c */, + A32D49590810244F008510AC /* ilut_directx9.c */, + A32D495A0810244F008510AC /* ilut_internal.c */, + A32D495B0810244F008510AC /* ilut_main.c */, + A32D495C0810244F008510AC /* ilut_opengl.c */, + A32D495D0810244F008510AC /* ilut_sdlsurface.c */, + A32D495E0810244F008510AC /* ilut_states.c */, + A32D495F0810244F008510AC /* ilut_win32.c */, + ); + name = src; + path = "../../src-ILUT/src"; + sourceTree = SOURCE_ROOT; + }; + A33D1D86080E969A00FEBAC9 /* Includes */ = { + isa = PBXGroup; + children = ( + A36D115F080E95D60012BB8B /* ilut.h */, + A36D1165080E95D60012BB8B /* ilu_region.h */, + A36D1166080E95D60012BB8B /* config.h */, + A36D1167080E95D60012BB8B /* il.h */, + A36D1168080E95D60012BB8B /* ilu.h */, + A36D116C080E95D60012BB8B /* devil_internal_exports.h */, + A36D116E080E95D60012BB8B /* il_wrap.h */, + ); + name = Includes; + sourceTree = ""; + }; + A36D10DB080E85070012BB8B /* src */ = { + isa = PBXGroup; + children = ( + EAF51F2A0F2FB9FE00264BE8 /* il_exr.cpp */, + EAF51F2B0F2FB9FE00264BE8 /* il_icns.c */, + EAF51F2C0F2FB9FE00264BE8 /* il_iff.c */, + EAF51F2D0F2FB9FE00264BE8 /* il_jp2.c */, + EAF51F2E0F2FB9FE00264BE8 /* il_nvidia.cpp */, + EAF51F300F2FB9FE00264BE8 /* il_squish.cpp */, + EAF51F310F2FB9FE00264BE8 /* il_sun.c */, + EAF51F320F2FB9FE00264BE8 /* il_tpl.c */, + EAF51F330F2FB9FE00264BE8 /* il_vtf.c */, + EAF51F340F2FB9FE00264BE8 /* il_wbmp.c */, + EAF51F350F2FB9FE00264BE8 /* il_wdp.c */, + EAF51F2F0F2FB9FE00264BE8 /* il_size.c */, + A36D106F080E84D70012BB8B /* il_alloc.c */, + A36D1070080E84D70012BB8B /* il_bits.c */, + A36D1071080E84D70012BB8B /* il_bmp.c */, + A36D1072080E84D70012BB8B /* il_convbuff.c */, + A36D1073080E84D70012BB8B /* il_convert.c */, + A36D1074080E84D70012BB8B /* il_cut.c */, + A36D1075080E84D70012BB8B /* il_dcx.c */, + A36D1076080E84D80012BB8B /* il_dds-save.c */, + A36D1077080E84D80012BB8B /* il_dds.c */, + A36D1078080E84D80012BB8B /* il_devil.c */, + A36D1079080E84D80012BB8B /* il_doom.c */, + A36D107A080E84D80012BB8B /* il_endian.c */, + A36D107B080E84D80012BB8B /* il_error.c */, + A36D107C080E84D80012BB8B /* il_fastconv.c */, + A36D107D080E84D80012BB8B /* il_files.c */, + A36D107E080E84D80012BB8B /* il_gif.c */, + A36D107F080E84D80012BB8B /* il_hdr.c */, + A36D1080080E84D80012BB8B /* il_header.c */, + A36D1081080E84D80012BB8B /* il_icon.c */, + A36D1082080E84D80012BB8B /* il_internal.c */, + A36D1083080E84D80012BB8B /* il_io.c */, + A36D1084080E84D80012BB8B /* il_jpeg.c */, + A36D1085080E84D80012BB8B /* il_lif.c */, + A36D1086080E84D80012BB8B /* il_main.c */, + A36D1087080E84D80012BB8B /* il_manip.c */, + A36D1088080E84D80012BB8B /* il_mdl.c */, + A36D1089080E84D80012BB8B /* il_mng.c */, + A36D108A080E84D80012BB8B /* il_neuquant.c */, + A36D108B080E84D80012BB8B /* il_pal.c */, + A36D108C080E84D80012BB8B /* il_pcd.c */, + A36D108D080E84D80012BB8B /* il_pcx.c */, + A36D108E080E84D80012BB8B /* il_pic.c */, + A36D108F080E84D80012BB8B /* il_pix.c */, + A36D1090080E84D80012BB8B /* il_png.c */, + A36D1091080E84D80012BB8B /* il_pnm.c */, + A36D1092080E84D80012BB8B /* il_profiles.c */, + A36D1093080E84D80012BB8B /* il_psd.c */, + A36D1094080E84D80012BB8B /* il_psp.c */, + A36D1095080E84D80012BB8B /* il_pxr.c */, + A36D1096080E84D80012BB8B /* il_quantizer.c */, + A36D1097080E84D80012BB8B /* il_raw.c */, + A36D1098080E84D80012BB8B /* il_rawdata.c */, + A36D1099080E84D80012BB8B /* il_register.c */, + A36D109A080E84D80012BB8B /* il_rle.c */, + A36D109B080E84D80012BB8B /* il_sgi.c */, + A36D109C080E84D80012BB8B /* il_stack.c */, + A36D109D080E84D80012BB8B /* il_states.c */, + A36D109E080E84D80012BB8B /* il_targa.c */, + A36D109F080E84D80012BB8B /* il_tiff.c */, + A36D10A0080E84D80012BB8B /* il_utility.c */, + A36D10A1080E84D80012BB8B /* il_wal.c */, + A36D10A2080E84D80012BB8B /* il_xpm.c */, + ); + name = src; + path = "../../src-IL/src"; + sourceTree = SOURCE_ROOT; + }; + A36D1100080E91B20012BB8B /* IL */ = { + isa = PBXGroup; + children = ( + A38C3C0A0818FC10008EE126 /* Makefile.am */, + A36D1101080E92150012BB8B /* include */, + A36D10DB080E85070012BB8B /* src */, + ); + name = IL; + sourceTree = ""; + }; + A36D1101080E92150012BB8B /* include */ = { + isa = PBXGroup; + children = ( + A36D1103080E92150012BB8B /* il_alloc.h */, + A36D1104080E92150012BB8B /* il_bits.h */, + A36D1105080E92150012BB8B /* il_bmp.h */, + A36D1106080E92150012BB8B /* il_dcx.h */, + A36D1107080E92150012BB8B /* il_dds.h */, + A36D1108080E92150012BB8B /* il_doompal.h */, + A36D1109080E92150012BB8B /* il_endian.h */, + A36D110A080E92150012BB8B /* il_files.h */, + A36D110B080E92150012BB8B /* il_gif.h */, + A36D110C080E92150012BB8B /* il_hdr.h */, + A36D110D080E92150012BB8B /* il_icon.h */, + A36D110E080E92150012BB8B /* il_internal.h */, + A36D110F080E92150012BB8B /* il_jpeg.h */, + A36D1110080E92150012BB8B /* il_lif.h */, + A36D1111080E92150012BB8B /* il_manip.h */, + A36D1112080E92150012BB8B /* il_mdl.h */, + A36D1113080E92150012BB8B /* il_pal.h */, + A36D1114080E92150012BB8B /* il_pcx.h */, + A36D1115080E92150012BB8B /* il_pic.h */, + A36D1116080E92150012BB8B /* il_pnm.h */, + A36D1117080E92150012BB8B /* il_psd.h */, + A36D1118080E92150012BB8B /* il_psp.h */, + A36D1119080E92150012BB8B /* il_q2pal.h */, + A36D111A080E92150012BB8B /* il_register.h */, + A36D111B080E92150012BB8B /* il_rle.h */, + A36D111C080E92150012BB8B /* il_sgi.h */, + A36D111D080E92150012BB8B /* il_stack.h */, + A36D111E080E92150012BB8B /* il_states.h */, + A36D111F080E92150012BB8B /* il_targa.h */, + ); + name = include; + path = "../../src-IL/include"; + sourceTree = SOURCE_ROOT; + }; + A38C3BE30818FAB2008EE126 /* altivec */ = { + isa = PBXGroup; + children = ( + A39B3BAE081C18DF00115B25 /* altivec.h */, + A39B3BAC081C189200115B25 /* altivec_typeconversion.h */, + A39B3BAD081C189200115B25 /* altivec_typeconversion.c */, + A38C3BE40818FAB2008EE126 /* altivec_common.c */, + A38C3BE50818FAB2008EE126 /* altivec_common.h */, + ); + name = altivec; + path = ../../altivec; + sourceTree = SOURCE_ROOT; + }; + EAF51F570F2FCF3A00264BE8 /* ilu_error */ = { + isa = PBXGroup; + children = ( + EAF51F5A0F2FCF6A00264BE8 /* ilu_err-dutch.h */, + EAF51F5B0F2FCF6A00264BE8 /* ilu_err-english.h */, + EAF51F5C0F2FCF6A00264BE8 /* ilu_err-german.h */, + EAF51F5D0F2FCF6A00264BE8 /* ilu_err-japanese.h */, + EAF51F5E0F2FCF6A00264BE8 /* ilu_err-spanish.h */, + EAF51F580F2FCF5400264BE8 /* ilu_err-arabic.h */, + ); + name = ilu_error; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A3009511080E7F44003DEA28 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D48E20810234E008510AC /* ilu_filter.h in Headers */, + A32D48E30810234E008510AC /* ilu_internal.h in Headers */, + A32D48E40810234E008510AC /* ilu_mipmap.h in Headers */, + A32D48E50810234E008510AC /* ilu_region.h in Headers */, + A32D48E60810234E008510AC /* ilu_states.h in Headers */, + EAF51F5F0F2FCF6A00264BE8 /* ilu_err-dutch.h in Headers */, + EAF51F600F2FCF6A00264BE8 /* ilu_err-english.h in Headers */, + EAF51F610F2FCF6A00264BE8 /* ilu_err-german.h in Headers */, + EAF51F620F2FCF6A00264BE8 /* ilu_err-japanese.h in Headers */, + EAF51F630F2FCF6A00264BE8 /* ilu_err-spanish.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009516080E7F51003DEA28 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D49630810244F008510AC /* ilut_allegro.h in Headers */, + A32D49640810244F008510AC /* ilut_internal.h in Headers */, + A32D49650810244F008510AC /* ilut_opengl.h in Headers */, + A32D49660810244F008510AC /* ilut_states.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009522080E7F6E003DEA28 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A36D1123080E92150012BB8B /* il_alloc.h in Headers */, + A36D1124080E92150012BB8B /* il_bits.h in Headers */, + A36D1125080E92150012BB8B /* il_bmp.h in Headers */, + A36D1126080E92150012BB8B /* il_dcx.h in Headers */, + A36D1127080E92150012BB8B /* il_dds.h in Headers */, + A36D1128080E92150012BB8B /* il_doompal.h in Headers */, + A36D1129080E92150012BB8B /* il_endian.h in Headers */, + A36D112A080E92150012BB8B /* il_files.h in Headers */, + A36D112B080E92150012BB8B /* il_gif.h in Headers */, + A36D112C080E92150012BB8B /* il_hdr.h in Headers */, + A36D112D080E92150012BB8B /* il_icon.h in Headers */, + A36D112E080E92150012BB8B /* il_internal.h in Headers */, + A36D112F080E92150012BB8B /* il_jpeg.h in Headers */, + A36D1130080E92150012BB8B /* il_lif.h in Headers */, + A36D1131080E92150012BB8B /* il_manip.h in Headers */, + A36D1132080E92150012BB8B /* il_mdl.h in Headers */, + A36D1133080E92150012BB8B /* il_pal.h in Headers */, + A36D1134080E92150012BB8B /* il_pcx.h in Headers */, + A36D1135080E92150012BB8B /* il_pic.h in Headers */, + A36D1136080E92150012BB8B /* il_pnm.h in Headers */, + A36D1137080E92150012BB8B /* il_psd.h in Headers */, + A36D1138080E92150012BB8B /* il_psp.h in Headers */, + A36D1139080E92150012BB8B /* il_q2pal.h in Headers */, + A36D113A080E92150012BB8B /* il_register.h in Headers */, + A36D113B080E92150012BB8B /* il_rle.h in Headers */, + A36D113C080E92150012BB8B /* il_sgi.h in Headers */, + A36D113D080E92150012BB8B /* il_stack.h in Headers */, + A36D113E080E92150012BB8B /* il_states.h in Headers */, + A36D113F080E92150012BB8B /* il_targa.h in Headers */, + A36D1173080E95D60012BB8B /* config.h in Headers */, + A36D1174080E95D60012BB8B /* il.h in Headers */, + A36D1176080E95D60012BB8B /* devil_internal_exports.h in Headers */, + A36D1177080E95D60012BB8B /* il_wrap.h in Headers */, + EAF51F590F2FCF5400264BE8 /* ilu_err-arabic.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + A3009514080E7F44003DEA28 /* libILU */ = { + isa = PBXNativeTarget; + buildConfigurationList = EACAFE5C0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libILU" */; + buildPhases = ( + A3009511080E7F44003DEA28 /* Headers */, + A3009512080E7F44003DEA28 /* Sources */, + A3009513080E7F44003DEA28 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + A36D0EE0080E81800012BB8B /* PBXTargetDependency */, + ); + name = libILU; + productName = libILU; + productReference = A3009515080E7F44003DEA28 /* libILU.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A3009519080E7F51003DEA28 /* libILUT */ = { + isa = PBXNativeTarget; + buildConfigurationList = EACAFE5D0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libILUT" */; + buildPhases = ( + A3009516080E7F51003DEA28 /* Headers */, + A3009517080E7F51003DEA28 /* Sources */, + A3009518080E7F51003DEA28 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + A36D0EE2080E81850012BB8B /* PBXTargetDependency */, + A36D0EE4080E81850012BB8B /* PBXTargetDependency */, + ); + name = libILUT; + productName = libILUT; + productReference = A300951A080E7F51003DEA28 /* libILUT.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A3009525080E7F6E003DEA28 /* libIL */ = { + isa = PBXNativeTarget; + buildConfigurationList = EACAFE5B0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libIL" */; + buildPhases = ( + A3009522080E7F6E003DEA28 /* Headers */, + A3009523080E7F6E003DEA28 /* Sources */, + A3009524080E7F6E003DEA28 /* Frameworks */, + A36D10E3080E856E0012BB8B /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = libIL; + productName = libIL; + productReference = A3009526080E7F6E003DEA28 /* libIL.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = EACAFE590E7936340024FAE4 /* Build configuration list for PBXProject "DevIL" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* DevIL */; + projectDirPath = ""; + projectRoot = ../..; + targets = ( + A36D10E8080E8E5D0012BB8B /* Configure */, + A3009525080E7F6E003DEA28 /* libIL */, + A3009514080E7F44003DEA28 /* libILU */, + A3009519080E7F51003DEA28 /* libILUT */, + A36D10F5080E8FD80012BB8B /* Install */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + A36D10E3080E856E0012BB8B /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ""; + }; + A36D10E7080E8E5D0012BB8B /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "# get to the root of the installation\ncd ../../\n\n# check if configure script is available or generate it\nif [ ! -x configure ] ; then\n\t./autogen.sh\nfi\n\n# call configuration script\nif [ |\n./configure\n\n# successfull exit\nexit $?\n"; + }; + A36D10F4080E8FD80012BB8B /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\ncd build\nsudo cp libIL.dylib libILU.dylib libILUT.dylib /usr/local/lib\nif [ $? -ne 0 ] ; then\n\techo \"Failure installing the libraries\"\n\texit 1\nfi\nsudo cp usr/local/include/* /usr/local/include/\nif [ $? -ne 0 ] ; then\n\techo \"Failure installing the includes\"\n\texit 1\nfi\nexit 0"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A3009512080E7F44003DEA28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D48C408102349008510AC /* ilu_alloc.c in Sources */, + A32D48C508102349008510AC /* ilu_error.c in Sources */, + A32D48C608102349008510AC /* ilu_filter.c in Sources */, + A32D48C708102349008510AC /* ilu_filter_rcg.c in Sources */, + A32D48C808102349008510AC /* ilu_internal.c in Sources */, + A32D48C908102349008510AC /* ilu_main.c in Sources */, + A32D48CA08102349008510AC /* ilu_manip.c in Sources */, + A32D48CB08102349008510AC /* ilu_mipmap.c in Sources */, + A32D48CC08102349008510AC /* ilu_noise.c in Sources */, + A32D48CD08102349008510AC /* ilu_region.c in Sources */, + A32D48CE08102349008510AC /* ilu_rotate.c in Sources */, + A32D48CF08102349008510AC /* ilu_scale.c in Sources */, + A32D48D008102349008510AC /* ilu_scale2d.c in Sources */, + A32D48D108102349008510AC /* ilu_scale3d.c in Sources */, + A32D48D208102349008510AC /* ilu_scaling.c in Sources */, + A32D48D308102349008510AC /* ilu_states.c in Sources */, + A32D48D408102349008510AC /* ilu_utilities.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009517080E7F51003DEA28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A32D49680810244F008510AC /* ilut_allegro.c in Sources */, + A32D49690810244F008510AC /* ilut_directx.c in Sources */, + A32D496A0810244F008510AC /* ilut_directx9.c in Sources */, + A32D496B0810244F008510AC /* ilut_internal.c in Sources */, + A32D496C0810244F008510AC /* ilut_main.c in Sources */, + A32D496D0810244F008510AC /* ilut_opengl.c in Sources */, + A32D496E0810244F008510AC /* ilut_sdlsurface.c in Sources */, + A32D496F0810244F008510AC /* ilut_states.c in Sources */, + A32D49700810244F008510AC /* ilut_win32.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A3009523080E7F6E003DEA28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A36D10A6080E84D80012BB8B /* il_alloc.c in Sources */, + A36D10A7080E84D80012BB8B /* il_bits.c in Sources */, + A36D10A8080E84D80012BB8B /* il_bmp.c in Sources */, + A36D10A9080E84D80012BB8B /* il_convbuff.c in Sources */, + A36D10AA080E84D80012BB8B /* il_convert.c in Sources */, + A36D10AB080E84D80012BB8B /* il_cut.c in Sources */, + A36D10AC080E84D80012BB8B /* il_dcx.c in Sources */, + A36D10AD080E84D80012BB8B /* il_dds-save.c in Sources */, + A36D10AE080E84D80012BB8B /* il_dds.c in Sources */, + A36D10AF080E84D80012BB8B /* il_devil.c in Sources */, + A36D10B0080E84D80012BB8B /* il_doom.c in Sources */, + A36D10B1080E84D80012BB8B /* il_endian.c in Sources */, + A36D10B2080E84D80012BB8B /* il_error.c in Sources */, + A36D10B3080E84D80012BB8B /* il_fastconv.c in Sources */, + A36D10B4080E84D80012BB8B /* il_files.c in Sources */, + A36D10B5080E84D80012BB8B /* il_gif.c in Sources */, + A36D10B6080E84D80012BB8B /* il_hdr.c in Sources */, + A36D10B7080E84D80012BB8B /* il_header.c in Sources */, + A36D10B8080E84D80012BB8B /* il_icon.c in Sources */, + A36D10B9080E84D80012BB8B /* il_internal.c in Sources */, + A36D10BA080E84D80012BB8B /* il_io.c in Sources */, + A36D10BB080E84D80012BB8B /* il_jpeg.c in Sources */, + A36D10BC080E84D80012BB8B /* il_lif.c in Sources */, + A36D10BD080E84D80012BB8B /* il_main.c in Sources */, + A36D10BE080E84D80012BB8B /* il_manip.c in Sources */, + A36D10BF080E84D80012BB8B /* il_mdl.c in Sources */, + A36D10C0080E84D80012BB8B /* il_mng.c in Sources */, + A36D10C1080E84D80012BB8B /* il_neuquant.c in Sources */, + A36D10C2080E84D80012BB8B /* il_pal.c in Sources */, + A36D10C3080E84D80012BB8B /* il_pcd.c in Sources */, + A36D10C4080E84D80012BB8B /* il_pcx.c in Sources */, + A36D10C5080E84D80012BB8B /* il_pic.c in Sources */, + A36D10C6080E84D80012BB8B /* il_pix.c in Sources */, + A36D10C7080E84D80012BB8B /* il_png.c in Sources */, + A36D10C8080E84D80012BB8B /* il_pnm.c in Sources */, + A36D10C9080E84D80012BB8B /* il_profiles.c in Sources */, + A36D10CA080E84D80012BB8B /* il_psd.c in Sources */, + A36D10CB080E84D80012BB8B /* il_psp.c in Sources */, + A36D10CC080E84D80012BB8B /* il_pxr.c in Sources */, + A36D10CD080E84D80012BB8B /* il_quantizer.c in Sources */, + A36D10CE080E84D80012BB8B /* il_raw.c in Sources */, + A36D10CF080E84D80012BB8B /* il_rawdata.c in Sources */, + A36D10D0080E84D80012BB8B /* il_register.c in Sources */, + A36D10D1080E84D80012BB8B /* il_rle.c in Sources */, + A36D10D2080E84D80012BB8B /* il_sgi.c in Sources */, + A36D10D3080E84D80012BB8B /* il_stack.c in Sources */, + A36D10D4080E84D80012BB8B /* il_states.c in Sources */, + A36D10D5080E84D80012BB8B /* il_targa.c in Sources */, + A36D10D6080E84D80012BB8B /* il_tiff.c in Sources */, + A36D10D7080E84D80012BB8B /* il_utility.c in Sources */, + A36D10D8080E84D80012BB8B /* il_wal.c in Sources */, + A36D10D9080E84D80012BB8B /* il_xpm.c in Sources */, + EAF51F360F2FB9FE00264BE8 /* il_exr.cpp in Sources */, + EAF51F370F2FB9FE00264BE8 /* il_icns.c in Sources */, + EAF51F380F2FB9FE00264BE8 /* il_iff.c in Sources */, + EAF51F390F2FB9FE00264BE8 /* il_jp2.c in Sources */, + EAF51F3A0F2FB9FE00264BE8 /* il_nvidia.cpp in Sources */, + EAF51F3B0F2FB9FE00264BE8 /* il_size.c in Sources */, + EAF51F3C0F2FB9FE00264BE8 /* il_squish.cpp in Sources */, + EAF51F3D0F2FB9FE00264BE8 /* il_sun.c in Sources */, + EAF51F3E0F2FB9FE00264BE8 /* il_tpl.c in Sources */, + EAF51F3F0F2FB9FE00264BE8 /* il_vtf.c in Sources */, + EAF51F400F2FB9FE00264BE8 /* il_wbmp.c in Sources */, + EAF51F410F2FB9FE00264BE8 /* il_wdp.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + A36D0EE0080E81800012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28 /* libIL */; + targetProxy = A36D0EDF080E81800012BB8B /* PBXContainerItemProxy */; + }; + A36D0EE2080E81850012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28 /* libIL */; + targetProxy = A36D0EE1080E81850012BB8B /* PBXContainerItemProxy */; + }; + A36D0EE4080E81850012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009514080E7F44003DEA28 /* libILU */; + targetProxy = A36D0EE3080E81850012BB8B /* PBXContainerItemProxy */; + }; + A36D10F9080E8FE80012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009525080E7F6E003DEA28 /* libIL */; + targetProxy = A36D10F8080E8FE80012BB8B /* PBXContainerItemProxy */; + }; + A36D10FB080E8FE80012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009514080E7F44003DEA28 /* libILU */; + targetProxy = A36D10FA080E8FE80012BB8B /* PBXContainerItemProxy */; + }; + A36D10FD080E8FE80012BB8B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A3009519080E7F51003DEA28 /* libILUT */; + targetProxy = A36D10FC080E8FE80012BB8B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + EACAFE470E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Development; + }; + EACAFE480E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Deployment; + }; + EACAFE490E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Default; + }; + EACAFE4A0E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + OTHER_CFLAGS = ( + "-DHAVE_CONFIG_H", + "-maltivec", + ); + OTHER_CPLUSPLUSFLAGS = ( + "-DHAVE_CONFIG_H", + "-maltivec", + ); + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Configure; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + name = Development; + }; + EACAFE4B0E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Configure; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + EACAFE4C0E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Configure; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + EACAFE4D0E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_PPC64 = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = ( + "\"/Users/dario/Desktop/DevIL o /src-IL/src/.libs\"", + /sw/lib, + ); + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = "-DHAVE_CONFIG_H"; + OTHER_CPLUSPLUSFLAGS = "-DHAVE_CONFIG_H"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libIL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + name = Development; + }; + EACAFE4E0E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_PPC64 = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = ( + "\"/Users/dario/Desktop/DevIL o /src-IL/src/.libs\"", + /sw/lib, + ); + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = ( + "-I../../include", + "-I../Include", + "-DHAVE_CONFIG_H", + ); + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libIL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + EACAFE4F0E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_MODEL_PPC64 = NO; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = ( + "\"/Users/dario/Desktop/DevIL o /src-IL/src/.libs\"", + /sw/lib, + ); + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = ( + "-I../../include", + "-I../Include", + ); + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libIL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + EACAFE500E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = ( + "-I../../include", + "-I../../src-ILU/include", + "-DHAVE_CONFIG_H", + ); + OTHER_CPLUSPLUSFLAGS = "-DHAVE_CONFIG_H"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILU; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + name = Development; + }; + EACAFE510E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = "-DHAVE_CONFIG_H"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILU; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + EACAFE520E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILU; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + EACAFE530E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = "-DHAVE_CONFIG_H"; + OTHER_CPLUSPLUSFLAGS = "-DHAVE_CONFIG_H"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILUT; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + name = Development; + }; + EACAFE540E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = "-DHAVE_CONFIG_H"; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILUT; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + EACAFE550E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ALTIVEC_EXTENSIONS = YES; + INSTALL_PATH = /usr/local/lib; + LIBRARY_STYLE = DYNAMIC; + MACH_O_TYPE = mh_dylib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = libILUT; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; + EACAFE560E7936330024FAE4 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_PEDANTIC = NO; + OTHER_CFLAGS = ( + "-DHAVE_CONFIG_H", + "-maltivec", + ); + OTHER_CPLUSPLUSFLAGS = ( + "-DHAVE_CONFIG_H", + "-maltivec", + ); + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Install; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wall"; + ZERO_LINK = YES; + }; + name = Development; + }; + EACAFE570E7936330024FAE4 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = ""; + GCC_OPTIMIZATION_LEVEL = 2; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Install; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + ZERO_LINK = NO; + }; + name = Deployment; + }; + EACAFE580E7936330024FAE4 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Install; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EACAFE590E7936340024FAE4 /* Build configuration list for PBXProject "DevIL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE470E7936330024FAE4 /* Development */, + EACAFE480E7936330024FAE4 /* Deployment */, + EACAFE490E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + EACAFE5A0E7936340024FAE4 /* Build configuration list for PBXAggregateTarget "Configure" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE4A0E7936330024FAE4 /* Development */, + EACAFE4B0E7936330024FAE4 /* Deployment */, + EACAFE4C0E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + EACAFE5B0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libIL" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE4D0E7936330024FAE4 /* Development */, + EACAFE4E0E7936330024FAE4 /* Deployment */, + EACAFE4F0E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + EACAFE5C0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libILU" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE500E7936330024FAE4 /* Development */, + EACAFE510E7936330024FAE4 /* Deployment */, + EACAFE520E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + EACAFE5D0E7936340024FAE4 /* Build configuration list for PBXNativeTarget "libILUT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE530E7936330024FAE4 /* Development */, + EACAFE540E7936330024FAE4 /* Deployment */, + EACAFE550E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + EACAFE5E0E7936340024FAE4 /* Build configuration list for PBXAggregateTarget "Install" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EACAFE560E7936330024FAE4 /* Development */, + EACAFE570E7936330024FAE4 /* Deployment */, + EACAFE580E7936330024FAE4 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/libs/DevIL-1.7.8/src-IL/include/altivec_common.h b/libs/DevIL-1.7.8/src-IL/include/altivec_common.h new file mode 100644 index 00000000..fb69075c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/altivec_common.h @@ -0,0 +1,34 @@ +/* + * altivec_typeconversion.h + * DevIL + * + * Created by Meloni Dario on 17/04/05. + * + */ + +#include "il_internal.h" + +#ifdef ALTIVEC_GCC +#ifndef ALTIVEC_COMMON +#define ALTIVEC_COMMON + +typedef union { + vector unsigned int vuint; + unsigned int suint[4]; + vector unsigned char vuchar; + unsigned char suchar[4]; + vector float vf; + float sf[4]; +} vector_t; + +// Loads 16 byte from the specified address, aligned or not +//vector unsigned char load_unaligned( unsigned char *buffer ); + +// Fills a vector with the specified value +vector float fill_vector_f( float value ); + +#define eround(v,x) (((int)((v/x)*10)%10) > 0 ? (v/x) : (v/x)+1) +#define eround16(v) eround(v,16) + +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-IL/include/altivec_typeconversion.h b/libs/DevIL-1.7.8/src-IL/include/altivec_typeconversion.h new file mode 100644 index 00000000..95ec0e66 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/altivec_typeconversion.h @@ -0,0 +1,28 @@ +/* + * altivec_typeconversion.h + * DevIL + * + * Created by Meloni Dario on 24/04/05. + * + */ + +#include "altivec_common.h" +#ifdef ALTIVEC_GCC + +// data and newdata may be the same buffer + +// Used to convert RGB <-> BGR in various data types +void abc2cba_byte( ILubyte *data, ILuint length, ILubyte *newdata ); +void abc2cba_short( ILushort *data, ILuint length, ILushort *newdata ); +void abc2cba_int( ILuint *data, ILuint length, ILuint *newdata ); +#define abc2cba_float(x,y,z) abc2cba_int(((ILuint*)(x)),y,((ILuint*)(z))) +void abc2cba_double( ILdouble *data, ILuint length, ILdouble *newdata ); + +// Used to convert RGBA <-> BGRA in various data types +void abcd2cbad_byte( ILubyte *data, ILuint length, ILubyte *newdata ); +void abcd2cbad_short( ILushort *data, ILuint length, ILushort *newdata ); +void abcd2cbad_int( ILuint *data, ILuint length, ILuint *newdata ); +#define abcd2cbad_float(x,y,z) abcd2cbad_int(((ILuint*)(x)),y,((ILuint*)(z))) +void abcd2cbad_double( ILdouble *data, ILuint length, ILdouble *newdata ); + +#endif diff --git a/libs/DevIL-1.7.8/src-IL/include/il_alloc.h b/libs/DevIL-1.7.8/src-IL/include/il_alloc.h new file mode 100644 index 00000000..b8963e5d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_alloc.h @@ -0,0 +1,41 @@ +#ifndef ALLOC_H +#define ALLOC_H + +/*#if defined(_WIN32) && defined(_MEM_DEBUG) + void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line); + void *m_alloc(unsigned long size, const char *file, unsigned long line); + void f_ree(void *ptr); + + #ifdef malloc + #undef malloc + #endif + + #ifdef calloc + #undef calloc + #endif + + #ifdef free + #undef free + #endif + + + #define malloc(size) m_alloc(size, __FILE__, __LINE__) + #define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__) + #define free(addr) f_ree(addr) +#endif//defined(_WIN32) && defined(_MEM_DEBUG)*/ + + +#if defined (__ALLOC_C) + #define __ALLOC_EXTERN +#else + #define __ALLOC_EXTERN extern +#endif +#include + + +__ALLOC_EXTERN mAlloc ialloc_ptr; +__ALLOC_EXTERN mFree ifree_ptr; + + + +#endif//ALLOC_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_bits.h b/libs/DevIL-1.7.8/src-IL/include/il_bits.h new file mode 100644 index 00000000..af4eb13d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_bits.h @@ -0,0 +1,43 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_bits.h +// +// Description: Implements a file class that reads/writes bits directly. +// +//----------------------------------------------------------------------------- + + +#ifndef BITS_H +#define BITS_H + +#include "il_internal.h" + + +// Struct for dealing with reading bits from a file +typedef struct BITFILE +{ + ILHANDLE File; + ILuint BitPos; + ILint ByteBitOff; + ILubyte Buff; +} BITFILE; + +// Functions for reading bits from a file +//BITFILE* bopen(const char *FileName, const char *Mode); +ILint bclose(BITFILE *BitFile); +BITFILE* bfile(ILHANDLE File); +ILint btell(BITFILE *BitFile); +ILint bseek(BITFILE *BitFile, ILuint Offset, ILuint Mode); +ILint bread(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile); +//ILint bwrite(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile); + +// Useful macros for manipulating bits +#define SetBits(var, bits) (var |= bits) +#define ClearBits(var, bits) (var &= ~(bits)) + + +#endif//BITS_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_bmp.h b/libs/DevIL-1.7.8/src-IL/include/il_bmp.h new file mode 100644 index 00000000..e1ec5146 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_bmp.h @@ -0,0 +1,107 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 09/01/2003 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_bmp.h +// +// Description: Reads and writes to a bitmap (.bmp) file. +// +//----------------------------------------------------------------------------- + + +#ifndef BMP_H +#define BMP_H + +#include "il_internal.h" + +#ifdef _WIN32 + #pragma pack(push, bmp_struct, 1) +#endif +typedef struct BMPHEAD { + ILushort bfType; + ILint bfSize; + ILuint bfReserved; + ILint bfDataOff; + ILint biSize; + ILint biWidth; + ILint biHeight; + ILshort biPlanes; + ILshort biBitCount; + ILint biCompression; + ILint biSizeImage; + ILint biXPelsPerMeter; + ILint biYPelsPerMeter; + ILint biClrUsed; + ILint biClrImportant; +} IL_PACKSTRUCT BMPHEAD; + +typedef struct OS2_HEAD +{ + // Bitmap file header. + ILushort bfType; + ILuint biSize; + ILshort xHotspot; + ILshort yHotspot; + ILuint DataOff; + + // Bitmap core header. + ILuint cbFix; + //2003-09-01: changed cx, cy to ushort according to MSDN + ILushort cx; + ILushort cy; + ILushort cPlanes; + ILushort cBitCount; +} IL_PACKSTRUCT OS2_HEAD; +#ifdef _WIN32 + #pragma pack(pop, bmp_struct) +#endif + +// Internal functions +ILboolean iGetBmpHead(BMPHEAD * const Header); +ILboolean iGetOS2Head(OS2_HEAD * const Header); +ILboolean iIsValidBmp(); +ILboolean iCheckBmp(const BMPHEAD *CONST_RESTRICT Header); +ILboolean iCheckOS2(const OS2_HEAD *CONST_RESTRICT Header); +ILboolean iLoadBitmapInternal(); +ILboolean iSaveBitmapInternal(); +ILboolean ilReadUncompBmp(BMPHEAD *Info); +ILboolean ilReadRLE8Bmp(BMPHEAD *Info); +ILboolean ilReadRLE4Bmp(BMPHEAD *Info); +ILboolean iGetOS2Bmp(OS2_HEAD *Header); + +#ifdef IL_BMP_C +#undef NOINLINE +#undef INLINE +#define INLINE +#endif + +#ifndef NOINLINE +INLINE void GetShiftFromMask(const ILuint Mask, ILuint * CONST_RESTRICT ShiftLeft, ILuint * CONST_RESTRICT ShiftRight) { + ILuint Temp, i; + + if( Mask == 0 ) { + *ShiftLeft = *ShiftRight = 0; + return; + } + + Temp = Mask; + for( i = 0; i < 32; i++, Temp >>= 1 ) { + if( Temp & 1 ) + break; + } + *ShiftRight = i; + + // Temp is preserved, so use it again: + for( i = 0; i < 8; i++, Temp >>= 1 ) { + if( !(Temp & 1) ) + break; + } + *ShiftLeft = 8 - i; + + return; +} +#endif + +#endif//BMP_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_dcx.h b/libs/DevIL-1.7.8/src-IL/include/il_dcx.h new file mode 100644 index 00000000..9ff6da92 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_dcx.h @@ -0,0 +1,52 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/26/2009 +// +// Filename: src-IL/include/il_dcx.h +// +// Description: Reads from a .dcx file. +// +//----------------------------------------------------------------------------- + + +#ifndef DCX_H +#define DCX_H + +#include "il_internal.h" + + +#ifdef _WIN32 +#pragma pack(push, packed_struct, 1) +#endif +typedef struct DCXHEAD +{ + ILubyte Manufacturer; + ILubyte Version; + ILubyte Encoding; + ILubyte Bpp; + ILushort Xmin, Ymin, Xmax, Ymax; + ILushort HDpi; + ILushort VDpi; + ILubyte ColMap[48]; + ILubyte Reserved; + ILubyte NumPlanes; + ILushort Bps; + ILushort PaletteInfo; + ILushort HScreenSize; + ILushort VScreenSize; + ILubyte Filler[54]; +} IL_PACKSTRUCT DCXHEAD; +#ifdef _WIN32 +#pragma pack(pop, packed_struct) +#endif + +// For checking and reading +ILboolean iIsValidDcx(void); +ILboolean iCheckDcx(DCXHEAD *Header); +ILboolean iLoadDcxInternal(void); +ILimage* iUncompressDcx(DCXHEAD *Header); +ILimage* iUncompressDcxSmall(DCXHEAD *Header); + +#endif//PCX_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_dds.h b/libs/DevIL-1.7.8/src-IL/include/il_dds.h new file mode 100644 index 00000000..045c29ec --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_dds.h @@ -0,0 +1,221 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/27/2008 +// +// Filename: src-IL/include/il_dds.h +// +// Description: Reads from a DirectDraw Surface (.dds) file. +// +//----------------------------------------------------------------------------- + + +#ifndef DDS_H +#define DDS_H + +#include "il_internal.h" + + +#ifdef _WIN32 + #pragma pack(push, dds_struct, 1) +#endif +typedef struct DDSHEAD +{ + ILbyte Signature[4]; + + ILuint Size1; // size of the structure (minus MagicNum) + ILuint Flags1; // determines what fields are valid + ILuint Height; // height of surface to be created + ILuint Width; // width of input surface + ILuint LinearSize; // Formless late-allocated optimized surface size + ILuint Depth; // Depth if a volume texture + ILuint MipMapCount; // number of mip-map levels requested + ILuint AlphaBitDepth; // depth of alpha buffer requested + + ILuint NotUsed[10]; + + ILuint Size2; // size of structure + ILuint Flags2; // pixel format flags + ILuint FourCC; // (FOURCC code) + ILuint RGBBitCount; // how many bits per pixel + ILuint RBitMask; // mask for red bit + ILuint GBitMask; // mask for green bits + ILuint BBitMask; // mask for blue bits + ILuint RGBAlphaBitMask; // mask for alpha channel + + ILuint ddsCaps1, ddsCaps2, ddsCaps3, ddsCaps4; // direct draw surface capabilities + ILuint TextureStage; +} IL_PACKSTRUCT DDSHEAD; +#ifdef _WIN32 + #pragma pack(pop, dds_struct) +#endif + + + +// use cast to struct instead of RGBA_MAKE as struct is +// much +typedef struct Color8888 +{ + ILubyte r; // change the order of names to change the + ILubyte g; // order of the output ARGB or BGRA, etc... + ILubyte b; // Last one is MSB, 1st is LSB. + ILubyte a; +} Color8888; + + +typedef struct Color888 +{ + ILubyte r; // change the order of names to change the + ILubyte g; // order of the output ARGB or BGRA, etc... + ILubyte b; // Last one is MSB, 1st is LSB. +} Color888; + + +typedef struct Color565 +{ + unsigned nBlue : 5; // order of names changes + unsigned nGreen : 6; // byte order of output to 32 bit + unsigned nRed : 5; +} Color565; + + +typedef struct DXTColBlock +{ + ILshort col0; + ILshort col1; + + // no bit fields - use bytes + ILbyte row[4]; +} DXTColBlock; + +typedef struct DXTAlphaBlockExplicit +{ + ILshort row[4]; +} DXTAlphaBlockExplicit; + +typedef struct DXTAlphaBlock3BitLinear +{ + ILbyte alpha0; + ILbyte alpha1; + + ILbyte stuff[6]; +} DXTAlphaBlock3BitLinear; + + +// Defines + +//Those 4 were added on 20040516 to make +//the written dds files more standard compliant +#define DDS_CAPS 0x00000001L +#define DDS_HEIGHT 0x00000002L +#define DDS_WIDTH 0x00000004L + +#define DDS_RGB 0x00000040L +#define DDS_PIXELFORMAT 0x00001000L + +#define DDS_LUMINANCE 0x00020000L + +#define DDS_ALPHAPIXELS 0x00000001L +#define DDS_ALPHA 0x00000002L +#define DDS_FOURCC 0x00000004L +#define DDS_PITCH 0x00000008L +#define DDS_COMPLEX 0x00000008L +#define DDS_TEXTURE 0x00001000L +#define DDS_MIPMAPCOUNT 0x00020000L +#define DDS_LINEARSIZE 0x00080000L +#define DDS_VOLUME 0x00200000L +#define DDS_MIPMAP 0x00400000L +#define DDS_DEPTH 0x00800000L + +#define DDS_CUBEMAP 0x00000200L +#define DDS_CUBEMAP_POSITIVEX 0x00000400L +#define DDS_CUBEMAP_NEGATIVEX 0x00000800L +#define DDS_CUBEMAP_POSITIVEY 0x00001000L +#define DDS_CUBEMAP_NEGATIVEY 0x00002000L +#define DDS_CUBEMAP_POSITIVEZ 0x00004000L +#define DDS_CUBEMAP_NEGATIVEZ 0x00008000L + + +#define IL_MAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((ILint)(ILbyte)(ch0) | ((ILint)(ILbyte)(ch1) << 8) | \ + ((ILint)(ILbyte)(ch2) << 16) | ((ILint)(ILbyte)(ch3) << 24 )) + +enum PixFormat +{ + PF_ARGB, + PF_RGB, + PF_DXT1, + PF_DXT2, + PF_DXT3, + PF_DXT4, + PF_DXT5, + PF_3DC, + PF_ATI1N, + PF_LUMINANCE, + PF_LUMINANCE_ALPHA, + PF_RXGB, //Doom3 normal maps + PF_A16B16G16R16, + PF_R16F, + PF_G16R16F, + PF_A16B16G16R16F, + PF_R32F, + PF_G32R32F, + PF_A32B32G32R32F, + PF_UNKNOWN = 0xFF +}; + +#define CUBEMAP_SIDES 6 + +// Internal functions +ILboolean iLoadDdsInternal(void); +ILboolean iIsValidDds(void); +ILboolean iCheckDds(DDSHEAD *Head); +void AdjustVolumeTexture(DDSHEAD *Head, ILuint CompFormat); +ILboolean ReadData(); +ILboolean AllocImage(ILuint CompFormat); +ILboolean DdsDecompress(ILuint CompFormat); +ILboolean ReadMipmaps(ILuint CompFormat); +ILuint DecodePixelFormat(); +void DxtcReadColor(ILushort Data, Color8888* Out); +void DxtcReadColors(const ILubyte* Data, Color8888* Out); +ILboolean DecompressARGB(ILuint CompFormat); +ILboolean DecompressARGB16(ILuint CompFormat); +ILboolean DecompressDXT1(ILimage *lImage, ILubyte *lCompData); +ILboolean DecompressDXT2(ILimage *lImage, ILubyte *lCompData); +ILboolean DecompressDXT3(ILimage *lImage, ILubyte *lCompData); +ILboolean DecompressDXT4(ILimage *lImage, ILubyte *lCompData); +ILboolean DecompressDXT5(ILimage *lImage, ILubyte *lCompData); +ILboolean Decompress3Dc(); +ILboolean DecompressAti1n(); +ILboolean DecompressRXGB(); +ILboolean iConvFloat16ToFloat32(ILuint* dest, ILushort* src, ILuint size); +ILboolean DecompressFloat(ILuint lCompFormat); +void CorrectPreMult(); +void GetBitsFromMask(ILuint Mask, ILuint *ShiftLeft, ILuint *ShiftRight); +ILboolean iSaveDdsInternal(void); +ILboolean WriteHeader(ILimage *Image, ILenum DXTCFormat, ILuint CubeFlags); +ILushort *CompressTo565(ILimage *Image); +ILubyte *CompressTo88(ILimage *Image); +ILuint Compress(ILimage *Image, ILenum DXTCFormat); +ILboolean GetBlock(ILushort *Block, ILushort *Data, ILimage *Image, ILuint XPos, ILuint YPos); +ILboolean GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos); +ILboolean Get3DcBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos, int channel); +void ShortToColor565(ILushort Pixel, Color565 *Colour); +void ShortToColor888(ILushort Pixel, Color888 *Colour); +ILushort Color565ToShort(Color565 *Colour); +ILushort Color888ToShort(Color888 *Colour); +ILuint GenBitMask(ILushort ex0, ILushort ex1, ILuint NumCols, ILushort *In, ILubyte *Alpha, Color888 *OutCol); +void GenAlphaBitMask(ILubyte a0, ILubyte a1, ILubyte *In, ILubyte *Mask, ILubyte *Out); +ILuint RMSAlpha(ILubyte *Orig, ILubyte *Test); +ILuint Distance(Color888 *c1, Color888 *c2); +void ChooseEndpoints(ILushort *Block, ILushort *ex0, ILushort *ex1); +void ChooseAlphaEndpoints(ILubyte *Block, ILubyte *a0, ILubyte *a1); +void CorrectEndDXT1(ILushort *ex0, ILushort *ex1, ILboolean HasAlpha); +void PreMult(ILushort *Data, ILubyte *Alpha); + + +extern ILuint CubemapDirections[CUBEMAP_SIDES]; + + +#endif//DDS_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_doompal.h b/libs/DevIL-1.7.8/src-IL/include/il_doompal.h new file mode 100644 index 00000000..563e1549 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_doompal.h @@ -0,0 +1,276 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_doompal.h +// +// Description: The default Doom palette +// +//----------------------------------------------------------------------------- + +#ifndef DOOMPAL_H +#define DOOMPAL_H + +#define IL_DOOMPAL_SIZE 768 +ILubyte ilDefaultDoomPal[IL_DOOMPAL_SIZE] = { + 0, 0, 0, + 31, 23, 11, + 23, 15, 7, + 75, 75, 75, + 255, 255, 255, + 27, 27, 27, + 19, 19, 19, + 11, 11, 11, + 7, 7, 7, + 47, 55, 31, + 35, 43, 15, + 23, 31, 7, + 15, 23, 0, + 79, 59, 43, + 71, 51, 35, + 63, 43, 27, + 255, 183, 183, + 247, 171, 171, + 243, 163, 163, + 235, 151, 151, + 231, 143, 143, + 223, 135, 135, + 219, 123, 123, + 211, 115, 115, + 203, 107, 107, + 199, 99, 99, + 191, 91, 91, + 187, 87, 87, + 179, 79, 79, + 175, 71, 71, + 167, 63, 63, + 163, 59, 59, + 155, 51, 51, + 151, 47, 47, + 143, 43, 43, + 139, 35, 35, + 131, 31, 31, + 127, 27, 27, + 119, 23, 23, + 115, 19, 19, + 107, 15, 15, + 103, 11, 11, + 95, 7, 7, + 91, 7, 7, + 83, 7, 7, + 79, 0, 0, + 71, 0, 0, + 67, 0, 0, + 255, 235, 223, + 255, 227, 211, + 255, 219, 199, + 255, 211, 187, + 255, 207, 179, + 255, 199, 167, + 255, 191, 155, + 255, 187, 147, + 255, 179, 131, + 247, 171, 123, + 239, 163, 115, + 231, 155, 107, + 223, 147, 99, + 215, 139, 91, + 207, 131, 83, + 203, 127, 79, + 191, 123, 75, + 179, 115, 71, + 171, 111, 67, + 163, 107, 63, + 155, 99, 59, + 143, 95, 55, + 135, 87, 51, + 127, 83, 47, + 119, 79, 43, + 107, 71, 39, + 95, 67, 35, + 83, 63, 31, + 75, 55, 27, + 63, 47, 23, + 51, 43, 19, + 43, 35, 15, + 239, 239, 239, + 231, 231, 231, + 223, 223, 223, + 219, 219, 219, + 211, 211, 211, + 203, 203, 203, + 199, 199, 199, + 191, 191, 191, + 183, 183, 183, + 179, 179, 179, + 171, 171, 171, + 167, 167, 167, + 159, 159, 159, + 151, 151, 151, + 147, 147, 147, + 139, 139, 139, + 131, 131, 131, + 127, 127, 127, + 119, 119, 119, + 111, 111, 111, + 107, 107, 107, + 99, 99, 99, + 91, 91, 91, + 87, 87, 87, + 79, 79, 79, + 71, 71, 71, + 67, 67, 67, + 59, 59, 59, + 55, 55, 55, + 47, 47, 47, + 39, 39, 39, + 35, 35, 35, + 119, 255, 111, + 111, 239, 103, + 103, 223, 95, + 95, 207, 87, + 91, 191, 79, + 83, 175, 71, + 75, 159, 63, + 67, 147, 55, + 63, 131, 47, + 55, 115, 43, + 47, 99, 35, + 39, 83, 27, + 31, 67, 23, + 23, 51, 15, + 19, 35, 11, + 11, 23, 7, + 191, 167, 143, + 183, 159, 135, + 175, 151, 127, + 167, 143, 119, + 159, 135, 111, + 155, 127, 107, + 147, 123, 99, + 139, 115, 91, + 131, 107, 87, + 123, 99, 79, + 119, 95, 75, + 111, 87, 67, + 103, 83, 63, + 95, 75, 55, + 87, 67, 51, + 83, 63, 47, + 159, 131, 99, + 143, 119, 83, + 131, 107, 75, + 119, 95, 63, + 103, 83, 51, + 91, 71, 43, + 79, 59, 35, + 67, 51, 27, + 123, 127, 99, + 111, 115, 87, + 103, 107, 79, + 91, 99, 71, + 83, 87, 59, + 71, 79, 51, + 63, 71, 43, + 55, 63, 39, + 255, 255, 115, + 235, 219, 87, + 215, 187, 67, + 195, 155, 47, + 175, 123, 31, + 155, 91, 19, + 135, 67, 7, + 115, 43, 0, + 255, 255, 255, + 255, 219, 219, + 255, 187, 187, + 255, 155, 155, + 255, 123, 123, + 255, 95, 95, + 255, 63, 63, + 255, 31, 31, + 255, 0, 0, + 239, 0, 0, + 227, 0, 0, + 215, 0, 0, + 203, 0, 0, + 191, 0, 0, + 179, 0, 0, + 167, 0, 0, + 155, 0, 0, + 139, 0, 0, + 127, 0, 0, + 115, 0, 0, + 103, 0, 0, + 91, 0, 0, + 79, 0, 0, + 67, 0, 0, + 231, 231, 255, + 199, 199, 255, + 171, 171, 255, + 143, 143, 255, + 115, 115, 255, + 83, 83, 255, + 55, 55, 255, + 27, 27, 255, + 0, 0, 255, + 0, 0, 227, + 0, 0, 203, + 0, 0, 179, + 0, 0, 155, + 0, 0, 131, + 0, 0, 107, + 0, 0, 83, + 255, 255, 255, + 255, 235, 219, + 255, 215, 187, + 255, 199, 155, + 255, 179, 123, + 255, 163, 91, + 255, 143, 59, + 255, 127, 27, + 243, 115, 23, + 235, 111, 15, + 223, 103, 15, + 215, 95, 11, + 203, 87, 7, + 195, 79, 0, + 183, 71, 0, + 175, 67, 0, + 255, 255, 255, + 255, 255, 215, + 255, 255, 179, + 255, 255, 143, + 255, 255, 107, + 255, 255, 71, + 255, 255, 35, + 255, 255, 0, + 167, 63, 0, + 159, 55, 0, + 147, 47, 0, + 135, 35, 0, + 79, 59, 39, + 67, 47, 27, + 55, 35, 19, + 47, 27, 11, + 0, 0, 83, + 0, 0, 71, + 0, 0, 59, + 0, 0, 47, + 0, 0, 35, + 0, 0, 23, + 0, 0, 11, + 0, 255, 255, + 255, 159, 67, + 255, 231, 75, + 255, 123, 255, + 255, 0, 255, + 207, 0, 207, + 159, 0, 155, + 111, 0, 107, + 167, 107, 107 +}; + +#endif//DOOMPAL_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_dpx.h b/libs/DevIL-1.7.8/src-IL/include/il_dpx.h new file mode 100644 index 00000000..77dea1bc --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_dpx.h @@ -0,0 +1,150 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/26/2009 +// +// Filename: src-IL/include/il_dpx.h +// +// Description: Reads from a Digital Picture Exchange (.dpx) file. +// Specifications for this format were found at +// http://www.cineon.com/ff_draft.php and +// http://www.fileformat.info/format/dpx/. +// +//----------------------------------------------------------------------------- + + +#ifndef DPX_H +#define DPX_H + +#include "il_internal.h" + + +#ifdef _WIN32 +#pragma pack(push, packed_struct, 1) +#endif +typedef struct R32 +{ + ILubyte r, g, b, a; +} IL_PACKSTRUCT R32; +#ifdef _WIN32 +#pragma pack(pop, packed_struct) +#endif + + +typedef struct DPX_FILE_INFO +{ + ILuint MagicNum; /* magic number 0x53445058 (SDPX) or 0x58504453 (XPDS) */ + ILuint Offset; /* offset to image data in bytes */ + ILbyte Vers[8]; /* which header format version is being used (v1.0)*/ + ILuint FileSize; /* file size in bytes */ + ILuint DittoKey; /* read time short cut - 0 = same, 1 = new */ + ILuint GenHdrSize; /* generic header length in bytes */ + ILuint IndHdrSize; /* industry header length in bytes */ + ILuint UserDataSize; /* user-defined data length in bytes */ + ILbyte FileName[100]; /* image file name */ + ILbyte CreateTime[24]; /* file creation date "yyyy:mm:dd:hh:mm:ss:LTZ" */ + ILbyte Creator[100]; /* file creator's name */ + ILbyte Project[200]; /* project name */ + ILbyte Copyright[200]; /* right to use or copyright info */ + ILuint Key; /* encryption ( FFFFFFFF = unencrypted ) */ + ILbyte Reserved[104]; /* reserved field TBD (need to pad) */ +} DPX_FILE_INFO; + +typedef struct DPX_IMAGE_ELEMENT +{ + ILuint DataSign; /* data sign (0 = unsigned, 1 = signed ) */ + /* "Core set images are unsigned" */ + ILuint RefLowData; /* reference low data code value */ + R32 RefLowQuantity; /* reference low quantity represented */ + ILuint RefHighData; /* reference high data code value */ + R32 RefHighQuantity;/* reference high quantity represented */ + ILubyte Descriptor; /* descriptor for image element */ + ILubyte Transfer; /* transfer characteristics for element */ + ILubyte Colorimetric; /* colormetric specification for element */ + ILubyte BitSize; /* bit size for element */ + ILushort Packing; /* packing for element */ + ILushort Encoding; /* encoding for element */ + ILuint DataOffset; /* offset to data of element */ + ILuint EolPadding; /* end of line padding used in element */ + ILuint EoImagePadding; /* end of image padding used in element */ + ILbyte Description[32];/* description of element */ +} DPX_IMAGE_ELEMENT; /* NOTE THERE ARE EIGHT OF THESE */ + + +typedef struct DPX_IMAGE_INFO +{ + ILushort Orientation; /* image orientation */ + ILushort NumElements; /* number of image elements */ + ILuint Width; /* or x value */ + ILuint Height; /* or y value, per element */ + DPX_IMAGE_ELEMENT ImageElement[8]; + ILubyte reserved[52]; /* reserved for future use (padding) */ +} DPX_IMAGE_INFO; + + +typedef struct DPX_IMAGE_ORIENT +{ + ILuint XOffset; /* X offset */ + ILuint YOffset; /* Y offset */ + R32 XCenter; /* X center */ + R32 YCenter; /* Y center */ + ILuint XOrigSize; /* X original size */ + ILuint YOrigSize; /* Y original size */ + ILbyte FileName[100]; /* source image file name */ + ILbyte CreationTime[24]; /* source image creation date and time */ + ILbyte InputDev[32]; /* input device name */ + ILbyte InputSerial[32]; /* input device serial number */ + ILushort Border[4]; /* border validity (XL, XR, YT, YB) */ + ILuint PixelAspect[2]; /* pixel aspect ratio (H:V) */ + ILubyte Reserved[28]; /* reserved for future use (padding) */ +} DPX_IMAGE_ORIENT; + + +typedef struct DPX_MOTION_PICTURE_HEAD +{ + ILbyte film_mfg_id[2]; /* film manufacturer ID code (2 digits from film edge code) */ + ILbyte film_type[2]; /* file type (2 digits from film edge code) */ + ILbyte offset[2]; /* offset in perfs (2 digits from film edge code)*/ + ILbyte prefix[6]; /* prefix (6 digits from film edge code) */ + ILbyte count[4]; /* count (4 digits from film edge code)*/ + ILbyte format[32]; /* format (i.e. academy) */ + ILuint frame_position; /* frame position in sequence */ + ILuint sequence_len; /* sequence length in frames */ + ILuint held_count; /* held count (1 = default) */ + R32 frame_rate; /* frame rate of original in frames/sec */ + R32 shutter_angle; /* shutter angle of camera in degrees */ + ILbyte frame_id[32]; /* frame identification (i.e. keyframe) */ + ILbyte slate_info[100]; /* slate information */ + ILubyte reserved[56]; /* reserved for future use (padding) */ +} DPX_MOTION_PICTURE_HEAD; + + +typedef struct DPX_TELEVISION_HEAD +{ + ILuint tim_code; /* SMPTE time code */ + ILuint userBits; /* SMPTE user bits */ + ILubyte interlace; /* interlace ( 0 = noninterlaced, 1 = 2:1 interlace*/ + ILubyte field_num; /* field number */ + ILubyte video_signal; /* video signal standard (table 4)*/ + ILubyte unused; /* used for byte alignment only */ + R32 hor_sample_rate; /* horizontal sampling rate in Hz */ + R32 ver_sample_rate; /* vertical sampling rate in Hz */ + R32 frame_rate; /* temporal sampling rate or frame rate in Hz */ + R32 time_offset; /* time offset from sync to first pixel */ + R32 gamma; /* gamma value */ + R32 black_level; /* black level code value */ + R32 black_gain; /* black gain */ + R32 break_point; /* breakpoint */ + R32 white_level; /* reference white level code value */ + R32 integration_times; /* integration time(s) */ + ILubyte reserved[76]; /* reserved for future use (padding) */ +} DPX_TELEVISION_HEAD; + + +// For checking and reading +ILboolean iIsValidDpx(void); +//ILboolean iCheckDpx(DPXHEAD *Header); +ILboolean iLoadDpxInternal(void); + +#endif//PCX_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_endian.h b/libs/DevIL-1.7.8/src-IL/include/il_endian.h new file mode 100644 index 00000000..08189484 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_endian.h @@ -0,0 +1,377 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/29/2009 +// +// Filename: src-IL/include/il_endian.h +// +// Description: Handles Endian-ness +// +//----------------------------------------------------------------------------- + +#ifndef IL_ENDIAN_H +#define IL_ENDIAN_H + +#include "il_internal.h" + +#ifdef WORDS_BIGENDIAN // This is defined by ./configure. + #ifndef __BIG_ENDIAN__ + #define __BIG_ENDIAN__ 1 + #endif +#endif + +#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \ + || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) + #undef __LITTLE_ENDIAN__ + #define Short(s) iSwapShort(s) + #define UShort(s) iSwapUShort(s) + #define Int(i) iSwapInt(i) + #define UInt(i) iSwapUInt(i) + #define Float(f) iSwapFloat(f) + #define Double(d) iSwapDouble(d) + + #define BigShort(s) + #define BigUShort(s) + #define BigInt(i) + #define BigUInt(i) + #define BigFloat(f) + #define BigDouble(d) +#else + #undef __BIG_ENDIAN__ + #undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler... + #define __LITTLE_ENDIAN__ + #define Short(s) + #define UShort(s) + #define Int(i) + #define UInt(i) + #define Float(f) + #define Double(d) + + #define BigShort(s) iSwapShort(s) + #define BigUShort(s) iSwapUShort(s) + #define BigInt(i) iSwapInt(i) + #define BigUInt(i) iSwapUInt(i) + #define BigFloat(f) iSwapFloat(f) + #define BigDouble(d) iSwapDouble(d) +#endif + +void iSwapUShort(ILushort *s); +void iSwapShort(ILshort *s); +void iSwapUInt(ILuint *i); +void iSwapInt(ILint *i); +void iSwapFloat(ILfloat *f); +void iSwapDouble(ILdouble *d); +ILushort GetLittleUShort(); +ILshort GetLittleShort(); +ILuint GetLittleUInt(); +ILint GetLittleInt(); +ILfloat GetLittleFloat(); +ILdouble GetLittleDouble(); +ILushort GetBigUShort(); +ILshort GetBigShort(); +ILuint GetBigUInt(); +ILint GetBigInt(); +ILfloat GetBigFloat(); +ILdouble GetBigDouble(); +ILubyte SaveLittleUShort(ILushort s); +ILubyte SaveLittleShort(ILshort s); +ILubyte SaveLittleUInt(ILuint i); +ILubyte SaveLittleInt(ILint i); +ILubyte SaveLittleFloat(ILfloat f); +ILubyte SaveLittleDouble(ILdouble d); +ILubyte SaveBigUShort(ILushort s); +ILubyte SaveBigShort(ILshort s); +ILubyte SaveBigUInt(ILuint i); +ILubyte SaveBigInt(ILint i); +ILubyte SaveBigFloat(ILfloat f); +ILubyte SaveBigDouble(ILdouble d); + +#ifdef IL_ENDIAN_C +#undef NOINLINE +#undef INLINE +#define INLINE +#endif + +#ifndef NOINLINE +INLINE void iSwapUShort(ILushort *s) { + #ifdef USE_WIN32_ASM + __asm { + mov ebx, s + mov al, [ebx+1] + mov ah, [ebx ] + mov [ebx], ax + } + #else + #ifdef GCC_X86_ASM + asm("ror $8,%0" + : "=r" (*s) + : "0" (*s)); + #else + *s = ((*s)>>8) | ((*s)<<8); + #endif //GCC_X86_ASM + #endif //USE_WIN32_ASM +} + +INLINE void iSwapShort(ILshort *s) { + iSwapUShort((ILushort*)s); +} + +INLINE void iSwapUInt(ILuint *i) { + #ifdef USE_WIN32_ASM + __asm { + mov ebx, i + mov eax, [ebx] + bswap eax + mov [ebx], eax + } + #else + #ifdef GCC_X86_ASM + asm("bswap %0;" + : "+r" (*i)); + #else + *i = ((*i)>>24) | (((*i)>>8) & 0xff00) | (((*i)<<8) & 0xff0000) | ((*i)<<24); + #endif //GCC_X86_ASM + #endif //USE_WIN32_ASM +} + +INLINE void iSwapInt(ILint *i) { + iSwapUInt((ILuint*)i); +} + +INLINE void iSwapFloat(ILfloat *f) { + iSwapUInt((ILuint*)f); +} + +INLINE void iSwapDouble(ILdouble *d) { + #ifdef GCC_X86_ASM + int *t = (int*)d; + asm("bswap %2 \n" + "bswap %3 \n" + "movl %2,%1 \n" + "movl %3,%0 \n" + : "=g" (t[0]), "=g" (t[1]) + : "r" (t[0]), "r" (t[1])); + #else + ILubyte t,*b = (ILubyte*)d; + #define dswap(x,y) t=b[x];b[x]=b[y];b[y]=b[x]; + dswap(0,7); + dswap(1,6); + dswap(2,5); + dswap(3,4); + #undef dswap + #endif +} + + +INLINE ILushort GetLittleUShort() { + ILushort s; + iread(&s, sizeof(ILushort), 1); +#ifdef __BIG_ENDIAN__ + iSwapUShort(&s); +#endif + return s; +} + +INLINE ILshort GetLittleShort() { + ILshort s; + iread(&s, sizeof(ILshort), 1); +#ifdef __BIG_ENDIAN__ + iSwapShort(&s); +#endif + return s; +} + +INLINE ILuint GetLittleUInt() { + ILuint i; + iread(&i, sizeof(ILuint), 1); +#ifdef __BIG_ENDIAN__ + iSwapUInt(&i); +#endif + return i; +} + +INLINE ILint GetLittleInt() { + ILint i; + iread(&i, sizeof(ILint), 1); +#ifdef __BIG_ENDIAN__ + iSwapInt(&i); +#endif + return i; +} + +INLINE ILfloat GetLittleFloat() { + ILfloat f; + iread(&f, sizeof(ILfloat), 1); +#ifdef __BIG_ENDIAN__ + iSwapFloat(&f); +#endif + return f; +} + +INLINE ILdouble GetLittleDouble() { + ILdouble d; + iread(&d, sizeof(ILdouble), 1); +#ifdef __BIG_ENDIAN__ + iSwapDouble(&d); +#endif + return d; +} + + +INLINE ILushort GetBigUShort() { + ILushort s; + iread(&s, sizeof(ILushort), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapUShort(&s); +#endif + return s; +} + + +INLINE ILshort GetBigShort() { + ILshort s; + iread(&s, sizeof(ILshort), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapShort(&s); +#endif + return s; +} + + +INLINE ILuint GetBigUInt() { + ILuint i; + iread(&i, sizeof(ILuint), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapUInt(&i); +#endif + return i; +} + + +INLINE ILint GetBigInt() { + ILint i; + iread(&i, sizeof(ILint), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapInt(&i); +#endif + return i; +} + + +INLINE ILfloat GetBigFloat() { + ILfloat f; + iread(&f, sizeof(ILfloat), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapFloat(&f); +#endif + return f; +} + + +INLINE ILdouble GetBigDouble() { + ILdouble d; + iread(&d, sizeof(ILdouble), 1); +#ifdef __LITTLE_ENDIAN__ + iSwapDouble(&d); +#endif + return d; +} + +INLINE ILubyte SaveLittleUShort(ILushort s) { +#ifdef __BIG_ENDIAN__ + iSwapUShort(&s); +#endif + return iwrite(&s, sizeof(ILushort), 1); +} + +INLINE ILubyte SaveLittleShort(ILshort s) { +#ifdef __BIG_ENDIAN__ + iSwapShort(&s); +#endif + return iwrite(&s, sizeof(ILshort), 1); +} + + +INLINE ILubyte SaveLittleUInt(ILuint i) { +#ifdef __BIG_ENDIAN__ + iSwapUInt(&i); +#endif + return iwrite(&i, sizeof(ILuint), 1); +} + + +INLINE ILubyte SaveLittleInt(ILint i) { +#ifdef __BIG_ENDIAN__ + iSwapInt(&i); +#endif + return iwrite(&i, sizeof(ILint), 1); +} + +INLINE ILubyte SaveLittleFloat(ILfloat f) { +#ifdef __BIG_ENDIAN__ + iSwapFloat(&f); +#endif + return iwrite(&f, sizeof(ILfloat), 1); +} + + +INLINE ILubyte SaveLittleDouble(ILdouble d) { +#ifdef __BIG_ENDIAN__ + iSwapDouble(&d); +#endif + return iwrite(&d, sizeof(ILdouble), 1); +} + + +INLINE ILubyte SaveBigUShort(ILushort s) { +#ifdef __LITTLE_ENDIAN__ + iSwapUShort(&s); +#endif + return iwrite(&s, sizeof(ILushort), 1); +} + + +INLINE ILubyte SaveBigShort(ILshort s) { +#ifdef __LITTLE_ENDIAN__ + iSwapShort(&s); +#endif + return iwrite(&s, sizeof(ILshort), 1); +} + + +INLINE ILubyte SaveBigUInt(ILuint i) { +#ifdef __LITTLE_ENDIAN__ + iSwapUInt(&i); +#endif + return iwrite(&i, sizeof(ILuint), 1); +} + + +INLINE ILubyte SaveBigInt(ILint i) { +#ifdef __LITTLE_ENDIAN__ + iSwapInt(&i); +#endif + return iwrite(&i, sizeof(ILint), 1); +} + + +INLINE ILubyte SaveBigFloat(ILfloat f) { +#ifdef __LITTLE_ENDIAN__ + iSwapFloat(&f); +#endif + return iwrite(&f, sizeof(ILfloat), 1); +} + + +INLINE ILubyte SaveBigDouble(ILdouble d) { +#ifdef __LITTLE_ENDIAN__ + iSwapDouble(&d); +#endif + return iwrite(&d, sizeof(ILdouble), 1); +} +#endif//NOINLINE + +void EndianSwapData(void *_Image); + +#endif//ENDIAN_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_exr.h b/libs/DevIL-1.7.8/src-IL/include/il_exr.h new file mode 100644 index 00000000..edeacfea --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_exr.h @@ -0,0 +1,90 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 08/29/2008 +// +// Filename: src-IL/include/il_exr.h +// +// Description: Reads from an OpenEXR (.exr) file. +// +//----------------------------------------------------------------------------- + + +#ifndef EXR_H +#define EXR_H + +#include "il_internal.h" +#include + + +//using namespace Imf; // Using this leads to errors with Microsoft's IStream. + // So it is better to just specify the namespace explicitly. + + +typedef struct EXRHEAD +{ + ILuint MagicNumber; // File signature (0x76, 0x2f, 0x31, 0x01) + ILuint Version; // Treated as two bitfields +} IL_PACKSTRUCT EXRHEAD; + +//@TODO: Should I just do these as enums? +#define EXR_UINT 0 +#define EXR_HALF 1 +#define EXR_FLOAT 2 + +#define EXR_NO_COMPRESSION 0 +#define EXR_RLE_COMPRESSION 1 +#define EXR_ZIPS_COMPRESSION 2 +#define EXR_ZIP_COMPRESSION 3 +#define EXR_PIZ_COMPRESSION 4 +#define EXR_PXR24_COMPRESSION 5 +#define EXR_B44_COMPRESSION 6 +#define EXR_B44A_COMPRESSION 7 + + +#ifdef __cplusplus +extern "C" { +#endif + +ILboolean iIsValidExr(); +ILboolean iCheckExr(EXRHEAD *Header); +ILboolean iLoadExrInternal(); +ILboolean iSaveExrInternal(); + +#ifdef __cplusplus +} +#endif + +class ilIStream : public Imf::IStream +{ + public: + ilIStream(/*ILHANDLE Handle*/); + virtual bool read (char c[/*n*/], int n); + // I don't think I need this one, since we are taking care of the file handles ourselves. + //virtual char * readMemoryMapped (int n); + virtual Imf::Int64 tellg (); + virtual void seekg (Imf::Int64 Pos); + virtual void clear (); + + protected: + + private: +}; + +class ilOStream : public Imf::OStream +{ + public: + ilOStream(/*ILHANDLE Handle*/); + virtual void write (const char c[/*n*/], int n); + // I don't think I need this one, since we are taking care of the file handles ourselves. + //virtual char * readMemoryMapped (int n); + virtual Imf::Int64 tellp (); + virtual void seekp (Imf::Int64 Pos); + + protected: + + private: +}; + +#endif//EXR_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_files.h b/libs/DevIL-1.7.8/src-IL/include/il_files.h new file mode 100644 index 00000000..bb8389fc --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_files.h @@ -0,0 +1,79 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/04/2009 +// +// Filename: src-IL/include/il_files.h +// +// Description: File handling for DevIL +// +//----------------------------------------------------------------------------- + +#ifndef FILES_H +#define FILES_H + +#if defined (__FILES_C) +#define __FILES_EXTERN +#else +#define __FILES_EXTERN extern +#endif +#include + + +__FILES_EXTERN void ILAPIENTRY iPreserveReadFuncs(void); +__FILES_EXTERN void ILAPIENTRY iRestoreReadFuncs(void); +__FILES_EXTERN void ILAPIENTRY iPreserveWriteFuncs(void); +__FILES_EXTERN void ILAPIENTRY iRestoreWriteFuncs(void); + +__FILES_EXTERN fEofProc EofProc; +__FILES_EXTERN fGetcProc GetcProc; +__FILES_EXTERN fReadProc ReadProc; +__FILES_EXTERN fSeekRProc SeekRProc; +__FILES_EXTERN fSeekWProc SeekWProc; +__FILES_EXTERN fTellRProc TellRProc; +__FILES_EXTERN fTellWProc TellWProc; +__FILES_EXTERN fPutcProc PutcProc; +__FILES_EXTERN fWriteProc WriteProc; + +__FILES_EXTERN ILHANDLE ILAPIENTRY iDefaultOpen(ILconst_string FileName); +__FILES_EXTERN void ILAPIENTRY iDefaultClose(ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultGetc(ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultRead(void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultSeekR(ILHANDLE Handle, ILint Offset, ILint Mode); +__FILES_EXTERN ILint ILAPIENTRY iDefaultSeekW(ILHANDLE Handle, ILint Offset, ILint Mode); +__FILES_EXTERN ILint ILAPIENTRY iDefaultTellR(ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultTellW(ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultPutc(ILubyte Char, ILHANDLE Handle); +__FILES_EXTERN ILint ILAPIENTRY iDefaultWrite(const void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle); + +__FILES_EXTERN void iSetInputFile(ILHANDLE File); +__FILES_EXTERN void iSetInputLump(const void *Lump, ILuint Size); +__FILES_EXTERN ILboolean (ILAPIENTRY *ieof)(void); +__FILES_EXTERN ILHANDLE (ILAPIENTRY *iopenr)(ILconst_string); +__FILES_EXTERN void (ILAPIENTRY *icloser)(ILHANDLE); +__FILES_EXTERN ILint (ILAPIENTRY *igetc)(void); +__FILES_EXTERN ILuint (ILAPIENTRY *iread)(void *Buffer, ILuint Size, ILuint Number); +__FILES_EXTERN ILint (ILAPIENTRY *iseek)(ILint Offset, ILuint Mode); +__FILES_EXTERN ILuint (ILAPIENTRY *itell)(void); + +__FILES_EXTERN void iSetOutputFile(ILHANDLE File); +__FILES_EXTERN void iSetOutputLump(void *Lump, ILuint Size); +__FILES_EXTERN void iSetOutputFake(void); +__FILES_EXTERN void (ILAPIENTRY *iclosew)(ILHANDLE); +__FILES_EXTERN ILHANDLE (ILAPIENTRY *iopenw)(ILconst_string); +__FILES_EXTERN ILint (ILAPIENTRY *iputc)(ILubyte Char); +__FILES_EXTERN ILint (ILAPIENTRY *iseekw)(ILint Offset, ILuint Mode); +__FILES_EXTERN ILuint (ILAPIENTRY *itellw)(void); +__FILES_EXTERN ILint (ILAPIENTRY *iwrite)(const void *Buffer, ILuint Size, ILuint Number); + +__FILES_EXTERN ILHANDLE ILAPIENTRY iGetFile(void); +__FILES_EXTERN const ILubyte* ILAPIENTRY iGetLump(void); + +__FILES_EXTERN ILuint ILAPIENTRY ilprintf(const char *, ...); +__FILES_EXTERN void ipad(ILuint NumZeros); + +__FILES_EXTERN ILboolean iPreCache(ILuint Size); +__FILES_EXTERN void iUnCache(void); + +#endif//FILES_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_gif.h b/libs/DevIL-1.7.8/src-IL/include/il_gif.h new file mode 100644 index 00000000..06c17436 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_gif.h @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/include/il_gif.h +// +// Description: Reads from a Graphics Interchange Format (.gif) file. +// +//----------------------------------------------------------------------------- + + +#ifndef GIF_H +#define GIF_H + +#include "il_internal.h" + +#define GIF87A 87 +#define GIF89A 89 + +#ifdef _WIN32 + #pragma pack(push, gif_struct, 1) +#endif +typedef struct GIFHEAD +{ + char Sig[6]; + ILushort Width; + ILushort Height; + ILubyte ColourInfo; + ILubyte Background; + ILubyte Aspect; +} IL_PACKSTRUCT GIFHEAD; + +typedef struct IMAGEDESC +{ + ILubyte Separator; + ILushort OffX; + ILushort OffY; + ILushort Width; + ILushort Height; + ILubyte ImageInfo; +} IL_PACKSTRUCT IMAGEDESC; + +typedef struct GFXCONTROL +{ + ILubyte Size; + ILubyte Packed; + ILushort Delay; + ILubyte Transparent; + ILubyte Terminator; + ILboolean Used; //this stores if a gfxcontrol was read - it is IL_FALSE (!) + + //if a gfxcontrol was read from the file, IL_TRUE otherwise +} IL_PACKSTRUCT GFXCONTROL; +#ifdef _WIN32 + #pragma pack(pop, gif_struct) +#endif + +// Internal functions +ILboolean iLoadGifInternal(void); +ILboolean ilLoadGifF(ILHANDLE File); +ILboolean iIsValidGif(void); +ILboolean iGetPalette(ILubyte Info, ILpal *Pal, ILboolean UsePrevPal, ILimage *PrevImage); +ILboolean GetImages(ILpal *GlobalPal, GIFHEAD *GifHead); +ILboolean SkipExtensions(GFXCONTROL *Gfx); +ILboolean GifGetData(ILimage *Image, ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, ILuint PalOffset, GFXCONTROL *Gfx); +ILboolean RemoveInterlace(ILimage *image); +ILboolean ConvertTransparent(ILimage *Image, ILubyte TransColour); + +#endif//GIF_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_hdr.h b/libs/DevIL-1.7.8/src-IL/include/il_hdr.h new file mode 100644 index 00000000..2c30b0af --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_hdr.h @@ -0,0 +1,43 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2004 by Denton Woods (this file by thakis) +// Last modified: 06/09/2004 +// +// Filename: src-IL/include/il_hdr.h +// +// Description: Reads a RADIANCE High Dynamic Range Image +// +//----------------------------------------------------------------------------- + + +#ifndef HDR_H +#define HDR_H + +#include "il_internal.h" + +#ifdef _WIN32 + #pragma pack(push, gif_struct, 1) +#endif + +typedef struct HDRHEADER +{ + char Signature[10]; //must be "#?RADIANCE" + ILuint Width, Height; +} IL_PACKSTRUCT HDRHEADER; + +#ifdef _WIN32 + #pragma pack(pop, gif_struct) +#endif + +// Internal functions +ILboolean ilIsValidHdrF(ILHANDLE file); +ILboolean iIsValidHdr(); +ILboolean iCheckHdr(HDRHEADER *Header); +ILboolean ilLoadHdrF(ILHANDLE file); +ILboolean iLoadHdrInternal(); +ILboolean iSaveHdrInternal(); + +void ReadScanline(ILubyte *scanline, ILuint w); + +#endif//HDR_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_icns.h b/libs/DevIL-1.7.8/src-IL/include/il_icns.h new file mode 100644 index 00000000..0924e59d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_icns.h @@ -0,0 +1,42 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 08/23/2008 +// +// Filename: src-IL/include/il_icns.h +// +// Description: Reads from a Mac OS X icon (.icns) file. +// +//----------------------------------------------------------------------------- + + +#ifndef ICNS_H +#define ICNS_H + +#include "il_internal.h" + +#ifdef _WIN32 + #pragma pack(push, icns_struct, 1) +#endif +typedef struct ICNSHEAD +{ + char Head[4]; // Must be 'ICNS' + ILint Size; // Total size of the file (including header) +} IL_PACKSTRUCT ICNSHEAD; + +typedef struct ICNSDATA +{ + char ID[4]; // Identifier ('it32', 'il32', etc.) + ILint Size; // Total size of the entry (including identifier) +} IL_PACKSTRUCT ICNSDATA; + +#ifdef _WIN32 + #pragma pack(pop, icns_struct) +#endif + +ILboolean iIsValidIcns(); +ILboolean iLoadIcnsInternal(); +ILboolean iIcnsReadData(ILboolean *BaseCreated, ILboolean IsAlpha, ILint Width, ICNSDATA *Entry, ILimage **Image); + +#endif//ICNS_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_icon.h b/libs/DevIL-1.7.8/src-IL/include/il_icon.h new file mode 100644 index 00000000..4f314950 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_icon.h @@ -0,0 +1,70 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_icon.h +// +// Description: Reads from a Windows icon (.ico) file. +// +//----------------------------------------------------------------------------- + + +#ifndef ICON_H +#define ICON_H + +#include "il_internal.h" + +#ifdef _WIN32 + #pragma pack(push, ico_struct, 1) +#endif +typedef struct ICODIR +{ + ILshort Reserved; // Reserved (must be 0) + ILshort Type; // Type (1 for icons, 2 for cursors) + ILshort Count; // How many different images? +} IL_PACKSTRUCT ICODIR; + +typedef struct ICODIRENTRY +{ + ILubyte Width; // Width, in pixels + ILubyte Height; // Height, in pixels + ILubyte NumColours; // Number of colors in image (0 if >=8bpp) + ILubyte Reserved; // Reserved (must be 0) + ILshort Planes; // Colour planes + ILshort Bpp; // Bits per pixel + ILuint SizeOfData; // How many bytes in this resource? + ILuint Offset; // Offset from beginning of the file +} IL_PACKSTRUCT ICODIRENTRY; + +typedef struct INFOHEAD +{ + ILint Size; + ILint Width; + ILint Height; + ILshort Planes; + ILshort BitCount; + ILint Compression; + ILint SizeImage; + ILint XPixPerMeter; + ILint YPixPerMeter; + ILint ColourUsed; + ILint ColourImportant; +} IL_PACKSTRUCT INFOHEAD; + +typedef struct ICOIMAGE +{ + INFOHEAD Head; + ILubyte *Pal; // Palette + ILubyte *Data; // XOR mask + ILubyte *AND; // AND mask +} ICOIMAGE; +#ifdef _WIN32 + #pragma pack(pop, ico_struct) +#endif + +ILboolean iLoadIconInternal(); +ILboolean iLoadIconPNG(ICOIMAGE *Icon); + +#endif//ICON_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_internal.h b/libs/DevIL-1.7.8/src-IL/include/il_internal.h new file mode 100644 index 00000000..6f976cc1 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_internal.h @@ -0,0 +1,539 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/01/2009 +// +// Filename: src-IL/include/il_internal.h +// +// Description: Internal stuff for DevIL +// +//----------------------------------------------------------------------------- +#ifndef INTERNAL_H +#define INTERNAL_H +#define _IL_BUILD_LIBRARY + + +// Local headers +/*#if (defined(_WIN32) || defined(_WIN64)) && !defined(HAVE_CONFIG_H) + #define HAVE_CONFIG_H +#endif*/ +#ifdef HAVE_CONFIG_H //if we use autotools, we have HAVE_CONFIG_H defined and we have to look for it like that + #include +#else // If we do not use autotools, we have to point to (possibly different) config.h than in the opposite case + #include +#endif + +// Standard headers +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include "il_files.h" +#include "il_endian.h" + +#ifndef _WIN32 + // The Microsoft HD Photo Device Porting Kit has not been ported to anything other + // than Windows yet, so we disable this if Windows is not the current platform. + #define IL_NO_WDP +#endif//_WIN32 + +// If we do not want support for game image formats, this define removes them all. +#ifdef IL_NO_GAMES + #define IL_NO_BLP + #define IL_NO_DOOM + #define IL_NO_FTX + #define IL_NO_IWI + #define IL_NO_LIF + #define IL_NO_MDL + #define IL_NO_ROT + #define IL_NO_TPL + #define IL_NO_UTX + #define IL_NO_WAL +#endif//IL_NO_GAMES + +// If we want to compile without support for formats supported by external libraries, +// this define will remove them all. +#ifdef IL_NO_EXTLIBS + #define IL_NO_EXR + #define IL_NO_JP2 + #define IL_NO_JPG + #define IL_NO_LCMS + #define IL_NO_MNG + #define IL_NO_PNG + #define IL_NO_TIF + #define IL_NO_WDP + #undef IL_USE_DXTC_NVIDIA + #undef IL_USE_DXTC_SQUISH +#endif//IL_NO_EXTLIBS + +// Windows-specific +#ifdef _WIN32 + #ifdef _MSC_VER + #if _MSC_VER > 1000 + #pragma once + #pragma intrinsic(memcpy) + #pragma intrinsic(memset) + #pragma intrinsic(strcmp) + #pragma intrinsic(strlen) + #pragma intrinsic(strcpy) + + #if _MSC_VER >= 1300 + #pragma warning(disable : 4996) // MSVC++ 8/9 deprecation warnings + #endif + #endif // _MSC_VER > 1000 + #endif + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + #include +#endif//_WIN32 + +#ifdef _UNICODE + #define IL_TEXT(s) L##s + #ifndef _WIN32 // At least in Linux, fopen works fine, and wcsicmp is not defined. + #define wcsicmp wcsncasecmp + #define _wcsicmp wcsncasecmp + #define _wfopen fopen + #endif + #define iStrCpy wcscpy +#else + #define IL_TEXT(s) (s) + #define iStrCpy strcpy +#endif + +#ifdef IL_INLINE_ASM + #if (defined (_MSC_VER) && defined(_WIN32)) // MSVC++ only + #define USE_WIN32_ASM + #endif + + #ifdef _WIN64 + #undef USE_WIN32_ASM + //@TODO: Windows 64 compiler cannot use inline ASM, so we need to + // generate some MASM code at some point. + #endif + + #ifdef _WIN32_WCE // Cannot use our inline ASM in Windows Mobile. + #undef USE_WIN32_ASM + #endif +#endif +extern ILimage *iCurImage; +#define BIT_0 0x00000001 +#define BIT_1 0x00000002 +#define BIT_2 0x00000004 +#define BIT_3 0x00000008 +#define BIT_4 0x00000010 +#define BIT_5 0x00000020 +#define BIT_6 0x00000040 +#define BIT_7 0x00000080 +#define BIT_8 0x00000100 +#define BIT_9 0x00000200 +#define BIT_10 0x00000400 +#define BIT_11 0x00000800 +#define BIT_12 0x00001000 +#define BIT_13 0x00002000 +#define BIT_14 0x00004000 +#define BIT_15 0x00008000 +#define BIT_16 0x00010000 +#define BIT_17 0x00020000 +#define BIT_18 0x00040000 +#define BIT_19 0x00080000 +#define BIT_20 0x00100000 +#define BIT_21 0x00200000 +#define BIT_22 0x00400000 +#define BIT_23 0x00800000 +#define BIT_24 0x01000000 +#define BIT_25 0x02000000 +#define BIT_26 0x04000000 +#define BIT_27 0x08000000 +#define BIT_28 0x10000000 +#define BIT_29 0x20000000 +#define BIT_30 0x40000000 +#define BIT_31 0x80000000 +#define NUL '\0' // Easier to type and ?portable? +#if !_WIN32 || _WIN32_WCE + int stricmp(const char *src1, const char *src2); + int strnicmp(const char *src1, const char *src2, size_t max); +#endif//_WIN32 +#ifdef _WIN32_WCE + char *strdup(const char *src); +#endif +int iStrCmp(ILconst_string src1, ILconst_string src2); + +// +// Some math functions +// +// A fast integer squareroot, completely accurate for x < 289. +// Taken from http://atoms.org.uk/sqrt/ +// There is also a version that is accurate for all integers +// < 2^31, if we should need it +int iSqrt(int x); +// +// Useful miscellaneous functions +// +ILboolean iCheckExtension(ILconst_string Arg, ILconst_string Ext); +ILbyte* iFgets(char *buffer, ILuint maxlen); +ILboolean iFileExists(ILconst_string FileName); +ILstring iGetExtension(ILconst_string FileName); +ILstring ilStrDup(ILconst_string Str); +ILuint ilStrLen(ILconst_string Str); +ILuint ilCharStrLen(const char *Str); +// Miscellaneous functions +void ilDefaultStates(void); +ILenum iGetHint(ILenum Target); +ILint iGetInt(ILenum Mode); +void ilRemoveRegistered(void); +ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image); +ILuint ilDetermineSize(ILenum Type); +// +// Rle compression +// +#define IL_TGACOMP 0x01 +#define IL_PCXCOMP 0x02 +#define IL_SGICOMP 0x03 +#define IL_BMPCOMP 0x04 +ILboolean ilRleCompressLine(ILubyte *ScanLine, ILuint Width, ILubyte Bpp, ILubyte *Dest, ILuint *DestWidth, ILenum CompressMode); +ILuint ilRleCompress(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte *Dest, ILenum CompressMode, ILuint *ScanTable); +void iSetImage0(void); +// DXTC compression +ILuint ilNVidiaCompressDXTFile(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtType); +ILAPI ILubyte* ILAPIENTRY ilNVidiaCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize); +ILAPI ILubyte* ILAPIENTRY ilSquishCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize); + +// Conversion functions +ILboolean ilAddAlpha(void); +ILboolean ilAddAlphaKey(ILimage *Image); +ILboolean iFastConvert(ILenum DestFormat); +ILboolean ilFixCur(void); +ILboolean ilFixImage(void); +ILboolean ilRemoveAlpha(void); +ILboolean ilSwapColours(void); +// Palette functions +ILboolean iCopyPalette(ILpal *Dest, ILpal *Src); +// Miscellaneous functions +char* iGetString(ILenum StringName); // Internal version of ilGetString + +// +// Image loading/saving functions +// +ILboolean ilIsValidBlp(ILconst_string FileName); +ILboolean ilIsValidBlpF(ILHANDLE File); +ILboolean ilIsValidBlpL(const void *Lump, ILuint Size); +ILboolean ilLoadBlp(ILconst_string FileName); +ILboolean ilLoadBlpF(ILHANDLE File); +ILboolean ilLoadBlpL(const void *Lump, ILuint Size); +ILboolean ilIsValidBmp(ILconst_string CONST_RESTRICT FileName); +ILboolean ilIsValidBmpF(ILHANDLE File); +ILboolean ilIsValidBmpL(const void *Lump, ILuint Size); +ILboolean ilLoadBmp(ILconst_string FileName); +ILboolean ilLoadBmpF(ILHANDLE File); +ILboolean ilLoadBmpL(const void *Lump, ILuint Size); +ILboolean ilSaveBmp(ILconst_string FileName); +ILuint ilSaveBmpF(ILHANDLE File); +ILuint ilSaveBmpL(void *Lump, ILuint Size); +ILboolean ilSaveCHeader(ILconst_string FileName, char *InternalName); +ILboolean ilLoadCut(ILconst_string FileName); +ILboolean ilLoadCutF(ILHANDLE File); +ILboolean ilLoadCutL(const void *Lump, ILuint Size); +ILboolean ilIsValidDcx(ILconst_string FileName); +ILboolean ilIsValidDcxF(ILHANDLE File); +ILboolean ilIsValidDcxL(const void *Lump, ILuint Size); +ILboolean ilLoadDcx(ILconst_string FileName); +ILboolean ilLoadDcxF(ILHANDLE File); +ILboolean ilLoadDcxL(const void *Lump, ILuint Size); +ILboolean ilIsValidDds(ILconst_string FileName); +ILboolean ilIsValidDdsF(ILHANDLE File); +ILboolean ilIsValidDdsL(const void *Lump, ILuint Size); +ILboolean ilLoadDds(ILconst_string FileName); +ILboolean ilLoadDdsF(ILHANDLE File); +ILboolean ilLoadDdsL(const void *Lump, ILuint Size); +ILboolean ilSaveDds(ILconst_string FileName); +ILuint ilSaveDdsF(ILHANDLE File); +ILuint ilSaveDdsL(void *Lump, ILuint Size); +ILboolean ilIsValidDicom(ILconst_string FileName); +ILboolean ilIsValidDicomF(ILHANDLE File); +ILboolean ilIsValidDicomL(const void *Lump, ILuint Size); +ILboolean ilLoadDicom(ILconst_string FileName); +ILboolean ilLoadDicomF(ILHANDLE File); +ILboolean ilLoadDicomL(const void *Lump, ILuint Size); +ILboolean ilLoadDoom(ILconst_string FileName); +ILboolean ilLoadDoomF(ILHANDLE File); +ILboolean ilLoadDoomL(const void *Lump, ILuint Size); +ILboolean ilLoadDoomFlat(ILconst_string FileName); +ILboolean ilLoadDoomFlatF(ILHANDLE File); +ILboolean ilLoadDoomFlatL(const void *Lump, ILuint Size); +ILboolean ilIsValidDpx(ILconst_string FileName); +ILboolean ilIsValidDpxF(ILHANDLE File); +ILboolean ilIsValidDpxL(const void *Lump, ILuint Size); +ILboolean ilLoadDpx(ILconst_string FileName); +ILboolean ilLoadDpxF(ILHANDLE File); +ILboolean ilLoadDpxL(const void *Lump, ILuint Size); +ILboolean ilIsValidExr(ILconst_string FileName); +ILboolean ilIsValidExrF(ILHANDLE File); +ILboolean ilIsValidExrL(const void *Lump, ILuint Size); +ILboolean ilLoadExr(ILconst_string FileName); +ILboolean ilLoadExrF(ILHANDLE File); +ILboolean ilLoadExrL(const void *Lump, ILuint Size); +ILboolean ilSaveExr(ILconst_string FileName); +ILuint ilSaveExrF(ILHANDLE File); +ILuint ilSaveExrL(void *Lump, ILuint Size); +ILboolean ilIsValidFits(ILconst_string FileName); +ILboolean ilIsValidFitsF(ILHANDLE File); +ILboolean ilIsValidFitsL(const void *Lump, ILuint Size); +ILboolean ilLoadFits(ILconst_string FileName); +ILboolean ilLoadFitsF(ILHANDLE File); +ILboolean ilLoadFitsL(const void *Lump, ILuint Size); +ILboolean ilLoadFtx(ILconst_string FileName); +ILboolean ilLoadFtxF(ILHANDLE File); +ILboolean ilLoadFtxL(const void *Lump, ILuint Size); +ILboolean ilIsValidGif(ILconst_string FileName); +ILboolean ilIsValidGifF(ILHANDLE File); +ILboolean ilIsValidGifL(const void *Lump, ILuint Size); +ILboolean ilLoadGif(ILconst_string FileName); +ILboolean ilLoadGifF(ILHANDLE File); +ILboolean ilLoadGifL(const void *Lump, ILuint Size); +ILboolean ilIsValidHdr(ILconst_string FileName); +ILboolean ilIsValidHdrF(ILHANDLE File); +ILboolean ilIsValidHdrL(const void *Lump, ILuint Size); +ILboolean ilLoadHdr(ILconst_string FileName); +ILboolean ilLoadHdrF(ILHANDLE File); +ILboolean ilLoadHdrL(const void *Lump, ILuint Size); +ILboolean ilSaveHdr(ILconst_string FileName); +ILuint ilSaveHdrF(ILHANDLE File); +ILuint ilSaveHdrL(void *Lump, ILuint Size); +ILboolean ilLoadIcon(ILconst_string FileName); +ILboolean ilLoadIconF(ILHANDLE File); +ILboolean ilLoadIconL(const void *Lump, ILuint Size); +ILboolean ilIsValidIcns(ILconst_string FileName); +ILboolean ilIsValidIcnsF(ILHANDLE File); +ILboolean ilIsValidIcnsL(const void *Lump, ILuint Size); +ILboolean ilLoadIcns(ILconst_string FileName); +ILboolean ilLoadIcnsF(ILHANDLE File); +ILboolean ilLoadIcnsL(const void *Lump, ILuint Size); +ILboolean ilLoadIff(ILconst_string FileName); +ILboolean ilLoadIffF(ILHANDLE File); +ILboolean ilLoadIffL(const void *Lump, ILuint Size); +ILboolean ilIsValidIlbm(ILconst_string FileName); +ILboolean ilIsValidIlbmF(ILHANDLE File); +ILboolean ilIsValidIlbmL(const void *Lump, ILuint Size); +ILboolean ilLoadIlbm(ILconst_string FileName); +ILboolean ilLoadIlbmF(ILHANDLE File); +ILboolean ilLoadIlbmL(const void *Lump, ILuint Size); +ILboolean ilIsValidIwi(ILconst_string FileName); +ILboolean ilIsValidIwiF(ILHANDLE File); +ILboolean ilIsValidIwiL(const void *Lump, ILuint Size); +ILboolean ilLoadIwi(ILconst_string FileName); +ILboolean ilLoadIwiF(ILHANDLE File); +ILboolean ilLoadIwiL(const void *Lump, ILuint Size); +ILboolean ilIsValidJp2(ILconst_string FileName); +ILboolean ilIsValidJp2F(ILHANDLE File); +ILboolean ilIsValidJp2L(const void *Lump, ILuint Size); +ILboolean ilLoadJp2(ILconst_string FileName); +ILboolean ilLoadJp2F(ILHANDLE File); +ILboolean ilLoadJp2L(const void *Lump, ILuint Size); +ILboolean ilLoadJp2LInternal(const void *Lump, ILuint Size, ILimage *Image); +ILboolean ilSaveJp2(ILconst_string FileName); +ILuint ilSaveJp2F(ILHANDLE File); +ILuint ilSaveJp2L(void *Lump, ILuint Size); +ILboolean ilIsValidJpeg(ILconst_string FileName); +ILboolean ilIsValidJpegF(ILHANDLE File); +ILboolean ilIsValidJpegL(const void *Lump, ILuint Size); +ILboolean ilLoadJpeg(ILconst_string FileName); +ILboolean ilLoadJpegF(ILHANDLE File); +ILboolean ilLoadJpegL(const void *Lump, ILuint Size); +ILboolean ilSaveJpeg(ILconst_string FileName); +ILuint ilSaveJpegF(ILHANDLE File); +ILuint ilSaveJpegL(void *Lump, ILuint Size); +ILboolean ilIsValidLif(ILconst_string FileName); +ILboolean ilIsValidLifF(ILHANDLE File); +ILboolean ilIsValidLifL(const void *Lump, ILuint Size); +ILboolean ilLoadLif(ILconst_string FileName); +ILboolean ilLoadLifF(ILHANDLE File); +ILboolean ilLoadLifL(const void *Lump, ILuint Size); +ILboolean ilIsValidMdl(ILconst_string FileName); +ILboolean ilIsValidMdlF(ILHANDLE File); +ILboolean ilIsValidMdlL(const void *Lump, ILuint Size); +ILboolean ilLoadMdl(ILconst_string FileName); +ILboolean ilLoadMdlF(ILHANDLE File); +ILboolean ilLoadMdlL(const void *Lump, ILuint Size); +ILboolean ilLoadMng(ILconst_string FileName); +ILboolean ilLoadMngF(ILHANDLE File); +ILboolean ilLoadMngL(const void *Lump, ILuint Size); +ILboolean ilSaveMng(ILconst_string FileName); +ILuint ilSaveMngF(ILHANDLE File); +ILuint ilSaveMngL(void *Lump, ILuint Size); +ILboolean ilIsValidMp3(ILconst_string FileName); +ILboolean ilIsValidMp3F(ILHANDLE File); +ILboolean ilIsValidMp3L(const void *Lump, ILuint Size); +ILboolean ilLoadMp3(ILconst_string FileName); +ILboolean ilLoadMp3F(ILHANDLE File); +ILboolean ilLoadMp3L(const void *Lump, ILuint Size); +ILboolean ilLoadPcd(ILconst_string FileName); +ILboolean ilLoadPcdF(ILHANDLE File); +ILboolean ilLoadPcdL(const void *Lump, ILuint Size); +ILboolean ilIsValidPcx(ILconst_string FileName); +ILboolean ilIsValidPcxF(ILHANDLE File); +ILboolean ilIsValidPcxL(const void *Lump, ILuint Size); +ILboolean ilLoadPcx(ILconst_string FileName); +ILboolean ilLoadPcxF(ILHANDLE File); +ILboolean ilLoadPcxL(const void *Lump, ILuint Size); +ILboolean ilSavePcx(ILconst_string FileName); +ILuint ilSavePcxF(ILHANDLE File); +ILuint ilSavePcxL(void *Lump, ILuint Size); +ILboolean ilIsValidPic(ILconst_string FileName); +ILboolean ilIsValidPicF(ILHANDLE File); +ILboolean ilIsValidPicL(const void *Lump, ILuint Size); +ILboolean ilLoadPic(ILconst_string FileName); +ILboolean ilLoadPicF(ILHANDLE File); +ILboolean ilLoadPicL(const void *Lump, ILuint Size); +ILboolean ilLoadPix(ILconst_string FileName); +ILboolean ilLoadPixF(ILHANDLE File); +ILboolean ilLoadPixL(const void *Lump, ILuint Size); +ILboolean ilIsValidPng(ILconst_string FileName); +ILboolean ilIsValidPngF(ILHANDLE File); +ILboolean ilIsValidPngL(const void *Lump, ILuint Size); +ILboolean ilLoadPng(ILconst_string FileName); +ILboolean ilLoadPngF(ILHANDLE File); +ILboolean ilLoadPngL(const void *Lump, ILuint Size); +ILboolean ilSavePng(ILconst_string FileName); +ILuint ilSavePngF(ILHANDLE File); +ILuint ilSavePngL(void *Lump, ILuint Size); +ILboolean ilIsValidPnm(ILconst_string FileName); +ILboolean ilIsValidPnmF(ILHANDLE File); +ILboolean ilIsValidPnmL(const void *Lump, ILuint Size); +ILboolean ilLoadPnm(ILconst_string FileName); +ILboolean ilLoadPnmF(ILHANDLE File); +ILboolean ilLoadPnmL(const void *Lump, ILuint Size); +ILboolean ilSavePnm(ILconst_string FileName); +ILuint ilSavePnmF(ILHANDLE File); +ILuint ilSavePnmL(void *Lump, ILuint Size); +ILboolean ilIsValidPsd(ILconst_string FileName); +ILboolean ilIsValidPsdF(ILHANDLE File); +ILboolean ilIsValidPsdL(const void *Lump, ILuint Size); +ILboolean ilLoadPsd(ILconst_string FileName); +ILboolean ilLoadPsdF(ILHANDLE File); +ILboolean ilLoadPsdL(const void *Lump, ILuint Size); +ILboolean ilSavePsd(ILconst_string FileName); +ILuint ilSavePsdF(ILHANDLE File); +ILuint ilSavePsdL(void *Lump, ILuint Size); +ILboolean ilIsValidPsp(ILconst_string FileName); +ILboolean ilIsValidPspF(ILHANDLE File); +ILboolean ilIsValidPspL(const void *Lump, ILuint Size); +ILboolean ilLoadPsp(ILconst_string FileName); +ILboolean ilLoadPspF(ILHANDLE File); +ILboolean ilLoadPspL(const void *Lump, ILuint Size); +ILboolean ilLoadPxr(ILconst_string FileName); +ILboolean ilLoadPxrF(ILHANDLE File); +ILboolean ilLoadPxrL(const void *Lump, ILuint Size); +ILboolean ilLoadRaw(ILconst_string FileName); +ILboolean ilLoadRawF(ILHANDLE File); +ILboolean ilLoadRawL(const void *Lump, ILuint Size); +ILboolean ilSaveRaw(ILconst_string FileName); +ILuint ilSaveRawF(ILHANDLE File); +ILuint ilSaveRawL(void *Lump, ILuint Size); +ILboolean ilLoadRot(ILconst_string FileName); +ILboolean ilLoadRotF(ILHANDLE File); +ILboolean ilLoadRotL(const void *Lump, ILuint Size); +ILboolean ilIsValidRot(ILconst_string FileName); +ILboolean ilIsValidRotF(ILHANDLE File); +ILboolean ilIsValidRotL(const void *Lump, ILuint Size); +ILboolean ilIsValidSgi(ILconst_string FileName); +ILboolean ilIsValidSgiF(ILHANDLE File); +ILboolean ilIsValidSgiL(const void *Lump, ILuint Size); +ILboolean ilLoadSgi(ILconst_string FileName); +ILboolean ilLoadSgiF(ILHANDLE File); +ILboolean ilLoadSgiL(const void *Lump, ILuint Size); +ILboolean ilSaveSgi(ILconst_string FileName); +ILuint ilSaveSgiF(ILHANDLE File); +ILuint ilSaveSgiL(void *Lump, ILuint Size); +ILboolean ilIsValidSun(ILconst_string FileName); +ILboolean ilIsValidSunF(ILHANDLE File); +ILboolean ilIsValidSunL(const void *Lump, ILuint Size); +ILboolean ilLoadSun(ILconst_string FileName); +ILboolean ilLoadSunF(ILHANDLE File); +ILboolean ilLoadSunL(const void *Lump, ILuint Size); +ILboolean ilIsValidTga(ILconst_string FileName); +ILboolean ilIsValidTgaF(ILHANDLE File); +ILboolean ilIsValidTgaL(const void *Lump, ILuint Size); +ILboolean ilLoadTarga(ILconst_string FileName); +ILboolean ilLoadTargaF(ILHANDLE File); +ILboolean ilLoadTargaL(const void *Lump, ILuint Size); +ILboolean ilSaveTarga(ILconst_string FileName); +ILuint ilSaveTargaF(ILHANDLE File); +ILuint ilSaveTargaL(void *Lump, ILuint Size); +ILboolean ilLoadTexture(ILconst_string FileName); +ILboolean ilLoadTextureF(ILHANDLE File); +ILboolean ilLoadTextureL(const void *Lump, ILuint Size); +ILboolean ilIsValidTiff(ILconst_string FileName); +ILboolean ilIsValidTiffF(ILHANDLE File); +ILboolean ilIsValidTiffL(const void *Lump, ILuint Size); +ILboolean ilLoadTiff(ILconst_string FileName); +ILboolean ilLoadTiffF(ILHANDLE File); +ILboolean ilLoadTiffL(const void *Lump, ILuint Size); +ILboolean ilSaveTiff(ILconst_string FileName); +ILuint ilSaveTiffF(ILHANDLE File); +ILuint ilSaveTiffL(void *Lump, ILuint Size); +ILboolean ilIsValidTpl(ILconst_string FileName); +ILboolean ilIsValidTplF(ILHANDLE File); +ILboolean ilIsValidTplL(const void *Lump, ILuint Size); +ILboolean ilLoadTpl(ILconst_string FileName); +ILboolean ilLoadTplF(ILHANDLE File); +ILboolean ilLoadTplL(const void *Lump, ILuint Size); +ILboolean ilLoadUtx(ILconst_string FileName); +ILboolean ilLoadUtxF(ILHANDLE File); +ILboolean ilLoadUtxL(const void *Lump, ILuint Size); +ILboolean ilIsValidVtf(ILconst_string FileName); +ILboolean ilIsValidVtfF(ILHANDLE File); +ILboolean ilIsValidVtfL(const void *Lump, ILuint Size); +ILboolean ilLoadVtf(ILconst_string FileName); +ILboolean ilLoadVtfF(ILHANDLE File); +ILboolean ilLoadVtfL(const void *Lump, ILuint Size); +ILboolean ilSaveVtf(ILconst_string FileName); +ILuint ilSaveVtfF(ILHANDLE File); +ILuint ilSaveVtfL(void *Lump, ILuint Size);ILboolean ilLoadWal(ILconst_string FileName); +ILboolean ilLoadWalF(ILHANDLE File); +ILboolean ilLoadWalL(const void *Lump, ILuint Size); +ILboolean ilLoadWbmp(ILconst_string FileName); +ILboolean ilLoadWbmpF(ILHANDLE File); +ILboolean ilLoadWbmpL(const void *Lump, ILuint Size); +ILboolean ilSaveWbmp(ILconst_string FileName); +ILuint ilSaveWbmpF(ILHANDLE File); +ILuint ilSaveWbmpL(void *Lump, ILuint Size); +ILboolean ilIsValidWdp(ILconst_string FileName); +ILboolean ilIsValidWdpF(ILHANDLE File); +ILboolean ilIsValidWdpL(const void *Lump, ILuint Size); +ILboolean ilLoadWdp(ILconst_string FileName); +ILboolean ilLoadWdpF(ILHANDLE File); +ILboolean ilLoadWdpL(const void *Lump, ILuint Size); +ILboolean ilIsValidXpm(ILconst_string FileName); +ILboolean ilIsValidXpmF(ILHANDLE File); +ILboolean ilIsValidXpmL(const void *Lump, ILuint Size); +ILboolean ilLoadXpm(ILconst_string FileName); +ILboolean ilLoadXpmF(ILHANDLE File); +ILboolean ilLoadXpmL(const void *Lump, ILuint Size); + + +// OpenEXR is written in C++, so we have to wrap this to avoid linker errors. +/*#ifndef IL_NO_EXR + #ifdef __cplusplus + extern "C" { + #endif + ILboolean ilLoadExr(ILconst_string FileName); + #ifdef __cplusplus + } + #endif +#endif*/ + +//ILboolean ilLoadExr(ILconst_string FileName); + + +#ifdef __cplusplus +} +#endif + +#endif//INTERNAL_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_jp2.h b/libs/DevIL-1.7.8/src-IL/include/il_jp2.h new file mode 100644 index 00000000..dd4466ec --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_jp2.h @@ -0,0 +1,22 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 08/24/2008 +// +// Filename: src-IL/src/il_jp2.h +// +// Description: Jpeg-2000 (.jp2) functions +// +//----------------------------------------------------------------------------- + +#ifndef JP2_H +#define JP2_H + +#include "il_internal.h" + +ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image); +ILboolean iSaveJp2Internal(); +jas_stream_t *iJp2ReadStream(); + +#endif//JP2_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_jpeg.h b/libs/DevIL-1.7.8/src-IL/include/il_jpeg.h new file mode 100644 index 00000000..52086cc6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_jpeg.h @@ -0,0 +1,29 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/include/il_jpeg.h +// +// Description: Jpeg (.jpg) functions +// +//----------------------------------------------------------------------------- + +#ifndef JPEG_H +#define JPEG_H + +#include "il_internal.h" + +ILboolean iCheckJpg(ILubyte Header[2]); +ILboolean iIsValidJpg(void); + +#ifndef IL_USE_IJL + ILboolean iLoadJpegInternal(void); + ILboolean iSaveJpegInternal(void); +#else + ILboolean iLoadJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size); + ILboolean iSaveJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size); +#endif + +#endif//JPEG_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_lif.h b/libs/DevIL-1.7.8/src-IL/include/il_lif.h new file mode 100644 index 00000000..781ac8cd --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_lif.h @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2001 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_lif.c +// +// Description: Reads a Homeworld image. +// +//----------------------------------------------------------------------------- + + +#ifndef LIF_H +#define LIF_H + +#include "il_internal.h" + +typedef struct LIF_HEAD +{ + char Id[8]; //"Willy 7" + ILuint Version; // Version Number (260) + ILuint Flags; // Usually 50 + ILuint Width; + ILuint Height; + ILuint PaletteCRC; // CRC of palettes for fast comparison. + ILuint ImageCRC; // CRC of the image. + ILuint PalOffset; // Offset to the palette (not used). + ILuint TeamEffect0; // Team effect offset 0 + ILuint TeamEffect1; // Team effect offset 1 +} LIF_HEAD; + +ILboolean iIsValidLif(void); +ILboolean iCheckLif(LIF_HEAD *Header); +ILboolean iLoadLifInternal(void); + +#endif//LIF_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_manip.h b/libs/DevIL-1.7.8/src-IL/include/il_manip.h new file mode 100644 index 00000000..d19f4589 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_manip.h @@ -0,0 +1,249 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2001-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_manip.h +// +// Description: Image manipulation +// +//----------------------------------------------------------------------------- + +#ifndef MANIP_H +#define MANIP_H + +#ifdef _cplusplus +extern "C" { +#endif + +ILboolean ilFlipImage(void); +ILboolean ilMirrorImage(void); //@JASON New routine created 03/28/2001 + +//----------------------------------------------- +// Overflow handler for float-to-half conversion; +// generates a hardware floating-point overflow, +// which may be trapped by the operating system. +//----------------------------------------------- +#ifndef NOINLINE + +#if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable : 4756) // Disables 'named type definition in parentheses' warning +#endif +INLINE ILfloat /*ILAPIENTRY*/ ilFloatToHalfOverflow() { + ILfloat f = 1e10; + ILint j; + for (j = 0; j < 10; j++) + f *= f; // this will overflow before + // the for loop terminates + return f; +} +#if defined(_MSC_VER) + #pragma warning(pop) +#endif + +//----------------------------------------------------- +// Float-to-half conversion -- general case, including +// zeroes, denormalized numbers and exponent overflows. +//----------------------------------------------------- +INLINE ILushort ILAPIENTRY ilFloatToHalf(ILuint i) { + // + // Our floating point number, f, is represented by the bit + // pattern in integer i. Disassemble that bit pattern into + // the sign, s, the exponent, e, and the significand, m. + // Shift s into the position where it will go in in the + // resulting half number. + // Adjust e, accounting for the different exponent bias + // of float and half (127 versus 15). + // + + register int s = (i >> 16) & 0x00008000; + register int e = ((i >> 23) & 0x000000ff) - (127 - 15); + register int m = i & 0x007fffff; + + // + // Now reassemble s, e and m into a half: + // + + if (e <= 0) + { + if (e < -10) + { + // + // E is less than -10. The absolute value of f is + // less than HALF_MIN (f may be a small normalized + // float, a denormalized float or a zero). + // + // We convert f to a half zero. + // + + return 0; + } + + // + // E is between -10 and 0. F is a normalized float, + // whose magnitude is less than HALF_NRM_MIN. + // + // We convert f to a denormalized half. + // + + m = (m | 0x00800000) >> (1 - e); + + // + // Round to nearest, round "0.5" up. + // + // Rounding may cause the significand to overflow and make + // our number normalized. Because of the way a half's bits + // are laid out, we don't have to treat this case separately; + // the code below will handle it correctly. + // + + if (m & 0x00001000) + m += 0x00002000; + + // + // Assemble the half from s, e (zero) and m. + // + + return s | (m >> 13); + } + else if (e == 0xff - (127 - 15)) + { + if (m == 0) + { + // + // F is an infinity; convert f to a half + // infinity with the same sign as f. + // + + return s | 0x7c00; + } + else + { + // + // F is a NAN; we produce a half NAN that preserves + // the sign bit and the 10 leftmost bits of the + // significand of f, with one exception: If the 10 + // leftmost bits are all zero, the NAN would turn + // into an infinity, so we have to set at least one + // bit in the significand. + // + + m >>= 13; + return s | 0x7c00 | m | (m == 0); + } + } + else + { + // + // E is greater than zero. F is a normalized float. + // We try to convert f to a normalized half. + // + + // + // Round to nearest, round "0.5" up + // + + if (m & 0x00001000) + { + m += 0x00002000; + + if (m & 0x00800000) + { + m = 0; // overflow in significand, + e += 1; // adjust exponent + } + } + + // + // Handle exponent overflow + // + + if (e > 30) + { + ilFloatToHalfOverflow(); // Cause a hardware floating point overflow; + return s | 0x7c00; // if this returns, the half becomes an + } // infinity with the same sign as f. + + // + // Assemble the half from s, e and m. + // + + return s | (e << 10) | (m >> 13); + } +} + +// Taken from OpenEXR +INLINE ILuint ILAPIENTRY ilHalfToFloat (ILushort y) { + + int s = (y >> 15) & 0x00000001; + int e = (y >> 10) & 0x0000001f; + int m = y & 0x000003ff; + + if (e == 0) + { + if (m == 0) + { + // + // Plus or minus zero + // + + return s << 31; + } + else + { + // + // Denormalized number -- renormalize it + // + + while (!(m & 0x00000400)) + { + m <<= 1; + e -= 1; + } + + e += 1; + m &= ~0x00000400; + } + } + else if (e == 31) + { + if (m == 0) + { + // + // Positive or negative infinity + // + + return (s << 31) | 0x7f800000; + } + else + { + // + // Nan -- preserve sign and significand bits + // + + return (s << 31) | 0x7f800000 | (m << 13); + } + } + + // + // Normalized number + // + + e = e + (127 - 15); + m = m << 13; + + // + // Assemble s, e and m. + // + + return (s << 31) | (e << 23) | m; +} +#endif //NOINLINE + +#ifdef _cplusplus +} +#endif + +#endif//MANIP_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_mdl.h b/libs/DevIL-1.7.8/src-IL/include/il_mdl.h new file mode 100644 index 00000000..1c8c946c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_mdl.h @@ -0,0 +1,28 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_mdl.h +// +// Description: Reads a Half-Life model file. +// +//----------------------------------------------------------------------------- + + +#ifndef MD2_H +#define MD2_H + +#include "il_internal.h" + +typedef struct TEX_HEAD +{ + char Name[64]; + ILuint Flags; + ILuint Width; + ILuint Height; + ILuint Offset; +} TEX_HEAD; + +#endif//MD2_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_pal.h b/libs/DevIL-1.7.8/src-IL/include/il_pal.h new file mode 100644 index 00000000..b2b81081 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_pal.h @@ -0,0 +1,54 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_pal.h +// +// Description: Loads palettes from different file formats +// +//----------------------------------------------------------------------------- + + +#ifndef IL_PAL_H +#define IL_PAL_H + +#include "il_internal.h" + +#define BUFFLEN 256 +#define PALBPP 3 + +#ifdef _MSC_VER +#pragma pack(push, packed_struct, 1) +#endif +typedef struct HALOHEAD +{ + ILushort Id; // 'AH' + ILshort Version; + ILshort Size; + ILbyte Filetype; + ILbyte Subtype; + //ILshort Brdid, Grmode; + ILint Ignored; + ILushort MaxIndex; // Colors = maxindex + 1 + ILushort MaxRed; + ILushort MaxGreen; + ILushort MaxBlue; + /*ILbyte Signature[8]; + ILbyte Filler[12];*/ + ILbyte Filler[20]; // Always 0 by PSP 4 +} IL_PACKSTRUCT HALOHEAD; +#ifdef _MSC_VER +#pragma pack(pop, packed_struct) +#endif + +ILboolean ilLoadJascPal(ILconst_string FileName); +ILboolean ilSaveJascPal(ILconst_string FileName); +char *iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File); +ILboolean ilLoadHaloPal(ILconst_string FileName); +ILboolean ilLoadColPal(ILconst_string FileName); +ILboolean ilLoadActPal(ILconst_string FileName); +ILboolean ilLoadPltPal(ILconst_string FileName); + +#endif//IL_PAL_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_pcx.h b/libs/DevIL-1.7.8/src-IL/include/il_pcx.h new file mode 100644 index 00000000..3bd44ac2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_pcx.h @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_pcx.h +// +// Description: Reads and writes from/to a .pcx file. +// +//----------------------------------------------------------------------------- + + +#ifndef PCX_H +#define PCX_H + +#include "il_internal.h" + + +#ifdef _WIN32 +#pragma pack(push, packed_struct, 1) +#endif +typedef struct PCXHEAD +{ + ILubyte Manufacturer; + ILubyte Version; + ILubyte Encoding; + ILubyte Bpp; + ILushort Xmin, Ymin, Xmax, Ymax; + ILushort HDpi; + ILushort VDpi; + ILubyte ColMap[48]; + ILubyte Reserved; + ILubyte NumPlanes; + ILushort Bps; + ILushort PaletteInfo; + ILushort HScreenSize; + ILushort VScreenSize; + ILubyte Filler[54]; +} IL_PACKSTRUCT PCXHEAD; +#ifdef _WIN32 +#pragma pack(pop, packed_struct) +#endif + +// For checking and reading +ILboolean iIsValidPcx(void); +ILboolean iCheckPcx(PCXHEAD *Header); +ILboolean iLoadPcxInternal(void); +ILboolean iSavePcxInternal(void); +ILboolean iUncompressPcx(PCXHEAD *Header); +ILboolean iUncompressSmall(PCXHEAD *Header); + +// For writing +ILuint encput(ILubyte byt, ILubyte cnt); +ILuint encLine(ILubyte *inBuff, ILint inLen, ILubyte Stride); + + +#endif//PCX_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_pic.h b/libs/DevIL-1.7.8/src-IL/include/il_pic.h new file mode 100644 index 00000000..761ccde1 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_pic.h @@ -0,0 +1,79 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/21/2002 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_pic.h +// +// Description: Softimage Pic (.pic) functions +// +//----------------------------------------------------------------------------- + + +#ifndef PIC_H +#define PIC_H + +#include "il_internal.h" + +#ifdef _MSC_VER +#pragma pack(push, packed_struct, 1) +#endif +typedef struct PIC_HEAD +{ + ILint Magic; // PIC_MAGIC_NUMBER + ILfloat Version; // Version of format + ILbyte Comment[80]; // Prototype description + ILbyte Id[4]; // 'PICT' + ILshort Width; // Image width, in pixels + ILshort Height; // Image height, in pixels + ILfloat Ratio; // Pixel aspect ratio + ILshort Fields; // Picture field type + ILshort Padding; // Unused +} IL_PACKSTRUCT PIC_HEAD; + +typedef struct CHANNEL +{ + ILubyte Size; + ILubyte Type; + ILubyte Chan; + void *Next; +} CHANNEL; +#ifdef _MSC_VER +#pragma pack(pop, packed_struct) +#endif + + +// Data type +#define PIC_UNSIGNED_INTEGER 0x00 +#define PIC_SIGNED_INTEGER 0x10 // XXX: Not implemented +#define PIC_SIGNED_FLOAT 0x20 // XXX: Not implemented + + +// Compression type +#define PIC_UNCOMPRESSED 0x00 +#define PIC_PURE_RUN_LENGTH 0x01 +#define PIC_MIXED_RUN_LENGTH 0x02 + +// CHANNEL types (OR'd) +#define PIC_RED_CHANNEL 0x80 +#define PIC_GREEN_CHANNEL 0x40 +#define PIC_BLUE_CHANNEL 0x20 +#define PIC_ALPHA_CHANNEL 0x10 +#define PIC_SHADOW_CHANNEL 0x08 // XXX: Not implemented +#define PIC_DEPTH_CHANNEL 0x04 // XXX: Not implemented +#define PIC_AUXILIARY_1_CHANNEL 0x02 // XXX: Not implemented +#define PIC_AUXILIARY_2_CHANNEL 0x01 // XXX: Not implemented + +ILboolean iIsValidPic(void); +ILboolean iCheckPic(PIC_HEAD *Header); +ILboolean iLoadPicInternal(void); +ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha); +ILuint readScanline(ILubyte *scan, ILint width, CHANNEL *channel, ILint bytes); +ILboolean channelReadRaw(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); +ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); +ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); + + + +#endif//PIC_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_pnm.h b/libs/DevIL-1.7.8/src-IL/include/il_pnm.h new file mode 100644 index 00000000..16141270 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_pnm.h @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_pnm.h +// +// Description: Reads/writes to/from pbm/pgm/ppm formats +// +//----------------------------------------------------------------------------- + + +#ifndef PPMPGM_H +#define PPMPGM_H + +#include "il_internal.h" + +#define IL_PBM_ASCII 0x0001 +#define IL_PGM_ASCII 0x0002 +#define IL_PPM_ASCII 0x0003 +#define IL_PBM_BINARY 0x0004 +#define IL_PGM_BINARY 0x0005 +#define IL_PPM_BINARY 0x0006 + +typedef struct PPMINFO +{ + ILenum Type; + ILuint Width; + ILuint Height; + ILuint MaxColour; + ILubyte Bpp; +} PPMINFO; + +ILboolean iIsValidPnm(void); +ILboolean iCheckPnm(char Header[2]); +ILboolean iLoadPnmInternal(void); +ILboolean iSavePnmInternal(void); +ILimage *ilReadAsciiPpm(PPMINFO *Info); +ILimage *ilReadBinaryPpm(PPMINFO *Info); +ILimage *ilReadBitPbm(PPMINFO *Info); +ILboolean iGetWord(ILboolean); +void PbmMaximize(ILimage *Image); + + +#endif//PPMPGM_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_psd.h b/libs/DevIL-1.7.8/src-IL/include/il_psd.h new file mode 100644 index 00000000..5bc576e3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_psd.h @@ -0,0 +1,56 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2001 by Denton Woods +// Last modified: 01/23/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_il_psd.c +// +// Description: Reads from a PhotoShop (.psd) file. +// +//----------------------------------------------------------------------------- + + +#ifndef PSD_H +#define PSD_H + +#include "il_internal.h" + +#ifdef _MSC_VER +#pragma pack(push, packed_struct, 1) +#endif +typedef struct PSDHEAD +{ + ILubyte Signature[4]; + ILushort Version; + ILubyte Reserved[6]; + ILushort Channels; + ILuint Height; + ILuint Width; + ILushort Depth; + ILushort Mode; +} IL_PACKSTRUCT PSDHEAD; + +#ifdef _MSC_VER +#pragma pack(pop, packed_struct) +#endif + +ILushort ChannelNum; + +ILboolean iIsValidPsd(void); +ILboolean iCheckPsd(PSDHEAD *Header); +ILboolean iLoadPsdInternal(void); +ILboolean ReadPsd(PSDHEAD *Head); +ILboolean ReadGrey(PSDHEAD *Head); +ILboolean ReadIndexed(PSDHEAD *Head); +ILboolean ReadRGB(PSDHEAD *Head); +ILboolean ReadCMYK(PSDHEAD *Head); +ILuint *GetCompChanLen(PSDHEAD *Head); +ILboolean PsdGetData(PSDHEAD *Head, void *Buffer, ILboolean Compressed); +ILboolean ParseResources(ILuint ResourceSize, ILubyte *Resources); +ILboolean GetSingleChannel(PSDHEAD *Head, ILubyte *Buffer, ILboolean Compressed); +ILboolean iSavePsdInternal(void); + + + +#endif//PSD_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_psp.h b/libs/DevIL-1.7.8/src-IL/include/il_psp.h new file mode 100644 index 00000000..ec59885b --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_psp.h @@ -0,0 +1,250 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/02/2002 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_psp.h +// +// Description: Reads a Paint Shop Pro file. +// +//----------------------------------------------------------------------------- + + +#ifndef PSP_H +#define PSP_H + +#include "il_internal.h" + + +// Block identifiers +enum PSPBlockID { + PSP_IMAGE_BLOCK = 0, // (0) General Image Attributes Block (main) + PSP_CREATOR_BLOCK, // (1) Creator Data Block (main) + PSP_COLOR_BLOCK, // (2) Color Palette Block (main and sub) + PSP_LAYER_START_BLOCK, // (3) Layer Bank Block (main) + PSP_LAYER_BLOCK, // (4) Layer Block (sub) + PSP_CHANNEL_BLOCK, // (5) Channel Block (sub) + PSP_SELECTION_BLOCK, // (6) Selection Block (main) + PSP_ALPHA_BANK_BLOCK, // (7) Alpha Bank Block (main) + PSP_ALPHA_CHANNEL_BLOCK, // (8) Alpha Channel Block (sub) + PSP_COMPOSITE_IMAGE_BLOCK, // (9) Composite Image Block (sub) + PSP_EXTENDED_DATA_BLOCK, // (10) Extended Data Block (main) + PSP_TUBE_BLOCK, // (11) Picture Tube Data Block (main) + PSP_ADJUSTMENT_EXTENSION_BLOCK, // (12) Adjustment Layer Block (sub) + PSP_VECTOR_EXTENSION_BLOCK, // (13) Vector Layer Block (sub) + PSP_SHAPE_BLOCK, // (14) Vector Shape Block (sub) + PSP_PAINTSTYLE_BLOCK, // (15) Paint Style Block (sub) + PSP_COMPOSITE_IMAGE_BANK_BLOCK, // (16) Composite Image Bank (main) + PSP_COMPOSITE_ATTRIBUTES_BLOCK, // (17) Composite Image Attr. (sub) + PSP_JPEG_BLOCK, // (18) JPEG Image Block (sub) + PSP_LINESTYLE_BLOCK, // (19) Line Style Block (sub) + PSP_TABLE_BANK_BLOCK, // (20) Table Bank Block (main) + PSP_TABLE_BLOCK, // (21) Table Block (sub) + PSP_PAPER_BLOCK, // (22) Vector Table Paper Block (sub) + PSP_PATTERN_BLOCK, // (23) Vector Table Pattern Block (sub) +}; + + +// Bitmap type +enum PSPDIBType { + PSP_DIB_IMAGE = 0, // Layer color bitmap + PSP_DIB_TRANS_MASK, // Layer transparency mask bitmap + PSP_DIB_USER_MASK, // Layer user mask bitmap + PSP_DIB_SELECTION, // Selection mask bitmap + PSP_DIB_ALPHA_MASK, // Alpha channel mask bitmap + PSP_DIB_THUMBNAIL // Thumbnail bitmap +}; + +// Channel types +enum PSPChannelType { + PSP_CHANNEL_COMPOSITE = 0, // Channel of single channel bitmap + PSP_CHANNEL_RED, // Red channel of 24 bit bitmap + PSP_CHANNEL_GREEN, // Green channel of 24 bit bitmap + PSP_CHANNEL_BLUE // Blue channel of 24 bit bitmap +}; + +// Possible metrics used to measure resolution +enum PSP_METRIC { + PSP_METRIC_UNDEFINED = 0, // Metric unknown + PSP_METRIC_INCH, // Resolution is in inches + PSP_METRIC_CM // Resolution is in centimeters +}; + + +// Possible types of compression. +enum PSPCompression { + PSP_COMP_NONE = 0, // No compression + PSP_COMP_RLE, // RLE compression + PSP_COMP_LZ77, // LZ77 compression + PSP_COMP_JPEG // JPEG compression (only used by thumbnail and composite image) +}; + + +// Picture tube placement mode. +enum TubePlacementMode { + tpmRandom, // Place tube images in random intervals + tpmConstant // Place tube images in constant intervals +}; + +// Picture tube selection mode. +enum TubeSelectionMode { + tsmRandom, // Randomly select the next image in tube to display + tsmIncremental, // Select each tube image in turn + tsmAngular, // Select image based on cursor direction + tsmPressure, // Select image based on pressure (from pressure-sensitive pad) + tsmVelocity // Select image based on cursor speed +}; + +// Extended data field types. +enum PSPExtendedDataID { + PSP_XDATA_TRNS_INDEX = 0 // Transparency index field +}; + +// Creator field types. +enum PSPCreatorFieldID { + PSP_CRTR_FLD_TITLE = 0, // Image document title field + PSP_CRTR_FLD_CRT_DATE, // Creation date field + PSP_CRTR_FLD_MOD_DATE, // Modification date field + PSP_CRTR_FLD_ARTIST, // Artist name field + PSP_CRTR_FLD_CPYRGHT, // Copyright holder name field + PSP_CRTR_FLD_DESC, // Image document description field + PSP_CRTR_FLD_APP_ID, // Creating app id field + PSP_CRTR_FLD_APP_VER, // Creating app version field +}; + +// Creator application identifiers. +enum PSPCreatorAppID { + PSP_CREATOR_APP_UNKNOWN = 0, // Creator application unknown + PSP_CREATOR_APP_PAINT_SHOP_PRO // Creator is Paint Shop Pro +}; + +// Layer types. +enum PSPLayerType { + PSP_LAYER_NORMAL = 0, // Normal layer + PSP_LAYER_FLOATING_SELECTION // Floating selection layer +}; + +// Truth values. +/*enum PSP_BOOLEAN { + FALSE = 0, + TRUE +};*/ + + + +#ifdef _MSC_VER +#pragma pack(push, packed_struct, 1) +#endif +typedef struct PSPRECT +{ + ILuint x1,y1,x2,y2; +} IL_PACKSTRUCT PSPRECT; + +typedef struct PSPHEAD +{ + char FileSig[32]; + ILushort MajorVersion; + ILushort MinorVersion; +} IL_PACKSTRUCT PSPHEAD; + +typedef struct BLOCKHEAD +{ + ILubyte HeadID[4]; + ILushort BlockID; + ILuint BlockLen; +} IL_PACKSTRUCT BLOCKHEAD; + +typedef struct GENATT_CHUNK +{ + ILint Width; + ILint Height; + ILdouble Resolution; + ILubyte ResMetric; + ILushort Compression; + ILushort BitDepth; + ILushort PlaneCount; + ILuint ColourCount; + ILubyte GreyscaleFlag; + ILuint SizeOfImage; + ILint ActiveLayer; + ILushort LayerCount; + ILuint GraphicContents; +} IL_PACKSTRUCT GENATT_CHUNK; + +typedef struct LAYERINFO_CHUNK +{ + ILubyte LayerType; + PSPRECT ImageRect; + PSPRECT SavedImageRect; + ILubyte Opacity; + ILubyte BlendingMode; + ILubyte LayerFlags; + ILubyte TransProtFlag; + ILubyte LinkID; + PSPRECT MaskRect; + PSPRECT SavedMaskRect; + ILubyte MaskLinked; + ILubyte MaskDisabled; + ILubyte InvertMaskBlend; + ILushort BlendRange; + ILubyte SourceBlend1[4]; + ILubyte DestBlend1[4]; + ILubyte SourceBlend2[4]; + ILubyte DestBlend2[4]; + ILubyte SourceBlend3[4]; + ILubyte DestBlend3[4]; + ILubyte SourceBlend4[4]; + ILubyte DestBlend4[4]; + ILubyte SourceBlend5[4]; + ILubyte DestBlend5[4]; +} IL_PACKSTRUCT LAYERINFO_CHUNK; + +typedef struct LAYERBITMAP_CHUNK +{ + ILushort NumBitmaps; + ILushort NumChannels; +} IL_PACKSTRUCT LAYERBITMAP_CHUNK; + +typedef struct CHANNEL_CHUNK +{ + ILuint CompLen; + ILuint Length; + ILushort BitmapType; + ILushort ChanType; +} IL_PACKSTRUCT CHANNEL_CHUNK; + +typedef struct ALPHAINFO_CHUNK +{ + PSPRECT AlphaRect; + PSPRECT AlphaSavedRect; +} IL_PACKSTRUCT ALPHAINFO_CHUNK; + +typedef struct ALPHA_CHUNK +{ + ILushort BitmapCount; + ILushort ChannelCount; +} IL_PACKSTRUCT ALPHA_CHUNK; + +#ifdef _MSC_VER +#pragma pack(pop, packed_struct) +#endif + + +// Function definitions +ILboolean iLoadPspInternal(void); +ILboolean iCheckPsp(void); +ILboolean iIsValidPsp(void); +ILboolean ReadGenAttributes(void); +ILboolean ParseChunks(void); +ILboolean ReadLayerBlock(ILuint BlockLen); +ILboolean ReadAlphaBlock(ILuint BlockLen); +ILubyte *GetChannel(void); +ILboolean UncompRLE(ILubyte *CompData, ILubyte *Data, ILuint CompLen); +ILboolean ReadPalette(ILuint BlockLen); +ILboolean AssembleImage(void); +ILboolean Cleanup(void); + + + +#endif//PSP_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_q2pal.h b/libs/DevIL-1.7.8/src-IL/include/il_q2pal.h new file mode 100644 index 00000000..1a3ff1b6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_q2pal.h @@ -0,0 +1,276 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_q2pal.h +// +// Description: The default Quake2 palette +// +//----------------------------------------------------------------------------- + +#ifndef Q2PAL_H +#define Q2PAL_H + +#define IL_Q2PAL_SIZE 768 +ILubyte ilDefaultQ2Pal[IL_Q2PAL_SIZE] = { + 0, 0, 0, + 15, 15, 15, + 31, 31, 31, + 47, 47, 47, + 63, 63, 63, + 75, 75, 75, + 91, 91, 91, + 107, 107, 107, + 123, 123, 123, + 139, 139, 139, + 155, 155, 155, + 171, 171, 171, + 187, 187, 187, + 203, 203, 203, + 219, 219, 219, + 235, 235, 235, + 99, 75, 35, + 91, 67, 31, + 83, 63, 31, + 79, 59, 27, + 71, 55, 27, + 63, 47, 23, + 59, 43, 23, + 51, 39, 19, + 47, 35, 19, + 43, 31, 19, + 39, 27, 15, + 35, 23, 15, + 27, 19, 11, + 23, 15, 11, + 19, 15, 7, + 15, 11, 7, + 95, 95, 111, + 91, 91, 103, + 91, 83, 95, + 87, 79, 91, + 83, 75, 83, + 79, 71, 75, + 71, 63, 67, + 63, 59, 59, + 59, 55, 55, + 51, 47, 47, + 47, 43, 43, + 39, 39, 39, + 35, 35, 35, + 27, 27, 27, + 23, 23, 23, + 19, 19, 19, + 143, 119, 83, + 123, 99, 67, + 115, 91, 59, + 103, 79, 47, + 207, 151, 75, + 167, 123, 59, + 139, 103, 47, + 111, 83, 39, + 235, 159, 39, + 203, 139, 35, + 175, 119, 31, + 147, 99, 27, + 119, 79, 23, + 91, 59, 15, + 63, 39, 11, + 35, 23, 7, + 167, 59, 43, + 159, 47, 35, + 151, 43, 27, + 139, 39, 19, + 127, 31, 15, + 115, 23, 11, + 103, 23, 7, + 87, 19, 0, + 75, 15, 0, + 67, 15, 0, + 59, 15, 0, + 51, 11, 0, + 43, 11, 0, + 35, 11, 0, + 27, 7, 0, + 19, 7, 0, + 123, 95, 75, + 115, 87, 67, + 107, 83, 63, + 103, 79, 59, + 95, 71, 55, + 87, 67, 51, + 83, 63, 47, + 75, 55, 43, + 67, 51, 39, + 63, 47, 35, + 55, 39, 27, + 47, 35, 23, + 39, 27, 19, + 31, 23, 15, + 23, 15, 11, + 15, 11, 7, + 111, 59, 23, + 95, 55, 23, + 83, 47, 23, + 67, 43, 23, + 55, 35, 19, + 39, 27, 15, + 27, 19, 11, + 15, 11, 7, + 179, 91, 79, + 191, 123, 111, + 203, 155, 147, + 215, 187, 183, + 203, 215, 223, + 179, 199, 211, + 159, 183, 195, + 135, 167, 183, + 115, 151, 167, + 91, 135, 155, + 71, 119, 139, + 47, 103, 127, + 23, 83, 111, + 19, 75, 103, + 15, 67, 91, + 11, 63, 83, + 7, 55, 75, + 7, 47, 63, + 7, 39, 51, + 0, 31, 43, + 0, 23, 31, + 0, 15, 19, + 0, 7, 11, + 0, 0, 0, + 139, 87, 87, + 131, 79, 79, + 123, 71, 71, + 115, 67, 67, + 107, 59, 59, + 99, 51, 51, + 91, 47, 47, + 87, 43, 43, + 75, 35, 35, + 63, 31, 31, + 51, 27, 27, + 43, 19, 19, + 31, 15, 15, + 19, 11, 11, + 11, 7, 7, + 0, 0, 0, + 151, 159, 123, + 143, 151, 115, + 135, 139, 107, + 127, 131, 99, + 119, 123, 95, + 115, 115, 87, + 107, 107, 79, + 99, 99, 71, + 91, 91, 67, + 79, 79, 59, + 67, 67, 51, + 55, 55, 43, + 47, 47, 35, + 35, 35, 27, + 23, 23, 19, + 15, 15, 11, + 159, 75, 63, + 147, 67, 55, + 139, 59, 47, + 127, 55, 39, + 119, 47, 35, + 107, 43, 27, + 99, 35, 23, + 87, 31, 19, + 79, 27, 15, + 67, 23, 11, + 55, 19, 11, + 43, 15, 7, + 31, 11, 7, + 23, 7, 0, + 11, 0, 0, + 0, 0, 0, + 119, 123, 207, + 111, 115, 195, + 103, 107, 183, + 99, 99, 167, + 91, 91, 155, + 83, 87, 143, + 75, 79, 127, + 71, 71, 115, + 63, 63, 103, + 55, 55, 87, + 47, 47, 75, + 39, 39, 63, + 35, 31, 47, + 27, 23, 35, + 19, 15, 23, + 11, 7, 7, + 155, 171, 123, + 143, 159, 111, + 135, 151, 99, + 123, 139, 87, + 115, 131, 75, + 103, 119, 67, + 95, 111, 59, + 87, 103, 51, + 75, 91, 39, + 63, 79, 27, + 55, 67, 19, + 47, 59, 11, + 35, 47, 7, + 27, 35, 0, + 19, 23, 0, + 11, 15, 0, + 0, 255, 0, + 35, 231, 15, + 63, 211, 27, + 83, 187, 39, + 95, 167, 47, + 95, 143, 51, + 95, 123, 51, + 255, 255, 255, + 255, 255, 211, + 255, 255, 167, + 255, 255, 127, + 255, 255, 83, + 255, 255, 39, + 255, 235, 31, + 255, 215, 23, + 255, 191, 15, + 255, 171, 7, + 255, 147, 0, + 239, 127, 0, + 227, 107, 0, + 211, 87, 0, + 199, 71, 0, + 183, 59, 0, + 171, 43, 0, + 155, 31, 0, + 143, 23, 0, + 127, 15, 0, + 115, 7, 0, + 95, 0, 0, + 71, 0, 0, + 47, 0, 0, + 27, 0, 0, + 239, 0, 0, + 55, 55, 255, + 255, 0, 0, + 0, 0, 255, + 43, 43, 35, + 27, 27, 23, + 19, 19, 15, + 235, 151, 127, + 195, 115, 83, + 159, 87, 51, + 123, 63, 27, + 235, 211, 199, + 199, 171, 155, + 167, 139, 119, + 135, 107, 87, + 159, 91, 83 +}; + +#endif//Q2PAL_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_register.h b/libs/DevIL-1.7.8/src-IL/include/il_register.h new file mode 100644 index 00000000..916df28f --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_register.h @@ -0,0 +1,41 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_register.h +// +// Description: Allows the caller to specify user-defined callback functions +// to open files DevIL does not support, to parse files +// differently, or anything else a person can think up. +// +//----------------------------------------------------------------------------- + + +#ifndef REGISTER_H +#define REGISTER_H + +#include "il_internal.h" + +typedef struct iFormatL +{ + ILstring Ext; + IL_LOADPROC Load; + struct iFormatL *Next; +} iFormatL; + +typedef struct iFormatS +{ + ILstring Ext; + IL_SAVEPROC Save; + struct iFormatS *Next; +} iFormatS; + +#define I_LOAD_FUNC 0 +#define I_SAVE_FUNC 1 + +ILboolean iRegisterLoad(ILconst_string FileName); +ILboolean iRegisterSave(ILconst_string FileName); + +#endif//REGISTER_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_rle.h b/libs/DevIL-1.7.8/src-IL/include/il_rle.h new file mode 100644 index 00000000..498bddbe --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_rle.h @@ -0,0 +1,92 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_rle.h +// +// Description: Functions for run-length encoding +// +//----------------------------------------------------------------------------- + +#ifndef RLE_H +#define RLE_H + +#include "il_internal.h" + +#define TGA_MAX_RUN 128 +#define SGI_MAX_RUN 127 +#define BMP_MAX_RUN 127 + +#ifdef IL_RLE_C +#undef NOINLINE +#undef INLINE +#define INLINE +#endif + +#ifndef NOINLINE +INLINE ILuint GetPix(ILubyte *p, ILuint bpp) { + ILuint Pixel; + Pixel = (ILuint)*p++; + + while( bpp-- > 1 ) { + Pixel <<= 8; + Pixel |= (ILuint)*p++; + } + return Pixel; +} + +INLINE ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt) { + ILuint pixel; + ILuint nextPixel = 0; + ILint n; + + n = 0; + if (pixCnt == 1) + return pixCnt; + pixel = GetPix(p, bpp); + + while (pixCnt > 1) { + p += bpp; + nextPixel = GetPix(p, bpp); + if (nextPixel == pixel) + break; + pixel = nextPixel; + ++n; + --pixCnt; + } + + if (nextPixel == pixel) + return n; + return n + 1; +} + + +INLINE ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt) { + ILuint pixel; + ILuint nextPixel; + ILint n; + + n = 1; + pixel = GetPix(p, bpp); + pixCnt--; + + while (pixCnt > 0) { + p += bpp; + nextPixel = GetPix(p, bpp); + if (nextPixel != pixel) + break; + ++n; + --pixCnt; + } + + return n; +} +#endif + +ILuint GetPix(ILubyte *p, ILuint bpp); +ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt); +ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt); + +#endif//RLE_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_sgi.h b/libs/DevIL-1.7.8/src-IL/include/il_sgi.h new file mode 100644 index 00000000..ae1ef390 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_sgi.h @@ -0,0 +1,66 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2002 <--Y2K Compliant! =] +// +// Filename: src-IL/include/sgi.h +// +// Description: Reads from and writes to SGI graphics files. +// +//----------------------------------------------------------------------------- + + +#ifndef SGI_H +#define SGI_H + +#include "il_internal.h" + +typedef struct iSgiHeader +{ + ILshort MagicNum; // IRIS image file magic number + ILbyte Storage; // Storage format + ILbyte Bpc; // Number of bytes per pixel channel + ILushort Dim; // Number of dimensions + // 1: single channel, 1 row with XSize pixels + // 2: single channel, XSize*YSize pixels + // 3: ZSize channels, XSize*YSize pixels + + ILushort XSize; // X size in pixels + ILushort YSize; // Y size in pixels + ILushort ZSize; // Number of channels + ILint PixMin; // Minimum pixel value + ILint PixMax; // Maximum pixel value + ILint Dummy1; // Ignored + ILbyte Name[80]; // Image name + ILint ColMap; // Colormap ID + ILbyte Dummy[404]; // Ignored +} IL_PACKSTRUCT iSgiHeader; + +// Sgi format #define's +#define SGI_VERBATIM 0 +#define SGI_RLE 1 +#define SGI_MAGICNUM 474 + +// Sgi colormap types +#define SGI_COLMAP_NORMAL 0 +#define SGI_COLMAP_DITHERED 1 +#define SGI_COLMAP_SCREEN 2 +#define SGI_COLMAP_COLMAP 3 + + +// Internal functions +ILboolean iIsValidSgi(void); +ILboolean iCheckSgi(iSgiHeader *Header); +ILboolean iLoadSgiInternal(void); +ILboolean iSaveSgiInternal(void); +void iExpandScanLine(ILubyte *Dest, ILubyte *Src, ILuint Bpc); +ILint iGetScanLine(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length); +ILint iGetScanLineFast(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length, ILubyte*); +void sgiSwitchData(ILubyte *Data, ILuint SizeOfData); +ILboolean iNewSgi(iSgiHeader *Head); +ILboolean iReadNonRleSgi(iSgiHeader *Head); +ILboolean iReadRleSgi(iSgiHeader *Head); +ILboolean iSaveRleSgi(ILubyte *Data, ILuint w, ILuint h, ILuint numChannels, ILuint bps); + +#endif//SGI_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_stack.h b/libs/DevIL-1.7.8/src-IL/include/il_stack.h new file mode 100644 index 00000000..5e4a214f --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_stack.h @@ -0,0 +1,43 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_stack.h +// +// Description: The main image stack +// +//----------------------------------------------------------------------------- + +#ifndef IMAGESTACK_H +#define IMAGESTACK_H + +#include "il_internal.h" + + +// Just a guess...seems large enough +#define I_STACK_INCREMENT 1024 + +typedef struct iFree +{ + ILuint Name; + void *Next; +} iFree; + + +// Internal functions +ILboolean iEnlargeStack(void); +void iFreeMem(void); + +// Globals for il_stack.c +ILuint StackSize = 0; +ILuint LastUsed = 0; +ILuint CurName = 0; +ILimage **ImageStack = NULL; +iFree *FreeNames = NULL; +ILboolean OnExit = IL_FALSE; +ILboolean ParentImage = IL_TRUE; + + +#endif//IMAGESTACK_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_states.h b/libs/DevIL-1.7.8/src-IL/include/il_states.h new file mode 100644 index 00000000..a5c6d85d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_states.h @@ -0,0 +1,399 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/07/2008 +// +// Filename: src-IL/src/il_states.h +// +// Description: State machine +// +//----------------------------------------------------------------------------- + + +#ifndef STATES_H +#define STATES_H + +#include "il_internal.h" + + +ILboolean ilAble(ILenum Mode, ILboolean Flag); + + +#define IL_ATTRIB_STACK_MAX 32 + +ILuint ilCurrentPos = 0; // Which position on the stack + +// +// Various states +// + +typedef struct IL_STATES +{ + // Origin states + ILboolean ilOriginSet; + ILenum ilOriginMode; + // Format and type states + ILboolean ilFormatSet; + ILboolean ilTypeSet; + ILenum ilFormatMode; + ILenum ilTypeMode; + // File mode states + ILboolean ilOverWriteFiles; + // Palette states + ILboolean ilAutoConvPal; + // Load fail states + ILboolean ilDefaultOnFail; + // Key colour states + ILboolean ilUseKeyColour; + // Alpha blend states + ILboolean ilBlitBlend; + // Compression states + ILenum ilCompression; + // Interlace states + ILenum ilInterlace; + // Quantization states + ILenum ilQuantMode; + ILuint ilNeuSample; + ILuint ilQuantMaxIndexs; + // DXTC states + ILboolean ilKeepDxtcData; + ILboolean ilUseNVidiaDXT; + ILboolean ilUseSquishDXT; + + + // + // Format-specific states + // + + ILboolean ilTgaCreateStamp; + ILuint ilJpgQuality; + ILboolean ilPngInterlace; + ILboolean ilTgaRle; + ILboolean ilBmpRle; + ILboolean ilSgiRle; + ILenum ilJpgFormat; + ILboolean ilJpgProgressive; + ILenum ilDxtcFormat; + ILenum ilPcdPicNum; + + ILint ilPngAlphaIndex; // this index should be treated as an alpha key (most formats use this rather than having alpha in the palette), -1 for none + // currently only used when writing out .png files and should obviously be set to -1 most of the time + ILenum ilVtfCompression; + + + // + // Format-specific strings + // + + char* ilTgaId; + char* ilTgaAuthName; + char* ilTgaAuthComment; + char* ilPngAuthName; + char* ilPngTitle; + char* ilPngDescription; + char* ilTifDescription; + char* ilTifHostComputer; + char* ilTifDocumentName; + char* ilTifAuthName; + char* ilCHeader; + + + + +} IL_STATES; + +IL_STATES ilStates[IL_ATTRIB_STACK_MAX]; + + +typedef struct IL_HINTS +{ + // Memory vs. Speed trade-off + ILenum MemVsSpeedHint; + // Compression hints + ILenum CompressHint; + +} IL_HINTS; + +IL_HINTS ilHints; + + +#ifndef IL_NO_BLP + #define IL_BLP_EXT "blp " +#else + #define IL_BLP_EXT "" +#endif + +#ifndef IL_NO_BMP + #define IL_BMP_EXT "bmp dib " +#else + #define IL_BMP_EXT "" +#endif + +#ifndef IL_NO_CHEAD + #define IL_CHEAD_EXT "h " +#else + #define IL_CHEAD_EXT "" +#endif + +#ifndef IL_NO_CUT + #define IL_CUT_EXT "cut " +#else + #define IL_CUT_EXT "" +#endif + +#ifndef IL_NO_DCX + #define IL_DCX_EXT "dcx " +#else + #define IL_DCX_EXT "" +#endif + +#ifndef IL_NO_DCM + #define IL_DCM_EXT "dicom dcm" +#else + #define IL_DCM_EXT "" +#endif + +#ifndef IL_NO_DDS + #define IL_DDS_EXT "dds " +#else + #define IL_DDS_EXT "" +#endif + +#ifndef IL_NO_DPX + #define IL_DPX_EXT "dds " +#else + #define IL_DPX_EXT "" +#endif + +#ifndef IL_NO_EXR + #define IL_EXR_EXT "exr " +#else + #define IL_EXR_EXT "" +#endif + +#ifndef IL_NO_FITS + #define IL_FITS_EXT "fit fits " +#else + #define IL_FITS_EXT "" +#endif + +#ifndef IL_NO_FTX + #define IL_FTX_EXT "ftx " +#else + #define IL_FTX_EXT "" +#endif + +#ifndef IL_NO_GIF + #define IL_GIF_EXT "gif " +#else + #define IL_GIF_EXT "" +#endif + +#ifndef IL_NO_HDR + #define IL_HDR_EXT "hdr " +#else + #define IL_HDR_EXT "" +#endif + +#ifndef IL_NO_ICNS + #define IL_ICNS_EXT "icns " +#else + #define IL_ICNS_EXT "" +#endif + +#ifndef IL_NO_ICO + #define IL_ICO_EXT "ico cur " +#else + #define IL_ICO_EXT "" +#endif + +#ifndef IL_NO_IFF + #define IL_IFF_EXT "iff " +#else + #define IL_IFF_EXT "" +#endif + +#ifndef IL_NO_IWI + #define IL_IWI_EXT "iwi " +#else + #define IL_IWI_EXT "" +#endif + +#ifndef IL_NO_JP2 + #define IL_JP2_EXT "jp2 " +#else + #define IL_JP2_EXT "" +#endif + +#ifndef IL_NO_JPG + #define IL_JPG_EXT "jpg jpe jpeg " +#else + #define IL_JPG_EXT "" +#endif + +#ifndef IL_NO_LIF + #define IL_LIF_EXT "lif " +#else + #define IL_LIF_EXT "" +#endif + +#ifndef IL_NO_MDL + #define IL_MDL_EXT "mdl " +#else + #define IL_MDL_EXT "" +#endif + +#ifndef IL_NO_MNG + #define IL_MNG_EXT "mng jng " +#else + #define IL_MNG_EXT "" +#endif + +#ifndef IL_NO_MP3 + #define IL_MP3_EXT "mp3 " +#else + #define IL_MP3_EXT "" +#endif + +#ifndef IL_NO_PCD + #define IL_PCD_EXT "pcd " +#else + #define IL_PCD_EXT "" +#endif + +#ifndef IL_NO_PCX + #define IL_PCX_EXT "pcx " +#else + #define IL_PCX_EXT "" +#endif + +#ifndef IL_NO_PIC + #define IL_PIC_EXT "pic " +#else + #define IL_PIC_EXT "" +#endif + +#ifndef IL_NO_PIX + #define IL_PIX_EXT "pix " +#else + #define IL_PIX_EXT "" +#endif + +#ifndef IL_NO_PNG + #define IL_PNG_EXT "png " +#else + #define IL_PNG_EXT "" +#endif + +#ifndef IL_NO_PNM + #define IL_PNM_EXT "pbm pgm pnm ppm " +#else + #define IL_PNM_EXT "" +#endif + +#ifndef IL_NO_PSD + #define IL_PSD_EXT "psd pdd " +#else + #define IL_PSD_EXT "" +#endif + +#ifndef IL_NO_PSP + #define IL_PSP_EXT "psp " +#else + #define IL_PSP_EXT "" +#endif + +#ifndef IL_NO_PXR + #define IL_PXR_EXT "pxr " +#else + #define IL_PXR_EXT "" +#endif + +#ifndef IL_NO_RAW + #define IL_RAW_EXT "raw " +#else + #define IL_RAW_EXT "" +#endif + +#ifndef IL_NO_ROT + #define IL_ROT_EXT "rot " +#else + #define IL_ROT_EXT "" +#endif + +#ifndef IL_NO_SGI + #define IL_SGI_EXT "sgi bw rgb rgba " +#else + #define IL_SGI_EXT "" +#endif + +#ifndef IL_NO_SUN + #define IL_SUN_EXT "sun ras rs im1 im8 im24 im32 " +#else + #define IL_SUN_EXT "" +#endif + +#ifndef IL_NO_TEXTURE + #define IL_TEX_EXT "texture " +#else + #define IL_TEX_EXT "" +#endif + +#ifndef IL_NO_TGA + #define IL_TGA_EXT "tga vda icb vst " +#else + #define IL_TGA_EXT "" +#endif + +#ifndef IL_NO_TIF + #define IL_TIF_EXT "tif tiff " +#else + #define IL_TIF_EXT "" +#endif + +#ifndef IL_NO_TPL + #define IL_TPL_EXT "tpl " +#else + #define IL_TPL_EXT "" +#endif + +#ifndef IL_NO_UTX + #define IL_UTX_EXT "utx " +#else + #define IL_UTX_EXT "" +#endif + +#ifndef IL_NO_VTF + #define IL_VTF_EXT "vtf " +#else + #define IL_VTF_EXT "" +#endif + +#ifndef IL_NO_WAL + #define IL_WAL_EXT "wal " +#else + #define IL_WAL_EXT "" +#endif + +#ifndef IL_NO_WBMP + #define IL_WBMP_EXT "wbmp " +#else + #define IL_WBMP_EXT "" +#endif + +#ifndef IL_NO_WDP + #define IL_WDP_EXT "wdp " +#else + #define IL_WDP_EXT "" +#endif + +#ifndef IL_NO_XPM + #define IL_XPM_EXT "xpm " +#else + #define IL_XPM_EXT "" +#endif + + + +#endif//STATES_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_targa.h b/libs/DevIL-1.7.8/src-IL/include/il_targa.h new file mode 100644 index 00000000..62c42140 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_targa.h @@ -0,0 +1,109 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/include/il_targa.h +// +// Description: Targa (.tga) functions +// +//----------------------------------------------------------------------------- + + +#ifndef TARGA_H +#define TARGA_H + +#include "il_internal.h" + +#ifdef _MSC_VER +#pragma pack(push, tga_struct, 1) +#elif defined(MACOSX) || defined(__GNUC__) +#pragma pack(1) +#endif + +typedef struct TARGAHEAD +{ + ILubyte IDLen; + ILubyte ColMapPresent; + ILubyte ImageType; + ILshort FirstEntry; + ILshort ColMapLen; + ILubyte ColMapEntSize; + + ILshort OriginX; + ILshort OriginY; + ILushort Width; + ILushort Height; + ILubyte Bpp; + ILubyte ImageDesc; +} IL_PACKSTRUCT TARGAHEAD; + +typedef struct TARGAFOOTER +{ + ILuint ExtOff; // Extension Area Offset + ILuint DevDirOff; // Developer Directory Offset + ILbyte Signature[16]; // TRUEVISION-XFILE + ILbyte Reserved; // ASCII period '.' + ILbyte NullChar; // NULL +} IL_PACKSTRUCT TARGAFOOTER; +#if defined(MACOSX) || defined(__GNUC__) +#pragma pack() +#elif _MSC_VER +#pragma pack(pop, tga_struct) +#endif + +#define TGA_EXT_LEN 495 +typedef struct TARGAEXT +{ + // Dev Directory + // We don't mess with this + + // Extension Area + ILshort Size; // should be TGA_EXT_LEN + ILbyte AuthName[41]; // the image author's name + ILbyte AuthComments[324]; // author's comments + ILshort Month, Day, Year, Hour, Minute, Second; // internal date of file + ILbyte JobID[41]; // the job description (if any) + ILshort JobHour, JobMin, JobSecs; // the job's time + ILbyte SoftwareID[41]; // the software that created this + ILshort SoftwareVer; // the software version number * 100 + ILbyte SoftwareVerByte; // the software version letter + ILint KeyColor; // the transparent colour +} TARGAEXT; + + +// Different Targa formats +#define TGA_NO_DATA 0 +#define TGA_COLMAP_UNCOMP 1 +#define TGA_UNMAP_UNCOMP 2 +#define TGA_BW_UNCOMP 3 +#define TGA_COLMAP_COMP 9 +#define TGA_UNMAP_COMP 10 +#define TGA_BW_COMP 11 + + +// Targa origins +#define IMAGEDESC_ORIGIN_MASK 0x30 +#define IMAGEDESC_TOPLEFT 0x20 +#define IMAGEDESC_BOTLEFT 0x00 +#define IMAGEDESC_BOTRIGHT 0x10 +#define IMAGEDESC_TOPRIGHT 0x30 + + +// Internal functions +ILboolean iIsValidTarga(); +ILboolean iGetTgaHead(TARGAHEAD *Header); +ILboolean iCheckTarga(TARGAHEAD *Header); +ILboolean iLoadTargaInternal(void); +ILboolean iSaveTargaInternal(void); +//ILvoid iMakeString(char *Str); +ILboolean iReadBwTga(TARGAHEAD *Header); +ILboolean iReadColMapTga(TARGAHEAD *Header); +ILboolean iReadUnmapTga(TARGAHEAD *Header); +ILboolean iUncompressTgaData(ILimage *Image); +ILboolean i16BitTarga(ILimage *Image); +void iGetDateTime(ILuint *Month, ILuint *Day, ILuint *Yr, ILuint *Hr, ILuint *Min, ILuint *Sec); + + +#endif//TARGA_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_utx.h b/libs/DevIL-1.7.8/src-IL/include/il_utx.h new file mode 100644 index 00000000..ce6f4b7b --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_utx.h @@ -0,0 +1,100 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/02/2009 +// +// Filename: src-IL/include/il_utx.h +// +// Description: Reads from an Unreal and Unreal Tournament Texture (.utx) file. +// Specifications can be found at +// http://wiki.beyondunreal.com/Legacy:Package_File_Format. +// +//----------------------------------------------------------------------------- + + +#ifndef UTX_H +#define UTX_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "il_internal.h" +#include "il_dds.h" + +#ifdef __cplusplus +} +#endif + + +#include +#include +#include +using namespace std; + + +typedef struct UTXHEADER +{ + ILuint Signature; + ILushort Version; + ILushort LicenseMode; + ILuint Flags; + ILuint NameCount; + ILuint NameOffset; + ILuint ExportCount; + ILuint ExportOffset; + ILuint ImportCount; + ILuint ImportOffset; +} UTXHEADER; + +typedef struct UTXENTRYNAME +{ + //char *Name; + string Name; + ILuint Flags; +} UTXENTRYNAME; + +typedef struct UTXEXPORTTABLE +{ + ILint Class; + ILint Super; + ILint Group; + ILint ObjectName; + ILuint ObjectFlags; + ILint SerialSize; + ILint SerialOffset; + + ILboolean ClassImported; + ILboolean SuperImported; + ILboolean GroupImported; +} UTXEXPORTTABLE; + +typedef struct UTXIMPORTTABLE +{ + ILint ClassPackage; + ILint ClassName; + ILint Package; + ILint ObjectName; + + ILboolean PackageImported; +} UTXIMPORTTABLE; + +class UTXPALETTE +{ +public: + UTXPALETTE() { Pal = NULL; } + ~UTXPALETTE() { delete [] Pal; } + + ILubyte *Pal; + ILuint Count; + ILuint Name; +}; + +// Data formats +#define UTX_P8 0x00 +#define UTX_DXT1 0x03 + +ILboolean iLoadUtxInternal(void); + +#endif//UTX_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_vtf.h b/libs/DevIL-1.7.8/src-IL/include/il_vtf.h new file mode 100644 index 00000000..7d9d40e5 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_vtf.h @@ -0,0 +1,132 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/28/2009 +// +// Filename: src-IL/include/il_vtf.h +// +// Description: Reads from and writes to a Valve Texture Format (.vtf) file. +// These are used in Valve's Source games. VTF specs available +// from http://developer.valvesoftware.com/wiki/VTF. +// +//----------------------------------------------------------------------------- + + +#ifndef VTF_H +#define VTF_H + +#include "il_internal.h" + +#ifdef _MSC_VER +#pragma pack(push, vtf_struct, 1) +#elif defined(MACOSX) || defined(__GNUC__) +#pragma pack(1) +#endif + +typedef struct VTFHEAD +{ + ILubyte Signature[4]; // File signature ("VTF\0"). + ILuint Version[2]; // version[0].version[1] (currently 7.2). + ILuint HeaderSize; // Size of the header struct (16 byte aligned; currently 80 bytes). + ILushort Width; // Width of the largest mipmap in pixels. Must be a power of 2. + ILushort Height; // Height of the largest mipmap in pixels. Must be a power of 2. + ILuint Flags; // VTF flags. + ILushort Frames; // Number of frames, if animated (1 for no animation). + ILushort FirstFrame; // First frame in animation (0 based). + ILubyte Padding0[4]; // reflectivity padding (16 byte alignment). + ILfloat Reflectivity[3]; // reflectivity vector. + ILubyte Padding1[4]; // reflectivity padding (8 byte packing). + ILfloat BumpmapScale; // Bumpmap scale. + ILuint HighResImageFormat; // High resolution image format. + ILubyte MipmapCount; // Number of mipmaps. + ILuint LowResImageFormat; // Low resolution image format (always DXT1). + ILubyte LowResImageWidth; // Low resolution image width. + ILubyte LowResImageHeight; // Low resolution image height. + ILushort Depth; // Depth of the largest mipmap in pixels. + // Must be a power of 2. Can be 0 or 1 for a 2D texture (v7.2 only). +} IL_PACKSTRUCT VTFHEAD; + +#if defined(MACOSX) || defined(__GNUC__) +#pragma pack() +#elif _MSC_VER +#pragma pack(pop, vtf_struct) +#endif + +enum +{ + IMAGE_FORMAT_NONE = -1, + IMAGE_FORMAT_RGBA8888 = 0, + IMAGE_FORMAT_ABGR8888, + IMAGE_FORMAT_RGB888, + IMAGE_FORMAT_BGR888, + IMAGE_FORMAT_RGB565, + IMAGE_FORMAT_I8, + IMAGE_FORMAT_IA88, + IMAGE_FORMAT_P8, + IMAGE_FORMAT_A8, + IMAGE_FORMAT_RGB888_BLUESCREEN, + IMAGE_FORMAT_BGR888_BLUESCREEN, + IMAGE_FORMAT_ARGB8888, + IMAGE_FORMAT_BGRA8888, + IMAGE_FORMAT_DXT1, + IMAGE_FORMAT_DXT3, + IMAGE_FORMAT_DXT5, + IMAGE_FORMAT_BGRX8888, + IMAGE_FORMAT_BGR565, + IMAGE_FORMAT_BGRX5551, + IMAGE_FORMAT_BGRA4444, + IMAGE_FORMAT_DXT1_ONEBITALPHA, + IMAGE_FORMAT_BGRA5551, + IMAGE_FORMAT_UV88, + IMAGE_FORMAT_UVWQ8888, + IMAGE_FORMAT_RGBA16161616F, + IMAGE_FORMAT_RGBA16161616, + IMAGE_FORMAT_UVLX8888 +}; + +enum +{ + TEXTUREFLAGS_POINTSAMPLE = 0x00000001, + TEXTUREFLAGS_TRILINEAR = 0x00000002, + TEXTUREFLAGS_CLAMPS = 0x00000004, + TEXTUREFLAGS_CLAMPT = 0x00000008, + TEXTUREFLAGS_ANISOTROPIC = 0x00000010, + TEXTUREFLAGS_HINT_DXT5 = 0x00000020, + TEXTUREFLAGS_NOCOMPRESS = 0x00000040, + TEXTUREFLAGS_NORMAL = 0x00000080, + TEXTUREFLAGS_NOMIP = 0x00000100, + TEXTUREFLAGS_NOLOD = 0x00000200, + TEXTUREFLAGS_MINMIP = 0x00000400, + TEXTUREFLAGS_PROCEDURAL = 0x00000800, + TEXTUREFLAGS_ONEBITALPHA = 0x00001000, + TEXTUREFLAGS_EIGHTBITALPHA = 0x00002000, + TEXTUREFLAGS_ENVMAP = 0x00004000, + TEXTUREFLAGS_RENDERTARGET = 0x00008000, + TEXTUREFLAGS_DEPTHRENDERTARGET = 0x00010000, + TEXTUREFLAGS_NODEBUGOVERRIDE = 0x00020000, + TEXTUREFLAGS_SINGLECOPY = 0x00040000, + TEXTUREFLAGS_ONEOVERMIPLEVELINALPHA = 0x00080000, + TEXTUREFLAGS_PREMULTCOLORBYONEOVERMIPLEVEL = 0x00100000, + TEXTUREFLAGS_NORMALTODUDV = 0x00200000, + TEXTUREFLAGS_ALPHATESTMIPGENERATION = 0x00400000, + TEXTUREFLAGS_NODEPTHBUFFER = 0x00800000, + TEXTUREFLAGS_NICEFILTERED = 0x01000000, + TEXTUREFLAGS_CLAMPU = 0x02000000 +}; + + + +// Internal functions +ILboolean iIsValidVtf(void); +ILboolean iGetVtfHead(VTFHEAD *Header); +ILboolean iCheckVtf(VTFHEAD *Header); +ILboolean iLoadVtfInternal(void); +ILboolean VtfInitFacesMipmaps(ILimage *BaseImage, ILuint NumFaces, VTFHEAD *Header); +ILboolean VtfInitMipmaps(ILimage *BaseImage, VTFHEAD *Header); +ILboolean VtfReadData(void); +ILboolean VtfDecompressDXT1(ILimage *Image); +ILboolean VtfDecompressDXT5(ILimage *Image); +ILboolean iSaveVtfInternal(void); + +#endif//VTF_H diff --git a/libs/DevIL-1.7.8/src-IL/include/il_wdp.h b/libs/DevIL-1.7.8/src-IL/include/il_wdp.h new file mode 100644 index 00000000..693b6194 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/include/il_wdp.h @@ -0,0 +1,188 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 09/26/2008 +// +// Filename: src-IL/include/il_hdr.h +// +// Description: Reads a Microsoft HD Photo (.wdp) +// +//----------------------------------------------------------------------------- + + +#ifndef WDP_H +#define WDP_H + +#include "il_internal.h" + + +// +// Structures +// +typedef struct WDPHEAD +{ + ILubyte Encoding[2]; + ILubyte UniqueID; + ILubyte Version; + ILuint Offset; +} WDPHEAD; + +typedef struct WDPIFD +{ + ILushort Tag; + ILushort Type; + ILuint Count; + ILuint ValOff; + ILuint NextOff; +} WDPIFD; + +typedef struct WDPGUID +{ + ILuint First; + ILushort Second; + ILushort Third; + ILuint Fourth; + ILuint Fifth; +} WDPGUID; + +typedef struct WDPIMGHEAD +{ + ILuint GDISignature[2]; + ILuint Codec; + ILubyte Flags[2]; + ILubyte Format; + ILuint Width, Height; // Can either be short or 32-bit int + ILuint VertTiles, HorzTiles; // 12-bits each + ILushort *TileWidth, *TileHeight; // 8 or 16-bits each + ILubyte *TileStretch; // 8-bits each + ILubyte ExtraPixels[3]; +} WDPIMGHEAD; + +typedef struct WDPIMGPLANE +{ + ILubyte Flags1; + ILubyte Color; + ILubyte Bayer; + ILubyte ShiftBits; + ILubyte Mantissa; + ILubyte Expbias; + ILubyte Flags2; + + ILubyte NumChannels; +} WDPIMGPLANE; + +typedef struct WDPDCQUANT +{ + ILubyte ChMode; + ILubyte DcQuant; + ILubyte DcQuantY; + ILubyte DcQuantUV; + ILubyte DcQuantChan; +} WDPDCQUANT; + +typedef struct WDPTILE +{ + ILuint StartCode; + ILubyte HashAndType; +} WDPTILE; + +// +// Image header defines +// + +// Codec and sub-codec +#define WDP_CODEC 0xF0 +#define WDP_SUBCODEC 0x0F + +// First set of flags +#define WDP_TILING_FLAG 0x80 +#define WDP_BITSTREAM_FMT 0x40 +#define WDP_ORIENTATION 0x38 +#define WDP_INDEXTABLE 0x04 +#define WDP_OVERLAP 0x03 + +// Second set of flags +#define WDP_SHORT_HEADER 0x80 +#define WDP_LONG_WORD 0x40 +#define WDP_WINDOWING 0x20 +#define WDP_TRIM_FLEXBITS 0x10 +#define WDP_TILE_STRETCH 0x08 +#define WDP_ALPHACHANNEL 0x01 + +// Format and bit-depth +#define WDP_FORMAT 0xF0 +#define WDP_BITDEPTH 0x0F +#define WDP_Y_ONLY 0x00 +#define WDP_YUV_420 0x01 +#define WDP_YUV_422 0x02 +#define WDP_YUV_444 0x03 +#define WDP_CMYK 0x04 +#define WDP_BAYER 0x05 +#define WDP_N_CHANNEL 0x06 +#define WDP_RGB 0x07 +#define WDP_RGBE 0x08 + +// Bitdepth +#define WDP_BD_1_WHITE 0x00 +#define WDP_BD_8 0x01 +#define WDP_BD_16 0x02 +#define WDP_BD_16S 0x03 +#define WDP_BD_16F 0x04 +#define WDP_BD_32 0x05 +#define WDP_BD_32S 0x06 +#define WDP_BD_32F 0x07 +#define WDP_BD_5 0x08 +#define WDP_BD_10 0x09 +#define WDP_BD_565 0x0A +#define WDP_BD_1_BLACK 0x0F + + +// +// Image plane header defines +// + +// First set of flags +#define WDP_CLR_FMT 0xE0 +#define WDP_NO_SCALED 0x10 +#define WDP_BANDS_PRESENT 0x0F + +// Defines for n-channels +#define WDP_NUM_CHANS 0xF0 +#define WDP_COLOR_INTERP 0x0F + +// Second set of flags +#define WDP_DC_FRAME 0x80 + +// Channel modes +#define WDP_CH_UNIFORM 0x00 +#define WDP_CH_SEPARATE 0x01 +#define WDP_CH_INDEPENDENT 0x02 + +// Tile types +#define WDP_TILE_HASH 0xF8 +#define WDP_TILE_TYPE 0x03 +#define WDP_SPATIAL_TILE 0x00 +#define WDP_DC_TILE 0x01 +#define WDP_LOWPASS_TILE 0x02 +#define WDP_HIGHPASS_TILE 0x03 +#define WDP_FLEXBITS_TILE 0x04 + +// Bands present +#define WDP_SB_ALL 0x00 +#define WDP_SB_NO_FLEXBITS 0x01 +#define WDP_SB_NO_HIGHPASS 0x02 +#define WDP_SB_DC_ONLY 0x03 +#define WDP_SB_ISOLATED 0x04 + + +// +// Internal functions +// +ILboolean iIsValidWdp(); +ILboolean iCheckWdp(WDPHEAD *Header); +ILboolean iLoadWdpInternal(); +ILuint VLWESC(); + + +#endif//WDP_H diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.rc b/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.rc new file mode 100644 index 00000000..026ee499 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.rc @@ -0,0 +1,120 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +1 VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "DevIL: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "DevIL: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "Developer's Image Library (DevIL)" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "DevIL.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Library (DevIL)" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + + +3 TEXTINCLUDE +BEGIN + "\r\n" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENIL "Developer's Image Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.vcproj b/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.vcproj new file mode 100644 index 00000000..64be526d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/IL Unicode.vcproj @@ -0,0 +1,2794 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/IL.rc b/libs/DevIL-1.7.8/src-IL/msvc8/IL.rc new file mode 100644 index 00000000..b96745b4 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/IL.rc @@ -0,0 +1,123 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////// FILEVERSION 0,1,7,8//////////////////////////////////////// +// +// Version +// + +1 VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "DevIL: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "DevIL: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "Developer's Image Library (DevIL)" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "DevIL.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Library (DevIL)" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENIL "Developer's Image Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/IL.vcproj b/libs/DevIL-1.7.8/src-IL/msvc8/IL.vcproj new file mode 100644 index 00000000..e0c5c358 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/IL.vcproj @@ -0,0 +1,2866 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/il.def b/libs/DevIL-1.7.8/src-IL/msvc8/il.def new file mode 100644 index 00000000..c9391184 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/il.def @@ -0,0 +1,200 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +ilActiveFace +ilActiveImage +ilActiveLayer +ilActiveMipmap +ilApplyProfile +ilApplyPal +ilBindImage +ilBlit +ilClampNTSC +ilClearColour +ilClearImage +ilCloneCurImage +ilCompressDXT +ilCompressFunc +ilConvertImage +ilConvertPal +ilCopyImage +ilCopyPixels +ilCreateSubImage +ilDefaultImage +ilDeleteImage +ilDeleteImages +ilDetermineType +ilDetermineTypeF +ilDetermineTypeL +ilDisable +ilDxtcDataToImage +ilDxtcDataToSurface +ilEnable +ilFormatFunc +ilGenImage +ilGenImages +ilGetAlpha +ilGetBoolean +ilGetBooleanv +ilGetBppFormat +ilGetBppPal +ilGetBpcType +ilGetClear +ilGetCurImage +ilGetCurName +ilGetData +ilGetDXTCData +ilGetError +ilGetFormatBpp +ilGetInteger +ilGetIntegerv +ilGetLumpPos +ilGetPalBaseType +ilGetPalette +ilGetString +ilGetTypeBpc +ilHint +ilInit +ilInitImage +ilImageToDxtcData +ilIsDisabled +ilIsEnabled +ilIsImage +ilIsValid +ilIsValidF +ilIsValidL +ilKeyColour +ilLoad +ilLoadF +ilLoadImage +ilLoadL +ilLoadPal +ilModAlpha +ilNewImageFull +ilNextPower2 +ilOriginFunc +ilOverlayImage +ilPopAttrib +ilPushAttrib +ilRegisterFormat +ilRegisterLoad +ilRegisterMipNum +ilRegisterNumFaces +ilRegisterNumImages +ilRegisterOrigin +ilRegisterPal +ilRegisterSave +ilRegisterType +ilRemoveLoad +ilRemoveSave +ilReplaceCurImage +ilResetMemory +ilResetRead +ilResetWrite +ilSave +ilSaveF +ilSaveImage +ilSaveL +ilSavePal +ilSaveData +ilSetAlpha +ilSetData +ilSetDuration +ilSetError +ilSetInteger +ilSetMemory +ilSetPal +ilSetRead +ilSetPixels +ilSetString +ilSetWrite +ilShutDown +ilSurfaceToDxtcData +ilTexImage +ilTexImageDxtc +ilTypeFromExt +ilTypeFunc +ilLoadData +ilLoadDataF +ilLoadDataL +;ilLoadFromJpegStruct +;ilSaveFromJpegStruct + +; Internal but exported functions +iBindImageTemp +ilClearImage_ +ilConvertBuffer +ilCloseImage +ilClosePal +iConvertImage +iConvertPal +iCopyPal +ilCopyImageAttr +ilCopyImage_ +iGetFlipped +ilIsValidPal +ilNewImage +ilResizeImage +ilSetCurImage +ilTexImage_ +ilTexSubImage_ +ialloc +ifree + + +; Export the API of the included libjpeg so that applications +; can use both libraries without linking to two separate copies. +;jpeg_std_error +;jpeg_CreateCompress +;jpeg_CreateDecompress +;jpeg_destroy_compress +;jpeg_destroy_decompress +;jpeg_stdio_dest +;jpeg_stdio_src +;jpeg_set_defaults +;jpeg_set_colorspace +;jpeg_default_colorspace +;jpeg_set_quality +;jpeg_set_linear_quality +;jpeg_add_quant_table +;jpeg_quality_scaling +;jpeg_simple_progression +;jpeg_suppress_tables +;jpeg_alloc_quant_table +;jpeg_alloc_huff_table +;jpeg_start_compress +;jpeg_write_scanlines +;jpeg_finish_compress +;jpeg_write_raw_data +;jpeg_write_marker +;jpeg_write_m_header +;jpeg_write_m_byte +;jpeg_write_tables +;jpeg_read_header +;jpeg_start_decompress +;jpeg_read_scanlines +;jpeg_finish_decompress +;jpeg_read_raw_data +;jpeg_has_multiple_scans +;jpeg_start_output +;jpeg_finish_output +;jpeg_input_complete +;jpeg_new_colormap +;jpeg_consume_input +;jpeg_calc_output_dimensions +;jpeg_save_markers +;jpeg_set_marker_processor +;jpeg_read_coefficients +;jpeg_write_coefficients +;jpeg_copy_critical_parameters +;jpeg_abort_compress +;jpeg_abort_decompress +;jpeg_abort +;jpeg_destroy +;jpeg_resync_to_restart + +;jpeg_copy_key_exif_parameters +;jpeg_extract_exif_entries +;jpeg_init_exif_field +;jpeg_build_exif_marker +;jpeg_init_exif_field_table diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/resource.h b/libs/DevIL-1.7.8/src-IL/msvc8/resource.h new file mode 100644 index 00000000..a5e411fe --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc8/resource.h @@ -0,0 +1,1496 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by IL Unicode.rc +// +#define SW_HIDE 0 +#define HIDE_WINDOW 0 +#define WM_NULL 0x0000 +#define WA_INACTIVE 0 +#define HTNOWHERE 0 +#define SMTO_NORMAL 0x0000 +#define ICON_SMALL 0 +#define SIZE_RESTORED 0 +#define BN_CLICKED 0 +#define BST_UNCHECKED 0x0000 +#define HDS_HORZ 0x0000 +#define TBSTYLE_BUTTON 0x0000 +#define TBS_HORZ 0x0000 +#define TBS_BOTTOM 0x0000 +#define TBS_RIGHT 0x0000 +#define LVS_ICON 0x0000 +#define LVS_ALIGNTOP 0x0000 +#define TCS_TABS 0x0000 +#define TCS_SINGLELINE 0x0000 +#define TCS_RIGHTJUSTIFY 0x0000 +#define DTS_SHORTDATEFORMAT 0x0000 +#define PGS_VERT 0x00000000 +#define LANG_NEUTRAL 0x00 +#define SUBLANG_NEUTRAL 0x00 +#define SORT_DEFAULT 0x0 +#define SORT_JAPANESE_XJIS 0x0 +#define SORT_CHINESE_BIG5 0x0 +#define SORT_CHINESE_PRCP 0x0 +#define SORT_KOREAN_KSC 0x0 +#define SORT_HUNGARIAN_DEFAULT 0x0 +#define SORT_GEORGIAN_TRADITIONAL 0x0 +#define _USE_DECLSPECS_FOR_SAL 0 +#define _USE_ATTRIBUTES_FOR_SAL 0 +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SHOW_OPENWINDOW 1 +#define SW_PARENTCLOSING 1 +#define VK_LBUTTON 0x01 +#define WM_CREATE 0x0001 +#define WA_ACTIVE 1 +#define PWR_OK 1 +#define PWR_SUSPENDREQUEST 1 +#define NFR_ANSI 1 +#define UIS_SET 1 +#define UISF_HIDEFOCUS 0x1 +#define XBUTTON1 0x0001 +#define WMSZ_LEFT 1 +#define HTCLIENT 1 +#define SMTO_BLOCK 0x0001 +#define MA_ACTIVATE 1 +#define ICON_BIG 1 +#define SIZE_MINIMIZED 1 +#define MK_LBUTTON 0x0001 +#define TME_HOVER 0x00000001 +#define CS_VREDRAW 0x0001 +#define CF_TEXT 1 +#define SCF_ISSECURE 0x00000001 +#define IDOK 1 +#define BN_PAINT 1 +#define BST_CHECKED 0x0001 +#define TBSTYLE_SEP 0x0001 +#define TTS_ALWAYSTIP 0x01 +#define TBS_AUTOTICKS 0x0001 +#define UDS_WRAP 0x0001 +#define PBS_SMOOTH 0x01 +#define LWS_TRANSPARENT 0x0001 +#define LVS_REPORT 0x0001 +#define TVS_HASBUTTONS 0x0001 +#define TCS_SCROLLOPPOSITE 0x0001 +#define ACS_CENTER 0x0001 +#define MCS_DAYSTATE 0x0001 +#define DTS_UPDOWN 0x0001 +#define PGS_HORZ 0x00000001 +#define NFS_EDIT 0x0001 +#define BCSIF_GLYPH 0x0001 +#define BCSS_NOSPLIT 0x0001 +#define LANG_ARABIC 0x01 +#define SUBLANG_DEFAULT 0x01 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 +#define SUBLANG_AZERI_LATIN 0x01 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CHINESE_TRADITIONAL 0x01 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 +#define SUBLANG_DUTCH 0x01 +#define SUBLANG_ENGLISH_US 0x01 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 +#define SUBLANG_FRENCH 0x01 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 +#define SUBLANG_GERMAN 0x01 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_ITALIAN 0x01 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 +#define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 +#define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 +#define SUBLANG_MALAY_MALAYSIA 0x01 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_NEPALI_NEPAL 0x01 +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SERBIAN_CROATIA 0x01 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 +#define SUBLANG_SPANISH 0x01 +#define SUBLANG_SWAHILI_KENYA 0x01 +#define SUBLANG_SWEDISH 0x01 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 +#define SUBLANG_URDU_PAKISTAN 0x01 +#define SUBLANG_UZBEK_LATIN 0x01 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 +#define SORT_INVARIANT_MATH 0x1 +#define SORT_JAPANESE_UNICODE 0x1 +#define SORT_CHINESE_UNICODE 0x1 +#define SORT_KOREAN_UNICODE 0x1 +#define SORT_GERMAN_PHONE_BOOK 0x1 +#define SORT_HUNGARIAN_TECHNICAL 0x1 +#define SORT_GEORGIAN_MODERN 0x1 +#define VS_VERSION_INFO 1 +#define VFFF_ISSHAREDFILE 0x0001 +#define VFF_CURNEDEST 0x0001 +#define VIFF_FORCEINSTALL 0x0001 +#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 +#define SW_SHOWMINIMIZED 2 +#define SHOW_ICONWINDOW 2 +#define SW_OTHERZOOM 2 +#define VK_RBUTTON 0x02 +#define WM_DESTROY 0x0002 +#define WA_CLICKACTIVE 2 +#define PWR_SUSPENDRESUME 2 +#define NFR_UNICODE 2 +#define UIS_CLEAR 2 +#define UISF_HIDEACCEL 0x2 +#define XBUTTON2 0x0002 +#define WMSZ_RIGHT 2 +#define HTCAPTION 2 +#define SMTO_ABORTIFHUNG 0x0002 +#define MA_ACTIVATEANDEAT 2 +#define ICON_SMALL2 2 +#define SIZE_MAXIMIZED 2 +#define MK_RBUTTON 0x0002 +#define TME_LEAVE 0x00000002 +#define CS_HREDRAW 0x0002 +#define CF_BITMAP 2 +#define IDCANCEL 2 +#define BN_HILITE 2 +#define BST_INDETERMINATE 0x0002 +#define HDS_BUTTONS 0x0002 +#define TBSTYLE_CHECK 0x0002 +#define TTS_NOPREFIX 0x02 +#define TBS_VERT 0x0002 +#define UDS_SETBUDDYINT 0x0002 +#define LWS_IGNORERETURN 0x0002 +#define LVS_SMALLICON 0x0002 +#define TVS_HASLINES 0x0002 +#define TVS_EX_MULTISELECT 0x0002 +#define TCS_BOTTOM 0x0002 +#define TCS_RIGHT 0x0002 +#define ACS_TRANSPARENT 0x0002 +#define MCS_MULTISELECT 0x0002 +#define DTS_SHOWNONE 0x0002 +#define PGS_AUTOSCROLL 0x00000002 +#define NFS_STATIC 0x0002 +#define BCSIF_IMAGE 0x0002 +#define BCSS_STRETCH 0x0002 +#define LANG_BULGARIAN 0x02 +#define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_ARABIC_IRAQ 0x02 +#define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 +#define SUBLANG_DUTCH_BELGIAN 0x02 +#define SUBLANG_ENGLISH_UK 0x02 +#define SUBLANG_FRENCH_BELGIAN 0x02 +#define SUBLANG_GERMAN_SWISS 0x02 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 +#define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_KASHMIRI_SASIA 0x02 +#define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MONGOLIAN_PRC 0x02 +#define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_PORTUGUESE 0x02 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SERBIAN_LATIN 0x02 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SPANISH_MEXICAN 0x02 +#define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_URDU_INDIA 0x02 +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SORT_CHINESE_PRC 0x2 +#define VFF_FILEINUSE 0x0002 +#define VIFF_DONTDELETEOLD 0x0002 +#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SHOW_FULLSCREEN 3 +#define SW_PARENTOPENING 3 +#define VK_CANCEL 0x03 +#define WM_MOVE 0x0003 +#define PWR_CRITICALRESUME 3 +#define NF_QUERY 3 +#define UIS_INITIALIZE 3 +#define WMSZ_TOP 3 +#define HTSYSMENU 3 +#define MA_NOACTIVATE 3 +#define SIZE_MAXSHOW 3 +#define CF_METAFILEPICT 3 +#define IDABORT 3 +#define BN_UNHILITE 3 +#define LVS_LIST 0x0003 +#define LVS_TYPEMASK 0x0003 +#define LANG_CATALAN 0x03 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_ARABIC_EGYPT 0x03 +#define SUBLANG_CHINESE_HONGKONG 0x03 +#define SUBLANG_ENGLISH_AUS 0x03 +#define SUBLANG_FRENCH_CANADIAN 0x03 +#define SUBLANG_GERMAN_AUSTRIAN 0x03 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SPANISH_MODERN 0x03 +#define SORT_CHINESE_BOPOMOFO 0x3 +#define SW_SHOWNOACTIVATE 4 +#define SHOW_OPENNOACTIVATE 4 +#define SW_OTHERUNZOOM 4 +#define VK_MBUTTON 0x04 +#define NF_REQUERY 4 +#define UISF_ACTIVE 0x4 +#define WMSZ_TOPLEFT 4 +#define HTGROWBOX 4 +#define MA_NOACTIVATEANDEAT 4 +#define SIZE_MAXHIDE 4 +#define MK_SHIFT 0x0004 +#define CF_SYLK 4 +#define IDRETRY 4 +#define BN_DISABLE 4 +#define BST_PUSHED 0x0004 +#define HDS_HOTTRACK 0x0004 +#define TBSTYLE_GROUP 0x0004 +#define TBS_TOP 0x0004 +#define TBS_LEFT 0x0004 +#define UDS_ALIGNRIGHT 0x0004 +#define PBS_VERTICAL 0x04 +#define LWS_NOPREFIX 0x0004 +#define LVS_SINGLESEL 0x0004 +#define TVS_LINESATROOT 0x0004 +#define TVS_EX_DOUBLEBUFFER 0x0004 +#define TCS_MULTISELECT 0x0004 +#define ACS_AUTOPLAY 0x0004 +#define MCS_WEEKNUMBERS 0x0004 +#define DTS_LONGDATEFORMAT 0x0004 +#define PGS_DRAGNDROP 0x00000004 +#define NFS_LISTCOMBO 0x0004 +#define BCSIF_STYLE 0x0004 +#define BCSS_ALIGNLEFT 0x0004 +#define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_ARABIC_LIBYA 0x04 +#define SUBLANG_CHINESE_SINGAPORE 0x04 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_ENGLISH_CAN 0x04 +#define SUBLANG_FRENCH_SWISS 0x04 +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#define SORT_JAPANESE_RADICALSTROKE 0x4 +#define VFF_BUFFTOOSMALL 0x0004 +#define SW_SHOW 5 +#define VK_XBUTTON1 0x05 +#define WM_SIZE 0x0005 +#define WMSZ_TOPRIGHT 5 +#define HTMENU 5 +#define CF_DIF 5 +#define IDIGNORE 5 +#define BN_DOUBLECLICKED 5 +#define LANG_CZECH 0x05 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_ARABIC_ALGERIA 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_ENGLISH_NZ 0x05 +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#define SW_MINIMIZE 6 +#define VK_XBUTTON2 0x06 +#define WM_ACTIVATE 0x0006 +#define WMSZ_BOTTOM 6 +#define HTHSCROLL 6 +#define CF_TIFF 6 +#define IDYES 6 +#define BN_SETFOCUS 6 +#define LANG_DANISH 0x06 +#define SUBLANG_ARABIC_MOROCCO 0x06 +#define SUBLANG_ENGLISH_EIRE 0x06 +#define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SPANISH_PANAMA 0x06 +#define SW_SHOWMINNOACTIVE 7 +#define WM_SETFOCUS 0x0007 +#define WMSZ_BOTTOMLEFT 7 +#define HTVSCROLL 7 +#define CF_OEMTEXT 7 +#define IDNO 7 +#define BN_KILLFOCUS 7 +#define LANG_GERMAN 0x07 +#define SUBLANG_ARABIC_TUNISIA 0x07 +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#define SW_SHOWNA 8 +#define VK_BACK 0x08 +#define WM_KILLFOCUS 0x0008 +#define WMSZ_BOTTOMRIGHT 8 +#define HTMINBUTTON 8 +#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 +#define MK_CONTROL 0x0008 +#define CS_DBLCLKS 0x0008 +#define CF_DIB 8 +#define IDCLOSE 8 +#define BST_FOCUS 0x0008 +#define HDS_HIDDEN 0x0008 +#define TBSTYLE_DROPDOWN 0x0008 +#define TBS_BOTH 0x0008 +#define UDS_ALIGNLEFT 0x0008 +#define PBS_MARQUEE 0x08 +#define LWS_USEVISUALSTYLE 0x0008 +#define LVS_SHOWSELALWAYS 0x0008 +#define TVS_EDITLABELS 0x0008 +#define TVS_EX_NOINDENTSTATE 0x0008 +#define TCS_FLATBUTTONS 0x0008 +#define ACS_TIMER 0x0008 +#define MCS_NOTODAYCIRCLE 0x0008 +#define NFS_BUTTON 0x0008 +#define BCSIF_SIZE 0x0008 +#define BCSS_IMAGE 0x0008 +#define LANG_GREEK 0x08 +#define SUBLANG_ARABIC_OMAN 0x08 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#define SW_RESTORE 9 +#define VK_TAB 0x09 +#define HTMAXBUTTON 9 +#define CF_PALETTE 9 +#define IDHELP 9 +#define DTS_TIMEFORMAT 0x0009 +#define LANG_ENGLISH 0x09 +#define SUBLANG_ARABIC_YEMEN 0x09 +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#define SW_SHOWDEFAULT 10 +#define WM_ENABLE 0x000A +#define HTLEFT 10 +#define CF_PENDATA 10 +#define IDTRYAGAIN 10 +#define HELP_CONTEXTMENU 0x000a +#define LANG_SPANISH 0x0a +#define SUBLANG_ARABIC_SYRIA 0x0a +#define SUBLANG_ENGLISH_BELIZE 0x0a +#define SUBLANG_SPANISH_PERU 0x0a +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 +#define WM_SETREDRAW 0x000B +#define HTRIGHT 11 +#define CF_RIFF 11 +#define IDCONTINUE 11 +#define HELP_FINDER 0x000b +#define LANG_FINNISH 0x0b +#define SUBLANG_ARABIC_JORDAN 0x0b +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#define VK_CLEAR 0x0C +#define WM_SETTEXT 0x000C +#define HTTOP 12 +#define CF_WAVE 12 +#define HELP_WM_HELP 0x000c +#define DTS_SHORTDATECENTURYFORMAT 0x000C +#define LANG_FRENCH 0x0c +#define SUBLANG_ARABIC_LEBANON 0x0c +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#define SUBLANG_SPANISH_ECUADOR 0x0c +#define VK_RETURN 0x0D +#define WM_GETTEXT 0x000D +#define HTTOPLEFT 13 +#define CF_UNICODETEXT 13 +#define HELP_SETPOPUP_POS 0x000d +#define LANG_HEBREW 0x0d +#define SUBLANG_ARABIC_KUWAIT 0x0d +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_SPANISH_CHILE 0x0d +#define WM_GETTEXTLENGTH 0x000E +#define HTTOPRIGHT 14 +#define CF_ENHMETAFILE 14 +#define LANG_HUNGARIAN 0x0e +#define SUBLANG_ARABIC_UAE 0x0e +#define SUBLANG_SPANISH_URUGUAY 0x0e +#define WM_PAINT 0x000F +#define HTBOTTOM 15 +#define CF_HDROP 15 +#define LANG_ICELANDIC 0x0f +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 +#define VK_SHIFT 0x10 +#define WM_CLOSE 0x0010 +#define HTBOTTOMLEFT 16 +#define WVR_ALIGNTOP 0x0010 +#define MK_MBUTTON 0x0010 +#define TME_NONCLIENT 0x00000010 +#define CF_LOCALE 16 +#define HELP_TCARD_DATA 0x0010 +#define TBSTYLE_AUTOSIZE 0x0010 +#define TTS_NOANIMATE 0x10 +#define TBS_NOTICKS 0x0010 +#define UDS_AUTOBUDDY 0x0010 +#define PBS_SMOOTHREVERSE 0x10 +#define LWS_USECUSTOMTEXT 0x0010 +#define LVS_SORTASCENDING 0x0010 +#define TVS_DISABLEDRAGDROP 0x0010 +#define TVS_EX_RICHTOOLTIP 0x0010 +#define TCS_FORCEICONLEFT 0x0010 +#define MCS_NOTODAY 0x0010 +#define DTS_APPCANPARSE 0x0010 +#define NFS_ALL 0x0010 +#define LANG_ITALIAN 0x10 +#define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#define VK_CONTROL 0x11 +#define WM_QUERYENDSESSION 0x0011 +#define HTBOTTOMRIGHT 17 +#define CF_DIBV5 17 +#define HELP_TCARD_OTHER_CALLER 0x0011 +#define LANG_JAPANESE 0x11 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define VK_MENU 0x12 +#define WM_QUIT 0x0012 +#define HTBORDER 18 +#define CF_MAX 18 +#define LANG_KOREAN 0x12 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define VK_PAUSE 0x13 +#define WM_QUERYOPEN 0x0013 +#define HTOBJECT 19 +#define LANG_DUTCH 0x13 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define VK_CAPITAL 0x14 +#define WM_ERASEBKGND 0x0014 +#define HTCLOSE 20 +#define LANG_NORWEGIAN 0x14 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define VK_KANA 0x15 +#define VK_HANGEUL 0x15 +#define VK_HANGUL 0x15 +#define WM_SYSCOLORCHANGE 0x0015 +#define HTHELP 21 +#define LANG_POLISH 0x15 +#define SUBLANG_SPANISH_US 0x15 +#define WM_ENDSESSION 0x0016 +#define LANG_PORTUGUESE 0x16 +#define VK_JUNJA 0x17 +#define LANG_ROMANSH 0x17 +#define RT_MANIFEST 24 +#define VK_FINAL 0x18 +#define WM_SHOWWINDOW 0x0018 +#define LANG_ROMANIAN 0x18 +#define VK_HANJA 0x19 +#define VK_KANJI 0x19 +#define LANG_RUSSIAN 0x19 +#define WM_WININICHANGE 0x001A +#define LANG_BOSNIAN 0x1a +#define LANG_CROATIAN 0x1a +#define LANG_SERBIAN 0x1a +#define VK_ESCAPE 0x1B +#define WM_DEVMODECHANGE 0x001B +#define LANG_SLOVAK 0x1b +#define VK_CONVERT 0x1C +#define WM_ACTIVATEAPP 0x001C +#define LANG_ALBANIAN 0x1c +#define VK_NONCONVERT 0x1D +#define WM_FONTCHANGE 0x001D +#define LANG_SWEDISH 0x1d +#define VK_ACCEPT 0x1E +#define WM_TIMECHANGE 0x001E +#define LANG_THAI 0x1e +#define VK_MODECHANGE 0x1F +#define WM_CANCELMODE 0x001F +#define LANG_TURKISH 0x1f +#define VK_SPACE 0x20 +#define WM_SETCURSOR 0x0020 +#define SMTO_ERRORONEXIT 0x0020 +#define WVR_ALIGNLEFT 0x0020 +#define MK_XBUTTON1 0x0020 +#define CS_OWNDC 0x0020 +#define TBSTYLE_NOPREFIX 0x0020 +#define TTS_NOFADE 0x20 +#define TBS_ENABLESELRANGE 0x0020 +#define UDS_ARROWKEYS 0x0020 +#define LWS_RIGHT 0x0020 +#define LVS_SORTDESCENDING 0x0020 +#define TVS_SHOWSELALWAYS 0x0020 +#define TVS_EX_AUTOHSCROLL 0x0020 +#define TCS_FORCELABELLEFT 0x0020 +#define DTS_RIGHTALIGN 0x0020 +#define NFS_USEFONTASSOC 0x0020 +#define LANG_URDU 0x20 +#define VK_PRIOR 0x21 +#define WM_MOUSEACTIVATE 0x0021 +#define LANG_INDONESIAN 0x21 +#define VK_NEXT 0x22 +#define WM_CHILDACTIVATE 0x0022 +#define LANG_UKRAINIAN 0x22 +#define VK_END 0x23 +#define WM_QUEUESYNC 0x0023 +#define LANG_BELARUSIAN 0x23 +#define VK_HOME 0x24 +#define WM_GETMINMAXINFO 0x0024 +#define LANG_SLOVENIAN 0x24 +#define VK_LEFT 0x25 +#define LANG_ESTONIAN 0x25 +#define VK_UP 0x26 +#define WM_PAINTICON 0x0026 +#define LANG_LATVIAN 0x26 +#define VK_RIGHT 0x27 +#define WM_ICONERASEBKGND 0x0027 +#define LANG_LITHUANIAN 0x27 +#define VK_DOWN 0x28 +#define WM_NEXTDLGCTL 0x0028 +#define LANG_TAJIK 0x28 +#define VK_SELECT 0x29 +#define LANG_FARSI 0x29 +#define LANG_PERSIAN 0x29 +#define VK_PRINT 0x2A +#define WM_SPOOLERSTATUS 0x002A +#define LANG_VIETNAMESE 0x2a +#define VK_EXECUTE 0x2B +#define WM_DRAWITEM 0x002B +#define LANG_ARMENIAN 0x2b +#define VK_SNAPSHOT 0x2C +#define WM_MEASUREITEM 0x002C +#define LANG_AZERI 0x2c +#define VK_INSERT 0x2D +#define WM_DELETEITEM 0x002D +#define LANG_BASQUE 0x2d +#define VK_DELETE 0x2E +#define WM_VKEYTOITEM 0x002E +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_UPPER_SORBIAN 0x2e +#define VK_HELP 0x2F +#define WM_CHARTOITEM 0x002F +#define LANG_MACEDONIAN 0x2f +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 +#define WM_SETHOTKEY 0x0032 +#define LANG_TSWANA 0x32 +#define WM_GETHOTKEY 0x0033 +#define LANG_XHOSA 0x34 +#define LANG_ZULU 0x35 +#define LANG_AFRIKAANS 0x36 +#define WM_QUERYDRAGICON 0x0037 +#define LANG_GEORGIAN 0x37 +#define LANG_FAEROESE 0x38 +#define WM_COMPAREITEM 0x0039 +#define LANG_HINDI 0x39 +#define LANG_MALTESE 0x3a +#define LANG_SAMI 0x3b +#define LANG_IRISH 0x3c +#define WM_GETOBJECT 0x003D +#define LANG_MALAY 0x3e +#define LANG_KAZAK 0x3f +#define WVR_ALIGNBOTTOM 0x0040 +#define MK_XBUTTON2 0x0040 +#define CS_CLASSDC 0x0040 +#define HDS_DRAGDROP 0x0040 +#define BTNS_SHOWTEXT 0x0040 +#define TTS_BALLOON 0x40 +#define TBS_FIXEDLENGTH 0x0040 +#define UDS_HORZ 0x0040 +#define LVS_SHAREIMAGELISTS 0x0040 +#define TVS_RTLREADING 0x0040 +#define TVS_EX_FADEINOUTEXPANDOS 0x0040 +#define TCS_HOTTRACK 0x0040 +#define MCS_NOTRAILINGDATES 0x0040 +#define LANG_KYRGYZ 0x40 +#define WM_COMPACTING 0x0041 +#define LANG_SWAHILI 0x41 +#define LANG_TURKMEN 0x42 +#define LANG_UZBEK 0x43 +#define WM_COMMNOTIFY 0x0044 +#define LANG_TATAR 0x44 +#define LANG_BENGALI 0x45 +#define WM_WINDOWPOSCHANGING 0x0046 +#define LANG_PUNJABI 0x46 +#define WM_WINDOWPOSCHANGED 0x0047 +#define LANG_GUJARATI 0x47 +#define WM_POWER 0x0048 +#define LANG_ORIYA 0x48 +#define LANG_TAMIL 0x49 +#define WM_COPYDATA 0x004A +#define LANG_TELUGU 0x4a +#define WM_CANCELJOURNAL 0x004B +#define LANG_KANNADA 0x4b +#define LANG_MALAYALAM 0x4c +#define LANG_ASSAMESE 0x4d +#define WM_NOTIFY 0x004E +#define LANG_MARATHI 0x4e +#define LANG_SANSKRIT 0x4f +#define WM_INPUTLANGCHANGEREQUEST 0x0050 +#define LANG_MONGOLIAN 0x50 +#define WM_INPUTLANGCHANGE 0x0051 +#define LANG_TIBETAN 0x51 +#define WM_TCARD 0x0052 +#define LANG_WELSH 0x52 +#define WM_HELP 0x0053 +#define LANG_KHMER 0x53 +#define WM_USERCHANGED 0x0054 +#define LANG_LAO 0x54 +#define WM_NOTIFYFORMAT 0x0055 +#define LANG_GALICIAN 0x56 +#define LANG_KONKANI 0x57 +#define LANG_MANIPURI 0x58 +#define LANG_SINDHI 0x59 +#define LANG_SYRIAC 0x5a +#define VK_LWIN 0x5B +#define LANG_SINHALESE 0x5b +#define VK_RWIN 0x5C +#define VK_APPS 0x5D +#define LANG_INUKTITUT 0x5d +#define LANG_AMHARIC 0x5e +#define VK_SLEEP 0x5F +#define LANG_TAMAZIGHT 0x5f +#define VK_NUMPAD0 0x60 +#define LANG_KASHMIRI 0x60 +#define VK_NUMPAD1 0x61 +#define LANG_NEPALI 0x61 +#define VK_NUMPAD2 0x62 +#define LANG_FRISIAN 0x62 +#define VK_NUMPAD3 0x63 +#define LANG_PASHTO 0x63 +#define VK_NUMPAD4 0x64 +#define LANG_FILIPINO 0x64 +#define VS_USER_DEFINED 100 +#define VK_NUMPAD5 0x65 +#define LANG_DIVEHI 0x65 +#define VK_NUMPAD6 0x66 +#define VK_NUMPAD7 0x67 +#define VK_NUMPAD8 0x68 +#define LANG_HAUSA 0x68 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define LANG_YORUBA 0x6a +#define VK_ADD 0x6B +#define LANG_QUECHUA 0x6b +#define VK_SEPARATOR 0x6C +#define LANG_SOTHO 0x6c +#define VK_SUBTRACT 0x6D +#define LANG_BASHKIR 0x6d +#define VK_DECIMAL 0x6E +#define LANG_LUXEMBOURGISH 0x6e +#define VK_DIVIDE 0x6F +#define LANG_GREENLANDIC 0x6f +#define VK_F1 0x70 +#define LANG_IGBO 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define LANG_TIGRIGNA 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define WHEEL_DELTA 120 +#define LANG_YI 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define LANG_MAPUDUNGUN 0x7a +#define VK_F12 0x7B +#define WM_CONTEXTMENU 0x007B +#define VK_F13 0x7C +#define WM_STYLECHANGING 0x007C +#define LANG_MOHAWK 0x7c +#define VK_F14 0x7D +#define WM_STYLECHANGED 0x007D +#define VK_F15 0x7E +#define WM_DISPLAYCHANGE 0x007E +#define LANG_BRETON 0x7e +#define VK_F16 0x7F +#define WM_GETICON 0x007F +#define LANG_INVARIANT 0x7f +#define VK_F17 0x80 +#define WM_SETICON 0x0080 +#define WVR_ALIGNRIGHT 0x0080 +#define CS_PARENTDC 0x0080 +#define CF_OWNERDISPLAY 0x0080 +#define HDS_FULLDRAG 0x0080 +#define BTNS_WHOLEDROPDOWN 0x0080 +#define TTS_CLOSE 0x80 +#define TBS_NOTHUMB 0x0080 +#define UDS_NOTHOUSANDS 0x0080 +#define LVS_NOLABELWRAP 0x0080 +#define TVS_NOTOOLTIPS 0x0080 +#define TVS_EX_PARTIALCHECKBOXES 0x0080 +#define TCS_VERTICAL 0x0080 +#define MCS_SHORTDAYSOFWEEK 0x0080 +#define LANG_UIGHUR 0x80 +#define VK_F18 0x81 +#define WM_NCCREATE 0x0081 +#define CF_DSPTEXT 0x0081 +#define LANG_MAORI 0x81 +#define VK_F19 0x82 +#define WM_NCDESTROY 0x0082 +#define CF_DSPBITMAP 0x0082 +#define LANG_OCCITAN 0x82 +#define VK_F20 0x83 +#define WM_NCCALCSIZE 0x0083 +#define CF_DSPMETAFILEPICT 0x0083 +#define LANG_CORSICAN 0x83 +#define VK_F21 0x84 +#define WM_NCHITTEST 0x0084 +#define LANG_ALSATIAN 0x84 +#define VK_F22 0x85 +#define WM_NCPAINT 0x0085 +#define LANG_YAKUT 0x85 +#define VK_F23 0x86 +#define WM_NCACTIVATE 0x0086 +#define LANG_KICHE 0x86 +#define VK_F24 0x87 +#define WM_GETDLGCODE 0x0087 +#define LANG_KINYARWANDA 0x87 +#define WM_SYNCPAINT 0x0088 +#define LANG_WOLOF 0x88 +#define LANG_DARI 0x8c +#define CF_DSPENHMETAFILE 0x008E +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 +#define VK_OEM_NEC_EQUAL 0x92 +#define VK_OEM_FJ_JISHO 0x92 +#define VK_OEM_FJ_MASSHOU 0x93 +#define VK_OEM_FJ_TOUROKU 0x94 +#define VK_OEM_FJ_LOYA 0x95 +#define VK_OEM_FJ_ROYA 0x96 +#define IDI_ICON1 155 +#define VK_LSHIFT 0xA0 +#define WM_NCMOUSEMOVE 0x00A0 +#define VK_RSHIFT 0xA1 +#define WM_NCLBUTTONDOWN 0x00A1 +#define VK_LCONTROL 0xA2 +#define WM_NCLBUTTONUP 0x00A2 +#define VK_RCONTROL 0xA3 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define VK_LMENU 0xA4 +#define WM_NCRBUTTONDOWN 0x00A4 +#define VK_RMENU 0xA5 +#define WM_NCRBUTTONUP 0x00A5 +#define VK_BROWSER_BACK 0xA6 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define VK_BROWSER_FORWARD 0xA7 +#define WM_NCMBUTTONDOWN 0x00A7 +#define VK_BROWSER_REFRESH 0xA8 +#define WM_NCMBUTTONUP 0x00A8 +#define VK_BROWSER_STOP 0xA9 +#define WM_NCMBUTTONDBLCLK 0x00A9 +#define VK_BROWSER_SEARCH 0xAA +#define VK_BROWSER_FAVORITES 0xAB +#define WM_NCXBUTTONDOWN 0x00AB +#define VK_BROWSER_HOME 0xAC +#define WM_NCXBUTTONUP 0x00AC +#define VK_VOLUME_MUTE 0xAD +#define WM_NCXBUTTONDBLCLK 0x00AD +#define VK_VOLUME_DOWN 0xAE +#define VK_VOLUME_UP 0xAF +#define VK_MEDIA_NEXT_TRACK 0xB0 +#define EM_GETSEL 0x00B0 +#define VK_MEDIA_PREV_TRACK 0xB1 +#define EM_SETSEL 0x00B1 +#define VK_MEDIA_STOP 0xB2 +#define EM_GETRECT 0x00B2 +#define VK_MEDIA_PLAY_PAUSE 0xB3 +#define EM_SETRECT 0x00B3 +#define VK_LAUNCH_MAIL 0xB4 +#define EM_SETRECTNP 0x00B4 +#define VK_LAUNCH_MEDIA_SELECT 0xB5 +#define EM_SCROLL 0x00B5 +#define VK_LAUNCH_APP1 0xB6 +#define EM_LINESCROLL 0x00B6 +#define VK_LAUNCH_APP2 0xB7 +#define EM_SCROLLCARET 0x00B7 +#define EM_GETMODIFY 0x00B8 +#define EM_SETMODIFY 0x00B9 +#define VK_OEM_1 0xBA +#define EM_GETLINECOUNT 0x00BA +#define VK_OEM_PLUS 0xBB +#define EM_LINEINDEX 0x00BB +#define VK_OEM_COMMA 0xBC +#define EM_SETHANDLE 0x00BC +#define VK_OEM_MINUS 0xBD +#define EM_GETHANDLE 0x00BD +#define VK_OEM_PERIOD 0xBE +#define EM_GETTHUMB 0x00BE +#define VK_OEM_2 0xBF +#define VK_OEM_3 0xC0 +#define EM_LINELENGTH 0x00C1 +#define EM_REPLACESEL 0x00C2 +#define EM_GETLINE 0x00C4 +#define EM_LIMITTEXT 0x00C5 +#define EM_CANUNDO 0x00C6 +#define EM_UNDO 0x00C7 +#define EM_FMTLINES 0x00C8 +#define EM_LINEFROMCHAR 0x00C9 +#define EM_SETTABSTOPS 0x00CB +#define EM_SETPASSWORDCHAR 0x00CC +#define EM_EMPTYUNDOBUFFER 0x00CD +#define EM_GETFIRSTVISIBLELINE 0x00CE +#define EM_SETREADONLY 0x00CF +#define EM_SETWORDBREAKPROC 0x00D0 +#define EM_GETWORDBREAKPROC 0x00D1 +#define EM_GETPASSWORDCHAR 0x00D2 +#define EM_SETMARGINS 0x00D3 +#define EM_GETMARGINS 0x00D4 +#define EM_GETLIMITTEXT 0x00D5 +#define EM_POSFROMCHAR 0x00D6 +#define EM_CHARFROMPOS 0x00D7 +#define EM_SETIMESTATUS 0x00D8 +#define EM_GETIMESTATUS 0x00D9 +#define VK_OEM_4 0xDB +#define VK_OEM_5 0xDC +#define VK_OEM_6 0xDD +#define VK_OEM_7 0xDE +#define VK_OEM_8 0xDF +#define VK_OEM_AX 0xE1 +#define VK_OEM_102 0xE2 +#define VK_ICO_HELP 0xE3 +#define VK_ICO_00 0xE4 +#define VK_PROCESSKEY 0xE5 +#define VK_ICO_CLEAR 0xE6 +#define VK_PACKET 0xE7 +#define VK_OEM_RESET 0xE9 +#define VK_OEM_JUMP 0xEA +#define VK_OEM_PA1 0xEB +#define VK_OEM_PA2 0xEC +#define VK_OEM_PA3 0xED +#define VK_OEM_WSCTRL 0xEE +#define VK_OEM_CUSEL 0xEF +#define VK_OEM_ATTN 0xF0 +#define BM_GETCHECK 0x00F0 +#define VK_OEM_FINISH 0xF1 +#define BM_SETCHECK 0x00F1 +#define VK_OEM_COPY 0xF2 +#define BM_GETSTATE 0x00F2 +#define VK_OEM_AUTO 0xF3 +#define BM_SETSTATE 0x00F3 +#define VK_OEM_ENLW 0xF4 +#define BM_SETSTYLE 0x00F4 +#define VK_OEM_BACKTAB 0xF5 +#define BM_CLICK 0x00F5 +#define VK_ATTN 0xF6 +#define BM_GETIMAGE 0x00F6 +#define VK_CRSEL 0xF7 +#define BM_SETIMAGE 0x00F7 +#define VK_EXSEL 0xF8 +#define BM_SETDONTCLICK 0x00F8 +#define VK_EREOF 0xF9 +#define VK_PLAY 0xFA +#define VK_ZOOM 0xFB +#define VK_NONAME 0xFC +#define VK_PA1 0xFD +#define VK_OEM_CLEAR 0xFE +#define WM_INPUT_DEVICE_CHANGE 0x00FE +#define SUBVERSION_MASK 0x000000FF +#define WM_INPUT 0x00FF +#define WM_KEYFIRST 0x0100 +#define WM_KEYDOWN 0x0100 +#define WVR_HREDRAW 0x0100 +#define HDS_FILTERBAR 0x0100 +#define TBSTYLE_TOOLTIPS 0x0100 +#define TTS_USEVISUALSTYLE 0x100 +#define SBARS_SIZEGRIP 0x0100 +#define TBS_TOOLTIPS 0x0100 +#define UDS_HOTTRACK 0x0100 +#define LVS_AUTOARRANGE 0x0100 +#define TVS_CHECKBOXES 0x0100 +#define TVS_EX_EXCLUSIONCHECKBOXES 0x0100 +#define TCS_BUTTONS 0x0100 +#define MCS_NOSELCHANGEONNAV 0x0100 +#define RBS_TOOLTIPS 0x0100 +#define WM_KEYUP 0x0101 +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 +#define WM_UNICHAR 0x0109 +#define WM_KEYLAST 0x0109 +#define WM_IME_STARTCOMPOSITION 0x010D +#define WM_IME_ENDCOMPOSITION 0x010E +#define WM_IME_COMPOSITION 0x010F +#define WM_IME_KEYLAST 0x010F +#define WM_INITDIALOG 0x0110 +#define WM_COMMAND 0x0111 +#define WM_SYSCOMMAND 0x0112 +#define WM_TIMER 0x0113 +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 +#define WM_ENTERIDLE 0x0121 +#define WM_MENURBUTTONUP 0x0122 +#define WM_MENUDRAG 0x0123 +#define WM_MENUGETOBJECT 0x0124 +#define WM_UNINITMENUPOPUP 0x0125 +#define WM_MENUCOMMAND 0x0126 +#define WM_CHANGEUISTATE 0x0127 +#define WM_UPDATEUISTATE 0x0128 +#define WM_QUERYUISTATE 0x0129 +#define WM_CTLCOLORMSGBOX 0x0132 +#define WM_CTLCOLOREDIT 0x0133 +#define WM_CTLCOLORLISTBOX 0x0134 +#define WM_CTLCOLORBTN 0x0135 +#define WM_CTLCOLORDLG 0x0136 +#define WM_CTLCOLORSCROLLBAR 0x0137 +#define WM_CTLCOLORSTATIC 0x0138 +#define MN_GETHMENU 0x01E1 +#define _WIN32_IE_IE20 0x0200 +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSEMOVE 0x0200 +#define WVR_VREDRAW 0x0200 +#define CS_NOCLOSE 0x0200 +#define CF_PRIVATEFIRST 0x0200 +#define HDS_FLAT 0x0200 +#define TBSTYLE_WRAPABLE 0x0200 +#define TBS_REVERSED 0x0200 +#define LVS_EDITLABELS 0x0200 +#define TVS_TRACKSELECT 0x0200 +#define TVS_EX_DIMMEDCHECKBOXES 0x0200 +#define TCS_MULTILINE 0x0200 +#define RBS_VARHEIGHT 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 +#define WM_MOUSEWHEEL 0x020A +#define WM_XBUTTONDOWN 0x020B +#define WM_XBUTTONUP 0x020C +#define WM_XBUTTONDBLCLK 0x020D +//#define WM_MOUSELAST 0x020D +#define WM_MOUSEHWHEEL 0x020E +#define WM_PARENTNOTIFY 0x0210 +#define WM_ENTERMENULOOP 0x0211 +#define WM_EXITMENULOOP 0x0212 +#define WM_NEXTMENU 0x0213 +#define WM_SIZING 0x0214 +#define WM_CAPTURECHANGED 0x0215 +#define WM_MOVING 0x0216 +#define WM_POWERBROADCAST 0x0218 +#define WM_DEVICECHANGE 0x0219 +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 +#define WM_ENTERSIZEMOVE 0x0231 +#define WM_EXITSIZEMOVE 0x0232 +#define WM_DROPFILES 0x0233 +#define WM_MDIREFRESHMENU 0x0234 +#define WM_IME_SETCONTEXT 0x0281 +#define WM_IME_NOTIFY 0x0282 +#define WM_IME_CONTROL 0x0283 +#define WM_IME_COMPOSITIONFULL 0x0284 +#define WM_IME_SELECT 0x0285 +#define WM_IME_CHAR 0x0286 +#define WM_IME_REQUEST 0x0288 +#define WM_IME_KEYDOWN 0x0290 +#define WM_IME_KEYUP 0x0291 +#define WM_NCMOUSEHOVER 0x02A0 +#define WM_MOUSEHOVER 0x02A1 +#define WM_NCMOUSELEAVE 0x02A2 +#define WM_MOUSELEAVE 0x02A3 +#define WM_WTSSESSION_CHANGE 0x02B1 +#define WM_TABLET_FIRST 0x02c0 +#define WM_TABLET_LAST 0x02df +#define CF_PRIVATELAST 0x02FF +#define _WIN32_IE_IE30 0x0300 +#define WM_CUT 0x0300 +#define CF_GDIOBJFIRST 0x0300 +#define WM_COPY 0x0301 +#define _WIN32_IE_IE302 0x0302 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_SIZECLIPBOARD 0x030B +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 +#define WM_HOTKEY 0x0312 +#define WM_PRINT 0x0317 +#define WM_PRINTCLIENT 0x0318 +#define WM_APPCOMMAND 0x0319 +#define WM_THEMECHANGED 0x031A +#define WM_CLIPBOARDUPDATE 0x031D +#define WM_DWMCOMPOSITIONCHANGED 0x031E +#define WM_DWMNCRENDERINGCHANGED 0x031F +#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 +#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 +#define WM_GETTITLEBARINFOEX 0x033F +#define WM_HANDHELDFIRST 0x0358 +#define WM_HANDHELDLAST 0x035F +#define WM_AFXFIRST 0x0360 +#define WM_AFXLAST 0x037F +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F +#define WM_DDE_FIRST 0x03E0 +#define CF_GDIOBJLAST 0x03FF +#define _WIN32_WINNT_NT4 0x0400 +#define _WIN32_IE_IE40 0x0400 +#define WM_USER 0x0400 +#define WVR_VALIDRECTS 0x0400 +#define HDS_CHECKBOXES 0x0400 +#define TBSTYLE_ALTDRAG 0x0400 +#define TBS_DOWNISLEFT 0x0400 +#define LVS_OWNERDRAWFIXED 0x0400 +#define TVS_SINGLEEXPAND 0x0400 +#define TVS_EX_DRAWIMAGEASYNC 0x0400 +#define TCS_FIXEDWIDTH 0x0400 +#define ctlFirst 0x0400 +#define psh1 0x0400 +#define RBS_BANDBORDERS 0x0400 +#define _WIN32_IE_IE401 0x0401 +#define psh2 0x0401 +#define psh3 0x0402 +#define psh4 0x0403 +#define psh5 0x0404 +#define psh6 0x0405 +#define psh7 0x0406 +#define psh8 0x0407 +#define psh9 0x0408 +#define psh10 0x0409 +#define psh11 0x040a +#define psh12 0x040b +#define psh13 0x040c +#define psh14 0x040d +#define psh15 0x040e +#define psh16 0x040f +#define _WIN32_WINDOWS 0x0410 +#define chx1 0x0410 +#define chx2 0x0411 +#define chx3 0x0412 +#define chx4 0x0413 +#define chx5 0x0414 +#define chx6 0x0415 +#define chx7 0x0416 +#define chx8 0x0417 +#define chx9 0x0418 +#define chx10 0x0419 +#define chx11 0x041a +#define chx12 0x041b +#define chx13 0x041c +#define chx14 0x041d +#define chx15 0x041e +#define chx16 0x041f +#define rad1 0x0420 +#define rad2 0x0421 +#define rad3 0x0422 +#define rad4 0x0423 +#define rad5 0x0424 +#define rad6 0x0425 +#define rad7 0x0426 +#define rad8 0x0427 +#define rad9 0x0428 +#define rad10 0x0429 +#define rad11 0x042a +#define rad12 0x042b +#define rad13 0x042c +#define rad14 0x042d +#define rad15 0x042e +#define rad16 0x042f +#define grp1 0x0430 +#define grp2 0x0431 +#define grp3 0x0432 +#define grp4 0x0433 +#define frm1 0x0434 +#define frm2 0x0435 +#define frm3 0x0436 +#define frm4 0x0437 +#define rct1 0x0438 +#define rct2 0x0439 +#define rct3 0x043a +#define rct4 0x043b +#define ico1 0x043c +#define ico2 0x043d +#define ico3 0x043e +#define ico4 0x043f +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc5 0x0444 +#define stc6 0x0445 +#define stc7 0x0446 +#define stc8 0x0447 +#define stc9 0x0448 +#define stc10 0x0449 +#define stc11 0x044a +#define stc12 0x044b +#define stc13 0x044c +#define stc14 0x044d +#define stc15 0x044e +#define stc16 0x044f +#define stc17 0x0450 +#define stc18 0x0451 +#define stc19 0x0452 +#define stc20 0x0453 +#define stc21 0x0454 +#define stc22 0x0455 +#define stc23 0x0456 +#define stc24 0x0457 +#define stc25 0x0458 +#define stc26 0x0459 +#define stc27 0x045a +#define stc28 0x045b +#define stc29 0x045c +#define stc30 0x045d +#define stc31 0x045e +#define stc32 0x045f +#define lst1 0x0460 +#define lst2 0x0461 +#define lst3 0x0462 +#define lst4 0x0463 +#define lst5 0x0464 +#define lst6 0x0465 +#define lst7 0x0466 +#define lst8 0x0467 +#define lst9 0x0468 +#define lst10 0x0469 +#define lst11 0x046a +#define lst12 0x046b +#define lst13 0x046c +#define lst14 0x046d +#define lst15 0x046e +#define lst16 0x046f +#define cmb1 0x0470 +#define cmb2 0x0471 +#define cmb3 0x0472 +#define cmb4 0x0473 +#define cmb5 0x0474 +#define cmb6 0x0475 +#define cmb7 0x0476 +#define cmb8 0x0477 +#define cmb9 0x0478 +#define cmb10 0x0479 +#define cmb11 0x047a +#define cmb12 0x047b +#define cmb13 0x047c +#define cmb14 0x047d +#define cmb15 0x047e +#define cmb16 0x047f +#define edt1 0x0480 +#define edt2 0x0481 +#define edt3 0x0482 +#define edt4 0x0483 +#define edt5 0x0484 +#define edt6 0x0485 +#define edt7 0x0486 +#define edt8 0x0487 +#define edt9 0x0488 +#define edt10 0x0489 +#define edt11 0x048a +#define edt12 0x048b +#define edt13 0x048c +#define edt14 0x048d +#define edt15 0x048e +#define edt16 0x048f +#define scr1 0x0490 +#define scr2 0x0491 +#define scr3 0x0492 +#define scr4 0x0493 +#define scr5 0x0494 +#define scr6 0x0495 +#define scr7 0x0496 +#define scr8 0x0497 +#define ctl1 0x04A0 +#define ctlLast 0x04ff +#define _WIN32_WINNT_WIN2K 0x0500 +#define _WIN32_IE_IE50 0x0500 +#define _WIN32_WINNT_WINXP 0x0501 +#define _WIN32_IE_IE501 0x0501 +#define WINVER 0x0501 +#define _WIN32_WINNT_WS03 0x0502 +#define _WIN32_IE_IE55 0x0550 +#define _WIN32_WINNT_WIN6 0x0600 +#define _WIN32_WINNT_VISTA 0x0600 +#define _WIN32_WINNT_WS08 0x0600 +#define _WIN32_WINNT_LONGHORN 0x0600 +#define _WIN32_IE_IE60 0x0600 +#define _WIN32_WINNT 0x0600 +#define FILEOPENORD 1536 +#define _WIN32_IE_IE60SP1 0x0601 +#define MULTIFILEOPENORD 1537 +#define _WIN32_IE_WS03 0x0602 +#define PRINTDLGORD 1538 +#define _WIN32_IE_IE60SP2 0x0603 +#define PRNSETUPDLGORD 1539 +#define FINDDLGORD 1540 +#define REPLACEDLGORD 1541 +#define FONTDLGORD 1542 +#define FORMATDLGORD31 1543 +#define FORMATDLGORD30 1544 +#define RUNDLGORD 1545 +#define PAGESETUPDLGORD 1546 +#define NEWFILEOPENORD 1547 +#define PRINTDLGEXORD 1549 +#define PAGESETUPDLGORDMOTIF 1550 +#define COLORMGMTDLGORD 1551 +#define NEWFILEOPENV2ORD 1552 +#define NEWFILEOPENV3ORD 1553 +#define _WIN32_IE_IE70 0x0700 +#define _WIN32_IE 0x0700 +#define CS_SAVEBITS 0x0800 +#define HDS_NOSIZING 0x0800 +#define TBSTYLE_FLAT 0x0800 +#define SBARS_TOOLTIPS 0x0800 +#define SBT_TOOLTIPS 0x0800 +#define TBS_NOTIFYBEFOREMOVE 0x0800 +#define LVS_ALIGNLEFT 0x0800 +#define TVS_INFOTIP 0x0800 +#define TCS_RAGGEDRIGHT 0x0800 +//#define RBS_FIXEDORDER 0x0800 +#define LVS_ALIGNMASK 0x0c00 +#define CS_BYTEALIGNCLIENT 0x1000 +#define HDS_OVERFLOW 0x1000 +#define TBSTYLE_LIST 0x1000 +#define TBS_TRANSPARENTBKGND 0x1000 +#define LVS_OWNERDATA 0x1000 +#define TVS_FULLROWSELECT 0x1000 +#define TCS_FOCUSONBUTTONDOWN 0x1000 +//#define RBS_REGISTERDROP 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 +#define TBSTYLE_CUSTOMERASE 0x2000 +#define LVS_NOSCROLL 0x2000 +#define TVS_NOSCROLL 0x2000 +#define TCS_OWNERDRAWFIXED 0x2000 +#define RBS_AUTOSIZE 0x2000 +#define CS_GLOBALCLASS 0x4000 +#define TBSTYLE_REGISTERDROP 0x4000 +#define LVS_NOCOLUMNHEADER 0x4000 +#define TVS_NONEVENHEIGHT 0x4000 +#define TCS_TOOLTIPS 0x4000 +#define RBS_VERTICALGRIPPER 0x4000 +#define IDH_NO_HELP 28440 +#define IDH_MISSING_CONTEXT 28441 +#define IDH_GENERIC_HELP_BUTTON 28442 +#define IDH_OK 28443 +#define IDH_CANCEL 28444 +#define IDH_HELP 28445 +#define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_SERBIAN_NEUTRAL 0x7c1a +#define IDTIMEOUT 32000 +#define OCR_NORMAL 32512 +#define OIC_SAMPLE 32512 +#define IDI_APPLICATION 32512 +#define OCR_IBEAM 32513 +#define OIC_HAND 32513 +#define IDI_HAND 32513 +#define OCR_WAIT 32514 +#define OIC_QUES 32514 +#define IDI_QUESTION 32514 +#define OCR_CROSS 32515 +#define OIC_BANG 32515 +#define IDI_EXCLAMATION 32515 +#define OCR_UP 32516 +#define OIC_NOTE 32516 +#define IDI_ASTERISK 32516 +#define OIC_WINLOGO 32517 +#define IDI_WINLOGO 32517 +#define OIC_SHIELD 32518 +#define IDI_SHIELD 32518 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 +#define OCR_NO 32648 +#define OCR_HAND 32649 +#define OCR_APPSTARTING 32650 +#define OBM_LFARROWI 32734 +#define OBM_RGARROWI 32735 +#define OBM_DNARROWI 32736 +#define OBM_UPARROWI 32737 +#define OBM_COMBO 32738 +#define OBM_MNARROW 32739 +#define OBM_LFARROWD 32740 +#define OBM_RGARROWD 32741 +#define OBM_DNARROWD 32742 +#define OBM_UPARROWD 32743 +#define OBM_RESTORED 32744 +#define OBM_ZOOMD 32745 +#define OBM_REDUCED 32746 +#define OBM_RESTORE 32747 +#define OBM_ZOOM 32748 +#define OBM_REDUCE 32749 +#define OBM_LFARROW 32750 +#define OBM_RGARROW 32751 +#define OBM_DNARROW 32752 +#define OBM_UPARROW 32753 +#define OBM_CLOSE 32754 +#define OBM_OLD_RESTORE 32755 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_REDUCE 32757 +#define OBM_BTNCORNERS 32758 +#define OBM_CHECKBOXES 32759 +#define OBM_CHECK 32760 +#define OBM_BTSIZE 32761 +#define OBM_OLD_LFARROW 32762 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_UPARROW 32765 +#define OBM_SIZE 32766 +#define OBM_OLD_CLOSE 32767 +#define WM_APP 0x8000 +#define HELP_TCARD 0x8000 +#define TBSTYLE_TRANSPARENT 0x8000 +#define LVS_NOSORTHEADER 0x8000 +#define TVS_NOHSCROLL 0x8000 +#define TCS_FOCUSNEVER 0x8000 +#define RBS_DBLCLKTOGGLE 0x8000 +#define IDC_OPENIL 40000 +#define SC_SIZE 0xF000 +#define SC_SEPARATOR 0xF00F +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 +#define SC_DEFAULT 0xF160 +#define SC_MONITORPOWER 0xF170 +#define SC_CONTEXTHELP 0xF180 +#define LVS_TYPESTYLEMASK 0xfc00 +#define SPVERSION_MASK 0x0000FF00 +//#define HTERROR -2 +#define IDC_STATIC -1 +#define UNICODE_NOCHAR 0xFFFF +//#define PWR_FAIL -1 +//#define HTTRANSPARENT -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-IL/msvc8/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-IL/msvc8/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-IL/msvc8/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.rc b/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.rc new file mode 100644 index 00000000..93286855 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.rc @@ -0,0 +1,123 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////// FILEVERSION 0,1,7,8//////////////////////////////////////// +// +// Version +// + +1 VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "DevIL: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "DevIL: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "Developer's Image Library (DevIL)" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "DevIL.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Library (DevIL)" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENIL "Developer's Image Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.vcproj b/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.vcproj new file mode 100644 index 00000000..9c6d429c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/IL Unicode.vcproj @@ -0,0 +1,2797 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/IL.dsp b/libs/DevIL-1.7.8/src-IL/msvc9/IL.dsp new file mode 100644 index 00000000..d7a4bd8d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/IL.dsp @@ -0,0 +1,549 @@ +# Microsoft Developer Studio Project File - Name="IL" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=IL - WIN32 DEBUG +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "IL.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "IL.mak" CFG="IL - WIN32 DEBUG" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "IL - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IL - Win32 Dynamic" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "IL - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "IL" +# PROP Scc_LocalPath "..\.." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "IL - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "../../lib/debug" +# PROP BASE Intermediate_Dir "../src/obj/debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../lib/debug" +# PROP Intermediate_Dir "../src/obj/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../projects/msvc/extlibs/" /I "../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"../src/obj/debug/DevIL.bsc" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:".\il.def" /out:"C:\path\devil.dll" /pdbtype:sept /libpath:"../../projects/msvc/extlibs" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "IL - Win32 Dynamic" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj/dynamic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj/dynamic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /I "../../extlibs/" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"../src/obj/dynamic/DevIL.bsc" +# ADD BSC32 /nologo /o"../src/obj/dynamic/DevIL.bsc" +LINK32=link.exe +# ADD BASE LINK32 delayimp.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL-l.dll" /OPT:NOWIN98 /delayload:libpng3.dll /delayload:lcms108.dll +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 delayimp.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL-l.dll" /libpath:"../../extlibs/lib" /OPT:NOWIN98 /delayload:lcms108.dll /delayload:libpng.dll +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +TargetName=DevIL-l +SOURCE="$(InputPath)" +PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\$(TargetName).dll +# End Special Build Tool + +!ELSEIF "$(CFG)" == "IL - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /D "IL_STATIC_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../../projects/msvc/extlibs/" /I "../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IL_EXPORTS" /YX /FD /c +# SUBTRACT CPP /X +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"../src/obj/DevIL.bsc" +# ADD BSC32 /nologo /o"../src/obj/DevIL.bsc" +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL.dll" /OPT:NOWIN98 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\il.def" /out:"../../lib/DevIL.dll" /libpath:"../../projects/msvc/extlibs" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\..\lib\DevIL.dll "C:\path\DevIL.dll" +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "IL - Win32 Debug" +# Name "IL - Win32 Dynamic" +# Name "IL - Win32 Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\il.def + +!IF "$(CFG)" == "IL - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "IL - Win32 Dynamic" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "IL - Win32 Release" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\il_alloc.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_bits.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_bmp.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_convbuff.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_convert.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_cut.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_dcx.c +# End Source File +# Begin Source File + +SOURCE="..\src\il_dds-save.c" +# End Source File +# Begin Source File + +SOURCE=..\src\il_dds.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_devil.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_doom.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_endian.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_error.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_fastconv.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_files.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_gif.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_hdr.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_header.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_icon.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_internal.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_io.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_jpeg.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_lif.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_main.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_manip.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_mdl.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_mng.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_neuquant.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pal.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pcd.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pcx.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pic.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pix.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_png.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pnm.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_profiles.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_psd.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_psp.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_pxr.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_quantizer.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_raw.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_rawdata.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_register.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_rle.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_sgi.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_stack.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_states.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_targa.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_tiff.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_utility.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_wal.c +# End Source File +# Begin Source File + +SOURCE=..\src\il_xpm.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\IL\config.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\IL\devil_internal_exports.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\il\il.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_alloc.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_bits.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_bmp.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_dcx.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_dds.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_doompal.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_endian.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_files.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_gif.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_hdr.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_icon.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_jpeg.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_lif.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_manip.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_mdl.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_pal.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_pcx.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_pic.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_pnm.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_psd.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_psp.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_q2pal.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_register.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_rle.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_sgi.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_stack.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_states.h +# End Source File +# Begin Source File + +SOURCE=..\include\il_targa.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\resources\IL Logo.ico" +# End Source File +# Begin Source File + +SOURCE=.\IL.rc +# End Source File +# End Group +# Begin Group "Text Files" + +# PROP Default_Filter "txt" +# Begin Source File + +SOURCE=..\..\AUTHORS +# End Source File +# Begin Source File + +SOURCE=..\..\BUGS +# End Source File +# Begin Source File + +SOURCE=..\..\ChangeLog +# End Source File +# Begin Source File + +SOURCE=..\..\CREDITS +# End Source File +# Begin Source File + +SOURCE=..\..\libraries.txt +# End Source File +# Begin Source File + +SOURCE="..\..\MSVC++.txt" +# End Source File +# Begin Source File + +SOURCE=..\..\README.unix +# End Source File +# Begin Source File + +SOURCE=..\..\README.win +# End Source File +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/IL.rc b/libs/DevIL-1.7.8/src-IL/msvc9/IL.rc new file mode 100644 index 00000000..9f5c7953 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/IL.rc @@ -0,0 +1,120 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +/////////////////// FILEVERSION 0,1,7,8////////////////////////////////////// +// +// Version +// + +1 VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "DevIL: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "DevIL: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "Developer's Image Library (DevIL)" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "DevIL.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Library (DevIL)" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.\0" +END + + +3 TEXTINCLUDE +BEGIN + "\r\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENIL "Developer's Image Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/IL.vcproj b/libs/DevIL-1.7.8/src-IL/msvc9/IL.vcproj new file mode 100644 index 00000000..85b6dbbe --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/IL.vcproj @@ -0,0 +1,2832 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/il.def b/libs/DevIL-1.7.8/src-IL/msvc9/il.def new file mode 100644 index 00000000..c9391184 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/il.def @@ -0,0 +1,200 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +ilActiveFace +ilActiveImage +ilActiveLayer +ilActiveMipmap +ilApplyProfile +ilApplyPal +ilBindImage +ilBlit +ilClampNTSC +ilClearColour +ilClearImage +ilCloneCurImage +ilCompressDXT +ilCompressFunc +ilConvertImage +ilConvertPal +ilCopyImage +ilCopyPixels +ilCreateSubImage +ilDefaultImage +ilDeleteImage +ilDeleteImages +ilDetermineType +ilDetermineTypeF +ilDetermineTypeL +ilDisable +ilDxtcDataToImage +ilDxtcDataToSurface +ilEnable +ilFormatFunc +ilGenImage +ilGenImages +ilGetAlpha +ilGetBoolean +ilGetBooleanv +ilGetBppFormat +ilGetBppPal +ilGetBpcType +ilGetClear +ilGetCurImage +ilGetCurName +ilGetData +ilGetDXTCData +ilGetError +ilGetFormatBpp +ilGetInteger +ilGetIntegerv +ilGetLumpPos +ilGetPalBaseType +ilGetPalette +ilGetString +ilGetTypeBpc +ilHint +ilInit +ilInitImage +ilImageToDxtcData +ilIsDisabled +ilIsEnabled +ilIsImage +ilIsValid +ilIsValidF +ilIsValidL +ilKeyColour +ilLoad +ilLoadF +ilLoadImage +ilLoadL +ilLoadPal +ilModAlpha +ilNewImageFull +ilNextPower2 +ilOriginFunc +ilOverlayImage +ilPopAttrib +ilPushAttrib +ilRegisterFormat +ilRegisterLoad +ilRegisterMipNum +ilRegisterNumFaces +ilRegisterNumImages +ilRegisterOrigin +ilRegisterPal +ilRegisterSave +ilRegisterType +ilRemoveLoad +ilRemoveSave +ilReplaceCurImage +ilResetMemory +ilResetRead +ilResetWrite +ilSave +ilSaveF +ilSaveImage +ilSaveL +ilSavePal +ilSaveData +ilSetAlpha +ilSetData +ilSetDuration +ilSetError +ilSetInteger +ilSetMemory +ilSetPal +ilSetRead +ilSetPixels +ilSetString +ilSetWrite +ilShutDown +ilSurfaceToDxtcData +ilTexImage +ilTexImageDxtc +ilTypeFromExt +ilTypeFunc +ilLoadData +ilLoadDataF +ilLoadDataL +;ilLoadFromJpegStruct +;ilSaveFromJpegStruct + +; Internal but exported functions +iBindImageTemp +ilClearImage_ +ilConvertBuffer +ilCloseImage +ilClosePal +iConvertImage +iConvertPal +iCopyPal +ilCopyImageAttr +ilCopyImage_ +iGetFlipped +ilIsValidPal +ilNewImage +ilResizeImage +ilSetCurImage +ilTexImage_ +ilTexSubImage_ +ialloc +ifree + + +; Export the API of the included libjpeg so that applications +; can use both libraries without linking to two separate copies. +;jpeg_std_error +;jpeg_CreateCompress +;jpeg_CreateDecompress +;jpeg_destroy_compress +;jpeg_destroy_decompress +;jpeg_stdio_dest +;jpeg_stdio_src +;jpeg_set_defaults +;jpeg_set_colorspace +;jpeg_default_colorspace +;jpeg_set_quality +;jpeg_set_linear_quality +;jpeg_add_quant_table +;jpeg_quality_scaling +;jpeg_simple_progression +;jpeg_suppress_tables +;jpeg_alloc_quant_table +;jpeg_alloc_huff_table +;jpeg_start_compress +;jpeg_write_scanlines +;jpeg_finish_compress +;jpeg_write_raw_data +;jpeg_write_marker +;jpeg_write_m_header +;jpeg_write_m_byte +;jpeg_write_tables +;jpeg_read_header +;jpeg_start_decompress +;jpeg_read_scanlines +;jpeg_finish_decompress +;jpeg_read_raw_data +;jpeg_has_multiple_scans +;jpeg_start_output +;jpeg_finish_output +;jpeg_input_complete +;jpeg_new_colormap +;jpeg_consume_input +;jpeg_calc_output_dimensions +;jpeg_save_markers +;jpeg_set_marker_processor +;jpeg_read_coefficients +;jpeg_write_coefficients +;jpeg_copy_critical_parameters +;jpeg_abort_compress +;jpeg_abort_decompress +;jpeg_abort +;jpeg_destroy +;jpeg_resync_to_restart + +;jpeg_copy_key_exif_parameters +;jpeg_extract_exif_entries +;jpeg_init_exif_field +;jpeg_build_exif_marker +;jpeg_init_exif_field_table diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/resource.h b/libs/DevIL-1.7.8/src-IL/msvc9/resource.h new file mode 100644 index 00000000..668b4528 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/msvc9/resource.h @@ -0,0 +1,1495 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by IL.rc +// +#define SW_HIDE 0 +#define HIDE_WINDOW 0 +#define WM_NULL 0x0000 +#define WA_INACTIVE 0 +#define HTNOWHERE 0 +#define SMTO_NORMAL 0x0000 +#define ICON_SMALL 0 +#define SIZE_RESTORED 0 +#define BN_CLICKED 0 +#define BST_UNCHECKED 0x0000 +#define HDS_HORZ 0x0000 +#define TBSTYLE_BUTTON 0x0000 +#define TBS_HORZ 0x0000 +#define TBS_BOTTOM 0x0000 +#define TBS_RIGHT 0x0000 +#define LVS_ICON 0x0000 +#define LVS_ALIGNTOP 0x0000 +#define TCS_TABS 0x0000 +#define TCS_SINGLELINE 0x0000 +#define TCS_RIGHTJUSTIFY 0x0000 +#define DTS_SHORTDATEFORMAT 0x0000 +#define PGS_VERT 0x00000000 +#define LANG_NEUTRAL 0x00 +#define SUBLANG_NEUTRAL 0x00 +#define SORT_DEFAULT 0x0 +#define SORT_JAPANESE_XJIS 0x0 +#define SORT_CHINESE_BIG5 0x0 +#define SORT_CHINESE_PRCP 0x0 +#define SORT_KOREAN_KSC 0x0 +#define SORT_HUNGARIAN_DEFAULT 0x0 +#define SORT_GEORGIAN_TRADITIONAL 0x0 +#define _USE_DECLSPECS_FOR_SAL 0 +#define _USE_ATTRIBUTES_FOR_SAL 0 +#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 +#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SHOW_OPENWINDOW 1 +#define SW_PARENTCLOSING 1 +#define VK_LBUTTON 0x01 +#define WM_CREATE 0x0001 +#define WA_ACTIVE 1 +#define PWR_OK 1 +#define PWR_SUSPENDREQUEST 1 +#define NFR_ANSI 1 +#define UIS_SET 1 +#define UISF_HIDEFOCUS 0x1 +#define XBUTTON1 0x0001 +#define WMSZ_LEFT 1 +#define HTCLIENT 1 +#define SMTO_BLOCK 0x0001 +#define MA_ACTIVATE 1 +#define ICON_BIG 1 +#define SIZE_MINIMIZED 1 +#define MK_LBUTTON 0x0001 +#define TME_HOVER 0x00000001 +#define CS_VREDRAW 0x0001 +#define CF_TEXT 1 +#define SCF_ISSECURE 0x00000001 +#define IDOK 1 +#define BN_PAINT 1 +#define BST_CHECKED 0x0001 +#define TBSTYLE_SEP 0x0001 +#define TTS_ALWAYSTIP 0x01 +#define TBS_AUTOTICKS 0x0001 +#define UDS_WRAP 0x0001 +#define PBS_SMOOTH 0x01 +#define LWS_TRANSPARENT 0x0001 +#define LVS_REPORT 0x0001 +#define TVS_HASBUTTONS 0x0001 +#define TCS_SCROLLOPPOSITE 0x0001 +#define ACS_CENTER 0x0001 +#define MCS_DAYSTATE 0x0001 +#define DTS_UPDOWN 0x0001 +#define PGS_HORZ 0x00000001 +#define NFS_EDIT 0x0001 +#define BCSIF_GLYPH 0x0001 +#define BCSS_NOSPLIT 0x0001 +#define LANG_ARABIC 0x01 +#define SUBLANG_DEFAULT 0x01 +#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 +#define SUBLANG_ALBANIAN_ALBANIA 0x01 +#define SUBLANG_ALSATIAN_FRANCE 0x01 +#define SUBLANG_AMHARIC_ETHIOPIA 0x01 +#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +#define SUBLANG_ARMENIAN_ARMENIA 0x01 +#define SUBLANG_ASSAMESE_INDIA 0x01 +#define SUBLANG_AZERI_LATIN 0x01 +#define SUBLANG_BASHKIR_RUSSIA 0x01 +#define SUBLANG_BASQUE_BASQUE 0x01 +#define SUBLANG_BELARUSIAN_BELARUS 0x01 +#define SUBLANG_BENGALI_INDIA 0x01 +#define SUBLANG_BRETON_FRANCE 0x01 +#define SUBLANG_BULGARIAN_BULGARIA 0x01 +#define SUBLANG_CATALAN_CATALAN 0x01 +#define SUBLANG_CHINESE_TRADITIONAL 0x01 +#define SUBLANG_CORSICAN_FRANCE 0x01 +#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 +#define SUBLANG_CROATIAN_CROATIA 0x01 +#define SUBLANG_DANISH_DENMARK 0x01 +#define SUBLANG_DARI_AFGHANISTAN 0x01 +#define SUBLANG_DIVEHI_MALDIVES 0x01 +#define SUBLANG_DUTCH 0x01 +#define SUBLANG_ENGLISH_US 0x01 +#define SUBLANG_ESTONIAN_ESTONIA 0x01 +#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 +#define SUBLANG_FILIPINO_PHILIPPINES 0x01 +#define SUBLANG_FINNISH_FINLAND 0x01 +#define SUBLANG_FRENCH 0x01 +#define SUBLANG_FRISIAN_NETHERLANDS 0x01 +#define SUBLANG_GALICIAN_GALICIAN 0x01 +#define SUBLANG_GEORGIAN_GEORGIA 0x01 +#define SUBLANG_GERMAN 0x01 +#define SUBLANG_GREEK_GREECE 0x01 +#define SUBLANG_GREENLANDIC_GREENLAND 0x01 +#define SUBLANG_GUJARATI_INDIA 0x01 +#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 +#define SUBLANG_HEBREW_ISRAEL 0x01 +#define SUBLANG_HINDI_INDIA 0x01 +#define SUBLANG_HUNGARIAN_HUNGARY 0x01 +#define SUBLANG_ICELANDIC_ICELAND 0x01 +#define SUBLANG_IGBO_NIGERIA 0x01 +#define SUBLANG_INDONESIAN_INDONESIA 0x01 +#define SUBLANG_INUKTITUT_CANADA 0x01 +#define SUBLANG_ITALIAN 0x01 +#define SUBLANG_JAPANESE_JAPAN 0x01 +#define SUBLANG_KANNADA_INDIA 0x01 +#define SUBLANG_KAZAK_KAZAKHSTAN 0x01 +#define SUBLANG_KHMER_CAMBODIA 0x01 +#define SUBLANG_KICHE_GUATEMALA 0x01 +#define SUBLANG_KINYARWANDA_RWANDA 0x01 +#define SUBLANG_KONKANI_INDIA 0x01 +#define SUBLANG_KOREAN 0x01 +#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 +#define SUBLANG_LAO_LAO 0x01 +#define SUBLANG_LATVIAN_LATVIA 0x01 +#define SUBLANG_LITHUANIAN 0x01 +#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 +#define SUBLANG_MACEDONIAN_MACEDONIA 0x01 +#define SUBLANG_MALAY_MALAYSIA 0x01 +#define SUBLANG_MALAYALAM_INDIA 0x01 +#define SUBLANG_MALTESE_MALTA 0x01 +#define SUBLANG_MAORI_NEW_ZEALAND 0x01 +#define SUBLANG_MAPUDUNGUN_CHILE 0x01 +#define SUBLANG_MARATHI_INDIA 0x01 +#define SUBLANG_MOHAWK_MOHAWK 0x01 +#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 +#define SUBLANG_NEPALI_NEPAL 0x01 +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 +#define SUBLANG_OCCITAN_FRANCE 0x01 +#define SUBLANG_ORIYA_INDIA 0x01 +#define SUBLANG_PASHTO_AFGHANISTAN 0x01 +#define SUBLANG_PERSIAN_IRAN 0x01 +#define SUBLANG_POLISH_POLAND 0x01 +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 +#define SUBLANG_PUNJABI_INDIA 0x01 +#define SUBLANG_QUECHUA_BOLIVIA 0x01 +#define SUBLANG_ROMANIAN_ROMANIA 0x01 +#define SUBLANG_ROMANSH_SWITZERLAND 0x01 +#define SUBLANG_RUSSIAN_RUSSIA 0x01 +#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 +#define SUBLANG_SANSKRIT_INDIA 0x01 +#define SUBLANG_SERBIAN_CROATIA 0x01 +#define SUBLANG_SINDHI_INDIA 0x01 +#define SUBLANG_SINHALESE_SRI_LANKA 0x01 +#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01 +#define SUBLANG_SLOVAK_SLOVAKIA 0x01 +#define SUBLANG_SLOVENIAN_SLOVENIA 0x01 +#define SUBLANG_SPANISH 0x01 +#define SUBLANG_SWAHILI_KENYA 0x01 +#define SUBLANG_SWEDISH 0x01 +#define SUBLANG_SYRIAC_SYRIA 0x01 +#define SUBLANG_TAJIK_TAJIKISTAN 0x01 +#define SUBLANG_TAMIL_INDIA 0x01 +#define SUBLANG_TATAR_RUSSIA 0x01 +#define SUBLANG_TELUGU_INDIA 0x01 +#define SUBLANG_THAI_THAILAND 0x01 +#define SUBLANG_TIBETAN_PRC 0x01 +#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 +#define SUBLANG_TURKISH_TURKEY 0x01 +#define SUBLANG_TURKMEN_TURKMENISTAN 0x01 +#define SUBLANG_UIGHUR_PRC 0x01 +#define SUBLANG_UKRAINIAN_UKRAINE 0x01 +#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 +#define SUBLANG_URDU_PAKISTAN 0x01 +#define SUBLANG_UZBEK_LATIN 0x01 +#define SUBLANG_VIETNAMESE_VIETNAM 0x01 +#define SUBLANG_WELSH_UNITED_KINGDOM 0x01 +#define SUBLANG_WOLOF_SENEGAL 0x01 +#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 +#define SUBLANG_YAKUT_RUSSIA 0x01 +#define SUBLANG_YI_PRC 0x01 +#define SUBLANG_YORUBA_NIGERIA 0x01 +#define SUBLANG_ZULU_SOUTH_AFRICA 0x01 +#define SORT_INVARIANT_MATH 0x1 +#define SORT_JAPANESE_UNICODE 0x1 +#define SORT_CHINESE_UNICODE 0x1 +#define SORT_KOREAN_UNICODE 0x1 +#define SORT_GERMAN_PHONE_BOOK 0x1 +#define SORT_HUNGARIAN_TECHNICAL 0x1 +#define SORT_GEORGIAN_MODERN 0x1 +#define VS_VERSION_INFO 1 +#define VFFF_ISSHAREDFILE 0x0001 +#define VFF_CURNEDEST 0x0001 +#define VIFF_FORCEINSTALL 0x0001 +#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 +#define SW_SHOWMINIMIZED 2 +#define SHOW_ICONWINDOW 2 +#define SW_OTHERZOOM 2 +#define VK_RBUTTON 0x02 +#define WM_DESTROY 0x0002 +#define WA_CLICKACTIVE 2 +#define PWR_SUSPENDRESUME 2 +#define NFR_UNICODE 2 +#define UIS_CLEAR 2 +#define UISF_HIDEACCEL 0x2 +#define XBUTTON2 0x0002 +#define WMSZ_RIGHT 2 +#define HTCAPTION 2 +#define SMTO_ABORTIFHUNG 0x0002 +#define MA_ACTIVATEANDEAT 2 +#define ICON_SMALL2 2 +#define SIZE_MAXIMIZED 2 +#define MK_RBUTTON 0x0002 +#define TME_LEAVE 0x00000002 +#define CS_HREDRAW 0x0002 +#define CF_BITMAP 2 +#define IDCANCEL 2 +#define BN_HILITE 2 +#define BST_INDETERMINATE 0x0002 +#define HDS_BUTTONS 0x0002 +#define TBSTYLE_CHECK 0x0002 +#define TTS_NOPREFIX 0x02 +#define TBS_VERT 0x0002 +#define UDS_SETBUDDYINT 0x0002 +#define LWS_IGNORERETURN 0x0002 +#define LVS_SMALLICON 0x0002 +#define TVS_HASLINES 0x0002 +#define TVS_EX_MULTISELECT 0x0002 +#define TCS_BOTTOM 0x0002 +#define TCS_RIGHT 0x0002 +#define ACS_TRANSPARENT 0x0002 +#define MCS_MULTISELECT 0x0002 +#define DTS_SHOWNONE 0x0002 +#define PGS_AUTOSCROLL 0x00000002 +#define NFS_STATIC 0x0002 +#define BCSIF_IMAGE 0x0002 +#define BCSS_STRETCH 0x0002 +#define LANG_BULGARIAN 0x02 +#define SUBLANG_SYS_DEFAULT 0x02 +#define SUBLANG_ARABIC_IRAQ 0x02 +#define SUBLANG_AZERI_CYRILLIC 0x02 +#define SUBLANG_BENGALI_BANGLADESH 0x02 +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 +#define SUBLANG_DUTCH_BELGIAN 0x02 +#define SUBLANG_ENGLISH_UK 0x02 +#define SUBLANG_FRENCH_BELGIAN 0x02 +#define SUBLANG_GERMAN_SWISS 0x02 +#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 +#define SUBLANG_IRISH_IRELAND 0x02 +#define SUBLANG_ITALIAN_SWISS 0x02 +#define SUBLANG_KASHMIRI_SASIA 0x02 +#define SUBLANG_KASHMIRI_INDIA 0x02 +#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +#define SUBLANG_MONGOLIAN_PRC 0x02 +#define SUBLANG_NEPALI_INDIA 0x02 +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 +#define SUBLANG_PORTUGUESE 0x02 +#define SUBLANG_QUECHUA_ECUADOR 0x02 +#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 +#define SUBLANG_SERBIAN_LATIN 0x02 +#define SUBLANG_SINDHI_PAKISTAN 0x02 +#define SUBLANG_SINDHI_AFGHANISTAN 0x02 +#define SUBLANG_SPANISH_MEXICAN 0x02 +#define SUBLANG_SWEDISH_FINLAND 0x02 +#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 +#define SUBLANG_TIGRIGNA_ERITREA 0x02 +#define SUBLANG_URDU_INDIA 0x02 +#define SUBLANG_UZBEK_CYRILLIC 0x02 +#define SORT_CHINESE_PRC 0x2 +#define VFF_FILEINUSE 0x0002 +#define VIFF_DONTDELETEOLD 0x0002 +#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SHOW_FULLSCREEN 3 +#define SW_PARENTOPENING 3 +#define VK_CANCEL 0x03 +#define WM_MOVE 0x0003 +#define PWR_CRITICALRESUME 3 +#define NF_QUERY 3 +#define UIS_INITIALIZE 3 +#define WMSZ_TOP 3 +#define HTSYSMENU 3 +#define MA_NOACTIVATE 3 +#define SIZE_MAXSHOW 3 +#define CF_METAFILEPICT 3 +#define IDABORT 3 +#define BN_UNHILITE 3 +#define LVS_LIST 0x0003 +#define LVS_TYPEMASK 0x0003 +#define LANG_CATALAN 0x03 +#define SUBLANG_CUSTOM_DEFAULT 0x03 +#define SUBLANG_ARABIC_EGYPT 0x03 +#define SUBLANG_CHINESE_HONGKONG 0x03 +#define SUBLANG_ENGLISH_AUS 0x03 +#define SUBLANG_FRENCH_CANADIAN 0x03 +#define SUBLANG_GERMAN_AUSTRIAN 0x03 +#define SUBLANG_QUECHUA_PERU 0x03 +#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 +#define SUBLANG_SERBIAN_CYRILLIC 0x03 +#define SUBLANG_SPANISH_MODERN 0x03 +#define SORT_CHINESE_BOPOMOFO 0x3 +#define SW_SHOWNOACTIVATE 4 +#define SHOW_OPENNOACTIVATE 4 +#define SW_OTHERUNZOOM 4 +#define VK_MBUTTON 0x04 +#define NF_REQUERY 4 +#define UISF_ACTIVE 0x4 +#define WMSZ_TOPLEFT 4 +#define HTGROWBOX 4 +#define MA_NOACTIVATEANDEAT 4 +#define SIZE_MAXHIDE 4 +#define MK_SHIFT 0x0004 +#define CF_SYLK 4 +#define IDRETRY 4 +#define BN_DISABLE 4 +#define BST_PUSHED 0x0004 +#define HDS_HOTTRACK 0x0004 +#define TBSTYLE_GROUP 0x0004 +#define TBS_TOP 0x0004 +#define TBS_LEFT 0x0004 +#define UDS_ALIGNRIGHT 0x0004 +#define PBS_VERTICAL 0x04 +#define LWS_NOPREFIX 0x0004 +#define LVS_SINGLESEL 0x0004 +#define TVS_LINESATROOT 0x0004 +#define TVS_EX_DOUBLEBUFFER 0x0004 +#define TCS_MULTISELECT 0x0004 +#define ACS_AUTOPLAY 0x0004 +#define MCS_WEEKNUMBERS 0x0004 +#define DTS_LONGDATEFORMAT 0x0004 +#define PGS_DRAGNDROP 0x00000004 +#define NFS_LISTCOMBO 0x0004 +#define BCSIF_STYLE 0x0004 +#define BCSS_ALIGNLEFT 0x0004 +#define LANG_CHINESE 0x04 +#define LANG_CHINESE_SIMPLIFIED 0x04 +#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 +#define SUBLANG_ARABIC_LIBYA 0x04 +#define SUBLANG_CHINESE_SINGAPORE 0x04 +#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 +#define SUBLANG_ENGLISH_CAN 0x04 +#define SUBLANG_FRENCH_SWISS 0x04 +#define SUBLANG_GERMAN_LUXEMBOURG 0x04 +#define SUBLANG_SAMI_LULE_NORWAY 0x04 +#define SUBLANG_SPANISH_GUATEMALA 0x04 +#define SORT_JAPANESE_RADICALSTROKE 0x4 +#define VFF_BUFFTOOSMALL 0x0004 +#define SW_SHOW 5 +#define VK_XBUTTON1 0x05 +#define WM_SIZE 0x0005 +#define WMSZ_TOPRIGHT 5 +#define HTMENU 5 +#define CF_DIF 5 +#define IDIGNORE 5 +#define BN_DOUBLECLICKED 5 +#define LANG_CZECH 0x05 +#define SUBLANG_UI_CUSTOM_DEFAULT 0x05 +#define SUBLANG_ARABIC_ALGERIA 0x05 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 +#define SUBLANG_CHINESE_MACAU 0x05 +#define SUBLANG_ENGLISH_NZ 0x05 +#define SUBLANG_FRENCH_LUXEMBOURG 0x05 +#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +#define SUBLANG_SAMI_LULE_SWEDEN 0x05 +#define SUBLANG_SPANISH_COSTA_RICA 0x05 +#define SW_MINIMIZE 6 +#define VK_XBUTTON2 0x06 +#define WM_ACTIVATE 0x0006 +#define WMSZ_BOTTOM 6 +#define HTHSCROLL 6 +#define CF_TIFF 6 +#define IDYES 6 +#define BN_SETFOCUS 6 +#define LANG_DANISH 0x06 +#define SUBLANG_ARABIC_MOROCCO 0x06 +#define SUBLANG_ENGLISH_EIRE 0x06 +#define SUBLANG_FRENCH_MONACO 0x06 +#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06 +#define SUBLANG_SPANISH_PANAMA 0x06 +#define SW_SHOWMINNOACTIVE 7 +#define WM_SETFOCUS 0x0007 +#define WMSZ_BOTTOMLEFT 7 +#define HTVSCROLL 7 +#define CF_OEMTEXT 7 +#define IDNO 7 +#define BN_KILLFOCUS 7 +#define LANG_GERMAN 0x07 +#define SUBLANG_ARABIC_TUNISIA 0x07 +#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 +#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07 +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +#define SW_SHOWNA 8 +#define VK_BACK 0x08 +#define WM_KILLFOCUS 0x0008 +#define WMSZ_BOTTOMRIGHT 8 +#define HTMINBUTTON 8 +#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 +#define MK_CONTROL 0x0008 +#define CS_DBLCLKS 0x0008 +#define CF_DIB 8 +#define IDCLOSE 8 +#define BST_FOCUS 0x0008 +#define HDS_HIDDEN 0x0008 +#define TBSTYLE_DROPDOWN 0x0008 +#define TBS_BOTH 0x0008 +#define UDS_ALIGNLEFT 0x0008 +#define PBS_MARQUEE 0x08 +#define LWS_USEVISUALSTYLE 0x0008 +#define LVS_SHOWSELALWAYS 0x0008 +#define TVS_EDITLABELS 0x0008 +#define TVS_EX_NOINDENTSTATE 0x0008 +#define TCS_FLATBUTTONS 0x0008 +#define ACS_TIMER 0x0008 +#define MCS_NOTODAYCIRCLE 0x0008 +#define NFS_BUTTON 0x0008 +#define BCSIF_SIZE 0x0008 +#define BCSS_IMAGE 0x0008 +#define LANG_GREEK 0x08 +#define SUBLANG_ARABIC_OMAN 0x08 +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 +#define SUBLANG_ENGLISH_JAMAICA 0x08 +#define SUBLANG_SAMI_SKOLT_FINLAND 0x08 +#define SUBLANG_SPANISH_VENEZUELA 0x08 +#define SW_RESTORE 9 +#define VK_TAB 0x09 +#define HTMAXBUTTON 9 +#define CF_PALETTE 9 +#define IDHELP 9 +#define DTS_TIMEFORMAT 0x0009 +#define LANG_ENGLISH 0x09 +#define SUBLANG_ARABIC_YEMEN 0x09 +#define SUBLANG_ENGLISH_CARIBBEAN 0x09 +#define SUBLANG_SAMI_INARI_FINLAND 0x09 +#define SUBLANG_SPANISH_COLOMBIA 0x09 +#define SW_SHOWDEFAULT 10 +#define WM_ENABLE 0x000A +#define HTLEFT 10 +#define CF_PENDATA 10 +#define IDTRYAGAIN 10 +#define HELP_CONTEXTMENU 0x000a +#define LANG_SPANISH 0x0a +#define SUBLANG_ARABIC_SYRIA 0x0a +#define SUBLANG_ENGLISH_BELIZE 0x0a +#define SUBLANG_SPANISH_PERU 0x0a +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 +#define WM_SETREDRAW 0x000B +#define HTRIGHT 11 +#define CF_RIFF 11 +#define IDCONTINUE 11 +#define HELP_FINDER 0x000b +#define LANG_FINNISH 0x0b +#define SUBLANG_ARABIC_JORDAN 0x0b +#define SUBLANG_ENGLISH_TRINIDAD 0x0b +#define SUBLANG_SPANISH_ARGENTINA 0x0b +#define VK_CLEAR 0x0C +#define WM_SETTEXT 0x000C +#define HTTOP 12 +#define CF_WAVE 12 +#define HELP_WM_HELP 0x000c +#define DTS_SHORTDATECENTURYFORMAT 0x000C +#define LANG_FRENCH 0x0c +#define SUBLANG_ARABIC_LEBANON 0x0c +#define SUBLANG_ENGLISH_ZIMBABWE 0x0c +#define SUBLANG_SPANISH_ECUADOR 0x0c +#define VK_RETURN 0x0D +#define WM_GETTEXT 0x000D +#define HTTOPLEFT 13 +#define CF_UNICODETEXT 13 +#define HELP_SETPOPUP_POS 0x000d +#define LANG_HEBREW 0x0d +#define SUBLANG_ARABIC_KUWAIT 0x0d +#define SUBLANG_ENGLISH_PHILIPPINES 0x0d +#define SUBLANG_SPANISH_CHILE 0x0d +#define WM_GETTEXTLENGTH 0x000E +#define HTTOPRIGHT 14 +#define CF_ENHMETAFILE 14 +#define LANG_HUNGARIAN 0x0e +#define SUBLANG_ARABIC_UAE 0x0e +#define SUBLANG_SPANISH_URUGUAY 0x0e +#define WM_PAINT 0x000F +#define HTBOTTOM 15 +#define CF_HDROP 15 +#define LANG_ICELANDIC 0x0f +#define SUBLANG_ARABIC_BAHRAIN 0x0f +#define SUBLANG_SPANISH_PARAGUAY 0x0f +#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 +#define VK_SHIFT 0x10 +#define WM_CLOSE 0x0010 +#define HTBOTTOMLEFT 16 +#define WVR_ALIGNTOP 0x0010 +#define MK_MBUTTON 0x0010 +#define TME_NONCLIENT 0x00000010 +#define CF_LOCALE 16 +#define HELP_TCARD_DATA 0x0010 +#define TBSTYLE_AUTOSIZE 0x0010 +#define TTS_NOANIMATE 0x10 +#define TBS_NOTICKS 0x0010 +#define UDS_AUTOBUDDY 0x0010 +#define PBS_SMOOTHREVERSE 0x10 +#define LWS_USECUSTOMTEXT 0x0010 +#define LVS_SORTASCENDING 0x0010 +#define TVS_DISABLEDRAGDROP 0x0010 +#define TVS_EX_RICHTOOLTIP 0x0010 +#define TCS_FORCEICONLEFT 0x0010 +#define MCS_NOTODAY 0x0010 +#define DTS_APPCANPARSE 0x0010 +#define NFS_ALL 0x0010 +#define LANG_ITALIAN 0x10 +#define SUBLANG_ARABIC_QATAR 0x10 +#define SUBLANG_ENGLISH_INDIA 0x10 +#define SUBLANG_SPANISH_BOLIVIA 0x10 +#define VK_CONTROL 0x11 +#define WM_QUERYENDSESSION 0x0011 +#define HTBOTTOMRIGHT 17 +#define CF_DIBV5 17 +#define HELP_TCARD_OTHER_CALLER 0x0011 +#define LANG_JAPANESE 0x11 +#define SUBLANG_ENGLISH_MALAYSIA 0x11 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define VK_MENU 0x12 +#define WM_QUIT 0x0012 +#define HTBORDER 18 +#define CF_MAX 18 +#define LANG_KOREAN 0x12 +#define SUBLANG_ENGLISH_SINGAPORE 0x12 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define VK_PAUSE 0x13 +#define WM_QUERYOPEN 0x0013 +#define HTOBJECT 19 +#define LANG_DUTCH 0x13 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define VK_CAPITAL 0x14 +#define WM_ERASEBKGND 0x0014 +#define HTCLOSE 20 +#define LANG_NORWEGIAN 0x14 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 +#define VK_KANA 0x15 +#define VK_HANGEUL 0x15 +#define VK_HANGUL 0x15 +#define WM_SYSCOLORCHANGE 0x0015 +#define HTHELP 21 +#define LANG_POLISH 0x15 +#define SUBLANG_SPANISH_US 0x15 +#define WM_ENDSESSION 0x0016 +#define LANG_PORTUGUESE 0x16 +#define VK_JUNJA 0x17 +#define LANG_ROMANSH 0x17 +#define RT_MANIFEST 24 +#define VK_FINAL 0x18 +#define WM_SHOWWINDOW 0x0018 +#define LANG_ROMANIAN 0x18 +#define VK_HANJA 0x19 +#define VK_KANJI 0x19 +#define LANG_RUSSIAN 0x19 +#define WM_WININICHANGE 0x001A +#define LANG_BOSNIAN 0x1a +#define LANG_CROATIAN 0x1a +#define LANG_SERBIAN 0x1a +#define VK_ESCAPE 0x1B +#define WM_DEVMODECHANGE 0x001B +#define LANG_SLOVAK 0x1b +#define VK_CONVERT 0x1C +#define WM_ACTIVATEAPP 0x001C +#define LANG_ALBANIAN 0x1c +#define VK_NONCONVERT 0x1D +#define WM_FONTCHANGE 0x001D +#define LANG_SWEDISH 0x1d +#define VK_ACCEPT 0x1E +#define WM_TIMECHANGE 0x001E +#define LANG_THAI 0x1e +#define VK_MODECHANGE 0x1F +#define WM_CANCELMODE 0x001F +#define LANG_TURKISH 0x1f +#define VK_SPACE 0x20 +#define WM_SETCURSOR 0x0020 +#define SMTO_ERRORONEXIT 0x0020 +#define WVR_ALIGNLEFT 0x0020 +#define MK_XBUTTON1 0x0020 +#define CS_OWNDC 0x0020 +#define TBSTYLE_NOPREFIX 0x0020 +#define TTS_NOFADE 0x20 +#define TBS_ENABLESELRANGE 0x0020 +#define UDS_ARROWKEYS 0x0020 +#define LWS_RIGHT 0x0020 +#define LVS_SORTDESCENDING 0x0020 +#define TVS_SHOWSELALWAYS 0x0020 +#define TVS_EX_AUTOHSCROLL 0x0020 +#define TCS_FORCELABELLEFT 0x0020 +#define DTS_RIGHTALIGN 0x0020 +#define NFS_USEFONTASSOC 0x0020 +#define LANG_URDU 0x20 +#define VK_PRIOR 0x21 +#define WM_MOUSEACTIVATE 0x0021 +#define LANG_INDONESIAN 0x21 +#define VK_NEXT 0x22 +#define WM_CHILDACTIVATE 0x0022 +#define LANG_UKRAINIAN 0x22 +#define VK_END 0x23 +#define WM_QUEUESYNC 0x0023 +#define LANG_BELARUSIAN 0x23 +#define VK_HOME 0x24 +#define WM_GETMINMAXINFO 0x0024 +#define LANG_SLOVENIAN 0x24 +#define VK_LEFT 0x25 +#define LANG_ESTONIAN 0x25 +#define VK_UP 0x26 +#define WM_PAINTICON 0x0026 +#define LANG_LATVIAN 0x26 +#define VK_RIGHT 0x27 +#define WM_ICONERASEBKGND 0x0027 +#define LANG_LITHUANIAN 0x27 +#define VK_DOWN 0x28 +#define WM_NEXTDLGCTL 0x0028 +#define LANG_TAJIK 0x28 +#define VK_SELECT 0x29 +#define LANG_FARSI 0x29 +#define LANG_PERSIAN 0x29 +#define VK_PRINT 0x2A +#define WM_SPOOLERSTATUS 0x002A +#define LANG_VIETNAMESE 0x2a +#define VK_EXECUTE 0x2B +#define WM_DRAWITEM 0x002B +#define LANG_ARMENIAN 0x2b +#define VK_SNAPSHOT 0x2C +#define WM_MEASUREITEM 0x002C +#define LANG_AZERI 0x2c +#define VK_INSERT 0x2D +#define WM_DELETEITEM 0x002D +#define LANG_BASQUE 0x2d +#define VK_DELETE 0x2E +#define WM_VKEYTOITEM 0x002E +#define LANG_LOWER_SORBIAN 0x2e +#define LANG_UPPER_SORBIAN 0x2e +#define VK_HELP 0x2F +#define WM_CHARTOITEM 0x002F +#define LANG_MACEDONIAN 0x2f +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 +#define WM_SETHOTKEY 0x0032 +#define LANG_TSWANA 0x32 +#define WM_GETHOTKEY 0x0033 +#define LANG_XHOSA 0x34 +#define LANG_ZULU 0x35 +#define LANG_AFRIKAANS 0x36 +#define WM_QUERYDRAGICON 0x0037 +#define LANG_GEORGIAN 0x37 +#define LANG_FAEROESE 0x38 +#define WM_COMPAREITEM 0x0039 +#define LANG_HINDI 0x39 +#define LANG_MALTESE 0x3a +#define LANG_SAMI 0x3b +#define LANG_IRISH 0x3c +#define WM_GETOBJECT 0x003D +#define LANG_MALAY 0x3e +#define LANG_KAZAK 0x3f +#define WVR_ALIGNBOTTOM 0x0040 +#define MK_XBUTTON2 0x0040 +#define CS_CLASSDC 0x0040 +#define HDS_DRAGDROP 0x0040 +#define BTNS_SHOWTEXT 0x0040 +#define TTS_BALLOON 0x40 +#define TBS_FIXEDLENGTH 0x0040 +#define UDS_HORZ 0x0040 +#define LVS_SHAREIMAGELISTS 0x0040 +#define TVS_RTLREADING 0x0040 +#define TVS_EX_FADEINOUTEXPANDOS 0x0040 +#define TCS_HOTTRACK 0x0040 +#define MCS_NOTRAILINGDATES 0x0040 +#define LANG_KYRGYZ 0x40 +#define WM_COMPACTING 0x0041 +#define LANG_SWAHILI 0x41 +#define LANG_TURKMEN 0x42 +#define LANG_UZBEK 0x43 +#define WM_COMMNOTIFY 0x0044 +#define LANG_TATAR 0x44 +#define LANG_BENGALI 0x45 +#define WM_WINDOWPOSCHANGING 0x0046 +#define LANG_PUNJABI 0x46 +#define WM_WINDOWPOSCHANGED 0x0047 +#define LANG_GUJARATI 0x47 +#define WM_POWER 0x0048 +#define LANG_ORIYA 0x48 +#define LANG_TAMIL 0x49 +#define WM_COPYDATA 0x004A +#define LANG_TELUGU 0x4a +#define WM_CANCELJOURNAL 0x004B +#define LANG_KANNADA 0x4b +#define LANG_MALAYALAM 0x4c +#define LANG_ASSAMESE 0x4d +#define WM_NOTIFY 0x004E +#define LANG_MARATHI 0x4e +#define LANG_SANSKRIT 0x4f +#define WM_INPUTLANGCHANGEREQUEST 0x0050 +#define LANG_MONGOLIAN 0x50 +#define WM_INPUTLANGCHANGE 0x0051 +#define LANG_TIBETAN 0x51 +#define WM_TCARD 0x0052 +#define LANG_WELSH 0x52 +#define WM_HELP 0x0053 +#define LANG_KHMER 0x53 +#define WM_USERCHANGED 0x0054 +#define LANG_LAO 0x54 +#define WM_NOTIFYFORMAT 0x0055 +#define LANG_GALICIAN 0x56 +#define LANG_KONKANI 0x57 +#define LANG_MANIPURI 0x58 +#define LANG_SINDHI 0x59 +#define LANG_SYRIAC 0x5a +#define VK_LWIN 0x5B +#define LANG_SINHALESE 0x5b +#define VK_RWIN 0x5C +#define VK_APPS 0x5D +#define LANG_INUKTITUT 0x5d +#define LANG_AMHARIC 0x5e +#define VK_SLEEP 0x5F +#define LANG_TAMAZIGHT 0x5f +#define VK_NUMPAD0 0x60 +#define LANG_KASHMIRI 0x60 +#define VK_NUMPAD1 0x61 +#define LANG_NEPALI 0x61 +#define VK_NUMPAD2 0x62 +#define LANG_FRISIAN 0x62 +#define VK_NUMPAD3 0x63 +#define LANG_PASHTO 0x63 +#define VK_NUMPAD4 0x64 +#define LANG_FILIPINO 0x64 +#define VS_USER_DEFINED 100 +#define VK_NUMPAD5 0x65 +#define LANG_DIVEHI 0x65 +#define VK_NUMPAD6 0x66 +#define VK_NUMPAD7 0x67 +#define VK_NUMPAD8 0x68 +#define LANG_HAUSA 0x68 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define LANG_YORUBA 0x6a +#define VK_ADD 0x6B +#define LANG_QUECHUA 0x6b +#define VK_SEPARATOR 0x6C +#define LANG_SOTHO 0x6c +#define VK_SUBTRACT 0x6D +#define LANG_BASHKIR 0x6d +#define VK_DECIMAL 0x6E +#define LANG_LUXEMBOURGISH 0x6e +#define VK_DIVIDE 0x6F +#define LANG_GREENLANDIC 0x6f +#define VK_F1 0x70 +#define LANG_IGBO 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define LANG_TIGRIGNA 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define WHEEL_DELTA 120 +#define LANG_YI 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define LANG_MAPUDUNGUN 0x7a +#define VK_F12 0x7B +#define WM_CONTEXTMENU 0x007B +#define VK_F13 0x7C +#define WM_STYLECHANGING 0x007C +#define LANG_MOHAWK 0x7c +#define VK_F14 0x7D +#define WM_STYLECHANGED 0x007D +#define VK_F15 0x7E +#define WM_DISPLAYCHANGE 0x007E +#define LANG_BRETON 0x7e +#define VK_F16 0x7F +#define WM_GETICON 0x007F +#define LANG_INVARIANT 0x7f +#define VK_F17 0x80 +#define WM_SETICON 0x0080 +#define WVR_ALIGNRIGHT 0x0080 +#define CS_PARENTDC 0x0080 +#define CF_OWNERDISPLAY 0x0080 +#define HDS_FULLDRAG 0x0080 +#define BTNS_WHOLEDROPDOWN 0x0080 +#define TTS_CLOSE 0x80 +#define TBS_NOTHUMB 0x0080 +#define UDS_NOTHOUSANDS 0x0080 +#define LVS_NOLABELWRAP 0x0080 +#define TVS_NOTOOLTIPS 0x0080 +#define TVS_EX_PARTIALCHECKBOXES 0x0080 +#define TCS_VERTICAL 0x0080 +#define MCS_SHORTDAYSOFWEEK 0x0080 +#define LANG_UIGHUR 0x80 +#define VK_F18 0x81 +#define WM_NCCREATE 0x0081 +#define CF_DSPTEXT 0x0081 +#define LANG_MAORI 0x81 +#define VK_F19 0x82 +#define WM_NCDESTROY 0x0082 +#define CF_DSPBITMAP 0x0082 +#define LANG_OCCITAN 0x82 +#define VK_F20 0x83 +#define WM_NCCALCSIZE 0x0083 +#define CF_DSPMETAFILEPICT 0x0083 +#define LANG_CORSICAN 0x83 +#define VK_F21 0x84 +#define WM_NCHITTEST 0x0084 +#define LANG_ALSATIAN 0x84 +#define VK_F22 0x85 +#define WM_NCPAINT 0x0085 +#define LANG_YAKUT 0x85 +#define VK_F23 0x86 +#define WM_NCACTIVATE 0x0086 +#define LANG_KICHE 0x86 +#define VK_F24 0x87 +#define WM_GETDLGCODE 0x0087 +#define LANG_KINYARWANDA 0x87 +#define WM_SYNCPAINT 0x0088 +#define LANG_WOLOF 0x88 +#define LANG_DARI 0x8c +#define CF_DSPENHMETAFILE 0x008E +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 +#define VK_OEM_NEC_EQUAL 0x92 +#define VK_OEM_FJ_JISHO 0x92 +#define VK_OEM_FJ_MASSHOU 0x93 +#define VK_OEM_FJ_TOUROKU 0x94 +#define VK_OEM_FJ_LOYA 0x95 +#define VK_OEM_FJ_ROYA 0x96 +#define IDI_ICON1 155 +#define VK_LSHIFT 0xA0 +#define WM_NCMOUSEMOVE 0x00A0 +#define VK_RSHIFT 0xA1 +#define WM_NCLBUTTONDOWN 0x00A1 +#define VK_LCONTROL 0xA2 +#define WM_NCLBUTTONUP 0x00A2 +#define VK_RCONTROL 0xA3 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define VK_LMENU 0xA4 +#define WM_NCRBUTTONDOWN 0x00A4 +#define VK_RMENU 0xA5 +#define WM_NCRBUTTONUP 0x00A5 +#define VK_BROWSER_BACK 0xA6 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define VK_BROWSER_FORWARD 0xA7 +#define WM_NCMBUTTONDOWN 0x00A7 +#define VK_BROWSER_REFRESH 0xA8 +#define WM_NCMBUTTONUP 0x00A8 +#define VK_BROWSER_STOP 0xA9 +#define WM_NCMBUTTONDBLCLK 0x00A9 +#define VK_BROWSER_SEARCH 0xAA +#define VK_BROWSER_FAVORITES 0xAB +#define WM_NCXBUTTONDOWN 0x00AB +#define VK_BROWSER_HOME 0xAC +#define WM_NCXBUTTONUP 0x00AC +#define VK_VOLUME_MUTE 0xAD +#define WM_NCXBUTTONDBLCLK 0x00AD +#define VK_VOLUME_DOWN 0xAE +#define VK_VOLUME_UP 0xAF +#define VK_MEDIA_NEXT_TRACK 0xB0 +#define EM_GETSEL 0x00B0 +#define VK_MEDIA_PREV_TRACK 0xB1 +#define EM_SETSEL 0x00B1 +#define VK_MEDIA_STOP 0xB2 +#define EM_GETRECT 0x00B2 +#define VK_MEDIA_PLAY_PAUSE 0xB3 +#define EM_SETRECT 0x00B3 +#define VK_LAUNCH_MAIL 0xB4 +#define EM_SETRECTNP 0x00B4 +#define VK_LAUNCH_MEDIA_SELECT 0xB5 +#define EM_SCROLL 0x00B5 +#define VK_LAUNCH_APP1 0xB6 +#define EM_LINESCROLL 0x00B6 +#define VK_LAUNCH_APP2 0xB7 +#define EM_SCROLLCARET 0x00B7 +#define EM_GETMODIFY 0x00B8 +#define EM_SETMODIFY 0x00B9 +#define VK_OEM_1 0xBA +#define EM_GETLINECOUNT 0x00BA +#define VK_OEM_PLUS 0xBB +#define EM_LINEINDEX 0x00BB +#define VK_OEM_COMMA 0xBC +#define EM_SETHANDLE 0x00BC +#define VK_OEM_MINUS 0xBD +#define EM_GETHANDLE 0x00BD +#define VK_OEM_PERIOD 0xBE +#define EM_GETTHUMB 0x00BE +#define VK_OEM_2 0xBF +#define VK_OEM_3 0xC0 +#define EM_LINELENGTH 0x00C1 +#define EM_REPLACESEL 0x00C2 +#define EM_GETLINE 0x00C4 +#define EM_LIMITTEXT 0x00C5 +#define EM_CANUNDO 0x00C6 +#define EM_UNDO 0x00C7 +#define EM_FMTLINES 0x00C8 +#define EM_LINEFROMCHAR 0x00C9 +#define EM_SETTABSTOPS 0x00CB +#define EM_SETPASSWORDCHAR 0x00CC +#define EM_EMPTYUNDOBUFFER 0x00CD +#define EM_GETFIRSTVISIBLELINE 0x00CE +#define EM_SETREADONLY 0x00CF +#define EM_SETWORDBREAKPROC 0x00D0 +#define EM_GETWORDBREAKPROC 0x00D1 +#define EM_GETPASSWORDCHAR 0x00D2 +#define EM_SETMARGINS 0x00D3 +#define EM_GETMARGINS 0x00D4 +#define EM_GETLIMITTEXT 0x00D5 +#define EM_POSFROMCHAR 0x00D6 +#define EM_CHARFROMPOS 0x00D7 +#define EM_SETIMESTATUS 0x00D8 +#define EM_GETIMESTATUS 0x00D9 +#define VK_OEM_4 0xDB +#define VK_OEM_5 0xDC +#define VK_OEM_6 0xDD +#define VK_OEM_7 0xDE +#define VK_OEM_8 0xDF +#define VK_OEM_AX 0xE1 +#define VK_OEM_102 0xE2 +#define VK_ICO_HELP 0xE3 +#define VK_ICO_00 0xE4 +#define VK_PROCESSKEY 0xE5 +#define VK_ICO_CLEAR 0xE6 +#define VK_PACKET 0xE7 +#define VK_OEM_RESET 0xE9 +#define VK_OEM_JUMP 0xEA +#define VK_OEM_PA1 0xEB +#define VK_OEM_PA2 0xEC +#define VK_OEM_PA3 0xED +#define VK_OEM_WSCTRL 0xEE +#define VK_OEM_CUSEL 0xEF +#define VK_OEM_ATTN 0xF0 +#define BM_GETCHECK 0x00F0 +#define VK_OEM_FINISH 0xF1 +#define BM_SETCHECK 0x00F1 +#define VK_OEM_COPY 0xF2 +#define BM_GETSTATE 0x00F2 +#define VK_OEM_AUTO 0xF3 +#define BM_SETSTATE 0x00F3 +#define VK_OEM_ENLW 0xF4 +#define BM_SETSTYLE 0x00F4 +#define VK_OEM_BACKTAB 0xF5 +#define BM_CLICK 0x00F5 +#define VK_ATTN 0xF6 +#define BM_GETIMAGE 0x00F6 +#define VK_CRSEL 0xF7 +#define BM_SETIMAGE 0x00F7 +#define VK_EXSEL 0xF8 +#define BM_SETDONTCLICK 0x00F8 +#define VK_EREOF 0xF9 +#define VK_PLAY 0xFA +#define VK_ZOOM 0xFB +#define VK_NONAME 0xFC +#define VK_PA1 0xFD +#define VK_OEM_CLEAR 0xFE +#define WM_INPUT_DEVICE_CHANGE 0x00FE +#define SUBVERSION_MASK 0x000000FF +#define WM_INPUT 0x00FF +#define WM_KEYFIRST 0x0100 +#define WM_KEYDOWN 0x0100 +#define WVR_HREDRAW 0x0100 +#define HDS_FILTERBAR 0x0100 +#define TBSTYLE_TOOLTIPS 0x0100 +#define RBS_TOOLTIPS 0x00000100 +#define TTS_USEVISUALSTYLE 0x100 +#define SBARS_SIZEGRIP 0x0100 +#define TBS_TOOLTIPS 0x0100 +#define UDS_HOTTRACK 0x0100 +#define LVS_AUTOARRANGE 0x0100 +#define TVS_CHECKBOXES 0x0100 +#define TVS_EX_EXCLUSIONCHECKBOXES 0x0100 +#define TCS_BUTTONS 0x0100 +#define MCS_NOSELCHANGEONNAV 0x0100 +#define WM_KEYUP 0x0101 +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 +#define WM_UNICHAR 0x0109 +#define WM_KEYLAST 0x0109 +#define WM_IME_STARTCOMPOSITION 0x010D +#define WM_IME_ENDCOMPOSITION 0x010E +#define WM_IME_COMPOSITION 0x010F +#define WM_IME_KEYLAST 0x010F +#define WM_INITDIALOG 0x0110 +#define WM_COMMAND 0x0111 +#define WM_SYSCOMMAND 0x0112 +#define WM_TIMER 0x0113 +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 +#define WM_ENTERIDLE 0x0121 +#define WM_MENURBUTTONUP 0x0122 +#define WM_MENUDRAG 0x0123 +#define WM_MENUGETOBJECT 0x0124 +#define WM_UNINITMENUPOPUP 0x0125 +#define WM_MENUCOMMAND 0x0126 +#define WM_CHANGEUISTATE 0x0127 +#define WM_UPDATEUISTATE 0x0128 +#define WM_QUERYUISTATE 0x0129 +#define WM_CTLCOLORMSGBOX 0x0132 +#define WM_CTLCOLOREDIT 0x0133 +#define WM_CTLCOLORLISTBOX 0x0134 +#define WM_CTLCOLORBTN 0x0135 +#define WM_CTLCOLORDLG 0x0136 +#define WM_CTLCOLORSCROLLBAR 0x0137 +#define WM_CTLCOLORSTATIC 0x0138 +#define MN_GETHMENU 0x01E1 +#define _WIN32_IE_IE20 0x0200 +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSEMOVE 0x0200 +#define WVR_VREDRAW 0x0200 +#define CS_NOCLOSE 0x0200 +#define CF_PRIVATEFIRST 0x0200 +#define HDS_FLAT 0x0200 +#define TBSTYLE_WRAPABLE 0x0200 +#define RBS_VARHEIGHT 0x00000200 +#define TBS_REVERSED 0x0200 +#define LVS_EDITLABELS 0x0200 +#define TVS_TRACKSELECT 0x0200 +#define TVS_EX_DIMMEDCHECKBOXES 0x0200 +#define TCS_MULTILINE 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 +#define WM_MOUSEWHEEL 0x020A +#define WM_XBUTTONDOWN 0x020B +#define WM_XBUTTONUP 0x020C +#define WM_XBUTTONDBLCLK 0x020D +#define WM_MOUSEHWHEEL 0x020E +#define WM_MOUSELAST 0x020E +#define WM_PARENTNOTIFY 0x0210 +#define WM_ENTERMENULOOP 0x0211 +#define WM_EXITMENULOOP 0x0212 +#define WM_NEXTMENU 0x0213 +#define WM_SIZING 0x0214 +#define WM_CAPTURECHANGED 0x0215 +#define WM_MOVING 0x0216 +#define WM_POWERBROADCAST 0x0218 +#define WM_DEVICECHANGE 0x0219 +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 +#define WM_ENTERSIZEMOVE 0x0231 +#define WM_EXITSIZEMOVE 0x0232 +#define WM_DROPFILES 0x0233 +#define WM_MDIREFRESHMENU 0x0234 +#define WM_IME_SETCONTEXT 0x0281 +#define WM_IME_NOTIFY 0x0282 +#define WM_IME_CONTROL 0x0283 +#define WM_IME_COMPOSITIONFULL 0x0284 +#define WM_IME_SELECT 0x0285 +#define WM_IME_CHAR 0x0286 +#define WM_IME_REQUEST 0x0288 +#define WM_IME_KEYDOWN 0x0290 +#define WM_IME_KEYUP 0x0291 +#define WM_NCMOUSEHOVER 0x02A0 +#define WM_MOUSEHOVER 0x02A1 +#define WM_NCMOUSELEAVE 0x02A2 +#define WM_MOUSELEAVE 0x02A3 +#define WM_WTSSESSION_CHANGE 0x02B1 +#define WM_TABLET_FIRST 0x02c0 +#define WM_TABLET_LAST 0x02df +#define CF_PRIVATELAST 0x02FF +#define _WIN32_IE_IE30 0x0300 +#define WM_CUT 0x0300 +#define CF_GDIOBJFIRST 0x0300 +#define WM_COPY 0x0301 +#define _WIN32_IE_IE302 0x0302 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_SIZECLIPBOARD 0x030B +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 +#define WM_HOTKEY 0x0312 +#define WM_PRINT 0x0317 +#define WM_PRINTCLIENT 0x0318 +#define WM_APPCOMMAND 0x0319 +#define WM_THEMECHANGED 0x031A +#define WM_CLIPBOARDUPDATE 0x031D +#define WM_DWMCOMPOSITIONCHANGED 0x031E +#define WM_DWMNCRENDERINGCHANGED 0x031F +#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320 +#define WM_DWMWINDOWMAXIMIZEDCHANGE 0x0321 +#define WM_GETTITLEBARINFOEX 0x033F +#define WM_HANDHELDFIRST 0x0358 +#define WM_HANDHELDLAST 0x035F +#define WM_AFXFIRST 0x0360 +#define WM_AFXLAST 0x037F +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F +#define WM_DDE_FIRST 0x03E0 +#define CF_GDIOBJLAST 0x03FF +#define _WIN32_WINNT_NT4 0x0400 +#define _WIN32_IE_IE40 0x0400 +#define WM_USER 0x0400 +#define WVR_VALIDRECTS 0x0400 +#define HDS_CHECKBOXES 0x0400 +#define TBSTYLE_ALTDRAG 0x0400 +#define RBS_BANDBORDERS 0x00000400 +#define TBS_DOWNISLEFT 0x0400 +#define LVS_OWNERDRAWFIXED 0x0400 +#define TVS_SINGLEEXPAND 0x0400 +#define TVS_EX_DRAWIMAGEASYNC 0x0400 +#define TCS_FIXEDWIDTH 0x0400 +#define ctlFirst 0x0400 +#define psh1 0x0400 +#define _WIN32_IE_IE401 0x0401 +#define psh2 0x0401 +#define psh3 0x0402 +#define psh4 0x0403 +#define psh5 0x0404 +#define psh6 0x0405 +#define psh7 0x0406 +#define psh8 0x0407 +#define psh9 0x0408 +#define psh10 0x0409 +#define psh11 0x040a +#define psh12 0x040b +#define psh13 0x040c +#define psh14 0x040d +#define psh15 0x040e +#define psh16 0x040f +#define _WIN32_WINDOWS 0x0410 +#define chx1 0x0410 +#define chx2 0x0411 +#define chx3 0x0412 +#define chx4 0x0413 +#define chx5 0x0414 +#define chx6 0x0415 +#define chx7 0x0416 +#define chx8 0x0417 +#define chx9 0x0418 +#define chx10 0x0419 +#define chx11 0x041a +#define chx12 0x041b +#define chx13 0x041c +#define chx14 0x041d +#define chx15 0x041e +#define chx16 0x041f +#define rad1 0x0420 +#define rad2 0x0421 +#define rad3 0x0422 +#define rad4 0x0423 +#define rad5 0x0424 +#define rad6 0x0425 +#define rad7 0x0426 +#define rad8 0x0427 +#define rad9 0x0428 +#define rad10 0x0429 +#define rad11 0x042a +#define rad12 0x042b +#define rad13 0x042c +#define rad14 0x042d +#define rad15 0x042e +#define rad16 0x042f +#define grp1 0x0430 +#define grp2 0x0431 +#define grp3 0x0432 +#define grp4 0x0433 +#define frm1 0x0434 +#define frm2 0x0435 +#define frm3 0x0436 +#define frm4 0x0437 +#define rct1 0x0438 +#define rct2 0x0439 +#define rct3 0x043a +#define rct4 0x043b +#define ico1 0x043c +#define ico2 0x043d +#define ico3 0x043e +#define ico4 0x043f +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc5 0x0444 +#define stc6 0x0445 +#define stc7 0x0446 +#define stc8 0x0447 +#define stc9 0x0448 +#define stc10 0x0449 +#define stc11 0x044a +#define stc12 0x044b +#define stc13 0x044c +#define stc14 0x044d +#define stc15 0x044e +#define stc16 0x044f +#define stc17 0x0450 +#define stc18 0x0451 +#define stc19 0x0452 +#define stc20 0x0453 +#define stc21 0x0454 +#define stc22 0x0455 +#define stc23 0x0456 +#define stc24 0x0457 +#define stc25 0x0458 +#define stc26 0x0459 +#define stc27 0x045a +#define stc28 0x045b +#define stc29 0x045c +#define stc30 0x045d +#define stc31 0x045e +#define stc32 0x045f +#define lst1 0x0460 +#define lst2 0x0461 +#define lst3 0x0462 +#define lst4 0x0463 +#define lst5 0x0464 +#define lst6 0x0465 +#define lst7 0x0466 +#define lst8 0x0467 +#define lst9 0x0468 +#define lst10 0x0469 +#define lst11 0x046a +#define lst12 0x046b +#define lst13 0x046c +#define lst14 0x046d +#define lst15 0x046e +#define lst16 0x046f +#define cmb1 0x0470 +#define cmb2 0x0471 +#define cmb3 0x0472 +#define cmb4 0x0473 +#define cmb5 0x0474 +#define cmb6 0x0475 +#define cmb7 0x0476 +#define cmb8 0x0477 +#define cmb9 0x0478 +#define cmb10 0x0479 +#define cmb11 0x047a +#define cmb12 0x047b +#define cmb13 0x047c +#define cmb14 0x047d +#define cmb15 0x047e +#define cmb16 0x047f +#define edt1 0x0480 +#define edt2 0x0481 +#define edt3 0x0482 +#define edt4 0x0483 +#define edt5 0x0484 +#define edt6 0x0485 +#define edt7 0x0486 +#define edt8 0x0487 +#define edt9 0x0488 +#define edt10 0x0489 +#define edt11 0x048a +#define edt12 0x048b +#define edt13 0x048c +#define edt14 0x048d +#define edt15 0x048e +#define edt16 0x048f +#define scr1 0x0490 +#define scr2 0x0491 +#define scr3 0x0492 +#define scr4 0x0493 +#define scr5 0x0494 +#define scr6 0x0495 +#define scr7 0x0496 +#define scr8 0x0497 +#define ctl1 0x04A0 +#define ctlLast 0x04ff +#define _WIN32_WINNT_WIN2K 0x0500 +#define _WIN32_IE_IE50 0x0500 +#define _WIN32_WINNT_WINXP 0x0501 +#define _WIN32_IE_IE501 0x0501 +#define _WIN32_WINNT_WS03 0x0502 +#define _WIN32_IE_IE55 0x0550 +#define _WIN32_WINNT_WIN6 0x0600 +#define _WIN32_WINNT_VISTA 0x0600 +#define _WIN32_WINNT_WS08 0x0600 +#define _WIN32_WINNT_LONGHORN 0x0600 +#define _WIN32_IE_IE60 0x0600 +#define _WIN32_WINNT 0x0600 +#define FILEOPENORD 1536 +#define _WIN32_IE_IE60SP1 0x0601 +#define MULTIFILEOPENORD 1537 +#define _WIN32_IE_WS03 0x0602 +#define PRINTDLGORD 1538 +#define _WIN32_IE_IE60SP2 0x0603 +#define PRNSETUPDLGORD 1539 +#define FINDDLGORD 1540 +#define REPLACEDLGORD 1541 +#define FONTDLGORD 1542 +#define FORMATDLGORD31 1543 +#define FORMATDLGORD30 1544 +#define RUNDLGORD 1545 +#define PAGESETUPDLGORD 1546 +#define NEWFILEOPENORD 1547 +#define PRINTDLGEXORD 1549 +#define PAGESETUPDLGORDMOTIF 1550 +#define COLORMGMTDLGORD 1551 +#define NEWFILEOPENV2ORD 1552 +#define NEWFILEOPENV3ORD 1553 +#define _WIN32_IE_IE70 0x0700 +#define _WIN32_IE 0x0700 +#define CS_SAVEBITS 0x0800 +#define HDS_NOSIZING 0x0800 +#define TBSTYLE_FLAT 0x0800 +#define RBS_FIXEDORDER 0x00000800 +#define SBARS_TOOLTIPS 0x0800 +#define SBT_TOOLTIPS 0x0800 +#define TBS_NOTIFYBEFOREMOVE 0x0800 +#define LVS_ALIGNLEFT 0x0800 +#define TVS_INFOTIP 0x0800 +#define TCS_RAGGEDRIGHT 0x0800 +#define LVS_ALIGNMASK 0x0c00 +#define CS_BYTEALIGNCLIENT 0x1000 +#define HDS_OVERFLOW 0x1000 +#define TBSTYLE_LIST 0x1000 +#define RBS_REGISTERDROP 0x00001000 +#define TBS_TRANSPARENTBKGND 0x1000 +#define LVS_OWNERDATA 0x1000 +#define TVS_FULLROWSELECT 0x1000 +#define TCS_FOCUSONBUTTONDOWN 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 +#define TBSTYLE_CUSTOMERASE 0x2000 +#define RBS_AUTOSIZE 0x00002000 +#define LVS_NOSCROLL 0x2000 +#define TVS_NOSCROLL 0x2000 +#define TCS_OWNERDRAWFIXED 0x2000 +#define CS_GLOBALCLASS 0x4000 +#define TBSTYLE_REGISTERDROP 0x4000 +#define RBS_VERTICALGRIPPER 0x00004000 +#define LVS_NOCOLUMNHEADER 0x4000 +#define TVS_NONEVENHEIGHT 0x4000 +#define TCS_TOOLTIPS 0x4000 +#define IDH_NO_HELP 28440 +#define IDH_MISSING_CONTEXT 28441 +#define IDH_GENERIC_HELP_BUTTON 28442 +#define IDH_OK 28443 +#define IDH_CANCEL 28444 +#define IDH_HELP 28445 +#define LANG_BOSNIAN_NEUTRAL 0x781a +#define LANG_CHINESE_TRADITIONAL 0x7c04 +#define LANG_SERBIAN_NEUTRAL 0x7c1a +#define IDTIMEOUT 32000 +#define OCR_NORMAL 32512 +#define OIC_SAMPLE 32512 +#define IDI_APPLICATION 32512 +#define OCR_IBEAM 32513 +#define OIC_HAND 32513 +#define IDI_HAND 32513 +#define OCR_WAIT 32514 +#define OIC_QUES 32514 +#define IDI_QUESTION 32514 +#define OCR_CROSS 32515 +#define OIC_BANG 32515 +#define IDI_EXCLAMATION 32515 +#define OCR_UP 32516 +#define OIC_NOTE 32516 +#define IDI_ASTERISK 32516 +#define OIC_WINLOGO 32517 +#define IDI_WINLOGO 32517 +#define OIC_SHIELD 32518 +#define IDI_SHIELD 32518 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 +#define OCR_NO 32648 +#define OCR_HAND 32649 +#define OCR_APPSTARTING 32650 +#define OBM_LFARROWI 32734 +#define OBM_RGARROWI 32735 +#define OBM_DNARROWI 32736 +#define OBM_UPARROWI 32737 +#define OBM_COMBO 32738 +#define OBM_MNARROW 32739 +#define OBM_LFARROWD 32740 +#define OBM_RGARROWD 32741 +#define OBM_DNARROWD 32742 +#define OBM_UPARROWD 32743 +#define OBM_RESTORED 32744 +#define OBM_ZOOMD 32745 +#define OBM_REDUCED 32746 +#define OBM_RESTORE 32747 +#define OBM_ZOOM 32748 +#define OBM_REDUCE 32749 +#define OBM_LFARROW 32750 +#define OBM_RGARROW 32751 +#define OBM_DNARROW 32752 +#define OBM_UPARROW 32753 +#define OBM_CLOSE 32754 +#define OBM_OLD_RESTORE 32755 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_REDUCE 32757 +#define OBM_BTNCORNERS 32758 +#define OBM_CHECKBOXES 32759 +#define OBM_CHECK 32760 +#define OBM_BTSIZE 32761 +#define OBM_OLD_LFARROW 32762 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_UPARROW 32765 +#define OBM_SIZE 32766 +#define OBM_OLD_CLOSE 32767 +#define WM_APP 0x8000 +#define HELP_TCARD 0x8000 +#define TBSTYLE_TRANSPARENT 0x8000 +#define RBS_DBLCLKTOGGLE 0x00008000 +#define LVS_NOSORTHEADER 0x8000 +#define TVS_NOHSCROLL 0x8000 +#define TCS_FOCUSNEVER 0x8000 +#define IDC_OPENIL 40000 +#define SC_SIZE 0xF000 +#define SC_SEPARATOR 0xF00F +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 +#define SC_DEFAULT 0xF160 +#define SC_MONITORPOWER 0xF170 +#define SC_CONTEXTHELP 0xF180 +#define LVS_TYPESTYLEMASK 0xfc00 +#define SPVERSION_MASK 0x0000FF00 +//#define HTERROR -2 +#define IDC_STATIC -1 +#define UNICODE_NOCHAR 0xFFFF +//#define PWR_FAIL -1 +#define HTTRANSPARENT -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-IL/msvc9/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-IL/msvc9/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-IL/msvc9/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-IL/src/altivec_common.c b/libs/DevIL-1.7.8/src-IL/src/altivec_common.c new file mode 100644 index 00000000..d3ca2dba --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/altivec_common.c @@ -0,0 +1,40 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Last modified: 17/04/2005 +// by Meloni Dario +// +// Description: Common altivec function. +// +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include +#endif //HAVE_CONFIG_H + +#ifdef ALTIVEC_GCC +#include "altivec_common.h" + +// from http://developer.apple.com/hardware/ve/alignment.html +/*vector unsigned char load_unaligned( unsigned char *buffer ) { + vector unsigned char MSQ, LSQ; + vector unsigned char mask; + MSQ = vec_ld(0, buffer); // most significant quadword + LSQ = vec_ld(15, buffer); // least significant quadword + mask = vec_lvsl(0, buffer); // create the permute mask + return vec_perm(MSQ, LSQ, mask);// align the data +}*/ + +vector float fill_vector_f( float value ) { + vector_t vec; + vec.sf[0] = value; + vector float temp = vec_ld(0,vec.sf); + return vec_splat(temp,0); +} + +inline unsigned int round16( unsigned int v ) { + return ((int)((v/16)*10)%10) > 0 ? (v/16) : (v/16)+1; +} + + +#endif diff --git a/libs/DevIL-1.7.8/src-IL/src/altivec_typeconversion.c b/libs/DevIL-1.7.8/src-IL/src/altivec_typeconversion.c new file mode 100644 index 00000000..b620066e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/altivec_typeconversion.c @@ -0,0 +1,230 @@ +#ifdef HAVE_CONFIG_H +#include +#endif //HAVE_CONFIG_H + +#ifdef ALTIVEC_GCC +#include "altivec_typeconversion.h" + +static inline void abc2cba_internal( register const vector unsigned char p[4], unsigned char *data, register unsigned int length, unsigned char *newdata ) { + register vector unsigned char d0,d1,d2,t0,t1,t2; + + length = eround16(length); + + if( length >= 3 ) { + length -= 3; + + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + + while( length >= 3 ) { + t0 = vec_perm(d0,d1,p[0]); + t1 = vec_perm(d1,d0,p[1]); + t2 = vec_perm(d2,d1,p[2]); + t1 = vec_perm(t1,d2,p[3]); + + vec_st(t0,0,newdata); + vec_st(t1,16,newdata); + vec_st(t2,32,newdata); + + length -= 3; + data += 16*3; + newdata += 16*3; + + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + } + t0 = vec_perm(d0,d1,p[0]); + t1 = vec_perm(d1,d0,p[1]); + t2 = vec_perm(d2,d1,p[2]); + t1 = vec_perm(t1,d2,p[3]); + + vec_st(t0,0,newdata); + vec_st(t1,16,newdata); + vec_st(t2,32,newdata); + } + + if( length == 2 ) { + d0 = vec_ld(0,data); + d1 = vec_ld(16,data); + + t0 = vec_perm(d0,d1,p[0]); + t1 = vec_perm(d1,d0,p[1]); + + vec_st(t0,0,newdata); + vec_st(t1,16,newdata); + } else if( length == 1 ) { + d0 = vec_ld(0,data); + t0 = vec_perm(d0,d0,p[0]); + vec_st(t0,0,newdata); + } +} + +static inline void abcd2cbad_internal( register const vector unsigned char p, unsigned char *data, unsigned int length, unsigned char *newdata ) { + register vector unsigned char d0,d1,d2,z; + z = vec_splat_u8(0); + + length = eround16(length); + + if( length >= 3 ) { + length -= 3; + + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + + while( length >= 3 ) { + d0 = vec_perm(d0,z,p); + d1 = vec_perm(d1,z,p); + d2 = vec_perm(d2,z,p); + + vec_st(d0,0,newdata); + vec_st(d1,16,newdata); + vec_st(d2,32,newdata); + + length -= 3; + data += 16*3; + newdata += 16*3; + + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + } + d0 = vec_perm(d0,z,p); + d1 = vec_perm(d1,z,p); + d2 = vec_perm(d2,z,p); + + vec_st(d0,0,newdata); + vec_st(d1,16,newdata); + vec_st(d2,32,newdata); + } + + if( length == 2 ) { + d0 = vec_ld(0,data); + d1 = vec_ld(16,data); + + d0 = vec_perm(d0,z,p); + d1 = vec_perm(d1,z,p); + + vec_st(d0,0,newdata); + vec_st(d1,16,newdata); + } else if( length == 1 ) { + d0 = vec_ld(0,data); + d0 = vec_perm(d0,d0,z); + vec_st(d0,0,newdata); + } +} + +// Format conversion function +void abc2cba_byte( ILubyte *data, ILuint length, ILubyte *newdata ) { + const vector unsigned char p[4] = +{ (vector unsigned char)(0x02,0x01,0x00,0x05,0x04,0x03,0x08,0x07,0x06,0x0B,0x0A,0x09,0x0E,0x0D,0x0C,0x11), + (vector unsigned char)(0x00,0x10,0x04,0x03,0x02,0x07,0x06,0x05,0x0A,0x09,0x08,0x0D,0x0C,0x0B,0x0E,0x0F), + (vector unsigned char)(0x1E,0x03,0x02,0x01,0x06,0x05,0x04,0x09,0x08,0x07,0x0C,0x0B,0x0A,0x0F,0x0E,0x0D), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x10,0x0F)}; + abc2cba_internal(p,data,length,newdata); +} + +void abc2cba_short( ILushort *data, ILuint length, ILushort *newdata ) { + const vector unsigned char p[4] = +{ (vector unsigned char)(0x04,0x05,0x02,0x03,0x00,0x01,0x0A,0x0B,0x08,0x09,0x06,0x07,0x10,0x11,0x0E,0x0F), + (vector unsigned char)(0x1C,0x1D,0x06,0x07,0x04,0x05,0x02,0x03,0x0C,0x0D,0x0A,0x0B,0x08,0x09,0x0E,0x0F), + (vector unsigned char)(0x00,0x01,0x1E,0x1F,0x08,0x09,0x06,0x07,0x04,0x05,0x0E,0x0F,0x0C,0x0D,0x0A,0x0B), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x12,0x13)}; + abc2cba_internal(p,(ILubyte*)data,length,(ILubyte*)newdata); +} + +void abc2cba_int( ILuint *data, ILuint length, ILuint *newdata ) { + const vector unsigned char p[4] = +{ (vector unsigned char)(0x08,0x09,0x0A,0x0B,0x04,0x05,0x06,0x07,0x00,0x01,0x02,0x03,0x14,0x15,0x16,0x17), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x1C,0x1D,0x1E,0x1F,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F), + (vector unsigned char)(0x18,0x19,0x1A,0x1B,0x0C,0x0D,0x0E,0x0F,0x08,0x09,0x0A,0x0B,0x04,0x05,0x06,0x07), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12,0x13,0x0C,0x0D,0x0E,0x0F)}; + abc2cba_internal(p,(ILubyte*)data,length,(ILubyte*)newdata); +} + +void abc2cba_double( ILdouble *data, ILuint length, ILdouble *newdata ) { + const vector unsigned char p[4] = +{ (vector unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F), + (vector unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F), + (vector unsigned char)(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F)}; + abc2cba_internal(p,(ILubyte*)data,length,(ILubyte*)newdata); +} + +void abcd2cbad_byte( ILubyte *data, ILuint length, ILubyte *newdata ) { + const vector unsigned char p = (vector unsigned char)(0x02,0x01,0x00,0x03,0x06,0x05,0x04,0x07,0x0A,0x09,0x08,0x0B, 0x0E,0x0D,0x0C,0x0F); + abcd2cbad_internal(p,data,length,newdata); +} + +void abcd2cbad_short( ILushort *data, ILuint length, ILushort *newdata ) { + const vector unsigned char p = (vector unsigned char)(0x04,0x05,0x02,0x03,0x00,0x01,0x06,0x07,0x0C,0x0D,0x0A,0x0B,0x08,0x09,0x0E,0x0F); + abcd2cbad_internal(p,(ILubyte*)data,length,(ILubyte*)newdata); +} + +void abcd2cbad_int( ILuint *data, ILuint length, ILuint *newdata ) { + const vector unsigned char p = (vector unsigned char)(0x08,0x09,0x0A,0x0B,0x04,0x05,0x06,0x07,0x00,0x01,0x02,0x03,0x0C,0x0D,0x0E,0x0F); + abcd2cbad_internal(p,(ILubyte*)data,length,(ILubyte*)newdata); +} + +void abcd2cbad_double( ILdouble *tdata, ILuint length, ILdouble *tnewdata ) { + register ILubyte *data = (ILubyte*)tdata; + register ILubyte *newdata = (ILubyte*)tnewdata; + const vector unsigned char p = (vector unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F); + register vector unsigned char d0,d1,d2,d3,t0,t1,t2,t3; + + length = eround16(length); + + if( length >= 4 ) { + length -= 4; + + d3 = vec_ld(48,data); + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + + while( length >= 4 ) { + t0 = vec_perm(d0,d1,p); + t1 = vec_perm(d1,d0,p); + t2 = vec_perm(d2,d3,p); + t3 = vec_perm(d3,d2,p); + + vec_st(t0,0,newdata); + vec_st(t1,16,newdata); + vec_st(t2,32,newdata); + vec_st(t3,48,newdata); + + length -= 4; + data += 16*4; + newdata += 16*4; + + d3 = vec_ld(48,data); + d2 = vec_ld(32,data); + d1 = vec_ld(16,data); + d0 = vec_ld(0,data); + } + t0 = vec_perm(d0,d1,p); + t1 = vec_perm(d1,d0,p); + t2 = vec_perm(d2,d3,p); + t3 = vec_perm(d3,d2,p); + + vec_st(d0,0,newdata); + vec_st(d1,16,newdata); + vec_st(d2,32,newdata); + vec_st(d3,48,newdata); + } + + if( length == 2 ) { + d0 = vec_ld(0,data); + d1 = vec_ld(16,data); + + t0 = vec_perm(d0,d1,p); + t1 = vec_perm(d1,d0,p); + + vec_st(t0,0,newdata); + vec_st(t1,16,newdata); + } +} + +#endif diff --git a/libs/DevIL-1.7.8/src-IL/src/il_alloc.c b/libs/DevIL-1.7.8/src-IL/src/il_alloc.c new file mode 100644 index 00000000..06688efe --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_alloc.c @@ -0,0 +1,287 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Last modified: 08/17/2008 +// +// Filename: src-IL/src/il_alloc.c +// +// Description: Memory allocation functions +// +//----------------------------------------------------------------------------- + + +#define __ALLOC_C + +// Memory leak detection +#ifdef _WIN32 + #ifdef _DEBUG + #define _CRTDBG_MAP_ALLOC + #include + #ifndef _WIN32_WCE // Does not have this header. + #include + #endif + #endif +#endif//_WIN32 + +#include "il_internal.h" +#include +#include + +#ifdef MM_MALLOC +#include +#endif + +static void ILAPIENTRY DefaultFreeFunc(const void * CONST_RESTRICT Ptr); +static void* ILAPIENTRY DefaultAllocFunc(const ILsizei Size); + +static mAlloc ialloc_ptr = DefaultAllocFunc; +static mFree ifree_ptr = DefaultFreeFunc; + +/*** Vector Allocation/Deallocation Function ***/ +#ifdef VECTORMEM +void *vec_malloc(const ILsizei size) +{ + const ILsizei _size = size % 16 > 0 ? size + 16 - (size % 16) : size; // align size value + +#ifdef MM_MALLOC + return _mm_malloc(_size,16); +#else +#ifdef VALLOC + return valloc( _size ); +#else +#ifdef POSIX_MEMALIGN + char *buffer; + return posix_memalign((void**)&buffer, 16, _size) == 0 ? buffer : NULL; +#else +#ifdef MEMALIGN + return memalign( 16, _size ); +#else + // Memalign hack from ffmpeg for MinGW + void *ptr; + int diff; + ptr = malloc(_size+16+1); + diff= ((-(int)ptr - 1)&15) + 1; + ptr = (void*)(((char*)ptr)+diff); + ((char*)ptr)[-1]= diff; + return ptr; +#endif //MEMALIGN +#endif //POSIX_MEMALIGN +#endif //VALLOC +#endif //MM_MALLOC +} + +void *ivec_align_buffer(void *buffer, const ILsizei size) +{ + if( (ILsizei)buffer % 16 != 0 ) { + void *aligned_buffer = vec_malloc( size ); + memcpy( aligned_buffer, buffer, size ); + ifree( buffer ); + return aligned_buffer; + } + return buffer; +} +#endif + + +/*** Allocation/Deallocation Function ***/ +void* ILAPIENTRY ialloc(const ILsizei Size) +{ + void *Ptr = ialloc_ptr(Size); + if (Ptr == NULL) + ilSetError(IL_OUT_OF_MEMORY); + return Ptr; +} + +void ILAPIENTRY ifree(const void * CONST_RESTRICT Ptr) +{ + if (Ptr == NULL) + return; + ifree_ptr(Ptr); + return; +} + +void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num) +{ + void *Ptr = ialloc(Size * Num); + if (Ptr == NULL) + return Ptr; + imemclear(Ptr, Size * Num); + return Ptr; +} + +/*** Default Allocation/Deallocation Function ***/ +static void* ILAPIENTRY DefaultAllocFunc(const ILsizei Size) +{ +#ifdef VECTORMEM + return (void*)vec_malloc(Size); +#else + return malloc(Size); +#endif //VECTORMEM +} + +static void ILAPIENTRY DefaultFreeFunc(const void * CONST_RESTRICT ptr) +{ + if (ptr) + { +#ifdef MM_MALLOC + _mm_free((void*)ptr); +#else +#if defined(VECTORMEM) & !defined(POSIX_MEMALIGN) & !defined(VALLOC) & !defined(MEMALIGN) & !defined(MM_MALLOC) + free(((char*)Ptr) - ((char*)Ptr)[-1]); +#else + free((void*)ptr); +#endif //OTHERS... +#endif //MM_MALLOC + } +} + +/*** Manipulate Allocation/Deallocation Function ***/ +void ILAPIENTRY ilResetMemory() // Deprecated +{ + ialloc_ptr = DefaultAllocFunc; + ifree_ptr = DefaultFreeFunc; +} + +void ILAPIENTRY ilSetMemory(mAlloc AllocFunc, mFree FreeFunc) +{ + ialloc_ptr = AllocFunc == NULL ? DefaultAllocFunc : AllocFunc; + ifree_ptr = FreeFunc == NULL ? DefaultFreeFunc : FreeFunc; +} + + +/*#if defined(_WIN32) && defined(_MEM_DEBUG) +#include + +int bAtexit = 0; + + +typedef struct ALLOC_INFO +{ + unsigned long address; + unsigned long size; + char file[64]; + unsigned long line; + struct ALLOC_INFO *Next; +} ALLOC_INFO; +ALLOC_INFO *AllocList; + + +void AddTrack(unsigned long addr, unsigned long size, const char *file, unsigned long line) +{ + ALLOC_INFO *Temp; + + if (AllocList == NULL) { + AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds. + AllocList->address = addr; + AllocList->size = size; + AllocList->line = line; + strncpy(AllocList->file, file, 63); + AllocList->Next = NULL; + } + else { + Temp = AllocList; + AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds. + AllocList->address = addr; + AllocList->size = size; + AllocList->line = line; + strncpy(AllocList->file, file, 63); + AllocList->Next = Temp; + } + + return; +} + + +void RemoveTrack(unsigned long addr) +{ + ALLOC_INFO *Temp, *Prev; + + Temp = AllocList; + Prev = NULL; + + if (Temp == NULL) + return; + + while (Temp != NULL) { + if (Temp->address == addr) { + if (Prev == NULL) { + AllocList = Temp->Next; + free(Temp); + } + else { + Prev->Next = Temp->Next; + free(Temp); + } + break; + } + Prev = Temp; + Temp = Temp->Next; + } + + return; +} + + +void DumpUnfreed(void) +{ + unsigned long TotalSize = 0; + char buf[1024]; + ALLOC_INFO *i = AllocList; + + OutputDebugString("DevIL Unfreed Information:\n"); + while (i != NULL) { + sprintf(buf, "%s(%d) : %d bytes unfreed at %d\n", i->file, i->line, i->size, i->address); + OutputDebugString(buf); + TotalSize += i->size; + + AllocList = i->Next; + free(i); + i = AllocList; + } + + sprintf(buf, "-----------------------------------------------------------\n"); + OutputDebugString(buf); + sprintf(buf, "Total Unfreed: %d bytes\n\n\n", TotalSize); + OutputDebugString(buf); +} + +void AddToAtexit() +{ + if (bAtexit) + return; + atexit(DumpUnfreed); + bAtexit = 1; +} + +void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line) +{ + void *ptr; + ptr = calloc(size, num); + if (!ptr) + return NULL; + AddToAtexit(); + AddTrack((unsigned long)ptr, size * num, file, line); + return ptr; +} + + +void *m_alloc(unsigned long size, const char *file, unsigned long line) +{ + void *ptr; + ptr = malloc(size); + if (!ptr) + return NULL; + AddToAtexit(); + AddTrack((unsigned long)ptr, size, file, line); + return ptr; +} + + +void f_ree(void *ptr) +{ + RemoveTrack((unsigned long)ptr); + free(ptr); + return; +} + +#endif//defined(_WIN32) && defined(_MEM_DEBUG)*/ diff --git a/libs/DevIL-1.7.8/src-IL/src/il_bits.c b/libs/DevIL-1.7.8/src-IL/src/il_bits.c new file mode 100644 index 00000000..4e3ba7f4 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_bits.c @@ -0,0 +1,185 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 08/14/2004 +// +// Filename: src-IL/src/il_bits.c +// +// Description: Implements a file class that reads/writes bits directly. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_bits.h" + + +// Opens a BITFILE just like fopen opens a FILE. +/*BITFILE *bopen(const char *FileName, const char *Mode) +{ + BITFILE *ToReturn = NULL; + + if (FileName != NULL) { + ToReturn = (BITFILE*)ialloc(sizeof(BITFILE)); + if (ToReturn != NULL) { + iopenr((char*)FileName); + ToReturn->File = iGetFile(); + ToReturn->BitPos = 0; + ToReturn->ByteBitOff = 8; + ToReturn->Buff = 0; + } + } + + return ToReturn; +}*/ + + +// Converts a FILE to a BITFILE. +BITFILE *bfile(ILHANDLE File) +{ + BITFILE *ToReturn = NULL; + + if (File != NULL) { + ToReturn = (BITFILE*)ialloc(sizeof(BITFILE)); + if (ToReturn != NULL) { + ToReturn->File = File; + ToReturn->BitPos = itell() << 3; + ToReturn->ByteBitOff = 8; + ToReturn->Buff = 0; + } + } + + return ToReturn; +} + + +// Closes an open BITFILE and frees memory for it. +ILint bclose(BITFILE *BitFile) +{ + if (BitFile == NULL || BitFile->File == NULL) + return IL_EOF; + + // Removed 01-26-2008. The file will get closed later by + // the calling function. + //icloser(BitFile->File); + ifree(BitFile); + + return 0; +} + + +// Returns the current bit position of a BITFILE. +ILint btell(BITFILE *BitFile) +{ + return BitFile->BitPos; +} + + +// Seeks in a BITFILE just like fseek for FILE. +ILint bseek(BITFILE *BitFile, ILuint Offset, ILuint Mode) +{ + ILint KeepPos, Len; + + if (BitFile == NULL || BitFile->File == NULL) + return 1; + + switch (Mode) + { + case IL_SEEK_SET: + if (!iseek(Offset >> 3, Mode)) { + BitFile->BitPos = Offset; + BitFile->ByteBitOff = BitFile->BitPos % 8; + } + break; + case IL_SEEK_CUR: + if (!iseek(Offset >> 3, Mode)) { + BitFile->BitPos += Offset; + BitFile->ByteBitOff = BitFile->BitPos % 8; + } + break; + case IL_SEEK_END: + KeepPos = itell(); + iseek(0, IL_SEEK_END); + Len = itell(); + iseek(0, IL_SEEK_SET); + + if (!iseek(Offset >> 3, Mode)) { + BitFile->BitPos = (Len << 3) + Offset; + BitFile->ByteBitOff = BitFile->BitPos % 8; + } + + break; + + default: + return 1; + } + + return 0; +} + + +// hehe, "bread". It reads data into Buffer from the BITFILE, just like fread for FILE. +ILint bread(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile) +{ + // Note that this function is somewhat useless: In binary image + // formats, there are some pad bits after each scanline. This + // function does not take that into account, so you must use bseek to + // skip the calculated value of bits. + + ILuint BuffPos = 0, Count = Size * Number; + + while (BuffPos < Count) { + if (BitFile->ByteBitOff < 0 || BitFile->ByteBitOff > 7) { + BitFile->ByteBitOff = 7; + if (iread(&BitFile->Buff, 1, 1) != 1) // Reached eof or error... + return BuffPos; + } + + *((ILubyte*)(Buffer) + BuffPos) = (ILubyte)!!(BitFile->Buff & (1 << BitFile->ByteBitOff)); + + BuffPos++; + BitFile->ByteBitOff--; + } + + return BuffPos; +} + + +// Reads bits and puts the first bit in the file as the highest in the return value. +ILuint breadVal(ILuint NumBits, BITFILE *BitFile) +{ + ILuint BuffPos = 0; + ILuint Buffer = 0; + + // Only returning up to 32 bits at one time + if (NumBits > 32) { + ilSetError(IL_INTERNAL_ERROR); + return 0; + } + + while (BuffPos < NumBits) { + Buffer <<= 1; + if (BitFile->ByteBitOff < 0 || BitFile->ByteBitOff > 7) { + BitFile->ByteBitOff = 7; + if (iread(&BitFile->Buff, 1, 1) != 1) // Reached eof or error... + return BuffPos; + } + + Buffer = Buffer + (ILubyte)!!(BitFile->Buff & (1 << BitFile->ByteBitOff)); + + BuffPos++; + BitFile->ByteBitOff--; + } + + return BuffPos; +} + + +// Not implemented yet. +/*ILint bwrite(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile) +{ + + + return 0; +}*/ diff --git a/libs/DevIL-1.7.8/src-IL/src/il_blp.c b/libs/DevIL-1.7.8/src-IL/src/il_blp.c new file mode 100644 index 00000000..24044519 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_blp.c @@ -0,0 +1,736 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/src/il_blp.c +// +// Description: Reads from a Blizzard Texture (.blp). +// Specifications were found at http://www.wowwiki.com/BLP_files +// for BLP2 and from +// http://web.archive.org/web/20080117120549/magos.thejefffiles.com/War3ModelEditor/MagosBlpFormat.txt +// for BLP1. +// +//----------------------------------------------------------------------------- + +//@TODO: Add support for the BLP1 format as well. + +#include "il_internal.h" +#ifndef IL_NO_BLP +#include "il_dds.h" + + +typedef struct BLP1HEAD +{ + ILubyte Sig[4]; + ILuint Compression; // Texture type: 0 = JPG, 1 = Paletted + ILuint Flags; // #8 - Uses alpha channel (?) + ILuint Width; // Image width in pixels + ILuint Height; // Image height in pixels + ILuint PictureType; // 3 - Uncompressed index list + alpha list + // 4 - Uncompressed index list + alpha list + // 5 - Uncompressed index list + ILuint PictureSubType; // 1 - ??? + ILuint MipOffsets[16]; // The file offsets of each mipmap, 0 for unused + ILuint MipLengths[16]; // The length of each mipmap data block +} BLP1HEAD; + +typedef struct BLP2HEAD +{ + ILubyte Sig[4]; // "BLP2" signature + ILuint Type; // Texture type: 0 = JPG, 1 = DXTC + ILubyte Compression; // Compression mode: 1 = raw, 2 = DXTC + ILubyte AlphaBits; // 0, 1, or 8 + ILubyte AlphaType; // 0, 1, 7 or 8 + ILubyte HasMips; // 0 = no mips levels, 1 = has mips (number of levels determined by image size) + ILuint Width; // Image width in pixels + ILuint Height; // Image height in pixels + ILuint MipOffsets[16]; // The file offsets of each mipmap, 0 for unused + ILuint MipLengths[16]; // The length of each mipmap data block +} BLP2HEAD; + +// Data formats +#define BLP_TYPE_JPG 0 +#define BLP_TYPE_DXTC_RAW 1 +#define BLP_RAW 1 +#define BLP_DXTC 2 + +#define BLP_RAW_PLUS_ALPHA1 3 +#define BLP_RAW_PLUS_ALPHA2 4 +#define BLP_RAW_NO_ALPHA 5 + + +ILboolean iIsValidBlp2(void); +ILboolean iCheckBlp2(BLP2HEAD *Header); +ILboolean iLoadBlpInternal(void); +ILboolean iLoadBlp1(void); +ILboolean iCheckBlp1(BLP1HEAD *Header); +ILboolean iGetBlp1Head(BLP1HEAD *Header); + + +//! Checks if the file specified in FileName is a valid BLP file. +ILboolean ilIsValidBlp(ILconst_string FileName) +{ + ILHANDLE BlpFile; + ILboolean bBlp = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("blp"))) { + ilSetError(IL_INVALID_EXTENSION); + return bBlp; + } + + BlpFile = iopenr(FileName); + if (BlpFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bBlp; + } + + bBlp = ilIsValidBlpF(BlpFile); + icloser(BlpFile); + + return bBlp; +} + + +//! Checks if the ILHANDLE contains a valid BLP file at the current position. +ILboolean ilIsValidBlpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidBlp2(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid BLP lump. +ILboolean ilIsValidBlpL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidBlp2(); +} + + +// Internal function used to get the BLP header from the current file. +ILboolean iGetBlp2Head(BLP2HEAD *Header) +{ + ILuint i; + + iread(Header->Sig, 1, 4); + Header->Type = GetLittleUInt(); + Header->Compression = igetc(); + Header->AlphaBits = igetc(); + Header->AlphaType = igetc(); + Header->HasMips = igetc(); + Header->Width = GetLittleUInt(); + Header->Height = GetLittleUInt(); + for (i = 0; i < 16; i++) + Header->MipOffsets[i] = GetLittleUInt(); + for (i = 0; i < 16; i++) + Header->MipLengths[i] = GetLittleUInt(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidBlp2(void) +{ + BLP2HEAD Header; + + if (!iGetBlp2Head(&Header)) + return IL_FALSE; + iseek(-148, IL_SEEK_CUR); + + return iCheckBlp2(&Header); +} + + +// Internal function used to check if the HEADER is a valid BLP header. +ILboolean iCheckBlp2(BLP2HEAD *Header) +{ + // The file signature is 'BLP2'. + if (strncmp(Header->Sig, "BLP2", 4)) + return IL_FALSE; + // Valid types are JPEG and DXTC. JPEG is not common, though. + // WoW only uses DXTC. + if (Header->Type != BLP_TYPE_JPG && Header->Type != BLP_TYPE_DXTC_RAW) + return IL_FALSE; + // For BLP_TYPE_DXTC_RAW, we can have RAW and DXTC compression. + if (Header->Compression != BLP_RAW && Header->Compression != BLP_DXTC) + return IL_FALSE; + // Alpha bits can only be 0, 1 and 8. + if (Header->AlphaBits != 0 && Header->AlphaBits != 1 && Header->AlphaBits != 8) + return IL_FALSE; + // Alpha type can only be 0, 1, 7 and 8. + if (Header->AlphaType != 0 && Header->AlphaType != 1 && Header->AlphaType != 7 && Header->AlphaType != 8) + return IL_FALSE; + // Width or height of 0 makes no sense. + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a BLP file +ILboolean ilLoadBlp(ILconst_string FileName) +{ + ILHANDLE BlpFile; + ILboolean bBlp = IL_FALSE; + + BlpFile = iopenr(FileName); + if (BlpFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bBlp; + } + + bBlp = ilLoadBlpF(BlpFile); + icloser(BlpFile); + + return bBlp; +} + + +//! Reads an already-opened BLP file +ILboolean ilLoadBlpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadBlpInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a BLP +ILboolean ilLoadBlpL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadBlpInternal(); +} + + +// Internal function used to load the BLP. +ILboolean iLoadBlpInternal(void) +{ + BLP2HEAD Header; + ILubyte *CompData; + ILimage *Image; + ILuint Mip, j, x, CompSize, AlphaSize, AlphaOff; + ILint y; + ILboolean BaseCreated = IL_FALSE; + ILubyte *DataAndAlpha = NULL, *Palette = NULL, AlphaMask; //, *JpegHeader, *JpegData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetBlp2Head(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + if (!iCheckBlp2(&Header)) { + goto check_blp1; + } + +//@TODO: Remove this! + if (Header.Type != BLP_TYPE_DXTC_RAW) + return IL_FALSE; + + switch (Header.Compression) + { + case BLP_RAW: + for (Mip = 0; Mip < 16; Mip++) { // Possible maximum of 16 mipmaps + if (BaseCreated) { + if (Header.HasMips == 0) // Does not have mipmaps, so we are done. + break; + if (Image->Width == 1 && Image->Height == 1) // Already at the smallest mipmap (1x1), so we are done. + break; + if (Header.MipOffsets[Mip] == 0 || Header.MipLengths == 0) // No more mipmaps in the file. + break; + } + + switch (Header.AlphaBits) + { + case 0: + if (!BaseCreated) { // Have not created the base image yet, so use ilTexImage. + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + Image = iCurImage; + BaseCreated = IL_TRUE; + + Image->Pal.Palette = (ILubyte*)ialloc(256 * 4); // 256 entries of ARGB8888 values (1024). + if (Image->Pal.Palette == NULL) + return IL_FALSE; + Image->Pal.PalSize = 1024; + Image->Pal.PalType = IL_PAL_BGRA32; //@TODO: Find out if this is really BGRA data. + if (iread(Image->Pal.Palette, 1, 1024) != 1024) // Read in the palette. + return IL_FALSE; + } + else { + Image->Mipmaps = ilNewImageFull(Image->Width >> 1, Image->Height >> 1, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + + // Copy the palette from the first image before we change our Image pointer. + iCopyPalette(&Image->Mipmaps->Pal, &Image->Pal); + // Move to the next mipmap in the linked list. + Image = Image->Mipmaps; + } + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + // These two should be the same (tells us how much data is in the file for this mipmap level). + if (Header.MipLengths[Mip] != Image->SizeOfData) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + // Finally read in the image data. + iseek(Header.MipOffsets[Mip], IL_SEEK_SET); + if (iread(Image->Data, 1, Image->SizeOfData) != Image->SizeOfData) + return IL_FALSE; + break; + + case 1: + if (!BaseCreated) { // Have not created the base image yet, so use ilTexImage. + if (!ilTexImage(Header.Width, Header.Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + Image = iCurImage; + BaseCreated = IL_TRUE; + + Palette = (ILubyte*)ialloc(256 * 4); + if (Palette == NULL) + return IL_FALSE; + + // Read in the palette. + if (iread(Palette, 1, 1024) != 1024) { + ifree(Palette); + return IL_FALSE; + } + + // We only allocate this once and reuse this buffer with every mipmap (since successive ones are smaller). + DataAndAlpha = (ILubyte*)ialloc(Image->Width * Image->Height); + if (DataAndAlpha == NULL) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + } + else { + Image->Mipmaps = ilNewImageFull(Image->Width >> 1, Image->Height >> 1, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + + // Move to the next mipmap in the linked list. + Image = Image->Mipmaps; + } + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + // Determine the size of the alpha data following the color indices. + AlphaSize = Image->Width * Image->Height / 8; + if (AlphaSize == 0) + AlphaSize = 1; // Should never be 0. + // These two should be the same (tells us how much data is in the file for this mipmap level). + if (Header.MipLengths[Mip] != Image->SizeOfData / 4 + AlphaSize) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Seek to the data and read it. + iseek(Header.MipOffsets[Mip], IL_SEEK_SET); + if (iread(DataAndAlpha, Image->Width * Image->Height, 1) != 1) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + + // Convert the color-indexed data to BGRX. + for (j = 0; j < Image->Width * Image->Height; j++) { + Image->Data[j*4] = Palette[DataAndAlpha[j]*4]; + Image->Data[j*4+1] = Palette[DataAndAlpha[j]*4+1]; + Image->Data[j*4+2] = Palette[DataAndAlpha[j]*4+2]; + } + + // Read in the alpha list. + if (iread(DataAndAlpha, AlphaSize, 1) != 1) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + + AlphaMask = 0x01; // Lowest bit + AlphaOff = 0; + // The really strange thing about this alpha data is that it is upside-down when compared to the + // regular color-indexed data, so we have to flip it. + for (y = Image->Height - 1; y >= 0; y--) { + for (x = 0; x < Image->Width; x++) { + if (AlphaMask == 0) { // Shifting it past the highest bit makes it 0, since we only have 1 byte. + AlphaOff++; // Move along the alpha buffer. + AlphaMask = 0x01; // Reset the alpha mask. + } + // This is just 1-bit alpha, so it is either on or off. + Image->Data[Image->Bps * y + x * 4 + 3] = DataAndAlpha[AlphaOff] & AlphaMask ? 0xFF : 0x00; + AlphaMask <<= 1; + } + } + + break; + + default: + //@TODO: Accept any other alpha values? + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + } + + // Done, so we can finally free these two. + ifree(DataAndAlpha); + ifree(Palette); + + break; + + case BLP_DXTC: + for (Mip = 0; Mip < 16; Mip++) { // Possible maximum of 16 mipmaps + //@TODO: Other formats + //if (Header.AlphaBits == 0) + // if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + // return IL_FALSE; + if (!BaseCreated) { // Have not created the base image yet, so use ilTexImage. + if (!ilTexImage(Header.Width, Header.Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + Image = iCurImage; + BaseCreated = IL_TRUE; + } + else { + if (Header.HasMips == 0) // Does not have mipmaps, so we are done. + break; + if (Image->Width == 1 && Image->Height == 1) // Already at the smallest mipmap (1x1), so we are done. + break; + if (Header.MipOffsets[Mip] == 0 || Header.MipLengths[Mip] == 0) // No more mipmaps in the file. + break; + + //@TODO: Other formats + // ilNewImageFull automatically changes widths and heights of 0 to 1, so we do not have to worry about it. + Image->Mipmaps = ilNewImageFull(Image->Width >> 1, Image->Height >> 1, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + Image = Image->Mipmaps; + } + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + //@TODO: Only do the allocation once. + CompData = (ILubyte*)ialloc(Header.MipLengths[Mip]); + if (CompData == NULL) + return IL_FALSE; + + // Read in the compressed mipmap data. + iseek(Header.MipOffsets[Mip], IL_SEEK_SET); + if (iread(CompData, 1, Header.MipLengths[Mip]) != Header.MipLengths[Mip]) { + ifree(CompData); + return IL_FALSE; + } + + switch (Header.AlphaBits) + { + case 0: // DXT1 without alpha + case 1: // DXT1 with alpha + // Check to make sure that the MipLength reported is the size needed, so that + // DecompressDXT1 does not crash. + CompSize = ((Image->Width + 3) / 4) * ((Image->Height + 3) / 4) * 8; + if (CompSize != Header.MipLengths[Mip]) { + ilSetError(IL_INVALID_FILE_HEADER); + ifree(CompData); + return IL_FALSE; + } + if (!DecompressDXT1(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + break; + + case 8: + // Check to make sure that the MipLength reported is the size needed, so that + // DecompressDXT3/5 do not crash. + CompSize = ((Image->Width + 3) / 4) * ((Image->Height + 3) / 4) * 16; + if (CompSize != Header.MipLengths[Mip]) { + ifree(CompData); + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + switch (Header.AlphaType) + { + case 0: // All three of + case 1: // these refer to + case 8: // DXT3... + if (!DecompressDXT3(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + break; + + case 7: // DXT5 compression + if (!DecompressDXT5(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + break; + + //default: // Should already be checked by iCheckBlp2. + } + break; + //default: // Should already be checked by iCheckBlp2. + } + //@TODO: Save DXTC data. + ifree(CompData); + } + break; + //default: + } + + return ilFixImage(); + +check_blp1: + iseek(-148, IL_SEEK_CUR); // Go back the size of the BLP2 header, since we tried reading it. + return iLoadBlp1(); +} + + +ILboolean iGetBlp1Head(BLP1HEAD *Header) +{ + ILuint i; + + iread(Header->Sig, 1, 4); + Header->Compression = GetLittleUInt(); + Header->Flags = GetLittleUInt(); + Header->Width = GetLittleUInt(); + Header->Height = GetLittleUInt(); + Header->PictureType = GetLittleUInt(); + Header->PictureSubType = GetLittleUInt(); + for (i = 0; i < 16; i++) + Header->MipOffsets[i] = GetLittleUInt(); + for (i = 0; i < 16; i++) + Header->MipLengths[i] = GetLittleUInt(); + + return IL_TRUE; +} + + +ILboolean iCheckBlp1(BLP1HEAD *Header) +{ + // The file signature is 'BLP1'. + if (strncmp(Header->Sig, "BLP1", 4)) + return IL_FALSE; + // Valid types are JPEG and RAW. JPEG is not common, though. + if (Header->Compression != BLP_TYPE_JPG && Header->Compression != BLP_RAW) + return IL_FALSE; +//@TODO: Find out what Flags is for. + + // PictureType determines whether this has an alpha list. + if (Header->PictureType != BLP_RAW_PLUS_ALPHA1 && Header->PictureType != BLP_RAW_PLUS_ALPHA2 + && Header->PictureType != BLP_RAW_NO_ALPHA) + return IL_FALSE; + // Width or height of 0 makes no sense. + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + + return IL_TRUE; +} + + +ILboolean iLoadBlp1() +{ + BLP1HEAD Header; + ILubyte *DataAndAlpha, *Palette; + ILuint i; + ILimage *Image = iCurImage; + ILboolean BaseCreated = IL_FALSE; +#ifndef IL_NO_JPG + ILubyte *JpegHeader, *JpegData; + ILuint JpegHeaderSize; +#endif//IL_NO_JPG + + if (!iGetBlp1Head(&Header)) + return IL_FALSE; + if (!iCheckBlp1(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + //@TODO: Remove this. + i = 0; + + switch (Header.Compression) + { + case BLP_TYPE_JPG: +#ifdef IL_NO_JPG + // We can only do the Jpeg decoding if we do not have IL_NO_JPEG defined. + return IL_FALSE; +#else + JpegHeaderSize = GetLittleUInt(); + JpegHeader = (ILubyte*)ialloc(JpegHeaderSize); + if (JpegHeader == NULL) + return IL_FALSE; + // Read the shared Jpeg header. + if (iread(JpegHeader, 1, JpegHeaderSize) != JpegHeaderSize) { + ifree(JpegHeader); + return IL_FALSE; + } + + //for (i = 0; i < 16; i++) { // Possible maximum of 16 mipmaps + //@TODO: Check return value? + iseek(Header.MipOffsets[i], IL_SEEK_SET); + JpegData = (ILubyte*)ialloc(JpegHeaderSize + Header.MipLengths[i]); + if (JpegData == NULL) { + ifree(JpegHeader); + return IL_FALSE; + } + memcpy(JpegData, JpegHeader, JpegHeaderSize); + if (iread(JpegData + JpegHeaderSize, Header.MipLengths[i], 1) != 1) + return IL_FALSE; + + // Just send the data straight to the Jpeg loader. + if (!ilLoadJpegL(JpegData, JpegHeaderSize + Header.MipLengths[i])) + return IL_FALSE; + + // The image data is in BGR(A) order, even though it is Jpeg-compressed. + if (Image->Format == IL_RGBA) + Image->Format = IL_BGRA; + if (Image->Format == IL_RGB) + Image->Format = IL_BGR; + + ifree(JpegData); + //} + ifree(JpegHeader); +#endif//IL_NO_JPG + break; + + case BLP_RAW: + switch (Header.PictureType) + { + // There is no alpha list, so we just read like a normal indexed image. + case BLP_RAW_NO_ALPHA: + for (i = 0; i < 16; i++) { // Possible maximum of 16 mipmaps + if (!BaseCreated) { // Have not created the base image yet, so use ilTexImage. + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + Image = iCurImage; + BaseCreated = IL_TRUE; + + // We have a BGRA palette. + Image->Pal.Palette = (ILubyte*)ialloc(256 * 4); + if (Image->Pal.Palette == NULL) + return IL_FALSE; + Image->Pal.PalSize = 1024; + Image->Pal.PalType = IL_PAL_BGRA32; + + // Read in the palette ... + if (iread(Image->Pal.Palette, 1, 1024) != 1024) + return IL_FALSE; + } + else { + if (Image->Width == 1 && Image->Height == 1) // Already at the smallest mipmap (1x1), so we are done. + break; + if (Header.MipOffsets[i] == 0 || Header.MipLengths[i] == 0) // No more mipmaps in the file. + break; + + Image->Mipmaps = ilNewImageFull(Image->Width >> 1, Image->Height >> 1, 1, 1, IL_COLOR_INDEX, IL_UNSIGNED_BYTE, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + + // Copy the palette from the first image before we change our Image pointer. + Image->Mipmaps->Pal.Palette = (ILubyte*)ialloc(256 * 4); + if (Image->Mipmaps->Pal.Palette == NULL) + return IL_FALSE; + Image->Mipmaps->Pal.PalSize = 1024; + Image->Mipmaps->Pal.PalType = IL_PAL_BGRA32; + memcpy(Image->Mipmaps->Pal.Palette, Image->Pal.Palette, 1024); + + // Move to the next mipmap in the linked list. + Image = Image->Mipmaps; + } + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + // Seek to the data and read it. + iseek(Header.MipOffsets[i], IL_SEEK_SET); + if (iread(Image->Data, 1, Image->SizeOfData) != Image->SizeOfData) + return IL_FALSE; + } + break; + + // These cases are identical and have an alpha list following the image data. + case BLP_RAW_PLUS_ALPHA1: + case BLP_RAW_PLUS_ALPHA2: + // Create the image. + if (!ilTexImage(Header.Width, Header.Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + DataAndAlpha = (ILubyte*)ialloc(Header.Width * Header.Height); + Palette = (ILubyte*)ialloc(256 * 4); + if (DataAndAlpha == NULL || Palette == NULL) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + + // Read in the data and the palette. + if (iread(Palette, 1, 1024) != 1024) { + ifree(Palette); + return IL_FALSE; + } + // Seek to the data and read it. + iseek(Header.MipOffsets[i], IL_SEEK_SET); + if (iread(DataAndAlpha, Header.Width * Header.Height, 1) != 1) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + + // Convert the color-indexed data to BGRX. + for (i = 0; i < Header.Width * Header.Height; i++) { + Image->Data[i*4] = Palette[DataAndAlpha[i]*4]; + Image->Data[i*4+1] = Palette[DataAndAlpha[i]*4+1]; + Image->Data[i*4+2] = Palette[DataAndAlpha[i]*4+2]; + } + + // Read in the alpha list. + if (iread(DataAndAlpha, Header.Width * Header.Height, 1) != 1) { + ifree(DataAndAlpha); + ifree(Palette); + return IL_FALSE; + } + // Finally put the alpha data into the image data. + for (i = 0; i < Header.Width * Header.Height; i++) { + Image->Data[i*4+3] = DataAndAlpha[i]; + } + + ifree(DataAndAlpha); + ifree(Palette); + break; + } + break; + + //default: // Should already be checked by iCheckBlp1. + } + + // Set the origin (always upper left). + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + return ilFixImage(); +} + + +#endif//IL_NO_BLP diff --git a/libs/DevIL-1.7.8/src-IL/src/il_bmp.c b/libs/DevIL-1.7.8/src-IL/src/il_bmp.c new file mode 100644 index 00000000..d5b7cd1c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_bmp.c @@ -0,0 +1,1049 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 02/09/2009 +// +// Filename: src-IL/src/il_bmp.c +// +// Description: Reads from and writes to a bitmap (.bmp) file. +// +//----------------------------------------------------------------------------- + +#define IL_BMP_C + +#include "il_internal.h" +#ifndef IL_NO_BMP +#include "il_bmp.h" +#include "il_manip.h" +#include "il_endian.h" +#include +void GetShiftFromMask(const ILuint Mask, ILuint * CONST_RESTRICT ShiftLeft, ILuint * CONST_RESTRICT ShiftRight); + +//! Checks if the file specified in FileName is a valid .bmp file. +ILboolean ilIsValidBmp(ILconst_string CONST_RESTRICT FileName) +{ + ILHANDLE BitmapFile; + ILboolean bBitmap = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("bmp"))) { + ilSetError(IL_INVALID_EXTENSION); + return bBitmap; + } + + BitmapFile = iopenr(FileName); + if (BitmapFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bBitmap; + } + + bBitmap = ilIsValidBmpF(BitmapFile); + icloser(BitmapFile); + + return bBitmap; +} + + +//! Checks if the ILHANDLE contains a valid .bmp file at the current position. +ILboolean ilIsValidBmpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidBmp(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .bmp lump. +ILboolean ilIsValidBmpL(const void * Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidBmp(); +} + +// Internal function used to get the .bmp header from the current file. +ILboolean iGetBmpHead(BMPHEAD * const Header) +{ + Header->bfType = GetLittleUShort(); + Header->bfSize = GetLittleInt(); + Header->bfReserved = GetLittleUInt(); + Header->bfDataOff = GetLittleInt(); + Header->biSize = GetLittleInt(); + Header->biWidth = GetLittleInt(); + Header->biHeight = GetLittleInt(); + Header->biPlanes = GetLittleShort(); + Header->biBitCount = GetLittleShort(); + Header->biCompression = GetLittleInt(); + Header->biSizeImage = GetLittleInt(); + Header->biXPelsPerMeter = GetLittleInt(); + Header->biYPelsPerMeter = GetLittleInt(); + Header->biClrUsed = GetLittleInt(); + Header->biClrImportant = GetLittleInt(); + return IL_TRUE; +} + + +ILboolean iGetOS2Head(OS2_HEAD * const Header) +{ + if (iread(Header, sizeof(OS2_HEAD), 1) != 1) + return IL_FALSE; + + UShort(&Header->bfType); + UInt(&Header->biSize); + Short(&Header->xHotspot); + Short(&Header->yHotspot); + UInt(&Header->DataOff); + UInt(&Header->cbFix); + + //2003-09-01 changed to UShort according to MSDN + UShort(&Header->cx); + UShort(&Header->cy); + UShort(&Header->cPlanes); + UShort(&Header->cBitCount); + + iseek((ILint)Header->cbFix - 12, IL_SEEK_CUR); // Skip rest of header, if any. + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidBmp() +{ + BMPHEAD Head; + OS2_HEAD Os2Head; + ILboolean IsValid; + + iGetBmpHead(&Head); + iseek(-(ILint)sizeof(BMPHEAD), IL_SEEK_CUR); // Go ahead and restore to previous state + + IsValid = iCheckBmp(&Head); + if (!IsValid) { + iGetOS2Head(&Os2Head); + iseek(-(ILint)sizeof(BMPHEAD), IL_SEEK_CUR); + IsValid = iCheckOS2(&Os2Head); + } + return IsValid; +} + + +// Internal function used to check if the HEADER is a valid .bmp header. +ILboolean iCheckBmp (const BMPHEAD * CONST_RESTRICT Header) +{ + //if ((Header->bfType != ('B'|('M'<<8))) || ((Header->biSize != 0x28) && (Header->biSize != 0x0C))) + if ((Header->bfType != ('B'|('M'<<8))) || (Header->biSize != 0x28)) + return IL_FALSE; + if (Header->biHeight == 0 || Header->biWidth < 1) + return IL_FALSE; + if (Header->biPlanes > 1) // Not sure... + return IL_FALSE; + if(Header->biCompression != 0 && Header->biCompression != 1 && + Header->biCompression != 2 && Header->biCompression != 3) + return IL_FALSE; + if(Header->biCompression == 3 && Header->biBitCount != 16 && Header->biBitCount != 32) + return IL_FALSE; + if (Header->biBitCount != 1 && Header->biBitCount != 4 && Header->biBitCount != 8 && + Header->biBitCount != 16 && Header->biBitCount != 24 && Header->biBitCount != 32) + return IL_FALSE; + return IL_TRUE; +} + + +ILboolean iCheckOS2 (const OS2_HEAD * CONST_RESTRICT Header) +{ + if ((Header->bfType != ('B'|('M'<<8))) || (Header->DataOff < 26) || (Header->cbFix < 12)) + return IL_FALSE; + if (Header->cPlanes != 1) + return IL_FALSE; + if (Header->cx == 0 || Header->cy == 0) + return IL_FALSE; + if (Header->cBitCount != 1 && Header->cBitCount != 4 && Header->cBitCount != 8 && + Header->cBitCount != 24) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a .bmp file +ILboolean ilLoadBmp(ILconst_string FileName) { + ILHANDLE BitmapFile; + ILboolean bBitmap = IL_FALSE; + + BitmapFile = iopenr(FileName); + if (BitmapFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bBitmap; + } + + bBitmap = ilLoadBmpF(BitmapFile); + icloser(BitmapFile); + + return bBitmap; +} + + +//! Reads an already-opened .bmp file +ILboolean ilLoadBmpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadBitmapInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .bmp +ILboolean ilLoadBmpL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadBitmapInternal(); +} + + +// Internal function used to load the .bmp. +ILboolean iLoadBitmapInternal() +{ + BMPHEAD Header; + OS2_HEAD Os2Head; + ILboolean bBitmap; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iGetBmpHead(&Header); + if (!iCheckBmp(&Header)) { + iseek(-(ILint)sizeof(BMPHEAD), IL_SEEK_CUR); + iGetOS2Head(&Os2Head); + if (!iCheckOS2(&Os2Head)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + else { + return iGetOS2Bmp(&Os2Head); + } + } + + // Don't know what to do if it has more than one plane... + if (Header.biPlanes != 1) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + switch (Header.biCompression) + { + case 0: // No compression + case 3: // BITFIELDS compression is handled in 16 bit + // and 32 bit code in ilReadUncompBmp() + bBitmap = ilReadUncompBmp(&Header); + break; + case 1: // RLE 8-bit / pixel (BI_RLE8) + bBitmap = ilReadRLE8Bmp(&Header); + break; + case 2: // RLE 4-bit / pixel (BI_RLE4) + bBitmap = ilReadRLE4Bmp(&Header); + break; + + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ilFixImage()) + return IL_FALSE; + + return bBitmap; +} + + +// Reads an uncompressed .bmp +// One of the absolute ugliest functions I've ever written! +ILboolean ilReadUncompBmp(BMPHEAD * Header) +{ + ILuint i, j, k, c, Read; + ILubyte Bpp, ByteData, PadSize, Padding[4]; + ILuint rMask, gMask, bMask; //required for bitfields packing + ILuint rShiftR, gShiftR, bShiftR; //required for bitfields packing + ILuint rShiftL, gShiftL, bShiftL; //required for bitfields packing + ILushort Read16; //used for 16bit bmp loading + + if (Header->biBitCount < 8) + Bpp = 1; // We can't have an integral number less than one and greater than 0 + else + Bpp = (ILubyte)(Header->biBitCount >> 3); // Convert to bytes per pixel + + if(Bpp == 2 || Bpp == 4) + Bpp = 3; + + // Update the current image with the new dimensions + if (!ilTexImage(Header->biWidth, abs(Header->biHeight), 1, Bpp, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + switch (Header->biBitCount) + { + case 1: + //iCurImage->Format = IL_LUMINANCE; + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalType = IL_PAL_BGR32; + iCurImage->Pal.PalSize = 2 * 4; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + break; + + case 4: + case 8: + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalType = IL_PAL_BGR32; + + // if there are 256 colors biClrUsed is 0 + iCurImage->Pal.PalSize = Header->biClrUsed ? + Header->biClrUsed * 4 : 256 * 4; + + if (Header->biBitCount == 4) // biClrUsed is 0 for 4-bit bitmaps + iCurImage->Pal.PalSize = 16 * 4; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + break; + + case 16: + case 24: + case 32: + iCurImage->Format = IL_BGR; + break; + + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + // A height of 0 is illegal + if (Header->biHeight == 0) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + if (iCurImage->Pal.Palette) + ifree(iCurImage->Pal.Palette); + return IL_FALSE; + } + + // If the image height is negative, then the image is flipped + // (Normal is IL_ORIGIN_LOWER_LEFT) + if (Header->biHeight < 0) { + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + } + else { + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + } + + // Read the palette + iseek(sizeof(BMPHEAD), IL_SEEK_SET); + if (iread(iCurImage->Pal.Palette, 1, iCurImage->Pal.PalSize) != iCurImage->Pal.PalSize) + return IL_FALSE; + + // Seek to the data from the "beginning" of the file + iseek(Header->bfDataOff, IL_SEEK_SET); + + // We have to handle 1 and 4-bit images separately, because we have to expand them. + switch (Header->biBitCount) + { + case 1: + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width / 8 * iCurImage->Height); + + PadSize = ((32 - (iCurImage->Width % 32)) / 8) % 4; // Has to truncate + for (j = 0; j < iCurImage->Height; j++) { + Read = 0; + for (i = 0; i < iCurImage->Width; ) { + if (iread(&ByteData, 1, 1) != 1) { + iUnCache(); + return IL_FALSE; + } + Read++; + k = 128; + for (c = 0; c < 8; c++) { + iCurImage->Data[j * iCurImage->Width + i] = + (!!(ByteData & k) == 1 ? 1 : 0); + k >>= 1; + if (++i >= iCurImage->Width) + break; + } + } + //iseek(PadSize, IL_SEEK_CUR); + iread(Padding, 1, PadSize); + } + + iUnCache(); + break; + + case 4: + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width / 2 * iCurImage->Height); + + PadSize = ((8 - (iCurImage->Width % 8)) / 2) % 4; // Has to truncate + for (j = 0; j < iCurImage->Height; j++) { + for (i = 0; i < iCurImage->Width; i++) { + if (iread(&ByteData, 1, 1) != 1) { + iUnCache(); + return IL_FALSE; + } + iCurImage->Data[j * iCurImage->Width + i] = ByteData >> 4; + if (++i == iCurImage->Width) + break; + iCurImage->Data[j * iCurImage->Width + i] = ByteData & 0x0F; + } + iread(Padding, 1, PadSize);//iseek(PadSize, IL_SEEK_CUR); + } + + iUnCache(); + break; + + case 16: + //padding + //2003-09-09: changed iCurImage->Bps to iCurImage->Width*2, + //because iCurImage->Bps refers to the 24 bit devil image + PadSize = (4 - (iCurImage->Width*2 % 4)) % 4; + + //check if bitfield compression is used + rMask = 0x7C00; + gMask = 0x03E0; + bMask = 0x001F; + rShiftR = 10; + gShiftR = 5; + bShiftR = 0; + rShiftL = 3; + gShiftL = 3; + bShiftL = 3; + if (Header->biCompression == 3) //bitfields + { + iseek(Header->bfDataOff - 12, IL_SEEK_SET); //seek to bitfield data + iread(&rMask, 4, 1); + iread(&gMask, 4, 1); + iread(&bMask, 4, 1); + UInt(&rMask); + UInt(&gMask); + UInt(&bMask); + GetShiftFromMask(rMask, &rShiftL, &rShiftR); + GetShiftFromMask(gMask, &gShiftL, &gShiftR); + GetShiftFromMask(bMask, &bShiftL, &bShiftR); + } + + k = 0; + + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width * iCurImage->Height); + + //@TODO: This may not be safe for Big Endian. + for (j = 0; j < iCurImage->Height; j++) { + for(i = 0; i < iCurImage->Width; i++, k += 3) { + if (iread(&Read16, 2, 1) != 1) { + iUnCache(); + return IL_FALSE; + } + iCurImage->Data[k] = ((Read16 & bMask) >> bShiftR) << bShiftL; + iCurImage->Data[k + 1] = ((Read16 & gMask) >> gShiftR) << gShiftL; + iCurImage->Data[k + 2] = ((Read16 & rMask) >> rShiftR) << rShiftL; + } + iread(Padding, 1, PadSize); + } + + iUnCache(); + break; + + case 8: + case 24: + // For 8 and 24 bit, Bps is equal to the bmps bps + PadSize = (4 - (iCurImage->Bps % 4)) % 4; + if (PadSize == 0) { + if (iread(iCurImage->Data, 1, iCurImage->SizeOfPlane) != iCurImage->SizeOfPlane) + return IL_FALSE; + } + else { // Microsoft requires lines to be padded if the widths aren't multiples of 4. + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width * iCurImage->Height); + + PadSize = (4 - (iCurImage->Bps % 4)); + for (i = 0; i < iCurImage->SizeOfPlane; i += iCurImage->Bps) { + if (iread(iCurImage->Data + i, 1, iCurImage->Bps) != iCurImage->Bps) { + iUnCache(); + return IL_FALSE; + } + //iseek(PadSize, IL_SEEK_CUR); + iread(Padding, 1, PadSize); + } + + iUnCache(); + } + break; + + case 32: + //32bit files are always padded to 4 byte... + //check if bitfield compression is used + rMask = 0xFF0000; + gMask = 0x00FF00; + bMask = 0x0000FF; + rShiftR = 16; + gShiftR = 8; + bShiftR = 0; + rShiftL = 0; + gShiftL = 0; + bShiftL = 0; + if (Header->biCompression == 3) //bitfields + { + iseek(Header->bfDataOff - 12, IL_SEEK_SET); //seek to bitfield data + iread(&rMask, 4, 1); + iread(&gMask, 4, 1); + iread(&bMask, 4, 1); + UInt(&rMask); + UInt(&gMask); + UInt(&bMask); + GetShiftFromMask(rMask, &rShiftL, &rShiftR); + GetShiftFromMask(gMask, &gShiftL, &gShiftR); + GetShiftFromMask(bMask, &bShiftL, &bShiftR); + } + + //TODO: win98 supports per-pixel alpha, so + //load to rgba???? + + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width * iCurImage->Height); + + for(i = 0; i < iCurImage->SizeOfData; i += 3) { + if (iread(&Read, 4, 1) != 1) { + iUnCache(); + return IL_FALSE; + } + + iCurImage->Data[i] = ((Read & bMask) >> bShiftR) << bShiftL; + iCurImage->Data[i + 1] = ((Read & gMask) >> gShiftR) << gShiftL; + iCurImage->Data[i + 2] = ((Read & rMask) >> rShiftR) << rShiftL; + } + + iUnCache(); + break; + + default: + return IL_FALSE; //shouldn't happen, we checked that before + } + + return IL_TRUE; +} + + +ILboolean ilReadRLE8Bmp(BMPHEAD *Header) +{ + ILubyte Bytes[2]; + size_t offset = 0, count, endOfLine = Header->biWidth; + + // Update the current image with the new dimensions + if (!ilTexImage(Header->biWidth, abs(Header->biHeight), 1, 1, 0, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + // A height of 0 is illegal + if (Header->biHeight == 0) + return IL_FALSE; + + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalType = IL_PAL_BGR32; + iCurImage->Pal.PalSize = Header->biClrUsed * 4; // 256 * 4 for most images + if (iCurImage->Pal.PalSize == 0) + iCurImage->Pal.PalSize = 256 * 4; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) + return IL_FALSE; + + // If the image height is negative, then the image is flipped + // (Normal is IL_ORIGIN_LOWER_LEFT) + iCurImage->Origin = Header->biHeight < 0 ? + IL_ORIGIN_UPPER_LEFT : IL_ORIGIN_LOWER_LEFT; + + // Read the palette + iseek(sizeof(BMPHEAD), IL_SEEK_SET); + if (iread(iCurImage->Pal.Palette, iCurImage->Pal.PalSize, 1) != 1) + return IL_FALSE; + + // Seek to the data from the "beginning" of the file + iseek(Header->bfDataOff, IL_SEEK_SET); + + while (offset < iCurImage->SizeOfData) { + if (iread(Bytes, sizeof(Bytes), 1) != 1) + return IL_FALSE; + if (Bytes[0] == 0x00) { // Escape sequence + switch (Bytes[1]) + { + case 0x00: // End of line + offset = endOfLine; + endOfLine += iCurImage->Width; + break; + case 0x01: // End of bitmap + offset = iCurImage->SizeOfData; + break; + case 0x2: + if (iread(Bytes, sizeof(Bytes), 1) != 1) + return IL_FALSE; + offset += Bytes[0] + Bytes[1] * iCurImage->Width; + endOfLine += Bytes[1] * iCurImage->Width; + break; + default: + count = IL_MIN(Bytes[1], iCurImage->SizeOfData-offset); + if (iread(iCurImage->Data + offset, (ILuint)count, 1) != 1) + return IL_FALSE; + offset += count; + if ((count & 1) == 1) // Must be on a word boundary + if (iread(Bytes, 1, 1) != 1) + return IL_FALSE; + break; + } + } else { + count = IL_MIN (Bytes[0], iCurImage->SizeOfData-offset); + memset(iCurImage->Data + offset, Bytes[1], count); + offset += count; + } + } + return IL_TRUE; +} + + +//changed 2003-09-01 +//deleted ilReadRLE8Bmp() USE_POINTER version + +ILboolean ilReadRLE4Bmp(BMPHEAD *Header) +{ + ILubyte Bytes[2]; + ILuint i; + size_t offset = 0, count, endOfLine = Header->biWidth; + + // Update the current image with the new dimensions + if (!ilTexImage(Header->biWidth, abs(Header->biHeight), 1, 1, 0, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + // A height of 0 is illegal + if (Header->biHeight == 0) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalType = IL_PAL_BGR32; + iCurImage->Pal.PalSize = 16 * 4; //Header->biClrUsed * 4; // 16 * 4 for most images + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) + return IL_FALSE; + + // If the image height is negative, then the image is flipped + // (Normal is IL_ORIGIN_LOWER_LEFT) + iCurImage->Origin = Header->biHeight < 0 ? + IL_ORIGIN_UPPER_LEFT : IL_ORIGIN_LOWER_LEFT; + + // Read the palette + iseek(sizeof(BMPHEAD), IL_SEEK_SET); + + if (iread(iCurImage->Pal.Palette, iCurImage->Pal.PalSize, 1) != 1) + return IL_FALSE; + + // Seek to the data from the "beginning" of the file + iseek(Header->bfDataOff, IL_SEEK_SET); + + while (offset < iCurImage->SizeOfData) { + int align; + if (iread(&Bytes[0], sizeof(Bytes), 1) != 1) + return IL_FALSE; + if (Bytes[0] == 0x0) { // Escape sequence + switch (Bytes[1]) { + case 0x0: // End of line + offset = endOfLine; + endOfLine += iCurImage->Width; + break; + case 0x1: // End of bitmap + offset = iCurImage->SizeOfData; + break; + case 0x2: + if (iread(&Bytes[0], sizeof(Bytes), 1) != 1) + return IL_FALSE; + offset += Bytes[0] + Bytes[1] * iCurImage->Width; + endOfLine += Bytes[1] * iCurImage->Width; + break; + default: // Run of pixels + count = IL_MIN (Bytes[1], iCurImage->SizeOfData-offset); + + for (i = 0; i < count; i++) { + int byte; + + if ((i & 0x01) == 0) { + if (iread(&Bytes[0], sizeof(Bytes[0]), 1) != 1) + return IL_FALSE; + byte = (Bytes[0] >> 4); + } + else + byte = (Bytes[0] & 0x0F); + iCurImage->Data[offset++] = byte; + } + + align = Bytes[1] % 4; + + if (align == 1 || align == 2) // Must be on a word boundary + if (iread(&Bytes[0], sizeof(Bytes[0]), 1) != 1) + return IL_FALSE; + } + } else { + count = IL_MIN (Bytes[0], iCurImage->SizeOfData-offset); + Bytes[0] = (Bytes[1] >> 4); + Bytes[1] &= 0x0F; + for (i = 0; i < count; i++) + iCurImage->Data[offset++] = Bytes [i & 1]; + } + } + + return IL_TRUE; +} + + +//changed 2003-09-01 +//deleted ilReadRLE4Bmp() USE_POINTER version + +ILboolean iGetOS2Bmp(OS2_HEAD *Header) +{ + ILuint PadSize, Read, i, j, k, c; + ILubyte ByteData; + + if (Header->cBitCount == 1) { + if (!ilTexImage(Header->cx, Header->cy, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(2 * 3); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + iCurImage->Pal.PalSize = 2 * 3; + iCurImage->Pal.PalType = IL_PAL_BGR24; + + if (iread(iCurImage->Pal.Palette, 1, 2 * 3) != 6) + return IL_FALSE; + + PadSize = ((32 - (iCurImage->Width % 32)) / 8) % 4; // Has to truncate. + iseek(Header->DataOff, IL_SEEK_SET); + + for (j = 0; j < iCurImage->Height; j++) { + Read = 0; + for (i = 0; i < iCurImage->Width; ) { + if (iread(&ByteData, 1, 1) != 1) + return IL_FALSE; + Read++; + k = 128; + for (c = 0; c < 8; c++) { + iCurImage->Data[j * iCurImage->Width + i] = + (!!(ByteData & k) == 1 ? 1 : 0); + k >>= 1; + if (++i >= iCurImage->Width) + break; + } + } + iseek(PadSize, IL_SEEK_CUR); + } + return IL_TRUE; + } + + if (Header->cBitCount == 4) { + if (!ilTexImage(Header->cx, Header->cy, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(16 * 3); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + iCurImage->Pal.PalSize = 16 * 3; + iCurImage->Pal.PalType = IL_PAL_BGR24; + + if (iread(iCurImage->Pal.Palette, 1, 16 * 3) != 16*3) + return IL_FALSE; + + PadSize = ((8 - (iCurImage->Width % 8)) / 2) % 4; // Has to truncate + iseek(Header->DataOff, IL_SEEK_SET); + + for (j = 0; j < iCurImage->Height; j++) { + for (i = 0; i < iCurImage->Width; i++) { + if (iread(&ByteData, 1, 1) != 1) + return IL_FALSE; + iCurImage->Data[j * iCurImage->Width + i] = ByteData >> 4; + if (++i == iCurImage->Width) + break; + iCurImage->Data[j * iCurImage->Width + i] = ByteData & 0x0F; + } + iseek(PadSize, IL_SEEK_CUR); + } + + return IL_TRUE; + } + + if (Header->cBitCount == 8) { + //added this line 2003-09-01...strange no-one noticed before... + if (!ilTexImage(Header->cx, Header->cy, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(256 * 3); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + iCurImage->Pal.PalSize = 256 * 3; + iCurImage->Pal.PalType = IL_PAL_BGR24; + + if (iread(iCurImage->Pal.Palette, 1, 256 * 3) != 256*3) + return IL_FALSE; + } + else { //has to be 24 bpp + if (!ilTexImage(Header->cx, Header->cy, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + iseek(Header->DataOff, IL_SEEK_SET); + + PadSize = (4 - (iCurImage->Bps % 4)) % 4; + if (PadSize == 0) { + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) + return IL_FALSE; + } + else { + for (i = 0; i < iCurImage->Height; i++) { + if (iread(iCurImage->Data + i * iCurImage->Bps, 1, iCurImage->Bps) != iCurImage->Bps) + return IL_FALSE; + iseek(PadSize, IL_SEEK_CUR); + } + } + + return IL_TRUE; +} + + +//! Writes a Bmp file +ILboolean ilSaveBmp(const ILstring FileName) +{ + ILHANDLE BitmapFile; + ILuint BitmapSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + BitmapFile = iopenw(FileName); + if (BitmapFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + BitmapSize = ilSaveBmpF(BitmapFile); + iclosew(BitmapFile); + + if (BitmapSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Bmp to an already-opened file +ILuint ilSaveBmpF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveBitmapInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Bmp to a memory "lump" +ILuint ilSaveBmpL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveBitmapInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the .bmp. +ILboolean iSaveBitmapInternal() +{ + //int compress_rle8 = ilGetInteger(IL_BMP_RLE); + int compress_rle8 = IL_FALSE; // disabled BMP RLE compression. broken + ILuint FileSize, i, PadSize, Padding = 0; + ILimage *TempImage = NULL; + ILpal *TempPal; + ILubyte *TempData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iputc('B'); // Comprises the + iputc('M'); // "signature" + + SaveLittleUInt(0); // Will come back and change later in this function (filesize) + SaveLittleUInt(0); // Reserved + + if (compress_rle8 == IL_TRUE) + { + TempImage = iConvertImage(iCurImage, IL_COLOR_INDEX, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + TempPal = iConvertPal(&TempImage->Pal, IL_PAL_BGR32); + if (TempPal == NULL) + { + ilCloseImage(TempImage); + return IL_FALSE; + } + } + + // If the current image has a palette, take care of it + TempPal = &iCurImage->Pal; + if( iCurImage->Pal.PalSize && iCurImage->Pal.Palette && iCurImage->Pal.PalType != IL_PAL_NONE ) { + // If the palette in .bmp format, write it directly + if (iCurImage->Pal.PalType == IL_PAL_BGR32) { + TempPal = &iCurImage->Pal; + } else { + TempPal = iConvertPal(&iCurImage->Pal, IL_PAL_BGR32); + if (TempPal == NULL) { + return IL_FALSE; + } + } + } + + SaveLittleUInt(54 + TempPal->PalSize); // Offset of the data + + //Changed 20040923: moved this block above writing of + //BITMAPINFOHEADER, so that the written header refers to + //TempImage instead of the original image + + // @TODO LUMINANCE converted to BGR insteaf of beign saved to luminance + if (iCurImage->Format != IL_BGR && iCurImage->Format != IL_BGRA && iCurImage->Format != IL_COLOUR_INDEX) { + if (iCurImage->Format == IL_RGBA) { + TempImage = iConvertImage(iCurImage, IL_BGRA, IL_UNSIGNED_BYTE); + } else { + TempImage = iConvertImage(iCurImage, IL_BGR, IL_UNSIGNED_BYTE); + } + if (TempImage == NULL) + return IL_FALSE; + } else if (iCurImage->Bpc > 1) { + TempImage = iConvertImage(iCurImage, iCurImage->Format, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } else { + TempImage = iCurImage; + } + + if (TempImage->Origin != IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + ilCloseImage(TempImage); + return IL_FALSE; + } + } else { + TempData = TempImage->Data; + } + + SaveLittleUInt(0x28); // Header size + SaveLittleUInt(iCurImage->Width); + + // Removed because some image viewers don't like the negative height. + // even if it is standard. @TODO should be enabled or disabled + // usually enabled. + /*if (iCurImage->Origin == IL_ORIGIN_UPPER_LEFT) + SaveLittleInt(-(ILint)iCurImage->Height); + else*/ + SaveLittleInt(TempImage->Height); + + SaveLittleUShort(1); // Number of planes + SaveLittleUShort((ILushort)((ILushort)TempImage->Bpp << 3)); // Bpp + if( compress_rle8 == IL_TRUE ) { + SaveLittleInt(1); // rle8 compression + } else { + SaveLittleInt(0); + } + SaveLittleInt(0); // Size of image (Obsolete) + SaveLittleInt(0); // (Obsolete) + SaveLittleInt(0); // (Obsolete) + + if (TempImage->Pal.PalType != IL_PAL_NONE) { + SaveLittleInt(ilGetInteger(IL_PALETTE_NUM_COLS)); // Num colours used + } else { + SaveLittleInt(0); + } + SaveLittleInt(0); // Important colour (none) + + iwrite(TempPal->Palette, 1, TempPal->PalSize); + + + if( compress_rle8 == IL_TRUE ) { + //@TODO compress and save + ILubyte *Dest = (ILubyte*)ialloc((long)((double)TempImage->SizeOfPlane*130/127)); + FileSize = ilRleCompress(TempImage->Data,TempImage->Width,TempImage->Height, + TempImage->Depth,TempImage->Bpp,Dest,IL_BMPCOMP,NULL); + iwrite(Dest,1,FileSize); + } else { + PadSize = (4 - (TempImage->Bps % 4)) % 4; + // No padding, so write data directly. + if (PadSize == 0) { + iwrite(TempData, 1, TempImage->SizeOfPlane); + } else { // Odd width, so we must pad each line. + for (i = 0; i < TempImage->SizeOfPlane; i += TempImage->Bps) { + iwrite(TempData + i, 1, TempImage->Bps); // Write data + iwrite(&Padding, 1, PadSize); // Write pad byte(s) + } + } + } + + // Write the filesize + FileSize = itellw(); + iseekw(2, IL_SEEK_SET); + SaveLittleUInt(FileSize); + + if (TempPal != &iCurImage->Pal) { + ifree(TempPal->Palette); + ifree(TempPal); + } + if (TempData != TempImage->Data) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + iseekw(FileSize, IL_SEEK_SET); + + return IL_TRUE; +} + + +#endif//IL_NO_BMP diff --git a/libs/DevIL-1.7.8/src-IL/src/il_convbuff.c b/libs/DevIL-1.7.8/src-IL/src/il_convbuff.c new file mode 100644 index 00000000..4106f960 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_convbuff.c @@ -0,0 +1,2314 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 01/08/2007 +// +// Filename: src-IL/src/il_convbuff.c +// +// Description: Converts between several image formats +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_manip.h" +#ifdef ALTIVEC_GCC +#include "altivec_typeconversion.h" +#endif +#include + + +void* ILAPIENTRY iSwitchTypes(ILuint SizeOfData, ILenum SrcType, ILenum DestType, void *Buffer); +ILushort ILAPIENTRY ilFloatToHalf(ILuint i); +ILuint ILAPIENTRY ilHalfToFloat (ILushort y); +ILfloat /*ILAPIENTRY*/ ilFloatToHalfOverflow(); +ILimage *iConvertPalette(ILimage *Image, ILenum DestFormat); + +#define CHECK_ALLOC() if (NewData == NULL) { \ + if (Data != Buffer) \ + ifree(Data); \ + return IL_FALSE; \ + } + +ILAPI void* ILAPIENTRY ilConvertBuffer(ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer) +{ + //static const ILfloat LumFactor[3] = { 0.299f, 0.587f, 0.114f }; // Used for conversion to luminance + //static const ILfloat LumFactor[3] = { 0.3086f, 0.6094f, 0.0820f }; // http://www.sgi.com/grafica/matrix/index.html + static const ILfloat LumFactor[3] = { 0.212671f, 0.715160f, 0.072169f }; // http://www.inforamp.net/~poynton/ and libpng's libpng.txt + + ILubyte *NewData = NULL; + ILuint i, j, c, Size; + ILfloat Resultf; + ILdouble Resultd; + ILuint NumPix; // Really number of pixels * bpp. + ILuint BpcDest; + void *Data = NULL; + ILimage *PalImage = NULL, *TempImage = NULL; + + if (SizeOfData == 0 || Buffer == NULL) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + Data = iSwitchTypes(SizeOfData, SrcType, DestType, Buffer); + if (Data == NULL) + return NULL; + + BpcDest = ilGetBpcType(DestType); + NumPix = SizeOfData / ilGetBpcType(SrcType); + + if (DestFormat == SrcFormat) { + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + if (NewData == NULL) { + return IL_FALSE; + } + memcpy(NewData, Data, NumPix * BpcDest); + if (Data != Buffer) + ifree(Data); + + return NewData; + } + + // Colour-indexed images are special here + if (SrcFormat == IL_COLOUR_INDEX) { + // We create a temporary palette image so that we can send it to iConvertPalette. + PalImage = (ILimage*)icalloc(1, sizeof(ILimage)); // Much better to have it all set to 0. + if (PalImage == NULL) + return NULL; + // Populate the temporary palette image. + PalImage->Pal.Palette = SrcPal->Palette; + PalImage->Pal.PalSize = SrcPal->PalSize; + PalImage->Pal.PalType = SrcPal->PalType; + PalImage->Width = NumPix; + PalImage->Height = 1; + PalImage->Depth = 1; + PalImage->Format = IL_COLOUR_INDEX; + PalImage->Type = IL_UNSIGNED_BYTE; + PalImage->Data = Buffer; + PalImage->Bpp = 1; + PalImage->SizeOfData = SizeOfData; + + // Convert the paletted image to a different format. + TempImage = iConvertPalette(PalImage, DestFormat); + if (TempImage == NULL) { + // So that we do not delete the original palette or data. + PalImage->Pal.Palette = NULL; + PalImage->Data = NULL; + ilCloseImage(PalImage); + return NULL; + } + + // Set TempImage->Data to NULL so that we can preserve it via NewData, or + // else it would get wiped out by ilCloseImage. + NewData = TempImage->Data; + TempImage->Data = NULL; + // So that we do not delete the original palette or data. + PalImage->Pal.Palette = NULL; + PalImage->Data = NULL; + + // Clean up here. + ilCloseImage(PalImage); + ilCloseImage(TempImage); + return NewData; + } + + switch (SrcFormat) + { + case IL_RGB: + switch (DestFormat) + { + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + #ifdef ALTIVEC_GCC + abc2cba_byte((ILubyte*)Data,NumPix * BpcDest,NewData); + #else + for (i = 0; i < NumPix; i += 3) { + NewData[i] = ((ILubyte*)(Data))[i+2]; + NewData[i+1] = ((ILubyte*)(Data))[i+1]; + NewData[i+2] = ((ILubyte*)(Data))[i]; + } + #endif + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + #ifdef ALTIVEC_GCC + abc2cba_short((ILushort*)Data,NumPix * BpcDest,(ILushort*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[i+2] = ((ILushort*)(Data))[i]; + } + #endif + break; + case IL_UNSIGNED_INT: + case IL_INT: + #ifdef ALTIVEC_GCC + abc2cba_int((ILuint*)Data,NumPix * BpcDest,(ILuint*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[i+2] = ((ILuint*)(Data))[i]; + } + #endif + break; + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abc2cba_float(Data,NumPix * BpcDest,NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[i+2] = ((ILfloat*)(Data))[i]; + } + #endif + break; + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abc2cba_double((ILdouble*)Data,NumPix * BpcDest,(ILdouble*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[i+2] = ((ILdouble*)(Data))[i]; + } + break; + #endif + } + break; + + case IL_RGBA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4 / 3); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + NewData[j] = ((ILubyte*)(Data))[i]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i+2]; + NewData[j+3] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+3] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+3] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+3] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+3] = 1.0; + } + break; + } + break; + + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4 / 3); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + NewData[j] = ((ILubyte*)(Data))[i+2]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i]; + NewData[j+3] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+3] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+3] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+3] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+3] = 1.0f; + } + break; + } + break; + + case IL_LUMINANCE: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3); + CHECK_ALLOC(); + Size = NumPix / 3; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 3 + c] * LumFactor[c]; + } + NewData[i] = (ILubyte)Resultf; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILuint*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultf; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILfloat*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i] = Resultf; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i] = Resultd; + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3 * 2); + CHECK_ALLOC(); + Size = NumPix / 3; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 3 + c] * LumFactor[c]; + } + NewData[i*2] = (ILubyte)Resultf; + NewData[i*2+1] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i*2] = (ILushort)Resultf; + ((ILushort*)(NewData))[i*2+1] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILuint*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i*2] = (ILuint)Resultf; + ((ILuint*)(NewData))[i*2+1] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILfloat*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i*2] = Resultf; + ((ILfloat*)(NewData))[i*2+1] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i*2] = Resultd; + ((ILdouble*)(NewData))[i*2+1] = 1.0; + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3); + CHECK_ALLOC(); + memset(NewData, 0, NumPix * BpcDest); + break; + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + case IL_RGBA: + switch (DestFormat) + { + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + #ifdef ALTIVEC_GCC + abcd2cbad_byte(NewData,iCurImage->SizeOfData,NewData); + #else + for (i = 0; i < NumPix; i += 4) { + NewData[i] = ((ILubyte*)(Data))[i+2]; + NewData[i+1] = ((ILubyte*)(Data))[i+1]; + NewData[i+2] = ((ILubyte*)(Data))[i]; + NewData[i+3] = ((ILubyte*)(Data))[i+3]; + } + #endif + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + #ifdef ALTIVEC_GCC + abcd2cbad_short((ILushort*)Data,iCurImage->SizeOfData,(ILushort*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[i+2] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[i+3] = ((ILushort*)(Data))[i+3]; + } + #endif + break; + case IL_UNSIGNED_INT: + case IL_INT: + #ifdef ALTIVEC_GCC + abcd2cbad_int((ILuint*)Data,iCurImage->SizeOfData,(ILuint*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[i+2] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[i+3] = ((ILuint*)(Data))[i+3]; + } + #endif + break; + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abcd2cbad_float(Data,iCurImage->SizeOfData,NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[i+2] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[i+3] = ((ILfloat*)(Data))[i+3]; + } + #endif + break; + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abcd2cbad_double((ILdouble*)Data,iCurImage->SizeOfData,(ILdouble*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[i+2] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[i+3] = ((ILdouble*)(Data))[i+3]; + } + #endif + break; + } + break; + + case IL_RGB: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3 / 4); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + NewData[j] = ((ILubyte*)(Data))[i]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i+2]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i+2]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i+2]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i+2]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i+2]; + } + break; + } + break; + + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3 / 4); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + NewData[j] = ((ILubyte*)(Data))[i+2]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i]; + } + break; + } + break; + + case IL_LUMINANCE: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4); + CHECK_ALLOC(); + Size = NumPix / 4; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 4 + c] * LumFactor[c]; + } + NewData[i] = (ILubyte)Resultf; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 4 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILuint*)(Data))[i * 4 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultd; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILfloat*)(Data))[i * 4 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i] = (ILfloat)Resultd; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 4 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i] = Resultd; + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4 * 2); + CHECK_ALLOC(); + Size = NumPix / 4 * 2; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i += 2) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 2 + c] * LumFactor[c]; + } + NewData[i] = (ILubyte)Resultf; + NewData[i+1] = ((ILubyte*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i += 2) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILuint*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultd; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i * 2 + 3]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILfloat*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i] = (ILfloat)Resultd; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i * 2 + 3]; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i] = Resultd; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i * 2 + 3]; + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4); + CHECK_ALLOC(); + Size = NumPix / 4; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + NewData[i] = ((ILubyte*)(Data))[i * 4 + 3]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i * 4 + 3]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i * 4 + 3]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i * 4 + 3]; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i * 4 + 3]; + } + break; + } + break; + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + case IL_BGR: + switch (DestFormat) + { + case IL_RGB: + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + #ifdef ALTIVEC_GCC + abc2cba_byte(((ILubyte*)Data),NumPix * BpcDest,NewData); + #else + for (i = 0; i < NumPix; i += 3) { + NewData[i] = ((ILubyte*)(Data))[i+2]; + NewData[i+1] = ((ILubyte*)(Data))[i+1]; + NewData[i+2] = ((ILubyte*)(Data))[i]; + } + #endif + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + #ifdef ALTIVEC_GCC + abc2cba_short((ILushort*)Data,NumPix * BpcDest,(ILushort*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[i+2] = ((ILushort*)(Data))[i]; + } + #endif + break; + case IL_UNSIGNED_INT: + case IL_INT: + #ifdef ALTIVEC_GCC + abc2cba_int((ILuint*)Data,NumPix * BpcDest,(ILuint*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[i+2] = ((ILuint*)(Data))[i]; + } + #endif + break; + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abc2cba_float(Data,NumPix * BpcDest,NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[i+2] = ((ILfloat*)(Data))[i]; + } + #endif + break; + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abc2cba_double((ILdouble*)Data,iCurImage->SizeOfData,(ILdouble*)NewData); + #else + for (i = 0; i < NumPix; i += 3) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[i+2] = ((ILdouble*)(Data))[i]; + } + #endif + break; + } + break; + + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4 / 3); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + NewData[j] = ((ILubyte*)(Data))[i]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i+2]; + NewData[j+3] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+3] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+3] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+3] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+3] = 1.0; + } + break; + } + break; + + case IL_RGBA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4 / 3); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + NewData[j] = ((ILubyte*)(Data))[i+2]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i]; + NewData[j+3] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+3] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+3] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+3] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 3, j += 4) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+3] = 1.0; + } + break; + } + break; + + case IL_LUMINANCE: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3); + CHECK_ALLOC(); + Size = NumPix / 3; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultf += ((ILubyte*)(Data))[i * 3 + c] * LumFactor[j]; + } + NewData[i] = (ILubyte)Resultf; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultf += ((ILushort*)(Data))[i * 3 + c] * LumFactor[j]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILuint*)(Data))[i * 3 + c] * LumFactor[j]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultd; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILfloat*)(Data))[i * 3 + c] * LumFactor[j]; + } + ((ILfloat*)(NewData))[i] = (ILfloat)Resultd; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILdouble*)(Data))[i * 3 + c] * LumFactor[j]; + } + ((ILdouble*)(NewData))[i] = Resultd; + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3 * 2); + CHECK_ALLOC(); + Size = NumPix / 3; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 3 + c] * LumFactor[c]; + } + NewData[i*2] = (ILubyte)Resultf; + NewData[i*2+1] = UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i*2] = (ILushort)Resultf; + ((ILushort*)(NewData))[i*2+1] = USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILuint*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i*2] = (ILuint)Resultf; + ((ILuint*)(NewData))[i*2+1] = UINT_MAX; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultf = 0; + for (c = 0; c < 3; c++) { + Resultf += ((ILfloat*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i*2] = Resultf; + ((ILfloat*)(NewData))[i*2+1] = 1.0f; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 3 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i*2] = Resultd; + ((ILdouble*)(NewData))[i*2+1] = 1.0; + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 3); + CHECK_ALLOC(); + memset(NewData, 0, NumPix * BpcDest / 3); + break; + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + case IL_BGRA: + switch (DestFormat) + { + case IL_RGBA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + #ifdef ALTIVEC_GCC + abcd2cbad_byte(NewData,iCurImage->SizeOfData,NewData); + #else + for (i = 0; i < NumPix; i += 4) { + NewData[i] = ((ILubyte*)(Data))[i+2]; + NewData[i+1] = ((ILubyte*)(Data))[i+1]; + NewData[i+2] = ((ILubyte*)(Data))[i]; + NewData[i+3] = ((ILubyte*)(Data))[i+3]; + } + #endif + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + #ifdef ALTIVEC_GCC + abcd2cbad_short((ILushort*)Data,iCurImage->SizeOfData,(ILushort*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[i+2] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[i+3] = ((ILushort*)(Data))[i+3]; + } + #endif + break; + case IL_UNSIGNED_INT: + case IL_INT: + #ifdef ALTIVEC_GCC + abcd2cbad_int((ILuint*)NewData,iCurImage->SizeOfData,(ILuint*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[i+2] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[i+3] = ((ILuint*)(Data))[i+3]; + } + #endif + break; + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abcd2cbad_float(NewData,iCurImage->SizeOfData,NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[i+2] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[i+3] = ((ILfloat*)(Data))[i+3]; + } + #endif + break; + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abcd2cbad_double((ILdouble*)Data,iCurImage->SizeOfData,(ILdouble*)NewData); + #else + for (i = 0; i < NumPix; i += 4) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[i+2] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[i+3] = ((ILdouble*)(Data))[i+3]; + } + #endif + break; + } + break; + + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3 / 4); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + NewData[j] = ((ILubyte*)(Data))[i]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i+2]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i+2]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i+2]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i+2]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i+2]; + } + break; + } + break; + + case IL_RGB: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3 / 4); + CHECK_ALLOC(); + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + NewData[j] = ((ILubyte*)(Data))[i+2]; + NewData[j+1] = ((ILubyte*)(Data))[i+1]; + NewData[j+2] = ((ILubyte*)(Data))[i]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i+2]; + ((ILushort*)(NewData))[j+1] = ((ILushort*)(Data))[i+1]; + ((ILushort*)(NewData))[j+2] = ((ILushort*)(Data))[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i+2]; + ((ILuint*)(NewData))[j+1] = ((ILuint*)(Data))[i+1]; + ((ILuint*)(NewData))[j+2] = ((ILuint*)(Data))[i]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i+2]; + ((ILfloat*)(NewData))[j+1] = ((ILfloat*)(Data))[i+1]; + ((ILfloat*)(NewData))[j+2] = ((ILfloat*)(Data))[i]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 4, j += 3) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i+2]; + ((ILdouble*)(NewData))[j+1] = ((ILdouble*)(Data))[i+1]; + ((ILdouble*)(NewData))[j+2] = ((ILdouble*)(Data))[i]; + } + break; + } + break; + + case IL_LUMINANCE: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4); + CHECK_ALLOC(); + Size = NumPix / 4; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultf += ((ILubyte*)(Data))[i * 4 + c] * LumFactor[j]; + } + NewData[i] = (ILubyte)Resultf; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + Resultf = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultf += ((ILushort*)(Data))[i * 4 + c] * LumFactor[j]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILuint*)(Data))[i * 4 + c] * LumFactor[j]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultd; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILfloat*)(Data))[i * 4 + c] * LumFactor[j]; + } + ((ILfloat*)(NewData))[i] = (ILfloat)Resultd; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + Resultd = 0.0f; j = 2; + for (c = 0; c < 3; c++, j--) { + Resultd += ((ILdouble*)(Data))[i * 4 + c] * LumFactor[j]; + } + ((ILdouble*)(NewData))[i] = Resultd; + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4 * 2); + CHECK_ALLOC(); + Size = NumPix / 4 * 2; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i += 2) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILubyte*)(Data))[i * 2 + c] * LumFactor[c]; + } + NewData[i] = (ILubyte)Resultf; + NewData[i+1] = ((ILubyte*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i += 2) { + Resultf = 0.0f; + for (c = 0; c < 3; c++) { + Resultf += ((ILushort*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILushort*)(NewData))[i] = (ILushort)Resultf; + ((ILushort*)(NewData))[i+1] = ((ILushort*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILuint*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILuint*)(NewData))[i] = (ILuint)Resultd; + ((ILuint*)(NewData))[i+1] = ((ILuint*)(Data))[i * 2 + 3]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILfloat*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILfloat*)(NewData))[i] = (ILfloat)Resultd; + ((ILfloat*)(NewData))[i+1] = ((ILfloat*)(Data))[i * 2 + 3]; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i += 2) { + Resultd = 0.0; + for (c = 0; c < 3; c++) { + Resultd += ((ILdouble*)(Data))[i * 2 + c] * LumFactor[c]; + } + ((ILdouble*)(NewData))[i] = Resultd; + ((ILdouble*)(NewData))[i+1] = ((ILdouble*)(Data))[i * 2 + 3]; + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 4); + CHECK_ALLOC(); + Size = NumPix / 4; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + NewData[i] = ((ILubyte*)(Data))[i * 4 + 3]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i * 4 + 3]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i * 4 + 3]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i * 4 + 3]; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i * 4 + 3]; + } + break; + } + break; + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + + case IL_LUMINANCE: + switch (DestFormat) + { + case IL_RGB: + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i++, j += 3) { + for (c = 0; c < 3; c++) { + NewData[j + c] = ((ILubyte*)(Data))[i]; + } + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i++, j += 3) { + for (c = 0; c < 3; c++) { + ((ILushort*)(NewData))[j + c] = ((ILushort*)(Data))[i]; + } + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i++, j += 3) { + for (c = 0; c < 3; c++) { + ((ILuint*)(NewData))[j + c] = ((ILuint*)(Data))[i]; + } + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i++, j += 3) { + for (c = 0; c < 3; c++) { + ((ILfloat*)(NewData))[j + c] = ((ILfloat*)(Data))[i]; + } + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i++, j += 3) { + for (c = 0; c < 3; c++) { + ((ILdouble*)(NewData))[j + c] = ((ILdouble*)(Data))[i]; + } + } + break; + } + break; + + case IL_RGBA: + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + NewData[j + c] = ((ILubyte*)(Data))[i]; + } + NewData[j + 3] = UCHAR_MAX; // Full opacity + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILushort*)(NewData))[j + c] = ((ILushort*)(Data))[i]; + } + ((ILushort*)(NewData))[j + 3] = USHRT_MAX; // Full opacity + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILuint*)(NewData))[j + c] = ((ILuint*)(Data))[i]; + } + ((ILuint*)(NewData))[j + 3] = UINT_MAX; // Full opacity + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILfloat*)(NewData))[j + c] = ((ILfloat*)(Data))[i]; + } + ((ILfloat*)(NewData))[j + 3] = 1.0f; // Full opacity + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILdouble*)(NewData))[j + c] = ((ILdouble*)(Data))[i]; + } + ((ILdouble*)(NewData))[j + 3] = 1.0; // Full opacity + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 2); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < NumPix; i++) { + NewData[i * 2] = ((ILubyte*)(Data))[i]; + NewData[i * 2 + 1] = UCHAR_MAX; // Full opacity + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < NumPix; i++) { + ((ILushort*)(NewData))[i * 2] = ((ILushort*)(Data))[i]; + ((ILushort*)(NewData))[i * 2 + 1] = USHRT_MAX; // Full opacity + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < NumPix; i++) { + ((ILuint*)(NewData))[i * 2] = ((ILuint*)(Data))[i]; + ((ILuint*)(NewData))[i * 2 + 1] = UINT_MAX; // Full opacity + } + break; + case IL_FLOAT: + for (i = 0; i < NumPix; i++) { + ((ILfloat*)(NewData))[i * 2] = ((ILfloat*)(Data))[i]; + ((ILfloat*)(NewData))[i * 2 + 1] = 1.0f; // Full opacity + } + break; + case IL_DOUBLE: + for (i = 0; i < NumPix; i++) { + ((ILdouble*)(NewData))[i * 2] = ((ILdouble*)(Data))[i]; + ((ILdouble*)(NewData))[i * 2 + 1] = 1.0; // Full opacity + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest); + CHECK_ALLOC(); + memset(NewData, 0, NumPix * BpcDest); + break; + + /*case IL_COLOUR_INDEX: + NewData = (ILubyte*)ialloc(iCurImage->SizeOfData); + NewImage->Pal.Palette = (ILubyte*)ialloc(768); + if (NewData == NULL || NewImage->Pal.Palette) { + ifree(NewImage); + return IL_FALSE; + } + + // Fill the palette + for (i = 0; i < 256; i++) { + for (c = 0; c < 3; c++) { + NewImage->Pal.Palette[i * 3 + c] = (ILubyte)i; + } + } + // Copy the data + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i] = iCurImage->Data[i]; + } + break;*/ + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + + case IL_LUMINANCE_ALPHA: + switch (DestFormat) + { + case IL_RGB: + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 2 * 3); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 2, j += 3) { + for (c = 0; c < 3; c++) { + NewData[j + c] = ((ILubyte*)(Data))[i]; + } + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 2, j += 3) { + for (c = 0; c < 3; c++) { + ((ILushort*)(NewData))[j + c] = ((ILushort*)(Data))[i]; + } + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 2, j += 3) { + for (c = 0; c < 3; c++) { + ((ILuint*)(NewData))[j + c] = ((ILuint*)(Data))[i]; + } + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 2, j += 3) { + for (c = 0; c < 3; c++) { + ((ILfloat*)(NewData))[j + c] = ((ILfloat*)(Data))[i]; + } + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 2, j += 3) { + for (c = 0; c < 3; c++) { + ((ILdouble*)(NewData))[j + c] = ((ILdouble*)(Data))[i]; + } + } + break; + } + break; + + case IL_RGBA: + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 2 * 4); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 2, j += 4) { + for (c = 0; c < 3; c++) { + NewData[j + c] = ((ILubyte*)(Data))[i]; + } + NewData[j + 3] = ((ILubyte*)(Data))[i+1]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 2, j += 4) { + for (c = 0; c < 3; c++) { + ((ILushort*)(NewData))[j + c] = ((ILushort*)(Data))[i]; + } + ((ILushort*)(NewData))[j + 3] = ((ILushort*)(Data))[i+1]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 2, j += 4) { + for (c = 0; c < 3; c++) { + ((ILuint*)(NewData))[j + c] = ((ILuint*)(Data))[i]; + } + ((ILuint*)(NewData))[j + 3] = ((ILuint*)(Data))[i+1]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 2, j += 4) { + for (c = 0; c < 3; c++) { + ((ILfloat*)(NewData))[j + c] = ((ILfloat*)(Data))[i]; + } + ((ILfloat*)(NewData))[j + 3] = ((ILfloat*)(Data))[i+1]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 2, j += 4) { + for (c = 0; c < 3; c++) { + ((ILdouble*)(NewData))[j + c] = ((ILdouble*)(Data))[i]; + } + ((ILdouble*)(NewData))[j + 3] = ((ILdouble*)(Data))[i+1]; + } + break; + } + break; + + case IL_LUMINANCE: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 2); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i += 2, j++) { + NewData[j] = ((ILubyte*)(Data))[i]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i += 2, j++) { + ((ILushort*)(NewData))[j] = ((ILushort*)(Data))[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i += 2, j++) { + ((ILuint*)(NewData))[j] = ((ILuint*)(Data))[i]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i += 2, j++) { + ((ILfloat*)(NewData))[j] = ((ILfloat*)(Data))[i]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i += 2, j++) { + ((ILdouble*)(NewData))[j] = ((ILdouble*)(Data))[i]; + } + break; + } + break; + + case IL_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest / 2); + CHECK_ALLOC(); + Size = NumPix / 2; + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + NewData[i] = ((ILubyte*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < Size; i++) { + ((ILushort*)(NewData))[i] = ((ILushort*)(Data))[i * 2 + 3]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + ((ILuint*)(NewData))[i] = ((ILuint*)(Data))[i * 2 + 3]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + ((ILfloat*)(NewData))[i] = ((ILfloat*)(Data))[i * 2 + 3]; + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + ((ILdouble*)(NewData))[i] = ((ILdouble*)(Data))[i * 2 + 3]; + } + break; + } + break; + + /*case IL_COLOUR_INDEX: + NewData = (ILubyte*)ialloc(iCurImage->SizeOfData); + NewImage->Pal.Palette = (ILubyte*)ialloc(768); + if (NewData == NULL || NewImage->Pal.Palette) { + ifree(NewImage); + return IL_FALSE; + } + + // Fill the palette + for (i = 0; i < 256; i++) { + for (c = 0; c < 3; c++) { + NewImage->Pal.Palette[i * 3 + c] = (ILubyte)i; + } + } + // Copy the data + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i] = iCurImage->Data[i]; + } + break;*/ + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + + + case IL_ALPHA: + switch (DestFormat) + { + case IL_RGB: + case IL_BGR: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 3); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + case IL_UNSIGNED_INT: + case IL_INT: + case IL_FLOAT: + case IL_DOUBLE: + memset(NewData, 0, NumPix * BpcDest * 3); // Easy enough + break; + //@TODO: Do we need to a check for default: (error)? + } + break; + + case IL_RGBA: + case IL_BGRA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 4); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + NewData[j + c] = 0; + } + NewData[j + 3] = ((ILubyte*)(Data))[i]; // Only value that matters + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILushort*)(NewData))[j + c] = 0; + } + ((ILushort*)(NewData))[j + 3] = ((ILushort*)(Data))[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILuint*)(NewData))[j + c] = 0; + } + ((ILuint*)(NewData))[j + 3] = ((ILuint*)(Data))[i]; + } + break; + case IL_FLOAT: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILfloat*)(NewData))[j + c] = 0; + } + ((ILfloat*)(NewData))[j + 3] = ((ILfloat*)(Data))[i]; + } + break; + case IL_DOUBLE: + for (i = 0, j = 0; i < NumPix; i++, j += 4) { + for (c = 0; c < 3; c++) { + ((ILdouble*)(NewData))[j + c] = 0; + } + ((ILdouble*)(NewData))[j + 3] = ((ILdouble*)(Data))[i]; + } + break; + } + break; + + case IL_LUMINANCE_ALPHA: + NewData = (ILubyte*)ialloc(NumPix * BpcDest * 2); + CHECK_ALLOC(); + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < NumPix; i++) { + NewData[i * 2] = 0; + NewData[i * 2 + 1] = ((ILubyte*)(Data))[i]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + case IL_HALF: + for (i = 0; i < NumPix; i++) { + ((ILushort*)(NewData))[i * 2] = 0; + ((ILushort*)(NewData))[i * 2 + 1] = ((ILushort*)(Data))[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < NumPix; i++) { + ((ILuint*)(NewData))[i * 2] = 0; + ((ILuint*)(NewData))[i * 2 + 1] = ((ILuint*)(Data))[i]; + } + break; + case IL_FLOAT: + for (i = 0; i < NumPix; i++) { + ((ILfloat*)(NewData))[i * 2] = 0; + ((ILfloat*)(NewData))[i * 2 + 1] = ((ILfloat*)(Data))[i]; + } + break; + case IL_DOUBLE: + for (i = 0; i < NumPix; i++) { + ((ILdouble*)(NewData))[i * 2] = 0; + ((ILdouble*)(NewData))[i * 2 + 1] = ((ILdouble*)(Data))[i]; + } + break; + } + break; + + + /*case IL_COLOUR_INDEX: + NewData = (ILubyte*)ialloc(iCurImage->SizeOfData); + NewImage->Pal.Palette = (ILubyte*)ialloc(768); + if (NewData == NULL || NewImage->Pal.Palette) { + ifree(NewImage); + return IL_FALSE; + } + + // Fill the palette + for (i = 0; i < 256; i++) { + for (c = 0; c < 3; c++) { + NewImage->Pal.Palette[i * 3 + c] = (ILubyte)i; + } + } + // Copy the data + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i] = iCurImage->Data[i]; + } + break;*/ + + default: + ilSetError(IL_INVALID_CONVERSION); + if (Data != Buffer) + ifree(Data); + return NULL; + } + break; + } + + if (Data != Buffer) + ifree(Data); + + return NewData; +} + + +// Really shouldn't have to check for default, as in above ilConvertBuffer(). +// This now converts better from lower bpp to higher bpp. For example, when +// converting from 8 bpp to 16 bpp, if the value is 0xEC, the new value is 0xECEC +// instead of 0xEC00. +void* ILAPIENTRY iSwitchTypes(ILuint SizeOfData, ILenum SrcType, ILenum DestType, void *Buffer) +{ + ILuint BpcSrc, BpcDest, Size, i; + ILubyte *NewData, *BytePtr; + ILushort *ShortPtr; + ILuint *IntPtr; + ILfloat *FloatPtr, tempFloat; + ILdouble *DblPtr, tempDouble; + ILushort *HalfPtr; + + BpcSrc = ilGetBpcType(SrcType); + BpcDest = ilGetBpcType(DestType); + + if (BpcSrc == 0 || BpcDest == 0) { + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + Size = SizeOfData / BpcSrc; + + //if (BpcSrc == BpcDest) { + if (SrcType == DestType) { + return Buffer; + } + + NewData = (ILubyte*)ialloc(Size * BpcDest); + if (NewData == NULL) { + return IL_FALSE; + } + + switch (DestType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + BytePtr = (ILubyte*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_SHORT: + case IL_SHORT: + for (i = 0; i < Size; i++) { + BytePtr[i] = ((ILushort*)Buffer)[i] >> 8; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + BytePtr[i] = ((ILuint*)Buffer)[i] >> 24; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + #if CLAMP_FLOATS + tempFloat = IL_CLAMP(((ILfloat*)Buffer)[i]); + BytePtr[i] = (ILubyte)(tempFloat * UCHAR_MAX); + #else + BytePtr[i] = (ILubyte)(((ILfloat*)Buffer)[i] * UCHAR_MAX); + #endif + } + break; + case IL_HALF: + for (i = 0; i < Size; i++) { + #if CLAMP_HALF + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + tempFloat = IL_CLAMP(tempFloat); + BytePtr[i] = (ILubyte)(tempFloat * UCHAR_MAX); + #else + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + BytePtr[i] = (ILubyte)(tempFloat * UCHAR_MAX); + #endif + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + #if CLAMP_DOUBLES + tempDouble = IL_CLAMP(((ILdouble*)Buffer)[i]); + BytePtr[i] = (ILubyte)(tempDouble * UCHAR_MAX); + #else + BytePtr[i] = (ILubyte)( ((ILdouble*)Buffer)[i] * UCHAR_MAX); + #endif + } + break; + } + break; + + case IL_UNSIGNED_SHORT: + case IL_SHORT: + ShortPtr = (ILushort*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + ShortPtr[i] = (((ILubyte*)Buffer)[i] << 8) | ((ILubyte*)Buffer)[i]; + } + break; + case IL_UNSIGNED_INT: + case IL_INT: + for (i = 0; i < Size; i++) { + ShortPtr[i] = ((ILuint*)Buffer)[i] >> 16; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + #if CLAMP_FLOATS + tempFloat = IL_CLAMP(((ILfloat*)Buffer)[i]); + ShortPtr[i] = (ILushort)(tempFloat * USHRT_MAX); + #else + ShortPtr[i] = (ILushort)( ((ILfloat*)Buffer)[i] * USHRT_MAX); + #endif + } + break; + case IL_HALF: + for (i = 0; i < Size; i++) { + #if CLAMP_FLOATS + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + tempFloat = IL_CLAMP(tempFloat); + ShortPtr[i] = (ILushort)(tempFloat * USHRT_MAX); + #else + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + ShortPtr[i] = (ILushort)(tempFloat * USHRT_MAX); + #endif + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + #if CLAMP_DOUBLES + tempDouble = IL_CLAMP(((ILdouble*)Buffer)[i]); + ShortPtr[i] = (ILushort)(tempDouble * USHRT_MAX); + #else + ShortPtr[i] = (ILushort)( ((ILdouble*)Buffer)[i] * USHRT_MAX); + #endif + } + break; + } + break; + + case IL_UNSIGNED_INT: + case IL_INT: + IntPtr = (ILuint*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + for (i = 0; i < Size; i++) { + IntPtr[i] = (((ILubyte*)Buffer)[i] << 24) | (((ILubyte*)Buffer)[i] << 16) | + (((ILubyte*)Buffer)[i] << 8) | ((ILubyte*)Buffer)[i]; + } + break; + case IL_UNSIGNED_SHORT: + case IL_SHORT: + for (i = 0; i < Size; i++) { + IntPtr[i] = (((ILushort*)Buffer)[i] << 16) | ((ILushort*)Buffer)[i]; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + #if CLAMP_FLOATS + tempFloat = IL_CLAMP(((ILfloat*)Buffer)[i]); + IntPtr[i] = (ILuint)(tempFloat * UINT_MAX); + #else + IntPtr[i] = (ILuint)( ((ILfloat*)Buffer)[i] * UINT_MAX); + #endif + } + break; + case IL_HALF: + for (i = 0; i < Size; i++) { + #if CLAMP_FLOATS + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + tempFloat = IL_CLAMP(tempFloat); + IntPtr[i] = (ILuint)(tempFloat * UINT_MAX); + #else + *((ILuint*)&tempFloat) = ilHalfToFloat(((ILushort*)Buffer)[i]); + IntPtr[i] = (ILuint)(tempFloat * UINT_MAX); + #endif + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + #if CLAMP_DOUBLES + tempDouble = IL_CLAMP(((ILdouble*)Buffer)[i]); + IntPtr[i] = (ILuint)(tempDouble * UINT_MAX); + #else + IntPtr[i] = (ILuint)( ((ILdouble*)Buffer)[i] * UINT_MAX); + #endif + } + break; + } + break; + + // @TODO: Handle signed better. + case IL_FLOAT: + FloatPtr = (ILfloat*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_BYTE: + for (i = 0; i < Size; i++) { + FloatPtr[i] = ((ILubyte*)Buffer)[i] / (ILfloat)UCHAR_MAX; + } + break; + case IL_BYTE: + for (i = 0; i < Size; i++) { + FloatPtr[i] = ((ILbyte*)Buffer)[i] / (ILfloat)UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + for (i = 0; i < Size; i++) { + FloatPtr[i] = ((ILushort*)Buffer)[i] / (ILfloat)USHRT_MAX; + } + break; + case IL_SHORT: + for (i = 0; i < Size; i++) { + FloatPtr[i] = ((ILshort*)Buffer)[i] / (ILfloat)USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + for (i = 0; i < Size; i++) { + FloatPtr[i] = (ILfloat)((ILuint*)Buffer)[i] / (ILfloat)UINT_MAX; + } + break; + case IL_INT: + for (i = 0; i < Size; i++) { + FloatPtr[i] = (ILfloat)((ILint*)Buffer)[i] / (ILfloat)UINT_MAX; + } + break; + case IL_HALF: + for (i = 0; i < Size; i++) { + *((ILuint*)&FloatPtr[i]) = ilHalfToFloat(((ILushort*)Buffer)[i]); + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + FloatPtr[i] = (ILfloat)((ILdouble*)Buffer)[i]; + } + break; + } + break; + + case IL_DOUBLE: + DblPtr = (ILdouble*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_BYTE: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILubyte*)Buffer)[i] / (ILdouble)UCHAR_MAX; + } + break; + case IL_BYTE: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILbyte*)Buffer)[i] / (ILdouble)UCHAR_MAX; + } + break; + case IL_UNSIGNED_SHORT: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILushort*)Buffer)[i] / (ILdouble)USHRT_MAX; + } + break; + case IL_SHORT: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILshort*)Buffer)[i] / (ILdouble)USHRT_MAX; + } + break; + case IL_UNSIGNED_INT: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILuint*)Buffer)[i] / (ILdouble)UINT_MAX; + } + break; + case IL_INT: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILint*)Buffer)[i] / (ILdouble)UINT_MAX; + } + break; + case IL_HALF: + for (i = 0; i < Size; i++) { + *(ILuint*)&tempFloat = ilHalfToFloat(((ILushort*)Buffer)[i]); + DblPtr[i] = tempFloat; + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + DblPtr[i] = ((ILfloat*)Buffer)[i]; + } + break; + } + break; + + case IL_HALF: + HalfPtr = (ILushort*)NewData; + switch (SrcType) + { + case IL_UNSIGNED_BYTE: + for (i = 0; i < Size; i++) { + tempFloat = ((ILubyte*)Buffer)[i] / (ILfloat)UCHAR_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_BYTE: + for (i = 0; i < Size; i++) { + tempFloat = ((ILbyte*)Buffer)[i] / (ILfloat)UCHAR_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_UNSIGNED_SHORT: + for (i = 0; i < Size; i++) { + tempFloat = ((ILushort*)Buffer)[i] / (ILfloat)USHRT_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_SHORT: + for (i = 0; i < Size; i++) { + tempFloat = ((ILshort*)Buffer)[i] / (ILfloat)USHRT_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_UNSIGNED_INT: + for (i = 0; i < Size; i++) { + tempFloat = ((ILuint*)Buffer)[i] / (ILfloat)UINT_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_INT: + for (i = 0; i < Size; i++) { + tempFloat = ((ILint*)Buffer)[i] / (ILfloat)UINT_MAX; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_DOUBLE: + for (i = 0; i < Size; i++) { + tempFloat = (ILfloat)((ILdouble*)Buffer)[i]; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + case IL_FLOAT: + for (i = 0; i < Size; i++) { + tempFloat = ((ILfloat*)Buffer)[i]; + *((ILushort*)&HalfPtr[i]) = ilFloatToHalf(*(ILuint*)&tempFloat); + } + break; + } + break; + } + + + return NewData; +} + + + + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_convert.c b/libs/DevIL-1.7.8/src-IL/src/il_convert.c new file mode 100644 index 00000000..8f7099d6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_convert.c @@ -0,0 +1,1126 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_convert.c +// +// Description: Converts between several image formats +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_manip.h" +#include + + +ILimage *iConvertPalette(ILimage *Image, ILenum DestFormat) +{ + static const ILfloat LumFactor[3] = { 0.212671f, 0.715160f, 0.072169f }; // http://www.inforamp.net/~poynton/ and libpng's libpng.txt - Used for conversion to luminance. + ILimage *NewImage = NULL, *CurImage = NULL; + ILuint i, j, k, c, Size, LumBpp = 1; + ILfloat Resultf; + ILubyte *Temp = NULL; + ILboolean Converted; + ILboolean HasAlpha; + + NewImage = (ILimage*)icalloc(1, sizeof(ILimage)); // Much better to have it all set to 0. + if (NewImage == NULL) { + return IL_FALSE; + } + + ilCopyImageAttr(NewImage, Image); + + if (!Image->Pal.Palette || !Image->Pal.PalSize || Image->Pal.PalType == IL_PAL_NONE || Image->Bpp != 1) { + ilCloseImage(NewImage); + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + if (DestFormat == IL_LUMINANCE || DestFormat == IL_LUMINANCE_ALPHA) { + if (NewImage->Pal.Palette) + ifree(NewImage->Pal.Palette); + if (DestFormat == IL_LUMINANCE_ALPHA) + LumBpp = 2; + + switch (iCurImage->Pal.PalType) + { + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + Temp = (ILubyte*)ialloc(LumBpp * Image->Pal.PalSize / ilGetBppPal(Image->Pal.PalType)); + if (Temp == NULL) + goto alloc_error; + + Size = ilGetBppPal(Image->Pal.PalType); + for (i = 0, k = 0; i < Image->Pal.PalSize; i += Size, k += LumBpp) { + Resultf = 0.0f; + for (c = 0; c < Size; c++) { + Resultf += Image->Pal.Palette[i + c] * LumFactor[c]; + } + Temp[k] = (ILubyte)Resultf; + if (LumBpp == 2) { + if (iCurImage->Pal.PalType == IL_PAL_RGBA32) + Temp[k+1] = Image->Pal.Palette[i + 3]; + else + Temp[k+1] = 0xff; + } + } + + break; + + case IL_PAL_BGR24: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + Temp = (ILubyte*)ialloc(LumBpp * Image->Pal.PalSize / ilGetBppPal(Image->Pal.PalType)); + if (Temp == NULL) + goto alloc_error; + + Size = ilGetBppPal(Image->Pal.PalType); + for (i = 0, k = 0; i < Image->Pal.PalSize; i += Size, k += LumBpp) { + Resultf = 0.0f; j = 2; + for (c = 0; c < Size; c++, j--) { + Resultf += Image->Pal.Palette[i + c] * LumFactor[j]; + } + Temp[k] = (ILubyte)Resultf; + if (LumBpp == 2) { + if (iCurImage->Pal.PalType == IL_PAL_RGBA32) + Temp[k+1] = Image->Pal.Palette[i + 3]; + else + Temp[k+1] = 0xff; + } + } + + break; + } + + NewImage->Pal.Palette = NULL; + NewImage->Pal.PalSize = 0; + NewImage->Pal.PalType = IL_PAL_NONE; + NewImage->Format = DestFormat; + NewImage->Bpp = LumBpp; + NewImage->Bps = NewImage->Width * LumBpp; + NewImage->SizeOfData = NewImage->SizeOfPlane = NewImage->Bps * NewImage->Height; + NewImage->Data = (ILubyte*)ialloc(NewImage->SizeOfData); + if (NewImage->Data == NULL) + goto alloc_error; + + if (LumBpp == 2) { + for (i = 0; i < Image->SizeOfData; i++) { + NewImage->Data[i*2] = Temp[Image->Data[i] * 2]; + NewImage->Data[i*2+1] = Temp[Image->Data[i] * 2 + 1]; + } + } + else { + for (i = 0; i < Image->SizeOfData; i++) { + NewImage->Data[i] = Temp[Image->Data[i]]; + } + } + + ifree(Temp); + + return NewImage; + } + else if (DestFormat == IL_ALPHA) { + if (NewImage->Pal.Palette) + ifree(NewImage->Pal.Palette); + + switch (iCurImage->Pal.PalType) + { + // Opaque, so all the values are 0xFF. + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_BGR24: + case IL_PAL_BGR32: + HasAlpha = IL_FALSE; + break; + + case IL_PAL_BGRA32: + case IL_PAL_RGBA32: + HasAlpha = IL_TRUE; + Temp = (ILubyte*)ialloc(1 * Image->Pal.PalSize / ilGetBppPal(Image->Pal.PalType)); + if (Temp == NULL) + goto alloc_error; + + Size = ilGetBppPal(Image->Pal.PalType); + for (i = 0, k = 0; i < Image->Pal.PalSize; i += Size, k += 1) { + Temp[k] = Image->Pal.Palette[i + 3]; + } + + break; + } + + NewImage->Pal.Palette = NULL; + NewImage->Pal.PalSize = 0; + NewImage->Pal.PalType = IL_PAL_NONE; + NewImage->Format = DestFormat; + NewImage->Bpp = LumBpp; + NewImage->Bps = NewImage->Width * 1; // Alpha is only one byte. + NewImage->SizeOfData = NewImage->SizeOfPlane = NewImage->Bps * NewImage->Height; + NewImage->Data = (ILubyte*)ialloc(NewImage->SizeOfData); + if (NewImage->Data == NULL) + goto alloc_error; + + if (HasAlpha) { + for (i = 0; i < Image->SizeOfData; i++) { + NewImage->Data[i*2] = Temp[Image->Data[i] * 2]; + NewImage->Data[i*2+1] = Temp[Image->Data[i] * 2 + 1]; + } + } + else { // No alpha, opaque. + for (i = 0; i < Image->SizeOfData; i++) { + NewImage->Data[i] = 0xFF; + } + } + + ifree(Temp); + + return NewImage; + } + + //NewImage->Format = ilGetPalBaseType(iCurImage->Pal.PalType); + NewImage->Format = DestFormat; + + if (ilGetBppFormat(NewImage->Format) == 0) { + ilCloseImage(NewImage); + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + CurImage = iCurImage; + ilSetCurImage(NewImage); + + switch (DestFormat) + { + case IL_RGB: + Converted = ilConvertPal(IL_PAL_RGB24); + break; + + case IL_BGR: + Converted = ilConvertPal(IL_PAL_BGR24); + break; + + case IL_RGBA: + Converted = ilConvertPal(IL_PAL_RGB32); + break; + + case IL_BGRA: + Converted = ilConvertPal(IL_PAL_BGR32); + break; + + case IL_COLOUR_INDEX: + // Just copy the original image over. + NewImage->Data = (ILubyte*)ialloc(CurImage->SizeOfData); + if (NewImage->Data == NULL) + goto alloc_error; + NewImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (NewImage->Pal.Palette == NULL) + goto alloc_error; + memcpy(NewImage->Data, CurImage->Data, CurImage->SizeOfData); + memcpy(NewImage->Pal.Palette, Image->Pal.Palette, Image->Pal.PalSize); + NewImage->Pal.PalSize = Image->Pal.PalSize; + NewImage->Pal.PalType = Image->Pal.PalType; + ilSetCurImage(CurImage); + return NewImage; + + default: + ilCloseImage(NewImage); + ilSetError(IL_INVALID_CONVERSION); + return NULL; + } + + // Resize to new bpp + ilResizeImage(NewImage, NewImage->Width, NewImage->Height, NewImage->Depth, ilGetBppFormat(DestFormat), /*ilGetBpcType(DestType)*/1); + + // ilConvertPal already sets the error message - no need to confuse the user. + if (!Converted) { + ilSetCurImage(CurImage); + ilCloseImage(NewImage); + return NULL; + } + + Size = ilGetBppPal(NewImage->Pal.PalType); + for (i = 0; i < Image->SizeOfData; i++) { + for (c = 0; c < NewImage->Bpp; c++) { + NewImage->Data[i * NewImage->Bpp + c] = NewImage->Pal.Palette[Image->Data[i] * Size + c]; + } + } + + ifree(NewImage->Pal.Palette); + + NewImage->Pal.Palette = NULL; + NewImage->Pal.PalSize = 0; + NewImage->Pal.PalType = IL_PAL_NONE; + ilSetCurImage(CurImage); + + return NewImage; + +alloc_error: + ifree(Temp); + if (NewImage) + ilCloseImage(NewImage); + if (CurImage != iCurImage) + ilSetCurImage(CurImage); + return NULL; +} + + +// In il_quantizer.c +ILimage *iQuantizeImage(ILimage *Image, ILuint NumCols); +// In il_neuquant.c +ILimage *iNeuQuant(ILimage *Image, ILuint NumCols); + +// Converts an image from one format to another +ILAPI ILimage* ILAPIENTRY iConvertImage(ILimage *Image, ILenum DestFormat, ILenum DestType) +{ + ILimage *NewImage, *CurImage; + ILuint i; + ILubyte *NewData; + + CurImage = Image; + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // We don't support 16-bit color indices (or higher). + if (DestFormat == IL_COLOUR_INDEX && DestType >= IL_SHORT) { + ilSetError(IL_INVALID_CONVERSION); + return NULL; + } + + if (Image->Format == IL_COLOUR_INDEX) { + NewImage = iConvertPalette(Image, DestFormat); + + //added test 2003-09-01 + if (NewImage == NULL) + return NULL; + + if (DestType == NewImage->Type) + return NewImage; + + NewData = (ILubyte*)ilConvertBuffer(NewImage->SizeOfData, NewImage->Format, DestFormat, NewImage->Type, DestType, NULL, NewImage->Data); + if (NewData == NULL) { + ifree(NewImage); // ilCloseImage not needed. + return NULL; + } + ifree(NewImage->Data); + NewImage->Data = NewData; + + ilCopyImageAttr(NewImage, Image); + NewImage->Format = DestFormat; + NewImage->Type = DestType; + NewImage->Bpc = ilGetBpcType(DestType); + NewImage->Bpp = ilGetBppFormat(DestFormat); + NewImage->Bps = NewImage->Bpp * NewImage->Bpc * NewImage->Width; + NewImage->SizeOfPlane = NewImage->Bps * NewImage->Height; + NewImage->SizeOfData = NewImage->SizeOfPlane * NewImage->Depth; + } + else if (DestFormat == IL_COLOUR_INDEX && Image->Format != IL_LUMINANCE) { + if (iGetInt(IL_QUANTIZATION_MODE) == IL_NEU_QUANT) + return iNeuQuant(Image, iGetInt(IL_MAX_QUANT_INDICES)); + else // Assume IL_WU_QUANT otherwise. + return iQuantizeImage(Image, iGetInt(IL_MAX_QUANT_INDICES)); + } + else { + NewImage = (ILimage*)icalloc(1, sizeof(ILimage)); // Much better to have it all set to 0. + if (NewImage == NULL) { + return NULL; + } + + if (ilGetBppFormat(DestFormat) == 0) { + ilSetError(IL_INVALID_PARAM); + ifree(NewImage); + return NULL; + } + + ilCopyImageAttr(NewImage, Image); + NewImage->Format = DestFormat; + NewImage->Type = DestType; + NewImage->Bpc = ilGetBpcType(DestType); + NewImage->Bpp = ilGetBppFormat(DestFormat); + NewImage->Bps = NewImage->Bpp * NewImage->Bpc * NewImage->Width; + NewImage->SizeOfPlane = NewImage->Bps * NewImage->Height; + NewImage->SizeOfData = NewImage->SizeOfPlane * NewImage->Depth; + + if (DestFormat == IL_COLOUR_INDEX && Image->Format == IL_LUMINANCE) { + NewImage->Pal.PalSize = 768; + NewImage->Pal.PalType = IL_PAL_RGB24; + NewImage->Pal.Palette = (ILubyte*)ialloc(768); + for (i = 0; i < 256; i++) { + NewImage->Pal.Palette[i * 3] = i; + NewImage->Pal.Palette[i * 3 + 1] = i; + NewImage->Pal.Palette[i * 3 + 2] = i; + } + NewImage->Data = (ILubyte*)ialloc(Image->SizeOfData); + if (NewImage->Data == NULL) { + ilCloseImage(NewImage); + return NULL; + } + memcpy(NewImage->Data, Image->Data, Image->SizeOfData); + } + else { + NewImage->Data = (ILubyte*)ilConvertBuffer(Image->SizeOfData, Image->Format, DestFormat, Image->Type, DestType, NULL, Image->Data); + if (NewImage->Data == NULL) { + ifree(NewImage); // ilCloseImage not needed. + return NULL; + } + } + } + + return NewImage; +} + + +//! Converts the current image to the DestFormat format. +/*! \param DestFormat An enum of the desired output format. Any format values are accepted. + \param DestType An enum of the desired output type. Any type values are accepted. + \exception IL_ILLEGAL_OPERATION No currently bound image + \exception IL_INVALID_CONVERSION DestFormat or DestType was an invalid identifier. + \exception IL_OUT_OF_MEMORY Could not allocate enough memory. + \return Boolean value of failure or success*/ +ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType) +{ + ILimage *Image, *pCurImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (DestFormat == iCurImage->Format && DestType == iCurImage->Type) + return IL_TRUE; // No conversion needed. + + if (DestType == iCurImage->Type) { + if (iFastConvert(DestFormat)) { + iCurImage->Format = DestFormat; + return IL_TRUE; + } + } + + if (ilIsEnabled(IL_USE_KEY_COLOUR)) { + ilAddAlphaKey(iCurImage); + } + + pCurImage = iCurImage; + while (pCurImage != NULL) + { + Image = iConvertImage(pCurImage, DestFormat, DestType); + if (Image == NULL) + return IL_FALSE; + + //ilCopyImageAttr(pCurImage, Image); // Destroys subimages. + + // We don't copy the colour profile here, since it stays the same. + // Same with the DXTC data. + pCurImage->Format = DestFormat; + pCurImage->Type = DestType; + pCurImage->Bpc = ilGetBpcType(DestType); + pCurImage->Bpp = ilGetBppFormat(DestFormat); + pCurImage->Bps = pCurImage->Width * pCurImage->Bpc * pCurImage->Bpp; + pCurImage->SizeOfPlane = pCurImage->Bps * pCurImage->Height; + pCurImage->SizeOfData = pCurImage->Depth * pCurImage->SizeOfPlane; + if (pCurImage->Pal.Palette && pCurImage->Pal.PalSize && pCurImage->Pal.PalType != IL_PAL_NONE) + ifree(pCurImage->Pal.Palette); + pCurImage->Pal.Palette = Image->Pal.Palette; + pCurImage->Pal.PalSize = Image->Pal.PalSize; + pCurImage->Pal.PalType = Image->Pal.PalType; + Image->Pal.Palette = NULL; + ifree(pCurImage->Data); + pCurImage->Data = Image->Data; + Image->Data = NULL; + ilCloseImage(Image); + + pCurImage = pCurImage->Next; + } + + return IL_TRUE; +} + + +// Swaps the colour order of the current image (rgb(a)->bgr(a) or vice-versa). +// Must be either an 8, 24 or 32-bit (coloured) image (or palette). +ILboolean ilSwapColours() +{ + ILuint i = 0, Size = iCurImage->Bpp * iCurImage->Width * iCurImage->Height; + ILbyte PalBpp = ilGetBppPal(iCurImage->Pal.PalType); + ILushort *ShortPtr; + ILuint *IntPtr, Temp; + ILdouble *DoublePtr, DoubleTemp; + + if ((iCurImage->Bpp != 1 && iCurImage->Bpp != 3 && iCurImage->Bpp != 4)) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + // Just check before we change the format. + if (iCurImage->Format == IL_COLOUR_INDEX) { + if (PalBpp == 0 || iCurImage->Format != IL_COLOUR_INDEX) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + } + + switch (iCurImage->Format) + { + case IL_RGB: + iCurImage->Format = IL_BGR; + break; + case IL_RGBA: + iCurImage->Format = IL_BGRA; + break; + case IL_BGR: + iCurImage->Format = IL_RGB; + break; + case IL_BGRA: + iCurImage->Format = IL_RGBA; + break; + case IL_ALPHA: + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + return IL_TRUE; // No need to do anything to luminance or alpha images. + case IL_COLOUR_INDEX: + switch (iCurImage->Pal.PalType) + { + case IL_PAL_RGB24: + iCurImage->Pal.PalType = IL_PAL_BGR24; + break; + case IL_PAL_RGB32: + iCurImage->Pal.PalType = IL_PAL_BGR32; + break; + case IL_PAL_RGBA32: + iCurImage->Pal.PalType = IL_PAL_BGRA32; + break; + case IL_PAL_BGR24: + iCurImage->Pal.PalType = IL_PAL_RGB24; + break; + case IL_PAL_BGR32: + iCurImage->Pal.PalType = IL_PAL_RGB32; + break; + case IL_PAL_BGRA32: + iCurImage->Pal.PalType = IL_PAL_RGBA32; + break; + default: + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + break; + default: + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iCurImage->Format == IL_COLOUR_INDEX) { + for (; i < iCurImage->Pal.PalSize; i += PalBpp) { + Temp = iCurImage->Pal.Palette[i]; + iCurImage->Pal.Palette[i] = iCurImage->Pal.Palette[i+2]; + iCurImage->Pal.Palette[i+2] = Temp; + } + } + else { + ShortPtr = (ILushort*)iCurImage->Data; + IntPtr = (ILuint*)iCurImage->Data; + DoublePtr = (ILdouble*)iCurImage->Data; + switch (iCurImage->Bpc) + { + case 1: + for (; i < Size; i += iCurImage->Bpp) { + Temp = iCurImage->Data[i]; + iCurImage->Data[i] = iCurImage->Data[i+2]; + iCurImage->Data[i+2] = Temp; + } + break; + case 2: + for (; i < Size; i += iCurImage->Bpp) { + Temp = ShortPtr[i]; + ShortPtr[i] = ShortPtr[i+2]; + ShortPtr[i+2] = Temp; + } + break; + case 4: // Works fine with ILint, ILuint and ILfloat. + for (; i < Size; i += iCurImage->Bpp) { + Temp = IntPtr[i]; + IntPtr[i] = IntPtr[i+2]; + IntPtr[i+2] = Temp; + } + break; + case 8: + for (; i < Size; i += iCurImage->Bpp) { + DoubleTemp = DoublePtr[i]; + DoublePtr[i] = DoublePtr[i+2]; + DoublePtr[i+2] = DoubleTemp; + } + break; + } + } + + return IL_TRUE; +} + + +// Adds an opaque alpha channel to a 24-bit image +ILboolean ilAddAlpha() +{ + ILubyte *NewData, NewBpp; + ILuint i = 0, j = 0, Size; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iCurImage->Bpp != 3) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + Size = iCurImage->Bps * iCurImage->Height / iCurImage->Bpc; + NewBpp = (ILubyte)(iCurImage->Bpp + 1); + + NewData = (ILubyte*)ialloc(NewBpp * iCurImage->Bpc * iCurImage->Width * iCurImage->Height); + if (NewData == NULL) { + return IL_FALSE; + } + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + NewData[j] = iCurImage->Data[i]; + NewData[j+1] = iCurImage->Data[i+1]; + NewData[j+2] = iCurImage->Data[i+2]; + NewData[j+3] = UCHAR_MAX; // Max opaqueness + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILushort*)NewData)[j] = ((ILushort*)iCurImage->Data)[i]; + ((ILushort*)NewData)[j+1] = ((ILushort*)iCurImage->Data)[i+1]; + ((ILushort*)NewData)[j+2] = ((ILushort*)iCurImage->Data)[i+2]; + ((ILushort*)NewData)[j+3] = USHRT_MAX; + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILuint*)NewData)[j] = ((ILuint*)iCurImage->Data)[i]; + ((ILuint*)NewData)[j+1] = ((ILuint*)iCurImage->Data)[i+1]; + ((ILuint*)NewData)[j+2] = ((ILuint*)iCurImage->Data)[i+2]; + ((ILuint*)NewData)[j+3] = UINT_MAX; + } + break; + + case IL_FLOAT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILfloat*)NewData)[j] = ((ILfloat*)iCurImage->Data)[i]; + ((ILfloat*)NewData)[j+1] = ((ILfloat*)iCurImage->Data)[i+1]; + ((ILfloat*)NewData)[j+2] = ((ILfloat*)iCurImage->Data)[i+2]; + ((ILfloat*)NewData)[j+3] = 1.0f; + } + break; + + case IL_DOUBLE: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILdouble*)NewData)[j] = ((ILdouble*)iCurImage->Data)[i]; + ((ILdouble*)NewData)[j+1] = ((ILdouble*)iCurImage->Data)[i+1]; + ((ILdouble*)NewData)[j+2] = ((ILdouble*)iCurImage->Data)[i+2]; + ((ILdouble*)NewData)[j+3] = 1.0; + } + break; + + default: + ifree(NewData); + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + + iCurImage->Bpp = NewBpp; + iCurImage->Bps = iCurImage->Width * iCurImage->Bpc * NewBpp; + iCurImage->SizeOfPlane = iCurImage->Bps * iCurImage->Height; + iCurImage->SizeOfData = iCurImage->SizeOfPlane * iCurImage->Depth; + ifree(iCurImage->Data); + iCurImage->Data = NewData; + + switch (iCurImage->Format) + { + case IL_RGB: + iCurImage->Format = IL_RGBA; + break; + case IL_BGR: + iCurImage->Format = IL_BGRA; + break; + } + + return IL_TRUE; +} + + +//ILfloat KeyRed = 0, KeyGreen = 0, KeyBlue = 0, KeyAlpha = 0; + +void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha) +{ + ILfloat KeyRed = 0, KeyGreen = 0, KeyBlue = 0, KeyAlpha = 0; + KeyRed = Red; + KeyGreen = Green; + KeyBlue = Blue; + KeyAlpha = Alpha; + return; +} + + +// Adds an alpha channel to an 8 or 24-bit image, +// making the image transparent where Key is equal to the pixel. +ILboolean ilAddAlphaKey(ILimage *Image) +{ + ILfloat KeyRed = 0, KeyGreen = 0, KeyBlue = 0, KeyAlpha = 0; + ILubyte *NewData, NewBpp; + ILfloat KeyColour[3]; + ILuint i = 0, j = 0, c, Size; + ILboolean Same; + + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Image->Format != IL_COLOUR_INDEX) { + if (Image->Bpp != 3) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + if (Image->Format == IL_BGR || Image->Format == IL_BGRA) { + KeyColour[0] = KeyBlue; + KeyColour[1] = KeyGreen; + KeyColour[2] = KeyRed; + } + else { + KeyColour[0] = KeyRed; + KeyColour[1] = KeyGreen; + KeyColour[2] = KeyBlue; + } + + Size = Image->Bps * Image->Height / Image->Bpc; + + NewBpp = (ILubyte)(Image->Bpp + 1); + + NewData = (ILubyte*)ialloc(NewBpp * Image->Bpc * Image->Width * Image->Height); + if (NewData == NULL) { + return IL_FALSE; + } + + switch (Image->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + for (; i < Size; i += Image->Bpp, j += NewBpp) { + NewData[j] = Image->Data[i]; + NewData[j+1] = Image->Data[i+1]; + NewData[j+2] = Image->Data[i+2]; + Same = IL_TRUE; + for (c = 0; c < Image->Bpp; c++) { + if (Image->Data[i+c] != KeyColour[c] * UCHAR_MAX) + Same = IL_FALSE; + } + + if (Same) + NewData[j+3] = 0; // Transparent - matches key colour + else + NewData[j+3] = UCHAR_MAX; + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + for (; i < Size; i += Image->Bpp, j += NewBpp) { + ((ILushort*)NewData)[j] = ((ILushort*)Image->Data)[i]; + ((ILushort*)NewData)[j+1] = ((ILushort*)Image->Data)[i+1]; + ((ILushort*)NewData)[j+2] = ((ILushort*)Image->Data)[i+2]; + Same = IL_TRUE; + for (c = 0; c < Image->Bpp; c++) { + if (((ILushort*)Image->Data)[i+c] != KeyColour[c] * USHRT_MAX) + Same = IL_FALSE; + } + + if (Same) + ((ILushort*)NewData)[j+3] = 0; + else + ((ILushort*)NewData)[j+3] = USHRT_MAX; + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + for (; i < Size; i += Image->Bpp, j += NewBpp) { + ((ILuint*)NewData)[j] = ((ILuint*)Image->Data)[i]; + ((ILuint*)NewData)[j+1] = ((ILuint*)Image->Data)[i+1]; + ((ILuint*)NewData)[j+2] = ((ILuint*)Image->Data)[i+2]; + Same = IL_TRUE; + for (c = 0; c < Image->Bpp; c++) { + if (((ILuint*)Image->Data)[i+c] != KeyColour[c] * UINT_MAX) + Same = IL_FALSE; + } + + if (Same) + ((ILuint*)NewData)[j+3] = 0; + else + ((ILuint*)NewData)[j+3] = UINT_MAX; + } + break; + + case IL_FLOAT: + for (; i < Size; i += Image->Bpp, j += NewBpp) { + ((ILfloat*)NewData)[j] = ((ILfloat*)Image->Data)[i]; + ((ILfloat*)NewData)[j+1] = ((ILfloat*)Image->Data)[i+1]; + ((ILfloat*)NewData)[j+2] = ((ILfloat*)Image->Data)[i+2]; + Same = IL_TRUE; + for (c = 0; c < Image->Bpp; c++) { + if (((ILfloat*)Image->Data)[i+c] != KeyColour[c]) + Same = IL_FALSE; + } + + if (Same) + ((ILfloat*)NewData)[j+3] = 0.0f; + else + ((ILfloat*)NewData)[j+3] = 1.0f; + } + break; + + case IL_DOUBLE: + for (; i < Size; i += Image->Bpp, j += NewBpp) { + ((ILdouble*)NewData)[j] = ((ILdouble*)Image->Data)[i]; + ((ILdouble*)NewData)[j+1] = ((ILdouble*)Image->Data)[i+1]; + ((ILdouble*)NewData)[j+2] = ((ILdouble*)Image->Data)[i+2]; + Same = IL_TRUE; + for (c = 0; c < Image->Bpp; c++) { + if (((ILdouble*)Image->Data)[i+c] != KeyColour[c]) + Same = IL_FALSE; + } + + if (Same) + ((ILdouble*)NewData)[j+3] = 0.0; + else + ((ILdouble*)NewData)[j+3] = 1.0; + } + break; + + default: + ifree(NewData); + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + + Image->Bpp = NewBpp; + Image->Bps = Image->Width * Image->Bpc * NewBpp; + Image->SizeOfPlane = Image->Bps * Image->Height; + Image->SizeOfData = Image->SizeOfPlane * Image->Depth; + ifree(Image->Data); + Image->Data = NewData; + + switch (Image->Format) + { + case IL_RGB: + Image->Format = IL_RGBA; + break; + case IL_BGR: + Image->Format = IL_BGRA; + break; + } + } + else { // IL_COLOUR_INDEX + if (Image->Bpp != 1) { + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + Size = ilGetInteger(IL_PALETTE_NUM_COLS); + if (Size == 0) { + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + if ((ILuint)(KeyAlpha * UCHAR_MAX) > Size) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + switch (Image->Pal.PalType) + { + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + if (!ilConvertPal(IL_PAL_RGBA32)) + return IL_FALSE; + break; + case IL_PAL_BGR24: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + if (!ilConvertPal(IL_PAL_BGRA32)) + return IL_FALSE; + break; + default: + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + // Set the colour index to be transparent. + Image->Pal.Palette[(ILuint)(KeyAlpha * UCHAR_MAX) * 4 + 3] = 0; + + // @TODO: Check if this is the required behaviour. + + if (Image->Pal.PalType == IL_PAL_RGBA32) + ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE); + else + ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE); + } + + return IL_TRUE; +} + + +// Removes alpha from a 32-bit image +// Should we maybe add an option that changes the image based on the alpha? +ILboolean ilRemoveAlpha() +{ + ILubyte *NewData, NewBpp; + ILuint i = 0, j = 0, Size; + + if (iCurImage == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (iCurImage->Bpp != 4) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + Size = iCurImage->Bps * iCurImage->Height; + NewBpp = (ILubyte)(iCurImage->Bpp - 1); + + NewData = (ILubyte*)ialloc(NewBpp * iCurImage->Bpc * iCurImage->Width * iCurImage->Height); + if (NewData == NULL) { + return IL_FALSE; + } + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + NewData[j] = iCurImage->Data[i]; + NewData[j+1] = iCurImage->Data[i+1]; + NewData[j+2] = iCurImage->Data[i+2]; + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILushort*)NewData)[j] = ((ILushort*)iCurImage->Data)[i]; + ((ILushort*)NewData)[j+1] = ((ILushort*)iCurImage->Data)[i+1]; + ((ILushort*)NewData)[j+2] = ((ILushort*)iCurImage->Data)[i+2]; + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILuint*)NewData)[j] = ((ILuint*)iCurImage->Data)[i]; + ((ILuint*)NewData)[j+1] = ((ILuint*)iCurImage->Data)[i+1]; + ((ILuint*)NewData)[j+2] = ((ILuint*)iCurImage->Data)[i+2]; + } + break; + + case IL_FLOAT: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILfloat*)NewData)[j] = ((ILfloat*)iCurImage->Data)[i]; + ((ILfloat*)NewData)[j+1] = ((ILfloat*)iCurImage->Data)[i+1]; + ((ILfloat*)NewData)[j+2] = ((ILfloat*)iCurImage->Data)[i+2]; + } + break; + + case IL_DOUBLE: + for (; i < Size; i += iCurImage->Bpp, j += NewBpp) { + ((ILdouble*)NewData)[j] = ((ILdouble*)iCurImage->Data)[i]; + ((ILdouble*)NewData)[j+1] = ((ILdouble*)iCurImage->Data)[i+1]; + ((ILdouble*)NewData)[j+2] = ((ILdouble*)iCurImage->Data)[i+2]; + } + break; + + default: + ifree(NewData); + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + + iCurImage->Bpp = NewBpp; + iCurImage->Bps = iCurImage->Width * iCurImage->Bpc * NewBpp; + iCurImage->SizeOfPlane = iCurImage->Bps * iCurImage->Height; + iCurImage->SizeOfData = iCurImage->SizeOfPlane * iCurImage->Depth; + ifree(iCurImage->Data); + iCurImage->Data = NewData; + + switch (iCurImage->Format) + { + case IL_RGBA: + iCurImage->Format = IL_RGB; + break; + case IL_BGRA: + iCurImage->Format = IL_BGR; + break; + } + + return IL_TRUE; +} + + +ILboolean ilFixCur() +{ + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + if (!ilFlipImage()) { + return IL_FALSE; + } + } + } + + if (ilIsEnabled(IL_TYPE_SET)) { + if ((ILenum)ilGetInteger(IL_TYPE_MODE) != iCurImage->Type) { + if (!ilConvertImage(iCurImage->Format, ilGetInteger(IL_TYPE_MODE))) { + return IL_FALSE; + } + } + } + if (ilIsEnabled(IL_FORMAT_SET)) { + if ((ILenum)ilGetInteger(IL_FORMAT_MODE) != iCurImage->Format) { + if (!ilConvertImage(ilGetInteger(IL_FORMAT_MODE), iCurImage->Type)) { + return IL_FALSE; + } + } + } + + if (iCurImage->Format == IL_COLOUR_INDEX) { + if (ilGetBoolean(IL_CONV_PAL) == IL_TRUE) { + if (!ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE)) { + return IL_FALSE; + } + } + } +/* Swap Colors on Big Endian !!!!! +#ifdef __BIG_ENDIAN__ + // Swap endian + EndianSwapData(iCurImage); +#endif +*/ + return IL_TRUE; +} + +/* +ILboolean ilFixImage() +{ + ILuint NumImages, i; + + NumImages = ilGetInteger(IL_NUM_IMAGES); + for (i = 0; i < NumImages; i++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveImage(i+1)) + return IL_FALSE; + if (!ilFixCur()) + return IL_FALSE; + } + + NumImages = ilGetInteger(IL_NUM_MIPMAPS); + for (i = 0; i < NumImages; i++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveMipmap(i+1)) + return IL_FALSE; + if (!ilFixCur()) + return IL_FALSE; + } + + NumImages = ilGetInteger(IL_NUM_LAYERS); + for (i = 0; i < NumImages; i++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveLayer(i+1)) + return IL_FALSE; + if (!ilFixCur()) + return IL_FALSE; + } + + ilBindImage(ilGetCurName()); + ilFixCur(); + + return IL_TRUE; +} +*/ + +/* +This function was replaced 20050304, because the previous version +didn't fix the mipmaps of the subimages etc. This version is not +completely correct either, because the subimages of the subimages +etc. are not fixed, but at the moment no images of this type can +be loaded anyway. Thanks to Chris Lux for pointing this out. +*/ + +ILboolean ilFixImage() +{ + ILuint NumFaces, f; + ILuint NumImages, i; + ILuint NumMipmaps,j; + ILuint NumLayers, k; + + NumImages = ilGetInteger(IL_NUM_IMAGES); + for (i = 0; i <= NumImages; i++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveImage(i)) + return IL_FALSE; + + NumFaces = ilGetInteger(IL_NUM_FACES); + for (f = 0; f <= NumFaces; f++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveImage(i)) + return IL_FALSE; + if (!ilActiveFace(f)) + return IL_FALSE; + + NumLayers = ilGetInteger(IL_NUM_LAYERS); + for (k = 0; k <= NumLayers; k++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveImage(i)) + return IL_FALSE; + if (!ilActiveFace(f)) + return IL_FALSE; + if (!ilActiveLayer(k)) + return IL_FALSE; + + NumMipmaps = ilGetInteger(IL_NUM_MIPMAPS); + for (j = 0; j <= NumMipmaps; j++) { + ilBindImage(ilGetCurName()); // Set to parent image first. + if (!ilActiveImage(i)) + return IL_FALSE; + if (!ilActiveFace(f)) + return IL_FALSE; + if (!ilActiveLayer(k)) + return IL_FALSE; + if (!ilActiveMipmap(j)) + return IL_FALSE; + if (!ilFixCur()) + return IL_FALSE; + } + } + } + } + ilBindImage(ilGetCurName()); + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_cut.c b/libs/DevIL-1.7.8/src-IL/src/il_cut.c new file mode 100644 index 00000000..87dc27ec --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_cut.c @@ -0,0 +1,148 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 10/10/2006 +// +// Filename: src-IL/src/il_cut.c +// +// Description: Reads a Dr. Halo .cut file +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_CUT +#include "il_manip.h" +#include "il_pal.h" +#include "il_bits.h" + + +// Wrap it just in case... +#ifdef _MSC_VER +#pragma pack(push, packed_struct, 1) +#endif +typedef struct CUT_HEAD +{ + ILushort Width; + ILushort Height; + ILint Dummy; +} IL_PACKSTRUCT CUT_HEAD; +#ifdef _MSC_VER +#pragma pack(pop, packed_struct) +#endif + +ILboolean iLoadCutInternal(); + +//! Reads a .cut file +ILboolean ilLoadCut(ILconst_string FileName) +{ + ILHANDLE CutFile; + ILboolean bCut = IL_FALSE; + + CutFile = iopenr(FileName); + if (CutFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bCut; + } + + bCut = ilLoadCutF(CutFile); + icloser(CutFile); + + return bCut; +} + + +//! Reads an already-opened .cut file +ILboolean ilLoadCutF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadCutInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .cut +ILboolean ilLoadCutL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadCutInternal(); +} + + +// Note: .Cut support has not been tested yet! +// A .cut can only have 1 bpp. +// We need to add support for the .pal's PSP outputs with these... +ILboolean iLoadCutInternal() +{ + CUT_HEAD Header; + ILuint Size, i = 0, j; + ILubyte Count, Run; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Header.Width = GetLittleShort(); + Header.Height = GetLittleShort(); + Header.Dummy = GetLittleInt(); + + if (Header.Width == 0 || Header.Height == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { // always 1 bpp + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + Size = Header.Width * Header.Height; + + while (i < Size) { + Count = igetc(); + if (Count == 0) { // end of row + igetc(); // Not supposed to be here, but + igetc(); // PSP is putting these two bytes here...WHY?! + continue; + } + if (Count & BIT_7) { // rle-compressed + ClearBits(Count, BIT_7); + Run = igetc(); + for (j = 0; j < Count; j++) { + iCurImage->Data[i++] = Run; + } + } + else { // run of pixels + for (j = 0; j < Count; j++) { + iCurImage->Data[i++] = igetc(); + } + } + } + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; // Not sure + + /*iCurImage->Pal.Palette = SharedPal.Palette; + iCurImage->Pal.PalSize = SharedPal.PalSize; + iCurImage->Pal.PalType = SharedPal.PalType;*/ + + return ilFixImage(); +} + +/* ????????? +void ilPopToast() { + ILstring flipCode = IL_TEXT("#flipCode and www.flipCode.com rule you all."); + flipCode[0] = flipCode[0]; +} +*/ + + + +#endif//IL_NO_CUT diff --git a/libs/DevIL-1.7.8/src-IL/src/il_dcx.c b/libs/DevIL-1.7.8/src-IL/src/il_dcx.c new file mode 100644 index 00000000..3e9eb802 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_dcx.c @@ -0,0 +1,486 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_dcx.c +// +// Description: Reads from a .dcx file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_DCX +#include "il_dcx.h" +#include "il_manip.h" + + +//! Checks if the file specified in FileName is a valid .dcx file. +ILboolean ilIsValidDcx(ILconst_string FileName) +{ + ILHANDLE DcxFile; + ILboolean bDcx = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("dcx"))) { + ilSetError(IL_INVALID_EXTENSION); + return bDcx; + } + + DcxFile = iopenr(FileName); + if (DcxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDcx; + } + + bDcx = ilIsValidDcxF(DcxFile); + icloser(DcxFile); + + return bDcx; +} + + +//! Checks if the ILHANDLE contains a valid .dcx file at the current position. +ILboolean ilIsValidDcxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidDcx(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .dcx lump. +ILboolean ilIsValidDcxL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidDcx(); +} + + +// Internal function obtain the .dcx header from the current file. +ILboolean iGetDcxHead(DCXHEAD *Head) +{ + Head->Xmin = GetLittleUShort(); + Head->Ymin = GetLittleUShort(); + Head->Xmax = GetLittleUShort(); + Head->Ymax = GetLittleUShort(); + Head->HDpi = GetLittleUShort(); + Head->VDpi = GetLittleUShort(); + Head->Bps = GetLittleUShort(); + Head->PaletteInfo = GetLittleUShort(); + Head->HScreenSize = GetLittleUShort(); + Head->VScreenSize = GetLittleUShort(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidDcx() +{ + ILuint Signature; + + if (iread(&Signature, 1, 4) != 4) + return IL_FALSE; + iseek(-4, IL_SEEK_CUR); + + return (Signature == 987654321); +} + + +// Internal function used to check if the HEADER is a valid .dcx header. +// Should we also do a check on Header->Bpp? +ILboolean iCheckDcx(DCXHEAD *Header) +{ + ILuint Test, i; + + // There are other versions, but I am not supporting them as of yet. + // Got rid of the Reserved check, because I've seen some .dcx files with invalid values in it. + if (Header->Manufacturer != 10 || Header->Version != 5 || Header->Encoding != 1/* || Header->Reserved != 0*/) + return IL_FALSE; + + // See if the padding size is correct + Test = Header->Xmax - Header->Xmin + 1; + /*if (Header->Bpp >= 8) { + if (Test & 1) { + if (Header->Bps != Test + 1) + return IL_FALSE; + } + else { + if (Header->Bps != Test) // No padding + return IL_FALSE; + } + }*/ + + for (i = 0; i < 54; i++) { + if (Header->Filler[i] != 0) + return IL_FALSE; + } + + return IL_TRUE; +} + + +//! Reads a .dcx file +ILboolean ilLoadDcx(ILconst_string FileName) +{ + ILHANDLE DcxFile; + ILboolean bDcx = IL_FALSE; + + DcxFile = iopenr(FileName); + if (DcxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDcx; + } + + bDcx = ilLoadDcxF(DcxFile); + icloser(DcxFile); + + return bDcx; +} + + +//! Reads an already-opened .dcx file +ILboolean ilLoadDcxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDcxInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .dcx +ILboolean ilLoadDcxL(const void *Lump, ILuint Size) { + iSetInputLump(Lump, Size); + return iLoadDcxInternal(); +} + + +// Internal function used to load the .dcx. +ILboolean iLoadDcxInternal() +{ + DCXHEAD Header; + ILuint Signature, i, Entries[1024], Num = 0; + ILimage *Image, *Base; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iIsValidDcx()) + return IL_FALSE; + iread(&Signature, 1, 4); + + do { + if (iread(&Entries[Num], 1, 4) != 4) + return IL_FALSE; + Num++; + } while (Entries[Num-1] != 0); + + for (i = 0; i < Num; i++) { + iseek(Entries[i], IL_SEEK_SET); + iGetDcxHead(&Header); + /*if (!iCheckDcx(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + }*/ + + Image = iUncompressDcx(&Header); + if (Image == NULL) + return IL_FALSE; + + if (i == 0) { + ilTexImage(Image->Width, Image->Height, 1, Image->Bpp, Image->Format, Image->Type, Image->Data); + Base = iCurImage; + Base->Origin = IL_ORIGIN_UPPER_LEFT; + ilCloseImage(Image); + } + else { + iCurImage->Next = Image; + iCurImage = iCurImage->Next; + } + } + + return ilFixImage(); +} + + +// Internal function to uncompress the .dcx (all .dcx files are rle compressed) +ILimage *iUncompressDcx(DCXHEAD *Header) +{ + ILubyte ByteHead, Colour, *ScanLine = NULL /* Only one plane */; + ILuint c, i, x, y;//, Read = 0; + ILimage *Image = NULL; + + if (Header->Bpp < 8) { + /*ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE;*/ + return iUncompressDcxSmall(Header); + } + + Image = ilNewImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, Header->NumPlanes, 1); + if (Image == NULL) + return NULL; + /*if (!ilTexImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, Header->NumPlanes, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + }*/ + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + ScanLine = (ILubyte*)ialloc(Header->Bps); + if (ScanLine == NULL) + goto dcx_error; + + switch (Image->Bpp) + { + case 1: + Image->Format = IL_COLOUR_INDEX; + Image->Pal.PalType = IL_PAL_RGB24; + Image->Pal.PalSize = 256 * 3; // Need to find out for sure... + Image->Pal.Palette = (ILubyte*)ialloc(Image->Pal.PalSize); + if (Image->Pal.Palette == NULL) + goto dcx_error; + break; + //case 2: // No 16-bit images in the dcx format! + case 3: + Image->Format = IL_RGB; + Image->Pal.Palette = NULL; + Image->Pal.PalSize = 0; + Image->Pal.PalType = IL_PAL_NONE; + break; + case 4: + Image->Format = IL_RGBA; + Image->Pal.Palette = NULL; + Image->Pal.PalSize = 0; + Image->Pal.PalType = IL_PAL_NONE; + break; + + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + goto dcx_error; + } + + + /*StartPos = itell(); + Compressed = (ILubyte*)ialloc(Image->SizeOfData * 4 / 3); + iread(Compressed, 1, Image->SizeOfData * 4 / 3); + + for (y = 0; y < Image->Height; y++) { + for (c = 0; c < Image->Bpp; c++) { + x = 0; + while (x < Header->Bps) { + ByteHead = Compressed[Read++]; + if ((ByteHead & 0xC0) == 0xC0) { + ByteHead &= 0x3F; + Colour = Compressed[Read++]; + for (i = 0; i < ByteHead; i++) { + ScanLine[x++] = Colour; + } + } + else { + ScanLine[x++] = ByteHead; + } + } + + for (x = 0; x < Image->Width; x++) { // 'Cleverly' ignores the pad bytes ;) + Image->Data[y * Image->Bps + x * Image->Bpp + c] = ScanLine[x]; + } + } + } + + ifree(Compressed); + iseek(StartPos + Read, IL_SEEK_SET);*/ + + //changed 2003-09-01 + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->SizeOfData); + + //TODO: because the .pcx-code was broken this + //code is probably broken, too + for (y = 0; y < Image->Height; y++) { + for (c = 0; c < Image->Bpp; c++) { + x = 0; + while (x < Header->Bps) { + if (iread(&ByteHead, 1, 1) != 1) { + iUnCache(); + goto dcx_error; + } + if ((ByteHead & 0xC0) == 0xC0) { + ByteHead &= 0x3F; + if (iread(&Colour, 1, 1) != 1) { + iUnCache(); + goto dcx_error; + } + for (i = 0; i < ByteHead; i++) { + ScanLine[x++] = Colour; + } + } + else { + ScanLine[x++] = ByteHead; + } + } + + for (x = 0; x < Image->Width; x++) { // 'Cleverly' ignores the pad bytes ;) + Image->Data[y * Image->Bps + x * Image->Bpp + c] = ScanLine[x]; + } + } + } + + iUnCache(); + + + ifree(ScanLine); + + // Read in the palette + if (Image->Bpp == 1) { + ByteHead = igetc(); // the value 12, because it signals there's a palette for some reason... + // We should do a check to make certain it's 12... + if (ByteHead != 12) + iseek(-1, IL_SEEK_CUR); + if (iread(Image->Pal.Palette, 1, Image->Pal.PalSize) != Image->Pal.PalSize) { + ilCloseImage(Image); + return NULL; + } + } + + return Image; + +dcx_error: + ifree(ScanLine); + ilCloseImage(Image); + return NULL; +} + + +ILimage *iUncompressDcxSmall(DCXHEAD *Header) +{ + ILuint i = 0, j, k, c, d, x, y, Bps; + ILubyte HeadByte, Colour, Data = 0, *ScanLine = NULL; + ILimage *Image; + + Image = ilNewImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, Header->NumPlanes, 1); + if (Image == NULL) + return NULL; + + /*if (!ilTexImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, 1, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + }*/ + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + switch (Header->NumPlanes) + { + case 1: + Image->Format = IL_LUMINANCE; + break; + case 4: + Image->Format = IL_COLOUR_INDEX; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + ilCloseImage(Image); + return NULL; + } + + if (Header->NumPlanes == 1) { + for (j = 0; j < Image->Height; j++) { + i = 0; + while (i < Image->Width) { + if (iread(&HeadByte, 1, 1) != 1) + goto file_read_error; + if (HeadByte >= 192) { + HeadByte -= 192; + if (iread(&Data, 1, 1) != 1) + goto file_read_error; + + for (c = 0; c < HeadByte; c++) { + k = 128; + for (d = 0; d < 8 && i < Image->Width; d++) { + Image->Data[j * Image->Width + i++] = (!!(Data & k) == 1 ? 255 : 0); + k >>= 1; + } + } + } + else { + k = 128; + for (c = 0; c < 8 && i < Image->Width; c++) { + Image->Data[j * Image->Width + i++] = (!!(HeadByte & k) == 1 ? 255 : 0); + k >>= 1; + } + } + } + if (Data != 0) + igetc(); // Skip pad byte if last byte not a 0 + } + } + else { // 4-bit images + Bps = Header->Bps * Header->NumPlanes * 2; + Image->Pal.Palette = (ILubyte*)ialloc(16 * 3); // Size of palette always (48 bytes). + Image->Pal.PalSize = 16 * 3; + Image->Pal.PalType = IL_PAL_RGB24; + ScanLine = (ILubyte*)ialloc(Bps); + if (Image->Pal.Palette == NULL || ScanLine == NULL) { + ifree(ScanLine); + ilCloseImage(Image); + return NULL; + } + + memcpy(Image->Pal.Palette, Header->ColMap, 16 * 3); + imemclear(Image->Data, Image->SizeOfData); // Since we do a += later. + + for (y = 0; y < Image->Height; y++) { + for (c = 0; c < Header->NumPlanes; c++) { + x = 0; + while (x < Bps) { + if (iread(&HeadByte, 1, 1) != 1) + goto file_read_error; + if ((HeadByte & 0xC0) == 0xC0) { + HeadByte &= 0x3F; + if (iread(&Colour, 1, 1) != 1) + goto file_read_error; + for (i = 0; i < HeadByte; i++) { + k = 128; + for (j = 0; j < 8; j++) { + ScanLine[x++] = !!(Colour & k); + k >>= 1; + } + } + } + else { + k = 128; + for (j = 0; j < 8; j++) { + ScanLine[x++] = !!(HeadByte & k); + k >>= 1; + } + } + } + + for (x = 0; x < Image->Width; x++) { // 'Cleverly' ignores the pad bytes. ;) + Image->Data[y * Image->Width + x] += ScanLine[x] << c; + } + } + } + ifree(ScanLine); + } + + return Image; + +file_read_error: + ifree(ScanLine); + ilCloseImage(Image); + return NULL; +} + +#endif//IL_NO_DCX diff --git a/libs/DevIL-1.7.8/src-IL/src/il_dds-save.c b/libs/DevIL-1.7.8/src-IL/src/il_dds-save.c new file mode 100644 index 00000000..9a5d1cab --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_dds-save.c @@ -0,0 +1,1314 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/09/2009 +// +// Filename: src-IL/src/il_dds-save.c +// +// Description: Saves a DirectDraw Surface (.dds) file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_dds.h" +#include "il_manip.h" +#include + + +#ifndef IL_NO_DDS + +//! Writes a Dds file +ILboolean ilSaveDds(const ILstring FileName) +{ + ILHANDLE DdsFile; + ILuint DdsSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + DdsFile = iopenw(FileName); + if (DdsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + DdsSize = ilSaveDdsF(DdsFile); + iclosew(DdsFile); + + if (DdsSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Dds to an already-opened file +ILuint ilSaveDdsF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveDdsInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Dds to a memory "lump" +ILuint ilSaveDdsL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveDdsInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Checks if an image is a cubemap +ILuint GetCubemapInfo(ILimage* image, ILint* faces) +{ + ILint indices[] = { -1, -1, -1, -1, -1, -1 }, i; + ILimage *img; + ILuint ret = 0, srcMipmapCount, srcImagesCount, mipmapCount; + + if (image == NULL) + return 0; + + iGetIntegervImage(image, IL_NUM_IMAGES, (ILint*) &srcImagesCount); + if (srcImagesCount != 5) //write only complete cubemaps (TODO?) + return 0; + + img = image; + iGetIntegervImage(image, IL_NUM_MIPMAPS, (ILint*) &srcMipmapCount); + mipmapCount = srcMipmapCount; + + for (i = 0; i < 6; ++i) { + switch (img->CubeFlags) + { + case DDS_CUBEMAP_POSITIVEX: + indices[i] = 0; + break; + case DDS_CUBEMAP_NEGATIVEX: + indices[i] = 1; + break; + case DDS_CUBEMAP_POSITIVEY: + indices[i] = 2; + break; + case DDS_CUBEMAP_NEGATIVEY: + indices[i] = 3; + break; + case DDS_CUBEMAP_POSITIVEZ: + indices[i] = 4; + break; + case DDS_CUBEMAP_NEGATIVEZ: + indices[i] = 5; + break; + } + iGetIntegervImage(img, IL_NUM_MIPMAPS, (ILint*) &srcMipmapCount); + if (srcMipmapCount != mipmapCount) + return 0; //equal # of mipmaps required + + ret |= img->CubeFlags; + img = img->Next; + } + + for (i = 0; i < 6; ++i) + if (indices[i] == -1) + return 0; //one face not found + + if (ret != 0) //should always be true + ret |= DDS_CUBEMAP; + + for (i = 0; i < 6; ++i) + faces[indices[i]] = i; + + return ret; +} + + +// Internal function used to save the Dds. +ILboolean iSaveDdsInternal() +{ + ILenum DXTCFormat; + ILuint counter, numMipMaps, image, numFaces, i; + ILubyte *CurData = NULL; + ILint CubeTable[6] = { 0 }; + ILuint CubeFlags; + + CubeFlags = GetCubemapInfo(iCurImage, CubeTable); + + image = ilGetInteger(IL_CUR_IMAGE); + DXTCFormat = iGetInt(IL_DXTC_FORMAT); + WriteHeader(iCurImage, DXTCFormat, CubeFlags); + + if (CubeFlags != 0) + numFaces = ilGetInteger(IL_NUM_FACES); // Should always be 5 for now + else + numFaces = 0; + + numMipMaps = ilGetInteger(IL_NUM_MIPMAPS); //this assumes all faces have same # of mipmaps + + for (i = 0; i <= numFaces; ++i) { + for (counter = 0; counter <= numMipMaps; counter++) { + ilBindImage(image); + ilActiveImage(CubeTable[i]); + ilActiveMipmap(counter); + + if (iCurImage->Origin != IL_ORIGIN_UPPER_LEFT) { + CurData = iCurImage->Data; + iCurImage->Data = iGetFlipped(iCurImage); + if (iCurImage->Data == NULL) { + iCurImage->Data = CurData; + return IL_FALSE; + } + } + + if (!Compress(iCurImage, DXTCFormat)) + return IL_FALSE; + + if (iCurImage->Origin != IL_ORIGIN_UPPER_LEFT) { + ifree(iCurImage->Data); + iCurImage->Data = CurData; + } + } + + } + + return IL_TRUE; +} + + +// @TODO: Finish this, as it is incomplete. +ILboolean WriteHeader(ILimage *Image, ILenum DXTCFormat, ILuint CubeFlags) +{ + ILuint i, FourCC, Flags1 = 0, Flags2 = 0, ddsCaps1 = 0, + LinearSize, BlockSize, ddsCaps2 = 0; + + Flags1 |= DDS_LINEARSIZE | DDS_MIPMAPCOUNT + | DDS_WIDTH | DDS_HEIGHT | DDS_CAPS | DDS_PIXELFORMAT; + Flags2 |= DDS_FOURCC; + + if (Image->Depth > 1) + Flags1 |= DDS_DEPTH; + + // @TODO: Fix the pre-multiplied alpha problem. + if (DXTCFormat == IL_DXT2) + DXTCFormat = IL_DXT3; + else if (DXTCFormat == IL_DXT4) + DXTCFormat = IL_DXT5; + + switch (DXTCFormat) + { + case IL_DXT1: + case IL_DXT1A: + FourCC = IL_MAKEFOURCC('D','X','T','1'); + break; + case IL_DXT2: + FourCC = IL_MAKEFOURCC('D','X','T','2'); + break; + case IL_DXT3: + FourCC = IL_MAKEFOURCC('D','X','T','3'); + break; + case IL_DXT4: + FourCC = IL_MAKEFOURCC('D','X','T','4'); + break; + case IL_DXT5: + FourCC = IL_MAKEFOURCC('D','X','T','5'); + break; + case IL_ATI1N: + FourCC = IL_MAKEFOURCC('A', 'T', 'I', '1'); + break; + case IL_3DC: + FourCC = IL_MAKEFOURCC('A','T','I','2'); + break; + case IL_RXGB: + FourCC = IL_MAKEFOURCC('R','X','G','B'); + break; + default: + // Error! + ilSetError(IL_INTERNAL_ERROR); // Should never happen, though. + return IL_FALSE; + } + + iwrite("DDS ", 1, 4); + SaveLittleUInt(124); // Size1 + SaveLittleUInt(Flags1); // Flags1 + SaveLittleUInt(Image->Height); + SaveLittleUInt(Image->Width); + + if (DXTCFormat == IL_DXT1 || DXTCFormat == IL_DXT1A || DXTCFormat == IL_ATI1N) { + BlockSize = 8; + } + else { + BlockSize = 16; + } + LinearSize = (((Image->Width + 3)/4) * ((Image->Height + 3)/4)) * BlockSize * Image->Depth; + + /* + // doing this is actually wrong, linear size is only size of one cube face + if (CubeFlags != 0) { + ILint numFaces = 0; + for (i = 0; i < 6; ++i) + if (CubeFlags & CubemapDirections[i]) + ++numFaces; + + LinearSize *= numFaces; + } + */ + + SaveLittleUInt(LinearSize); // LinearSize (TODO: change this when uncompressed formats are supported) + + if (Image->Depth > 1) { + SaveLittleUInt(Image->Depth); // Depth + ddsCaps2 |= DDS_VOLUME; + } + else + SaveLittleUInt(0); // Depth + + SaveLittleUInt(ilGetInteger(IL_NUM_MIPMAPS) + 1); // MipMapCount + SaveLittleUInt(0); // AlphaBitDepth + + for (i = 0; i < 10; i++) + SaveLittleUInt(0); // Not used + + SaveLittleUInt(32); // Size2 + SaveLittleUInt(Flags2); // Flags2 + SaveLittleUInt(FourCC); // FourCC + SaveLittleUInt(0); // RGBBitCount + SaveLittleUInt(0); // RBitMask + SaveLittleUInt(0); // GBitMask + SaveLittleUInt(0); // BBitMask + SaveLittleUInt(0); // RGBAlphaBitMask + ddsCaps1 |= DDS_TEXTURE; + //changed 20040516: set mipmap flag on mipmap images + //(non-compressed .dds files still not supported, + //though) + if (ilGetInteger(IL_NUM_MIPMAPS) > 0) + ddsCaps1 |= DDS_MIPMAP | DDS_COMPLEX; + if (CubeFlags != 0) { + ddsCaps1 |= DDS_COMPLEX; + ddsCaps2 |= CubeFlags; + } + + SaveLittleUInt(ddsCaps1); // ddsCaps1 + + SaveLittleUInt(ddsCaps2); // ddsCaps2 + SaveLittleUInt(0); // ddsCaps3 + SaveLittleUInt(0); // ddsCaps4 + SaveLittleUInt(0); // TextureStage + + return IL_TRUE; +} + +#endif//IL_NO_DDS + + +ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat) +{ + ILubyte *CurData = NULL; + ILuint retVal; + ILint BlockNum; + + if (Buffer == NULL) { // Return the number that will be written with a subsequent call. + BlockNum = ((iCurImage->Width + 3)/4) * ((iCurImage->Height + 3)/4) + * iCurImage->Depth; + + switch (DXTCFormat) + { + case IL_DXT1: + case IL_DXT1A: + case IL_ATI1N: + return BlockNum * 8; + case IL_DXT3: + case IL_DXT5: + case IL_3DC: + case IL_RXGB: + return BlockNum * 16; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return 0; + } + } + + if (DXTCFormat == iCurImage->DxtcFormat && iCurImage->DxtcSize && iCurImage->DxtcData) { + memcpy(Buffer, iCurImage->DxtcData, IL_MIN(BufferSize, iCurImage->DxtcSize)); + return IL_MIN(BufferSize, iCurImage->DxtcSize); + } + + if (iCurImage->Origin != IL_ORIGIN_UPPER_LEFT) { + CurData = iCurImage->Data; + iCurImage->Data = iGetFlipped(iCurImage); + if (iCurImage->Data == NULL) { + iCurImage->Data = CurData; + return 0; + } + } + + //@TODO: Is this the best way to do this? + iSetOutputLump(Buffer, BufferSize); + retVal = Compress(iCurImage, DXTCFormat); + + if (iCurImage->Origin != IL_ORIGIN_UPPER_LEFT) { + ifree(iCurImage->Data); + iCurImage->Data = CurData; + } + + return retVal; +} + + +// Added the next two functions based on Charles Bloom's rant at +// http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html. +// This code is by ryg and from the Molly Rocket forums: +// https://mollyrocket.com/forums/viewtopic.php?t=392. +static ILint Mul8Bit(ILint a, ILint b) +{ + ILint t = a*b + 128; + return (t + (t >> 8)) >> 8; +} + +ILushort As16Bit(ILint r, ILint g, ILint b) +{ + return (Mul8Bit(r,31) << 11) + (Mul8Bit(g,63) << 5) + Mul8Bit(b,31); +} + + +ILushort *CompressTo565(ILimage *Image) +{ + ILimage *TempImage; + ILushort *Data; + ILuint i, j; + + if ((Image->Type != IL_UNSIGNED_BYTE && Image->Type != IL_BYTE) || Image->Format == IL_COLOUR_INDEX) { + TempImage = iConvertImage(iCurImage, IL_BGRA, IL_UNSIGNED_BYTE); // @TODO: Needs to be BGRA. + if (TempImage == NULL) + return NULL; + } + else { + TempImage = Image; + } + + Data = (ILushort*)ialloc(iCurImage->Width * iCurImage->Height * 2 * iCurImage->Depth); + if (Data == NULL) { + if (TempImage != Image) + ilCloseImage(TempImage); + return NULL; + } + + //changed 20040623: Use TempImages format :) + switch (TempImage->Format) + { + case IL_RGB: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j++) { + /*Data[j] = (TempImage->Data[i ] >> 3) << 11; + Data[j] |= (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i+2] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i], TempImage->Data[i+1], TempImage->Data[i+2]); + } + break; + + case IL_RGBA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j++) { + /*Data[j] = (TempImage->Data[i ] >> 3) << 11; + Data[j] |= (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i+2] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i], TempImage->Data[i+1], TempImage->Data[i+2]); + } + break; + + case IL_BGR: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j++) { + /*Data[j] = (TempImage->Data[i+2] >> 3) << 11; + Data[j] |= (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i ] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i+2], TempImage->Data[i+1], TempImage->Data[i]); + } + break; + + case IL_BGRA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j++) { + /*Data[j] = (TempImage->Data[i+2] >> 3) << 11; + Data[j] |= (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i ] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i+2], TempImage->Data[i+1], TempImage->Data[i]); + } + break; + + case IL_LUMINANCE: + for (i = 0, j = 0; i < TempImage->SizeOfData; i++, j++) { + //@TODO: Do better conversion here. + /*Data[j] = (TempImage->Data[i] >> 3) << 11; + Data[j] |= (TempImage->Data[i] >> 2) << 5; + Data[j] |= TempImage->Data[i] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i], TempImage->Data[i], TempImage->Data[i]); + } + break; + + case IL_LUMINANCE_ALPHA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 2, j++) { + //@TODO: Do better conversion here. + /*Data[j] = (TempImage->Data[i] >> 3) << 11; + Data[j] |= (TempImage->Data[i] >> 2) << 5; + Data[j] |= TempImage->Data[i] >> 3;*/ + Data[j] = As16Bit(TempImage->Data[i], TempImage->Data[i], TempImage->Data[i]); + } + break; + + case IL_ALPHA: + memset(Data, 0, iCurImage->Width * iCurImage->Height * 2 * iCurImage->Depth); + break; + } + + if (TempImage != Image) + ilCloseImage(TempImage); + + return Data; +} + + +ILubyte *CompressTo88(ILimage *Image) +{ + ILimage *TempImage; + ILubyte *Data; + ILuint i, j; + + if ((Image->Type != IL_UNSIGNED_BYTE && Image->Type != IL_BYTE) || Image->Format == IL_COLOUR_INDEX) { + TempImage = iConvertImage(iCurImage, IL_BGR, IL_UNSIGNED_BYTE); // @TODO: Needs to be BGRA. + if (TempImage == NULL) + return NULL; + } + else { + TempImage = Image; + } + + Data = (ILubyte*)ialloc(iCurImage->Width * iCurImage->Height * 2 * iCurImage->Depth); + if (Data == NULL) { + if (TempImage != Image) + ilCloseImage(TempImage); + return NULL; + } + + //changed 20040623: Use TempImage's format :) + switch (TempImage->Format) + { + case IL_RGB: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j += 2) { + Data[j ] = TempImage->Data[i+1]; + Data[j+1] = TempImage->Data[i ]; + } + break; + + case IL_RGBA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j += 2) { + Data[j ] = TempImage->Data[i+1]; + Data[j+1] = TempImage->Data[i ]; + } + break; + + case IL_BGR: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j += 2) { + Data[j ] = TempImage->Data[i+1]; + Data[j+1] = TempImage->Data[i+2]; + } + break; + + case IL_BGRA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j += 2) { + Data[j ] = TempImage->Data[i+1]; + Data[j+1] = TempImage->Data[i+2]; + } + break; + + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i++, j += 2) { + Data[j ] = Data[j+1] = 0; //??? Luminance is no normal map format... + } + break; + } + + if (TempImage != Image) + ilCloseImage(TempImage); + + return Data; +} + +void CompressToRXGB(ILimage *Image, ILushort** xgb, ILubyte** r) +{ + ILimage *TempImage; + ILuint i, j; + ILushort *Data; + ILubyte *Alpha; + + *xgb = NULL; + *r = NULL; + + if ((Image->Type != IL_UNSIGNED_BYTE && Image->Type != IL_BYTE) || Image->Format == IL_COLOUR_INDEX) { + TempImage = iConvertImage(iCurImage, IL_BGR, IL_UNSIGNED_BYTE); // @TODO: Needs to be BGRA. + if (TempImage == NULL) + return; + } + else { + TempImage = Image; + } + + *xgb = (ILushort*)ialloc(iCurImage->Width * iCurImage->Height * 2 * iCurImage->Depth); + *r = (ILubyte*)ialloc(iCurImage->Width * iCurImage->Height * iCurImage->Depth); + if (*xgb == NULL || *r == NULL) { + if (TempImage != Image) + ilCloseImage(TempImage); + return; + } + + //Alias pointers to be able to use copy'n'pasted code :) + Data = *xgb; + Alpha = *r; + + switch (TempImage->Format) + { + case IL_RGB: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j++) { + Alpha[j] = TempImage->Data[i]; + Data[j] = (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i+2] >> 3; + } + break; + + case IL_RGBA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j++) { + Alpha[j] = TempImage->Data[i]; + Data[j] = (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i+2] >> 3; + } + break; + + case IL_BGR: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 3, j++) { + Alpha[j] = TempImage->Data[i+2]; + Data[j] = (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i ] >> 3; + } + break; + + case IL_BGRA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 4, j++) { + Alpha[j] = TempImage->Data[i+2]; + Data[j] = (TempImage->Data[i+1] >> 2) << 5; + Data[j] |= TempImage->Data[i ] >> 3; + } + break; + + case IL_LUMINANCE: + for (i = 0, j = 0; i < TempImage->SizeOfData; i++, j++) { + Alpha[j] = TempImage->Data[i]; + Data[j] = (TempImage->Data[i] >> 2) << 5; + Data[j] |= TempImage->Data[i] >> 3; + } + break; + + case IL_LUMINANCE_ALPHA: + for (i = 0, j = 0; i < TempImage->SizeOfData; i += 2, j++) { + Alpha[j] = TempImage->Data[i]; + Data[j] = (TempImage->Data[i] >> 2) << 5; + Data[j] |= TempImage->Data[i] >> 3; + } + break; + } + + if (TempImage != Image) + ilCloseImage(TempImage); +} + + +ILuint Compress(ILimage *Image, ILenum DXTCFormat) +{ + ILushort *Data, Block[16], ex0, ex1, *Runner16, t0, t1; + ILuint x, y, z, i, BitMask, DXTCSize;//, Rms1, Rms2; + ILubyte *Alpha, AlphaBlock[16], AlphaBitMask[6], /*AlphaOut[16],*/ a0, a1; + ILboolean HasAlpha; + ILuint Count = 0; + ILubyte *Data3Dc, *Runner8, *ByteData, *BlockData; + + if (DXTCFormat == IL_3DC) { + Data3Dc = CompressTo88(Image); + if (Data3Dc == NULL) + return 0; + + Runner8 = Data3Dc; + + for (z = 0; z < Image->Depth; z++) { + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + Get3DcBlock(AlphaBlock, Runner8, Image, x, y, 0); + ChooseAlphaEndpoints(AlphaBlock, &a0, &a1); + GenAlphaBitMask(a0, a1, AlphaBlock, AlphaBitMask, NULL); + iputc(a0); + iputc(a1); + iwrite(AlphaBitMask, 1, 6); + + Get3DcBlock(AlphaBlock, Runner8, Image, x, y, 1); + ChooseAlphaEndpoints(AlphaBlock, &a0, &a1); + GenAlphaBitMask(a0, a1, AlphaBlock, AlphaBitMask, NULL); + iputc(a0); + iputc(a1); + iwrite(AlphaBitMask, 1, 6); + + Count += 16; + } + } + Runner8 += Image->Width * Image->Height * 2; + } + ifree(Data3Dc); + } + + else if (DXTCFormat == IL_ATI1N) + { + ILimage *TempImage; + + if (Image->Bpp != 1) { + TempImage = iConvertImage(iCurImage, IL_LUMINANCE, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return 0; + } + else { + TempImage = Image; + } + + Runner8 = TempImage->Data; + + for (z = 0; z < Image->Depth; z++) { + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + GetAlphaBlock(AlphaBlock, Runner8, Image, x, y); + ChooseAlphaEndpoints(AlphaBlock, &a0, &a1); + GenAlphaBitMask(a0, a1, AlphaBlock, AlphaBitMask, NULL); + iputc(a0); + iputc(a1); + iwrite(AlphaBitMask, 1, 6); + Count += 8; + } + } + Runner8 += Image->Width * Image->Height; + } + + if (TempImage != Image) + ilCloseImage(TempImage); + } + else + { + // We want to try nVidia compression first, because it is the fastest. +#ifdef IL_USE_DXTC_NVIDIA + if (ilIsEnabled(IL_NVIDIA_COMPRESS) && Image->Depth == 1) { // See if we need to use the nVidia Texture Tools library. + if (DXTCFormat == IL_DXT1 || DXTCFormat == IL_DXT1A || DXTCFormat == IL_DXT3 || DXTCFormat == IL_DXT5) { + // NVTT needs data as BGRA 32-bit. + if (Image->Format != IL_BGRA || Image->Type != IL_UNSIGNED_BYTE) { // No need to convert if already this format/type. + ByteData = ilConvertBuffer(Image->SizeOfData, Image->Format, IL_BGRA, Image->Type, IL_UNSIGNED_BYTE, NULL, Image->Data); + if (ByteData == NULL) + return 0; + } + else + ByteData = Image->Data; + + // Here's where all the compression and writing goes on. + if (!ilNVidiaCompressDXTFile(ByteData, Image->Width, Image->Height, 1, DXTCFormat)) + return 0; + + if (ByteData != Image->Data) + ifree(ByteData); + + return Image->Width * Image->Height * 4; // Either compresses all or none. + } + } +#endif//IL_USE_DXTC_NVIDIA + + // libsquish generates better quality output than DevIL does, so we try it next. +#ifdef IL_USE_DXTC_SQUISH + if (ilIsEnabled(IL_SQUISH_COMPRESS) && Image->Depth == 1) { // See if we need to use the nVidia Texture Tools library. + if (DXTCFormat == IL_DXT1 || DXTCFormat == IL_DXT1A || DXTCFormat == IL_DXT3 || DXTCFormat == IL_DXT5) { + // libsquish needs data as RGBA 32-bit. + if (Image->Format != IL_RGBA || Image->Type != IL_UNSIGNED_BYTE) { // No need to convert if already this format/type. + ByteData = ilConvertBuffer(Image->SizeOfData, Image->Format, IL_RGBA, Image->Type, IL_UNSIGNED_BYTE, NULL, Image->Data); + if (ByteData == NULL) + return 0; + } + else + ByteData = Image->Data; + + // Get compressed data here. + BlockData = ilSquishCompressDXT(ByteData, Image->Width, Image->Height, 1, DXTCFormat, &DXTCSize); + if (BlockData == NULL) + return 0; + + if (iwrite(BlockData, 1, DXTCSize) != DXTCSize) { + if (ByteData != Image->Data) + ifree(ByteData); + ifree(BlockData); + return 0; + } + + if (ByteData != Image->Data) + ifree(ByteData); + ifree(BlockData); + + return Image->Width * Image->Height * 4; // Either compresses all or none. + } + } +#endif//IL_USE_DXTC_SQUISH + + if (DXTCFormat != IL_RXGB) { + Data = CompressTo565(Image); + if (Data == NULL) + return 0; + + Alpha = ilGetAlpha(IL_UNSIGNED_BYTE); + if (Alpha == NULL) { + ifree(Data); + return 0; + } + } + else { + CompressToRXGB(Image, &Data, &Alpha); + if (Data == NULL || Alpha == NULL) { + if (Data != NULL) + ifree(Data); + if (Alpha != NULL) + ifree(Alpha); + return 0; + } + } + + Runner8 = Alpha; + Runner16 = Data; + + switch (DXTCFormat) + { + case IL_DXT1: + case IL_DXT1A: + for (z = 0; z < Image->Depth; z++) { + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + GetAlphaBlock(AlphaBlock, Runner8, Image, x, y); + HasAlpha = IL_FALSE; + for (i = 0 ; i < 16; i++) { + if (AlphaBlock[i] < 128) { + HasAlpha = IL_TRUE; + break; + } + } + + GetBlock(Block, Runner16, Image, x, y); + ChooseEndpoints(Block, &ex0, &ex1); + CorrectEndDXT1(&ex0, &ex1, HasAlpha); + SaveLittleUShort(ex0); + SaveLittleUShort(ex1); + if (HasAlpha) + BitMask = GenBitMask(ex0, ex1, 3, Block, AlphaBlock, NULL); + else + BitMask = GenBitMask(ex0, ex1, 4, Block, NULL, NULL); + SaveLittleUInt(BitMask); + Count += 8; + } + } + + Runner16 += Image->Width * Image->Height; + Runner8 += Image->Width * Image->Height; + } + break; + + /*case IL_DXT2: + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + GetAlphaBlock(AlphaBlock, Alpha, Image, x, y); + for (i = 0; i < 16; i += 2) { + iputc((ILubyte)(((AlphaBlock[i] >> 4) << 4) | (AlphaBlock[i+1] >> 4))); + } + + GetBlock(Block, Data, Image, x, y); + PreMult(Block, AlphaBlock); + ChooseEndpoints(Block, &ex0, &ex1); + SaveLittleUShort(ex0); + SaveLittleUShort(ex1); + BitMask = GenBitMask(ex0, ex1, 4, Block, NULL, NULL); + SaveLittleUInt(BitMask); + } + } + break;*/ + + case IL_DXT3: + for (z = 0; z < Image->Depth; z++) { + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + GetAlphaBlock(AlphaBlock, Runner8, Image, x, y); + for (i = 0; i < 16; i += 2) { + iputc((ILubyte)(((AlphaBlock[i+1] >> 4) << 4) | (AlphaBlock[i] >> 4))); + } + + GetBlock(Block, Runner16, Image, x, y); + ChooseEndpoints(Block, &t0, &t1); + ex0 = IL_MAX(t0, t1); + ex1 = IL_MIN(t0, t1); + CorrectEndDXT1(&ex0, &ex1, 0); + SaveLittleUShort(ex0); + SaveLittleUShort(ex1); + BitMask = GenBitMask(ex0, ex1, 4, Block, NULL, NULL); + SaveLittleUInt(BitMask); + Count += 16; + } + } + + Runner16 += Image->Width * Image->Height; + Runner8 += Image->Width * Image->Height; + } + break; + + case IL_RXGB: + case IL_DXT5: + for (z = 0; z < Image->Depth; z++) { + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + GetAlphaBlock(AlphaBlock, Runner8, Image, x, y); + ChooseAlphaEndpoints(AlphaBlock, &a0, &a1); + GenAlphaBitMask(a0, a1, AlphaBlock, AlphaBitMask, NULL/*AlphaOut*/); + /*Rms2 = RMSAlpha(AlphaBlock, AlphaOut); + GenAlphaBitMask(a0, a1, 8, AlphaBlock, AlphaBitMask, AlphaOut); + Rms1 = RMSAlpha(AlphaBlock, AlphaOut); + if (Rms2 <= Rms1) { // Yeah, we have to regenerate... + GenAlphaBitMask(a0, a1, 6, AlphaBlock, AlphaBitMask, AlphaOut); + Rms2 = a1; // Just reuse Rms2 as a temporary variable... + a1 = a0; + a0 = Rms2; + }*/ + iputc(a0); + iputc(a1); + iwrite(AlphaBitMask, 1, 6); + + GetBlock(Block, Runner16, Image, x, y); + ChooseEndpoints(Block, &t0, &t1); + ex0 = IL_MAX(t0, t1); + ex1 = IL_MIN(t0, t1); + CorrectEndDXT1(&ex0, &ex1, 0); + SaveLittleUShort(ex0); + SaveLittleUShort(ex1); + BitMask = GenBitMask(ex0, ex1, 4, Block, NULL, NULL); + SaveLittleUInt(BitMask); + Count += 16; + } + } + + Runner16 += Image->Width * Image->Height; + Runner8 += Image->Width * Image->Height; + } + break; + } + + ifree(Data); + ifree(Alpha); + } //else no 3DC + + return Count; // Returns 0 if no compression was done. +} + + +// Assumed to be 16-bit (5:6:5). +ILboolean GetBlock(ILushort *Block, ILushort *Data, ILimage *Image, ILuint XPos, ILuint YPos) +{ + ILuint x, y, i = 0, Offset = YPos * Image->Width + XPos; + + for (y = 0; y < 4; y++) { + for (x = 0; x < 4; x++) { + if (XPos + x < Image->Width && YPos + y < Image->Height) + Block[i++] = Data[Offset + x]; + else + // Variant of bugfix from https://sourceforge.net/forum/message.php?msg_id=5486779. + // If we are out of bounds of the image, just copy the adjacent data. + Block[i++] = Data[Offset]; + } + // We do not want to read past the end of the image. + if (YPos + y + 1 < Image->Height) + Offset += Image->Width; + } + + return IL_TRUE; +} + + +ILboolean GetAlphaBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos) +{ + ILuint x, y, i = 0, Offset = YPos * Image->Width + XPos; + + for (y = 0; y < 4; y++) { + for (x = 0; x < 4; x++) { + if (XPos + x < Image->Width && YPos + y < Image->Height) + Block[i++] = Data[Offset + x]; + else + // Variant of bugfix from https://sourceforge.net/forum/message.php?msg_id=5486779. + // If we are out of bounds of the image, just copy the adjacent data. + Block[i++] = Data[Offset]; + } + // We do not want to read past the end of the image. + if (YPos + y + 1 < Image->Height) + Offset += Image->Width; + } + + return IL_TRUE; +} + +ILboolean Get3DcBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos, int channel) +{ + ILuint x, y, i = 0, Offset = 2*(YPos * Image->Width + XPos) + channel; + + for (y = 0; y < 4; y++) { + for (x = 0; x < 4; x++) { + if (x < Image->Width && y < Image->Height) + Block[i++] = Data[Offset + 2*x]; + else + Block[i++] = Data[Offset]; + } + Offset += 2*Image->Width; + } + + return IL_TRUE; +} + + +void ShortToColor565(ILushort Pixel, Color565 *Colour) +{ + Colour->nRed = (Pixel & 0xF800) >> 11; + Colour->nGreen = (Pixel & 0x07E0) >> 5; + Colour->nBlue = (Pixel & 0x001F); + return; +} + + +void ShortToColor888(ILushort Pixel, Color888 *Colour) +{ + Colour->r = ((Pixel & 0xF800) >> 11) << 3; + Colour->g = ((Pixel & 0x07E0) >> 5) << 2; + Colour->b = ((Pixel & 0x001F)) << 3; + return; +} + + +ILushort Color565ToShort(Color565 *Colour) +{ + return (Colour->nRed << 11) | (Colour->nGreen << 5) | (Colour->nBlue); +} + + +ILushort Color888ToShort(Color888 *Colour) +{ + return ((Colour->r >> 3) << 11) | ((Colour->g >> 2) << 5) | (Colour->b >> 3); +} + + +ILuint GenBitMask(ILushort ex0, ILushort ex1, ILuint NumCols, ILushort *In, ILubyte *Alpha, Color888 *OutCol) +{ + ILuint i, j, Closest, Dist, BitMask = 0; + ILubyte Mask[16]; + Color888 c, Colours[4]; + + ShortToColor888(ex0, &Colours[0]); + ShortToColor888(ex1, &Colours[1]); + if (NumCols == 3) { + Colours[2].r = (Colours[0].r + Colours[1].r) / 2; + Colours[2].g = (Colours[0].g + Colours[1].g) / 2; + Colours[2].b = (Colours[0].b + Colours[1].b) / 2; + Colours[3].r = (Colours[0].r + Colours[1].r) / 2; + Colours[3].g = (Colours[0].g + Colours[1].g) / 2; + Colours[3].b = (Colours[0].b + Colours[1].b) / 2; + } + else { // NumCols == 4 + Colours[2].r = (2 * Colours[0].r + Colours[1].r + 1) / 3; + Colours[2].g = (2 * Colours[0].g + Colours[1].g + 1) / 3; + Colours[2].b = (2 * Colours[0].b + Colours[1].b + 1) / 3; + Colours[3].r = (Colours[0].r + 2 * Colours[1].r + 1) / 3; + Colours[3].g = (Colours[0].g + 2 * Colours[1].g + 1) / 3; + Colours[3].b = (Colours[0].b + 2 * Colours[1].b + 1) / 3; + } + + for (i = 0; i < 16; i++) { + if (Alpha) { // Test to see if we have 1-bit transparency + if (Alpha[i] < 128) { + Mask[i] = 3; // Transparent + if (OutCol) { + OutCol[i].r = Colours[3].r; + OutCol[i].g = Colours[3].g; + OutCol[i].b = Colours[3].b; + } + continue; + } + } + + // If no transparency, try to find which colour is the closest. + Closest = UINT_MAX; + ShortToColor888(In[i], &c); + for (j = 0; j < NumCols; j++) { + Dist = Distance(&c, &Colours[j]); + if (Dist < Closest) { + Closest = Dist; + Mask[i] = j; + if (OutCol) { + OutCol[i].r = Colours[j].r; + OutCol[i].g = Colours[j].g; + OutCol[i].b = Colours[j].b; + } + } + } + } + + for (i = 0; i < 16; i++) { + BitMask |= (Mask[i] << (i*2)); + } + + return BitMask; +} + + +void GenAlphaBitMask(ILubyte a0, ILubyte a1, ILubyte *In, ILubyte *Mask, ILubyte *Out) +{ + ILubyte Alphas[8], M[16]; + ILuint i, j, Closest, Dist; + + Alphas[0] = a0; + Alphas[1] = a1; + + // 8-alpha or 6-alpha block? + if (a0 > a1) { + // 8-alpha block: derive the other six alphas. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + Alphas[2] = (6 * Alphas[0] + 1 * Alphas[1] + 3) / 7; // bit code 010 + Alphas[3] = (5 * Alphas[0] + 2 * Alphas[1] + 3) / 7; // bit code 011 + Alphas[4] = (4 * Alphas[0] + 3 * Alphas[1] + 3) / 7; // bit code 100 + Alphas[5] = (3 * Alphas[0] + 4 * Alphas[1] + 3) / 7; // bit code 101 + Alphas[6] = (2 * Alphas[0] + 5 * Alphas[1] + 3) / 7; // bit code 110 + Alphas[7] = (1 * Alphas[0] + 6 * Alphas[1] + 3) / 7; // bit code 111 + } + else { + // 6-alpha block. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + Alphas[2] = (4 * Alphas[0] + 1 * Alphas[1] + 2) / 5; // Bit code 010 + Alphas[3] = (3 * Alphas[0] + 2 * Alphas[1] + 2) / 5; // Bit code 011 + Alphas[4] = (2 * Alphas[0] + 3 * Alphas[1] + 2) / 5; // Bit code 100 + Alphas[5] = (1 * Alphas[0] + 4 * Alphas[1] + 2) / 5; // Bit code 101 + Alphas[6] = 0x00; // Bit code 110 + Alphas[7] = 0xFF; // Bit code 111 + } + + for (i = 0; i < 16; i++) { + Closest = UINT_MAX; + for (j = 0; j < 8; j++) { + Dist = abs((ILint)In[i] - (ILint)Alphas[j]); + if (Dist < Closest) { + Closest = Dist; + M[i] = j; + } + } + } + + if (Out) { + for (i = 0; i < 16; i++) { + Out[i] = Alphas[M[i]]; + } + } + + //this was changed 20040623. There was a shift bug in here. Now the code + //produces much higher quality images. + // First three bytes. + Mask[0] = (M[0]) | (M[1] << 3) | ((M[2] & 0x03) << 6); + Mask[1] = ((M[2] & 0x04) >> 2) | (M[3] << 1) | (M[4] << 4) | ((M[5] & 0x01) << 7); + Mask[2] = ((M[5] & 0x06) >> 1) | (M[6] << 2) | (M[7] << 5); + + // Second three bytes. + Mask[3] = (M[8]) | (M[9] << 3) | ((M[10] & 0x03) << 6); + Mask[4] = ((M[10] & 0x04) >> 2) | (M[11] << 1) | (M[12] << 4) | ((M[13] & 0x01) << 7); + Mask[5] = ((M[13] & 0x06) >> 1) | (M[14] << 2) | (M[15] << 5); + + return; +} + + +ILuint RMSAlpha(ILubyte *Orig, ILubyte *Test) +{ + ILuint RMS = 0, i; + ILint d; + + for (i = 0; i < 16; i++) { + d = Orig[i] - Test[i]; + RMS += d*d; + } + + //RMS /= 16; + + return RMS; +} + + +ILuint Distance(Color888 *c1, Color888 *c2) +{ + return (c1->r - c2->r) * (c1->r - c2->r) + + (c1->g - c2->g) * (c1->g - c2->g) + + (c1->b - c2->b) * (c1->b - c2->b); +} + +#define Sum(c) ((c)->r + (c)->g + (c)->b) +#define NormSquared(c) ((c)->r * (c)->r + (c)->g * (c)->g + (c)->b * (c)->b) + +void ChooseEndpoints(ILushort *Block, ILushort *ex0, ILushort *ex1) +{ + ILuint i; + Color888 Colours[16]; + ILint Lowest=0, Highest=0; + + for (i = 0; i < 16; i++) { + ShortToColor888(Block[i], &Colours[i]); + + if (NormSquared(&Colours[i]) < NormSquared(&Colours[Lowest])) + Lowest = i; + if (NormSquared(&Colours[i]) > NormSquared(&Colours[Highest])) + Highest = i; + } + *ex0 = Block[Highest]; + *ex1 = Block[Lowest]; +} + +#undef Sum +#undef NormSquared + + +void ChooseAlphaEndpoints(ILubyte *Block, ILubyte *a0, ILubyte *a1) +{ + ILuint i, Lowest = 0xFF, Highest = 0; + + for (i = 0; i < 16; i++) { + if (Block[i] < Lowest) + Lowest = Block[i]; + if (Block[i] > Highest) + Highest = Block[i]; + } + + *a0 = Lowest; + *a1 = Highest; +} + + +void CorrectEndDXT1(ILushort *ex0, ILushort *ex1, ILboolean HasAlpha) +{ + ILushort Temp; + + if (HasAlpha) { + if (*ex0 > *ex1) { + Temp = *ex0; + *ex0 = *ex1; + *ex1 = Temp; + } + } + else { + if (*ex0 < *ex1) { + Temp = *ex0; + *ex0 = *ex1; + *ex1 = Temp; + } + } + + return; +} + + +void PreMult(ILushort *Data, ILubyte *Alpha) +{ + Color888 Colour; + ILuint i; + + for (i = 0; i < 16; i++) { + ShortToColor888(Data[i], &Colour); + Colour.r = (ILubyte)(((ILuint)Colour.r * Alpha[i]) >> 8); + Colour.g = (ILubyte)(((ILuint)Colour.g * Alpha[i]) >> 8); + Colour.b = (ILubyte)(((ILuint)Colour.b * Alpha[i]) >> 8); + + /*Colour.r = (ILubyte)(Colour.r * (Alpha[i] / 255.0)); + Colour.g = (ILubyte)(Colour.g * (Alpha[i] / 255.0)); + Colour.b = (ILubyte)(Colour.b * (Alpha[i] / 255.0));*/ + + Data[i] = Color888ToShort(&Colour); + ShortToColor888(Data[i], &Colour); + } + + return; +} + + +//! Compresses data to a DXT format using different methods. +// The data must be in unsigned byte RGBA or BGRA format. Only DXT1, DXT3 and DXT5 are supported. +ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize) +{ + ILimage *TempImage, *CurImage = iCurImage; + ILuint BuffSize; + ILubyte *Buffer; + + if ((DXTCFormat != IL_DXT1 && DXTCFormat != IL_DXT1A && DXTCFormat != IL_DXT3 && DXTCFormat != IL_DXT5) + || Data == NULL || Width == 0 || Height == 0 || Depth == 0) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + // We want to try nVidia compression first, because it is the fastest. +#ifdef IL_USE_DXTC_NVIDIA + if (ilIsEnabled(IL_NVIDIA_COMPRESS) && Depth == 1) { // See if we need to use the nVidia Texture Tools library. + // NVTT needs data as BGRA 32-bit. + // Here's where all the compression and writing goes on. + return ilNVidiaCompressDXT(Data, Width, Height, 1, DXTCFormat, DXTCSize); + } +#endif//IL_USE_DXTC_NVIDIA + + // libsquish generates better quality output than DevIL does, so we try it next. +#ifdef IL_USE_DXTC_SQUISH + if (ilIsEnabled(IL_SQUISH_COMPRESS) && Depth == 1) { // See if we need to use the nVidia Texture Tools library. + if (DXTCFormat == IL_DXT1 || DXTCFormat == IL_DXT1A || DXTCFormat == IL_DXT3 || DXTCFormat == IL_DXT5) { + // libsquish needs data as RGBA 32-bit. + // Get compressed data here. + return ilSquishCompressDXT(Data, Width, Height, 1, DXTCFormat, DXTCSize); + } + } +#endif//IL_USE_DXTC_SQUISH + + TempImage = (ILimage*)ialloc(sizeof(ILimage)); + memset(TempImage, 0, sizeof(ILimage)); + TempImage->Width = Width; + TempImage->Height = Height; + TempImage->Depth = Depth; + TempImage->Bpp = 4; // RGBA or BGRA + TempImage->Format = IL_BGRA; + TempImage->Bpc = 1; // Unsigned bytes only + TempImage->Type = IL_UNSIGNED_BYTE; + TempImage->SizeOfPlane = TempImage->Bps * Height; + TempImage->SizeOfData = TempImage->SizeOfPlane * Depth; + TempImage->Origin = IL_ORIGIN_UPPER_LEFT; + TempImage->Data = Data; + + BuffSize = ilGetDXTCData(NULL, 0, DXTCFormat); + if (BuffSize == 0) + return NULL; + Buffer = (ILubyte*)ialloc(BuffSize); + if (Buffer == NULL) + return NULL; + + if (ilGetDXTCData(Buffer, BuffSize, DXTCFormat) != BuffSize) { + ifree(Buffer); + return NULL; + } + *DXTCSize = BuffSize; + + // Restore backup of iCurImage. + iCurImage = CurImage; + TempImage->Data = NULL; + ilCloseImage(TempImage); + + return Buffer; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_dds.c b/libs/DevIL-1.7.8/src-IL/src/il_dds.c new file mode 100644 index 00000000..02978c7b --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_dds.c @@ -0,0 +1,2523 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/28/2009 +// +// Filename: src-IL/src/il_dds.c +// +// Description: Reads from a DirectDraw Surface (.dds) file. +// +//----------------------------------------------------------------------------- + + +// +// +// Note: Almost all this code is from nVidia's DDS-loading example at +// http://www.nvidia.com/view.asp?IO=dxtc_decompression_code +// and from the specs at +// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/hh/dx8_c/graphics_using_0j03.asp +// and +// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/Graphics/ProgrammersGuide/Appendix/DDSFileFormat/ovwDDSFileFormat.asp +// However, some not really valid .dds files are also read, for example +// Volume Textures without the COMPLEX bit set, so the specs aren't taken +// too strictly while reading. + + +#include "il_internal.h" +#ifndef IL_NO_DDS +#include "il_dds.h" + + +// Global variables +static DDSHEAD Head; // Image header +static ILubyte *CompData = NULL; // Compressed data +static ILuint CompSize; // Compressed size +//static ILuint CompFormat; // Compressed format +static ILimage *Image; +static ILint Width, Height, Depth; +static ILboolean Has16BitComponents; + +ILuint CubemapDirections[CUBEMAP_SIDES] = { + DDS_CUBEMAP_POSITIVEX, + DDS_CUBEMAP_NEGATIVEX, + DDS_CUBEMAP_POSITIVEY, + DDS_CUBEMAP_NEGATIVEY, + DDS_CUBEMAP_POSITIVEZ, + DDS_CUBEMAP_NEGATIVEZ +}; + + +//! Checks if the file specified in FileName is a valid .dds file. +ILboolean ilIsValidDds(ILconst_string FileName) +{ + ILHANDLE DdsFile; + ILboolean bDds = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("dds"))) { + ilSetError(IL_INVALID_EXTENSION); + return bDds; + } + + DdsFile = iopenr(FileName); + if (DdsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDds; + } + + bDds = ilIsValidDdsF(DdsFile); + icloser(DdsFile); + + return bDds; +} + + +//! Checks if the ILHANDLE contains a valid .dds file at the current position. +ILboolean ilIsValidDdsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidDds(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .dds lump. +ILboolean ilIsValidDdsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidDds(); +} + + +// Internal function used to get the .dds header from the current file. +ILboolean iGetDdsHead(DDSHEAD *Header) +{ + ILint i; + + iread(&Header->Signature, 1, 4); + Header->Size1 = GetLittleUInt(); + Header->Flags1 = GetLittleUInt(); + Header->Height = GetLittleUInt(); + Header->Width = GetLittleUInt(); + Header->LinearSize = GetLittleUInt(); + Header->Depth = GetLittleUInt(); + Header->MipMapCount = GetLittleUInt(); + Header->AlphaBitDepth = GetLittleUInt(); + + for (i = 0; i < 10; ++i) + Header->NotUsed[i] = GetLittleUInt(); + + Header->Size2 = GetLittleUInt(); + Header->Flags2 = GetLittleUInt(); + Header->FourCC = GetLittleUInt(); + Header->RGBBitCount = GetLittleUInt(); + Header->RBitMask = GetLittleUInt(); + Header->GBitMask = GetLittleUInt(); + Header->BBitMask = GetLittleUInt(); + Header->RGBAlphaBitMask = GetLittleUInt(); + Header->ddsCaps1 = GetLittleUInt(); + Header->ddsCaps2 = GetLittleUInt(); + Header->ddsCaps3 = GetLittleUInt(); + Header->ddsCaps4 = GetLittleUInt(); + Header->TextureStage = GetLittleUInt(); + + if (Head.Depth == 0) + Head.Depth = 1; + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidDds() +{ + ILboolean IsValid; + DDSHEAD Head; + + iGetDdsHead(&Head); + iseek(-(ILint)sizeof(DDSHEAD), IL_SEEK_CUR); // Go ahead and restore to previous state + + IsValid = iCheckDds(&Head); + + return IsValid; +} + + +// Internal function used to check if the HEADER is a valid .dds header. +ILboolean iCheckDds(DDSHEAD *Head) +{ + if (strncmp((const char*)Head->Signature, "DDS ", 4)) + return IL_FALSE; + //note that if Size1 is "DDS " this is not a valid dds file according + //to the file spec. Some broken tool out there seems to produce files + //with this value in the size field, so we support reading them... + if (Head->Size1 != 124 && Head->Size1 != IL_MAKEFOURCC('D', 'D', 'S', ' ')) + return IL_FALSE; + if (Head->Size2 != 32) + return IL_FALSE; + if (Head->Width == 0 || Head->Height == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Reads a .dds file +ILboolean ilLoadDds(ILconst_string FileName) +{ + ILHANDLE DdsFile; + ILboolean bDds = IL_FALSE; + + DdsFile = iopenr(FileName); + if (DdsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDds; + } + + bDds = ilLoadDdsF(DdsFile); + icloser(DdsFile); + + return bDds; +} + + +//! Reads an already-opened .dds file +ILboolean ilLoadDdsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDdsInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .dds +ILboolean ilLoadDdsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadDdsInternal(); +} + + +void Check16BitComponents(DDSHEAD *Header) +{ + if (Header->RGBBitCount != 32) + Has16BitComponents = IL_FALSE; + // a2b10g10r10 format + if (Header->RBitMask == 0x3FF00000 && Header->GBitMask == 0x000FFC00 && Header->BBitMask == 0x000003FF + && Header->RGBAlphaBitMask == 0xC0000000) + Has16BitComponents = IL_TRUE; + // a2r10g10b10 format + else if (Header->RBitMask == 0x000003FF && Header->GBitMask == 0x000FFC00 && Header->BBitMask == 0x3FF00000 + && Header->RGBAlphaBitMask == 0xC0000000) + Has16BitComponents = IL_TRUE; + else + Has16BitComponents = IL_FALSE; + return; +} + + +ILubyte iCompFormatToBpp(ILenum Format) +{ + //non-compressed (= non-FOURCC) codes + if (Format == PF_LUMINANCE || Format == PF_LUMINANCE_ALPHA || Format == PF_ARGB) + return Head.RGBBitCount/8; + + //fourcc formats + else if (Format == PF_RGB || Format == PF_3DC || Format == PF_RXGB) + return 3; + else if (Format == PF_ATI1N) + return 1; + //else if (Format == PF_R16F) + // return 2; + else if (Format == PF_A16B16G16R16 || Format == PF_A16B16G16R16F + || Format == PF_G32R32F) + return 8; + else if (Format == PF_A32B32G32R32F) + return 16; + else //if (Format == PF_G16R16F || Format == PF_R32F || dxt) + return 4; +} + + +ILubyte iCompFormatToBpc(ILenum Format) +{ + if (Has16BitComponents) + return 2; + if (Format == PF_R16F || Format == PF_G16R16F || Format == PF_A16B16G16R16F) + //DevIL has no internal half type, so these formats are converted to 32 bits + return 4; + else if (Format == PF_R32F || Format == PF_R16F || Format == PF_G32R32F || Format == PF_A32B32G32R32F) + return 4; + else if(Format == PF_A16B16G16R16) + return 2; + else + return 1; +} + + +ILubyte iCompFormatToChannelCount(ILenum Format) +{ + if (Format == PF_RGB || Format == PF_3DC || Format == PF_RXGB) + return 3; + else if (Format == PF_LUMINANCE || /*Format == PF_R16F || Format == PF_R32F ||*/ Format == PF_ATI1N) + return 1; + else if (Format == PF_LUMINANCE_ALPHA /*|| Format == PF_G16R16F || Format == PF_G32R32F*/) + return 2; + else if (Format == PF_G16R16F || Format == PF_G32R32F || Format == PF_R32F || Format == PF_R16F) + return 3; + else //if(Format == PF_ARGB || dxt) + return 4; +} + + +ILboolean iLoadDdsCubemapInternal(ILuint CompFormat) +{ + ILuint i; + ILubyte Bpp, Channels, Bpc; + ILimage *startImage; + + CompData = NULL; + + Bpp = iCompFormatToBpp(CompFormat); + Channels = iCompFormatToChannelCount(CompFormat); + Bpc = iCompFormatToBpc(CompFormat); + if (CompFormat == PF_LUMINANCE && Head.RGBBitCount == 16 && Head.RBitMask == 0xFFFF) { //@TODO: This is a HACK. + Bpc = 2; Bpp = 2; + } + + startImage = Image; + // Run through cube map possibilities + for (i = 0; i < CUBEMAP_SIDES; i++) { + // Reset each time + Width = Head.Width; + Height = Head.Height; + Depth = Head.Depth; + if (Head.ddsCaps2 & CubemapDirections[i]) { + if (i != 0) { + Image->Faces = ilNewImage(Width, Height, Depth, Channels, Bpc); + if (Image->Faces == NULL) + return IL_FALSE; + + Image = Image->Faces; + + if (CompFormat == PF_R16F + || CompFormat == PF_G16R16F + || CompFormat == PF_A16B16G16R16F + || CompFormat == PF_R32F + || CompFormat == PF_G32R32F + || CompFormat == PF_A32B32G32R32F) { + // DevIL's format autodetection doesn't work for + // float images...correct this. + Image->Type = IL_FLOAT; + Image->Bpp = Channels; + } + + ilBindImage(ilGetCurName()); // Set to parent image first. + //ilActiveImage(i); //@TODO: now Image == iCurImage...globals SUCK, fix this!!! + ilActiveFace(i); + } + + if (!ReadData()) + return IL_FALSE; + + if (!AllocImage(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + + Image->CubeFlags = CubemapDirections[i]; + + if (!DdsDecompress(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + + if (!ReadMipmaps(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + } + } + + if (CompData) { + ifree(CompData); + CompData = NULL; + } + + ilBindImage(ilGetCurName()); // Set to parent image first. + return ilFixImage(); +} + + +ILboolean iLoadDdsInternal() +{ + ILuint BlockSize = 0; + ILuint CompFormat; + + CompData = NULL; + Image = NULL; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetDdsHead(&Head)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + if (!iCheckDds(&Head)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + BlockSize = DecodePixelFormat(&CompFormat); + if (CompFormat == PF_UNKNOWN) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + Check16BitComponents(&Head); + + // Microsoft bug, they're not following their own documentation. + if (!(Head.Flags1 & (DDS_LINEARSIZE | DDS_PITCH)) + || Head.LinearSize == 0) { + Head.Flags1 |= DDS_LINEARSIZE; + Head.LinearSize = BlockSize; + } + + Image = iCurImage; + if (Head.ddsCaps1 & DDS_COMPLEX) { + if (Head.ddsCaps2 & DDS_CUBEMAP) { + if (!iLoadDdsCubemapInternal(CompFormat)) + return IL_FALSE; + return IL_TRUE; + } + } + + Width = Head.Width; + Height = Head.Height; + Depth = Head.Depth; + AdjustVolumeTexture(&Head, CompFormat); + + if (!ReadData()) + return IL_FALSE; + if (!AllocImage(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + if (!DdsDecompress(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + + if (!ReadMipmaps(CompFormat)) { + if (CompData) { + ifree(CompData); + CompData = NULL; + } + return IL_FALSE; + } + + if (CompData) { + ifree(CompData); + CompData = NULL; + } + + ilBindImage(ilGetCurName()); // Set to parent image first. + return ilFixImage(); +} + + +ILuint DecodePixelFormat(ILuint *CompFormat) +{ + ILuint BlockSize; + + if (Head.Flags2 & DDS_FOURCC) { + BlockSize = ((Head.Width + 3)/4) * ((Head.Height + 3)/4) * Head.Depth; + switch (Head.FourCC) + { + case IL_MAKEFOURCC('D','X','T','1'): + *CompFormat = PF_DXT1; + BlockSize *= 8; + break; + + case IL_MAKEFOURCC('D','X','T','2'): + *CompFormat = PF_DXT2; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('D','X','T','3'): + *CompFormat = PF_DXT3; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('D','X','T','4'): + *CompFormat = PF_DXT4; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('D','X','T','5'): + *CompFormat = PF_DXT5; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('A', 'T', 'I', '1'): + *CompFormat = PF_ATI1N; + BlockSize *= 8; + break; + + case IL_MAKEFOURCC('A', 'T', 'I', '2'): + *CompFormat = PF_3DC; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('R', 'X', 'G', 'B'): + *CompFormat = PF_RXGB; + BlockSize *= 16; + break; + + case IL_MAKEFOURCC('$', '\0', '\0', '\0'): + *CompFormat = PF_A16B16G16R16; + BlockSize = Head.Width * Head.Height * Head.Depth * 8; + break; + + case IL_MAKEFOURCC('o', '\0', '\0', '\0'): + *CompFormat = PF_R16F; + BlockSize = Head.Width * Head.Height * Head.Depth * 2; + break; + + case IL_MAKEFOURCC('p', '\0', '\0', '\0'): + *CompFormat = PF_G16R16F; + BlockSize = Head.Width * Head.Height * Head.Depth * 4; + break; + + case IL_MAKEFOURCC('q', '\0', '\0', '\0'): + *CompFormat = PF_A16B16G16R16F; + BlockSize = Head.Width * Head.Height * Head.Depth * 8; + break; + + case IL_MAKEFOURCC('r', '\0', '\0', '\0'): + *CompFormat = PF_R32F; + BlockSize = Head.Width * Head.Height * Head.Depth * 4; + break; + + case IL_MAKEFOURCC('s', '\0', '\0', '\0'): + *CompFormat = PF_G32R32F; + BlockSize = Head.Width * Head.Height * Head.Depth * 8; + break; + + case IL_MAKEFOURCC('t', '\0', '\0', '\0'): + *CompFormat = PF_A32B32G32R32F; + BlockSize = Head.Width * Head.Height * Head.Depth * 16; + break; + + default: + *CompFormat = PF_UNKNOWN; + BlockSize *= 16; + break; + } + } else { + // This dds texture isn't compressed so write out ARGB or luminance format + if (Head.Flags2 & DDS_LUMINANCE) { + if (Head.Flags2 & DDS_ALPHAPIXELS) { + *CompFormat = PF_LUMINANCE_ALPHA; + } else { + *CompFormat = PF_LUMINANCE; + } + } + else { + if (Head.Flags2 & DDS_ALPHAPIXELS) { + *CompFormat = PF_ARGB; + } else { + *CompFormat = PF_RGB; + } + } + BlockSize = (Head.Width * Head.Height * Head.Depth * (Head.RGBBitCount >> 3)); + } + + return BlockSize; +} + + +// The few volume textures that I have don't have consistent LinearSize +// entries, even though the DDS_LINEARSIZE flag is set. +void AdjustVolumeTexture(DDSHEAD *Head, ILuint CompFormat) +{ + if (Head->Depth <= 1) + return; + + // All volume textures I've seem so far didn't have the DDS_COMPLEX flag set, + // even though this is normally required. But because noone does set it, + // also read images without it (TODO: check file size for 3d texture?) + if (/*!(Head->ddsCaps1 & DDS_COMPLEX) ||*/ !(Head->ddsCaps2 & DDS_VOLUME)) { + Head->Depth = 1; + Depth = 1; + } + + switch (CompFormat) + { + case PF_ARGB: + case PF_RGB: + case PF_LUMINANCE: + case PF_LUMINANCE_ALPHA: + //don't use the iCompFormatToBpp() function because this way + //argb images with only 8 bits (eg. a1r2g3b2) work as well + Head->LinearSize = IL_MAX(1,Head->Width) * IL_MAX(1,Head->Height) * + (Head->RGBBitCount / 8); + break; + + case PF_DXT1: + + case PF_ATI1N: + Head->LinearSize = ((Head->Width+3)/4) * ((Head->Height+3)/4) * 8; + break; + + case PF_DXT2: + case PF_DXT3: + case PF_DXT4: + case PF_DXT5: + case PF_3DC: + case PF_RXGB: + Head->LinearSize = ((Head->Width+3)/4) * ((Head->Height+3)/4) * 16; + break; + + case PF_A16B16G16R16: + case PF_R16F: + case PF_G16R16F: + case PF_A16B16G16R16F: + case PF_R32F: + case PF_G32R32F: + case PF_A32B32G32R32F: + Head->LinearSize = IL_MAX(1,Head->Width) * IL_MAX(1,Head->Height) * + iCompFormatToBpp(CompFormat); + break; + } + + Head->Flags1 |= DDS_LINEARSIZE; + Head->LinearSize *= Head->Depth; + + return; +} + + +// Reads the compressed data +ILboolean ReadData() +{ + ILuint Bps; + ILint y, z; + ILubyte *Temp; + + if (CompData) { + ifree(CompData); + CompData = NULL; + } + + if (Head.Flags1 & DDS_LINEARSIZE) { + //Head.LinearSize = Head.LinearSize * Depth; + + CompData = (ILubyte*)ialloc(Head.LinearSize); + if (CompData == NULL) { + return IL_FALSE; + } + + if (iread(CompData, 1, Head.LinearSize) != (ILuint)Head.LinearSize) { + ifree(CompData); + CompData = NULL; + return IL_FALSE; + } + } + else { + Bps = Width * Head.RGBBitCount / 8; + CompSize = Bps * Height * Depth; + + CompData = (ILubyte*)ialloc(CompSize); + if (CompData == NULL) { + return IL_FALSE; + } + + Temp = CompData; + for (z = 0; z < Depth; z++) { + for (y = 0; y < Height; y++) { + if (iread(Temp, 1, Bps) != Bps) { + ifree(CompData); + CompData = NULL; + return IL_FALSE; + } + Temp += Bps; + } + } + } + + return IL_TRUE; +} + + +ILboolean AllocImage(ILuint CompFormat) +{ + ILubyte channels = 4; + ILenum format = IL_RGBA; + + switch (CompFormat) + { + case PF_RGB: + if (!ilTexImage(Width, Height, Depth, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + case PF_ARGB: + if (!ilTexImage(Width, Height, Depth, 4, IL_RGBA, Has16BitComponents ? IL_UNSIGNED_SHORT : IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + + case PF_LUMINANCE: + if (Head.RGBBitCount == 16 && Head.RBitMask == 0xFFFF) { //HACK + if (!ilTexImage(Width, Height, Depth, 1, IL_LUMINANCE, IL_UNSIGNED_SHORT, NULL)) + return IL_FALSE; + } + else + if (!ilTexImage(Width, Height, Depth, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + + case PF_LUMINANCE_ALPHA: + if (!ilTexImage(Width, Height, Depth, 2, IL_LUMINANCE_ALPHA, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + + case PF_ATI1N: + //right now there's no OpenGL api to use the compressed 3dc data, so + //throw it away (I don't know how DirectX works, though)? + if (!ilTexImage(Width, Height, Depth, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + + case PF_3DC: + //right now there's no OpenGL api to use the compressed 3dc data, so + //throw it away (I don't know how DirectX works, though)? + if (!ilTexImage(Width, Height, Depth, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + break; + + case PF_A16B16G16R16: + if (!ilTexImage(Width, Height, Depth, iCompFormatToChannelCount(CompFormat), + ilGetFormatBpp(iCompFormatToChannelCount(CompFormat)), IL_UNSIGNED_SHORT, NULL)) + return IL_FALSE; + break; + + case PF_R16F: + case PF_G16R16F: + case PF_A16B16G16R16F: + case PF_R32F: + case PF_G32R32F: + case PF_A32B32G32R32F: + if (!ilTexImage(Width, Height, Depth, iCompFormatToChannelCount(CompFormat), + ilGetFormatBpp(iCompFormatToChannelCount(CompFormat)), IL_FLOAT, NULL)) + return IL_FALSE; + break; + + default: + if (CompFormat == PF_RXGB) { + channels = 3; //normal map + format = IL_RGB; + } + + if (!ilTexImage(Width, Height, Depth, channels, format, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE && CompData) { + iCurImage->DxtcData = (ILubyte*)ialloc(Head.LinearSize); + if (iCurImage->DxtcData == NULL) + return IL_FALSE; + iCurImage->DxtcFormat = CompFormat - PF_DXT1 + IL_DXT1; + iCurImage->DxtcSize = Head.LinearSize; + memcpy(iCurImage->DxtcData, CompData, iCurImage->DxtcSize); + } + break; + } + + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + return IL_TRUE; +} + + +/* + * Assumes that the global variable CompFormat stores the format of the + * global pointer CompData (that's the pointer to the compressed data). + * Decompresses this data into Image->Data, returns if it was successful. + * It also uses the globals Width and Height. + * + * Assumes that iCurImage has valid Width, Height, Depth, Data, SizeOfData, + * Bpp, Bpc, Bps, SizeOfPlane, Format and Type fields. It is more or + * less assumed that the image has u8 rgba data (perhaps not for float + * images...) + * + * + * @TODO: don't use globals, clean this function (and this file) up + */ +ILboolean DdsDecompress(ILuint CompFormat) +{ + switch (CompFormat) + { + case PF_ARGB: + case PF_RGB: + case PF_LUMINANCE: + case PF_LUMINANCE_ALPHA: + return DecompressARGB(CompFormat); + + case PF_DXT1: + return DecompressDXT1(Image, CompData); + + case PF_DXT2: + return DecompressDXT2(Image, CompData); + + case PF_DXT3: + return DecompressDXT3(Image, CompData); + + case PF_DXT4: + return DecompressDXT4(Image, CompData); + + case PF_DXT5: + return DecompressDXT5(Image, CompData); + + case PF_ATI1N: + return DecompressAti1n(); + + case PF_3DC: + return Decompress3Dc(); + + case PF_RXGB: + return DecompressRXGB(); + + case PF_A16B16G16R16: + memcpy(Image->Data, CompData, Image->SizeOfData); + return IL_TRUE; + + case PF_R16F: + case PF_G16R16F: + case PF_A16B16G16R16F: + case PF_R32F: + case PF_G32R32F: + case PF_A32B32G32R32F: + return DecompressFloat(CompFormat); + + case PF_UNKNOWN: + return IL_FALSE; + } + + return IL_FALSE; +} + + +ILboolean ReadMipmaps(ILuint CompFormat) +{ + ILuint i, CompFactor=0; + ILubyte Bpp, Channels, Bpc; + ILimage *StartImage, *TempImage; + ILuint LastLinear; + ILuint minW, minH; + + ILboolean isCompressed = IL_FALSE; + + Bpp = iCompFormatToBpp(CompFormat); + Channels = iCompFormatToChannelCount(CompFormat); + Bpc = iCompFormatToBpc(CompFormat); + if (CompFormat == PF_LUMINANCE && Head.RGBBitCount == 16 && Head.RBitMask == 0xFFFF) { //HACK + Bpc = 2; Bpp = 2; + } + + //This doesn't work for images which first mipmap (= the image + //itself) has width or height < 4 + //if (Head.Flags1 & DDS_LINEARSIZE) { + // CompFactor = (Width * Height * Depth * Bpp) / Head.LinearSize; + //} + switch (CompFormat) + { + case PF_DXT1: + // This is officially 6, we have 8 here because DXT1 may contain alpha. + CompFactor = 8; + break; + case PF_DXT2: + case PF_DXT3: + case PF_DXT4: + case PF_DXT5: + CompFactor = 4; + break; + case PF_RXGB: + case PF_3DC: + // This is officially 4 for 3dc, but that's bullshit :) There's no + // alpha data in 3dc images. + CompFactor = 3; + break; + + case PF_ATI1N: + CompFactor = 2; + break; + default: + CompFactor = 1; + } + + StartImage = Image; + + if (!(Head.Flags1 & DDS_MIPMAPCOUNT) || Head.MipMapCount == 0) { + //some .dds-files have their mipmap flag set, + //but a mipmapcount of 0. Because mipMapCount is an uint, 0 - 1 gives + //overflow - don't let this happen: + Head.MipMapCount = 1; + } + + LastLinear = Head.LinearSize; + for (i = 0; i < Head.MipMapCount - 1; i++) { + Depth = Depth / 2; + Width = Width / 2; + Height = Height / 2; + + if (Depth == 0) + Depth = 1; + if (Width == 0) + Width = 1; + if (Height == 0) + Height = 1; + + Image->Mipmaps = ilNewImage(Width, Height, Depth, Channels, Bpc); + if (Image->Mipmaps == NULL) + goto mip_fail; + Image = Image->Mipmaps; + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + if (Head.Flags1 & DDS_LINEARSIZE) { + if (CompFormat == PF_R16F + || CompFormat == PF_G16R16F + || CompFormat == PF_A16B16G16R16F + || CompFormat == PF_R32F + || CompFormat == PF_G32R32F + || CompFormat == PF_A32B32G32R32F) { + Head.LinearSize = Width * Height * Depth * Bpp; + + //DevIL's format autodetection doesn't work for + //float images...correct this + Image->Type = IL_FLOAT; + Image->Bpp = Channels; + } + else if (CompFormat == PF_A16B16G16R16) + Head.LinearSize = Width * Height * Depth * Bpp; + else if (CompFormat != PF_RGB && CompFormat != PF_ARGB + && CompFormat != PF_LUMINANCE + && CompFormat != PF_LUMINANCE_ALPHA) { + + //compressed format + minW = (((Width+3)/4))*4; + minH = (((Height+3)/4))*4; + Head.LinearSize = (minW * minH * Depth * Bpp) / CompFactor; + + isCompressed = IL_TRUE; + } + else { + //don't use Bpp to support argb images with less than 32 bits + Head.LinearSize = Width * Height * Depth * (Head.RGBBitCount >> 3); + } + } + else { + Head.LinearSize >>= 1; + } + + if (!ReadData()) + goto mip_fail; + + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE && isCompressed == IL_TRUE && CompData) { + Image->DxtcData = (ILubyte*)ialloc(Head.LinearSize); + if (Image->DxtcData == NULL) + return IL_FALSE; + Image->DxtcFormat = CompFormat - PF_DXT1 + IL_DXT1; + Image->DxtcSize = Head.LinearSize; + memcpy(Image->DxtcData, CompData, Image->DxtcSize); + } + + if (!DdsDecompress(CompFormat)) + goto mip_fail; + } + + Head.LinearSize = LastLinear; + Image = StartImage; + + return IL_TRUE; + +mip_fail: + Image = StartImage; + StartImage = StartImage->Mipmaps; + while (StartImage) { + TempImage = StartImage; + StartImage = StartImage->Mipmaps; + ifree(TempImage); + } + + Image->Mipmaps = NULL; + return IL_FALSE; +} + + +void DxtcReadColors(const ILubyte* Data, Color8888* Out) +{ + ILubyte r0, g0, b0, r1, g1, b1; + + b0 = Data[0] & 0x1F; + g0 = ((Data[0] & 0xE0) >> 5) | ((Data[1] & 0x7) << 3); + r0 = (Data[1] & 0xF8) >> 3; + + b1 = Data[2] & 0x1F; + g1 = ((Data[2] & 0xE0) >> 5) | ((Data[3] & 0x7) << 3); + r1 = (Data[3] & 0xF8) >> 3; + + Out[0].r = r0 << 3 | r0 >> 2; + Out[0].g = g0 << 2 | g0 >> 3; + Out[0].b = b0 << 3 | b0 >> 2; + + Out[1].r = r1 << 3 | r1 >> 2; + Out[1].g = g1 << 2 | g1 >> 3; + Out[1].b = b1 << 3 | b1 >> 2; +} + +//@TODO: Probably not safe on Big Endian. +void DxtcReadColor(ILushort Data, Color8888* Out) +{ + ILubyte r, g, b; + + b = Data & 0x1f; + g = (Data & 0x7E0) >> 5; + r = (Data & 0xF800) >> 11; + + Out->r = r << 3 | r >> 2; + Out->g = g << 2 | g >> 3; + Out->b = b << 3 | r >> 2; +} + +ILboolean DecompressDXT1(ILimage *lImage, ILubyte *lCompData) +{ + ILuint x, y, z, i, j, k, Select; + ILubyte *Temp; + Color8888 colours[4], *col; + ILushort color_0, color_1; + ILuint bitmask, Offset; + + if (!lCompData) + return IL_FALSE; + + Temp = lCompData; + colours[0].a = 0xFF; + colours[1].a = 0xFF; + colours[2].a = 0xFF; + //colours[3].a = 0xFF; + for (z = 0; z < lImage->Depth; z++) { + for (y = 0; y < lImage->Height; y += 4) { + for (x = 0; x < lImage->Width; x += 4) { + color_0 = *((ILushort*)Temp); + UShort(&color_0); + color_1 = *((ILushort*)(Temp + 2)); + UShort(&color_1); + DxtcReadColor(color_0, colours); + DxtcReadColor(color_1, colours + 1); + bitmask = ((ILuint*)Temp)[1]; + UInt(&bitmask); + Temp += 8; + + if (color_0 > color_1) { + // Four-color block: derive the other two colors. + // 00 = color_0, 01 = color_1, 10 = color_2, 11 = color_3 + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (2 * colours[0].b + colours[1].b + 1) / 3; + colours[2].g = (2 * colours[0].g + colours[1].g + 1) / 3; + colours[2].r = (2 * colours[0].r + colours[1].r + 1) / 3; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + colours[3].a = 0xFF; + } + else { + // Three-color block: derive the other color. + // 00 = color_0, 01 = color_1, 10 = color_2, + // 11 = transparent. + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (colours[0].b + colours[1].b) / 2; + colours[2].g = (colours[0].g + colours[1].g) / 2; + colours[2].r = (colours[0].r + colours[1].r) / 2; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + colours[3].a = 0x00; + } + + for (j = 0, k = 0; j < 4; j++) { + for (i = 0; i < 4; i++, k++) { + Select = (bitmask & (0x03 << k*2)) >> k*2; + col = &colours[Select]; + + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp; + lImage->Data[Offset + 0] = col->r; + lImage->Data[Offset + 1] = col->g; + lImage->Data[Offset + 2] = col->b; + lImage->Data[Offset + 3] = col->a; + } + } + } + } + } + } + + return IL_TRUE; +} + + +ILboolean DecompressDXT2(ILimage *lImage, ILubyte *lCompData) +{ + // Can do color & alpha same as dxt3, but color is pre-multiplied + // so the result will be wrong unless corrected. + if (!DecompressDXT3(Image, CompData)) + return IL_FALSE; + CorrectPreMult(); + + return IL_TRUE; +} + + +ILboolean DecompressDXT3(ILimage *lImage, ILubyte *lCompData) +{ + ILuint x, y, z, i, j, k, Select; + ILubyte *Temp; + //Color565 *color_0, *color_1; + Color8888 colours[4], *col; + ILuint bitmask, Offset; + ILushort word; + ILubyte *alpha; + + if (!lCompData) + return IL_FALSE; + + Temp = lCompData; + for (z = 0; z < lImage->Depth; z++) { + for (y = 0; y < lImage->Height; y += 4) { + for (x = 0; x < lImage->Width; x += 4) { + alpha = Temp; + Temp += 8; + DxtcReadColors(Temp, colours); + bitmask = ((ILuint*)Temp)[1]; + UInt(&bitmask); + Temp += 8; + + // Four-color block: derive the other two colors. + // 00 = color_0, 01 = color_1, 10 = color_2, 11 = color_3 + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (2 * colours[0].b + colours[1].b + 1) / 3; + colours[2].g = (2 * colours[0].g + colours[1].g + 1) / 3; + colours[2].r = (2 * colours[0].r + colours[1].r + 1) / 3; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + //colours[3].a = 0xFF; + + k = 0; + for (j = 0; j < 4; j++) { + for (i = 0; i < 4; i++, k++) { + Select = (bitmask & (0x03 << k*2)) >> k*2; + col = &colours[Select]; + + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp; + lImage->Data[Offset + 0] = col->r; + lImage->Data[Offset + 1] = col->g; + lImage->Data[Offset + 2] = col->b; + } + } + } + + for (j = 0; j < 4; j++) { + word = alpha[2*j] + 256*alpha[2*j+1]; + for (i = 0; i < 4; i++) { + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp + 3; + lImage->Data[Offset] = word & 0x0F; + lImage->Data[Offset] = lImage->Data[Offset] | (lImage->Data[Offset] << 4); + } + word >>= 4; + } + } + + } + } + } + + return IL_TRUE; +} + + +ILboolean DecompressDXT4(ILimage *lImage, ILubyte *lCompData) +{ + // Can do color & alpha same as dxt5, but color is pre-multiplied + // so the result will be wrong unless corrected. + if (!DecompressDXT5(Image, CompData)) + return IL_FALSE; + CorrectPreMult(); + + return IL_FALSE; +} + + +ILboolean DecompressDXT5(ILimage *lImage, ILubyte *lCompData) +{ + ILuint x, y, z, i, j, k, Select; + ILubyte *Temp; //, r0, g0, b0, r1, g1, b1; + Color8888 colours[4], *col; + ILuint bitmask, Offset; + ILubyte alphas[8], *alphamask; + ILuint bits; + + if (!lCompData) + return IL_FALSE; + + Temp = lCompData; + for (z = 0; z < lImage->Depth; z++) { + for (y = 0; y < lImage->Height; y += 4) { + for (x = 0; x < lImage->Width; x += 4) { + if (y >= lImage->Height || x >= lImage->Width) + break; + alphas[0] = Temp[0]; + alphas[1] = Temp[1]; + alphamask = Temp + 2; + Temp += 8; + + DxtcReadColors(Temp, colours); + bitmask = ((ILuint*)Temp)[1]; + UInt(&bitmask); + Temp += 8; + + // Four-color block: derive the other two colors. + // 00 = color_0, 01 = color_1, 10 = color_2, 11 = color_3 + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (2 * colours[0].b + colours[1].b + 1) / 3; + colours[2].g = (2 * colours[0].g + colours[1].g + 1) / 3; + colours[2].r = (2 * colours[0].r + colours[1].r + 1) / 3; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + //colours[3].a = 0xFF; + + k = 0; + for (j = 0; j < 4; j++) { + for (i = 0; i < 4; i++, k++) { + + Select = (bitmask & (0x03 << k*2)) >> k*2; + col = &colours[Select]; + + // only put pixels out < width or height + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp; + lImage->Data[Offset + 0] = col->r; + lImage->Data[Offset + 1] = col->g; + lImage->Data[Offset + 2] = col->b; + } + } + } + + // 8-alpha or 6-alpha block? + if (alphas[0] > alphas[1]) { + // 8-alpha block: derive the other six alphas. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + alphas[2] = (6 * alphas[0] + 1 * alphas[1] + 3) / 7; // bit code 010 + alphas[3] = (5 * alphas[0] + 2 * alphas[1] + 3) / 7; // bit code 011 + alphas[4] = (4 * alphas[0] + 3 * alphas[1] + 3) / 7; // bit code 100 + alphas[5] = (3 * alphas[0] + 4 * alphas[1] + 3) / 7; // bit code 101 + alphas[6] = (2 * alphas[0] + 5 * alphas[1] + 3) / 7; // bit code 110 + alphas[7] = (1 * alphas[0] + 6 * alphas[1] + 3) / 7; // bit code 111 + } + else { + // 6-alpha block. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + alphas[2] = (4 * alphas[0] + 1 * alphas[1] + 2) / 5; // Bit code 010 + alphas[3] = (3 * alphas[0] + 2 * alphas[1] + 2) / 5; // Bit code 011 + alphas[4] = (2 * alphas[0] + 3 * alphas[1] + 2) / 5; // Bit code 100 + alphas[5] = (1 * alphas[0] + 4 * alphas[1] + 2) / 5; // Bit code 101 + alphas[6] = 0x00; // Bit code 110 + alphas[7] = 0xFF; // Bit code 111 + } + + // Note: Have to separate the next two loops, + // it operates on a 6-byte system. + + // First three bytes + //bits = *((ILint*)alphamask); + bits = (alphamask[0]) | (alphamask[1] << 8) | (alphamask[2] << 16); + for (j = 0; j < 2; j++) { + for (i = 0; i < 4; i++) { + // only put pixels out < width or height + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp + 3; + lImage->Data[Offset] = alphas[bits & 0x07]; + } + bits >>= 3; + } + } + + // Last three bytes + //bits = *((ILint*)&alphamask[3]); + bits = (alphamask[3]) | (alphamask[4] << 8) | (alphamask[5] << 16); + for (j = 2; j < 4; j++) { + for (i = 0; i < 4; i++) { + // only put pixels out < width or height + if (((x + i) < lImage->Width) && ((y + j) < lImage->Height)) { + Offset = z * lImage->SizeOfPlane + (y + j) * lImage->Bps + (x + i) * lImage->Bpp + 3; + lImage->Data[Offset] = alphas[bits & 0x07]; + } + bits >>= 3; + } + } + } + } + } + + return IL_TRUE; +} + + +ILboolean Decompress3Dc() +{ + int x, y, z, i, j, k, t1, t2; + ILubyte *Temp, *Temp2; + ILubyte XColours[8], YColours[8]; + ILuint bitmask, bitmask2, Offset, CurrOffset; + + if (!CompData) + return IL_FALSE; + + Temp = CompData; + Offset = 0; + for (z = 0; z < Depth; z++) { + for (y = 0; y < Height; y += 4) { + for (x = 0; x < Width; x += 4) { + Temp2 = Temp + 8; + + //Read Y palette + t1 = YColours[0] = Temp[0]; + t2 = YColours[1] = Temp[1]; + Temp += 2; + if (t1 > t2) + for (i = 2; i < 8; ++i) + YColours[i] = t1 + ((t2 - t1)*(i - 1))/7; + else { + for (i = 2; i < 6; ++i) + YColours[i] = t1 + ((t2 - t1)*(i - 1))/5; + YColours[6] = 0; + YColours[7] = 255; + } + + // Read X palette + t1 = XColours[0] = Temp2[0]; + t2 = XColours[1] = Temp2[1]; + Temp2 += 2; + if (t1 > t2) + for (i = 2; i < 8; ++i) + XColours[i] = t1 + ((t2 - t1)*(i - 1))/7; + else { + for (i = 2; i < 6; ++i) + XColours[i] = t1 + ((t2 - t1)*(i - 1))/5; + XColours[6] = 0; + XColours[7] = 255; + } + + //decompress pixel data + CurrOffset = Offset; + for (k = 0; k < 4; k += 2) { + // First three bytes + bitmask = ((ILuint)(Temp[0]) << 0) | ((ILuint)(Temp[1]) << 8) | ((ILuint)(Temp[2]) << 16); + bitmask2 = ((ILuint)(Temp2[0]) << 0) | ((ILuint)(Temp2[1]) << 8) | ((ILuint)(Temp2[2]) << 16); + for (j = 0; j < 2; j++) { + // only put pixels out < height + if ((y + k + j) < Height) { + for (i = 0; i < 4; i++) { + // only put pixels out < width + if (((x + i) < Width)) { + ILint t, tx, ty; + + t1 = CurrOffset + (x + i)*3; + Image->Data[t1 + 1] = ty = YColours[bitmask & 0x07]; + Image->Data[t1 + 0] = tx = XColours[bitmask2 & 0x07]; + + //calculate b (z) component ((r/255)^2 + (g/255)^2 + (b/255)^2 = 1 + t = 127*128 - (tx - 127)*(tx - 128) - (ty - 127)*(ty - 128); + if (t > 0) + Image->Data[t1 + 2] = (ILubyte)(iSqrt(t) + 128); + else + Image->Data[t1 + 2] = 0x7F; + } + bitmask >>= 3; + bitmask2 >>= 3; + } + CurrOffset += Image->Bps; + } + } + Temp += 3; + Temp2 += 3; + } + + //skip bytes that were read via Temp2 + Temp += 8; + } + Offset += Image->Bps*4; + } + } + + return IL_TRUE; +} + + +ILboolean DecompressAti1n() +{ + int x, y, z, i, j, k, t1, t2; + ILubyte *Temp; + ILubyte Colours[8]; + ILuint bitmask, Offset, CurrOffset; + + if (!CompData) + return IL_FALSE; + + Temp = CompData; + Offset = 0; + for (z = 0; z < Depth; z++) { + for (y = 0; y < Height; y += 4) { + for (x = 0; x < Width; x += 4) { + //Read palette + t1 = Colours[0] = Temp[0]; + t2 = Colours[1] = Temp[1]; + Temp += 2; + if (t1 > t2) + for (i = 2; i < 8; ++i) + Colours[i] = t1 + ((t2 - t1)*(i - 1))/7; + else { + for (i = 2; i < 6; ++i) + Colours[i] = t1 + ((t2 - t1)*(i - 1))/5; + Colours[6] = 0; + Colours[7] = 255; + } + + //decompress pixel data + CurrOffset = Offset; + for (k = 0; k < 4; k += 2) { + // First three bytes + bitmask = ((ILuint)(Temp[0]) << 0) | ((ILuint)(Temp[1]) << 8) | ((ILuint)(Temp[2]) << 16); + for (j = 0; j < 2; j++) { + // only put pixels out < height + if ((y + k + j) < Height) { + for (i = 0; i < 4; i++) { + // only put pixels out < width + if (((x + i) < Width)) { + t1 = CurrOffset + (x + i); + Image->Data[t1] = Colours[bitmask & 0x07]; + } + bitmask >>= 3; + } + CurrOffset += Image->Bps; + } + } + Temp += 3; + } + } + Offset += Image->Bps*4; + } + } + + return IL_TRUE; +} + + +//This is nearly exactly the same as DecompressDXT5... +//I have to clean up this file (put common code in +//helper functions etc) +ILboolean DecompressRXGB() +{ + int x, y, z, i, j, k, Select; + ILubyte *Temp; + Color565 *color_0, *color_1; + Color8888 colours[4], *col; + ILuint bitmask, Offset; + ILubyte alphas[8], *alphamask; + ILuint bits; + + if (!CompData) + return IL_FALSE; + + Temp = CompData; + for (z = 0; z < Depth; z++) { + for (y = 0; y < Height; y += 4) { + for (x = 0; x < Width; x += 4) { + if (y >= Height || x >= Width) + break; + alphas[0] = Temp[0]; + alphas[1] = Temp[1]; + alphamask = Temp + 2; + Temp += 8; + color_0 = ((Color565*)Temp); + color_1 = ((Color565*)(Temp+2)); + bitmask = ((ILuint*)Temp)[1]; + Temp += 8; + + colours[0].r = color_0->nRed << 3; + colours[0].g = color_0->nGreen << 2; + colours[0].b = color_0->nBlue << 3; + colours[0].a = 0xFF; + + colours[1].r = color_1->nRed << 3; + colours[1].g = color_1->nGreen << 2; + colours[1].b = color_1->nBlue << 3; + colours[1].a = 0xFF; + + // Four-color block: derive the other two colors. + // 00 = color_0, 01 = color_1, 10 = color_2, 11 = color_3 + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (2 * colours[0].b + colours[1].b + 1) / 3; + colours[2].g = (2 * colours[0].g + colours[1].g + 1) / 3; + colours[2].r = (2 * colours[0].r + colours[1].r + 1) / 3; + colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + colours[3].a = 0xFF; + + k = 0; + for (j = 0; j < 4; j++) { + for (i = 0; i < 4; i++, k++) { + + Select = (bitmask & (0x03 << k*2)) >> k*2; + col = &colours[Select]; + + // only put pixels out < width or height + if (((x + i) < Width) && ((y + j) < Height)) { + Offset = z * Image->SizeOfPlane + (y + j) * Image->Bps + (x + i) * Image->Bpp; + Image->Data[Offset + 0] = col->r; + Image->Data[Offset + 1] = col->g; + Image->Data[Offset + 2] = col->b; + } + } + } + + // 8-alpha or 6-alpha block? + if (alphas[0] > alphas[1]) { + // 8-alpha block: derive the other six alphas. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + alphas[2] = (6 * alphas[0] + 1 * alphas[1] + 3) / 7; // bit code 010 + alphas[3] = (5 * alphas[0] + 2 * alphas[1] + 3) / 7; // bit code 011 + alphas[4] = (4 * alphas[0] + 3 * alphas[1] + 3) / 7; // bit code 100 + alphas[5] = (3 * alphas[0] + 4 * alphas[1] + 3) / 7; // bit code 101 + alphas[6] = (2 * alphas[0] + 5 * alphas[1] + 3) / 7; // bit code 110 + alphas[7] = (1 * alphas[0] + 6 * alphas[1] + 3) / 7; // bit code 111 + } + else { + // 6-alpha block. + // Bit code 000 = alpha_0, 001 = alpha_1, others are interpolated. + alphas[2] = (4 * alphas[0] + 1 * alphas[1] + 2) / 5; // Bit code 010 + alphas[3] = (3 * alphas[0] + 2 * alphas[1] + 2) / 5; // Bit code 011 + alphas[4] = (2 * alphas[0] + 3 * alphas[1] + 2) / 5; // Bit code 100 + alphas[5] = (1 * alphas[0] + 4 * alphas[1] + 2) / 5; // Bit code 101 + alphas[6] = 0x00; // Bit code 110 + alphas[7] = 0xFF; // Bit code 111 + } + + // Note: Have to separate the next two loops, + // it operates on a 6-byte system. + // First three bytes + bits = *((ILint*)alphamask); + for (j = 0; j < 2; j++) { + for (i = 0; i < 4; i++) { + // only put pixels out < width or height + if (((x + i) < Width) && ((y + j) < Height)) { + Offset = z * Image->SizeOfPlane + (y + j) * Image->Bps + (x + i) * Image->Bpp + 0; + Image->Data[Offset] = alphas[bits & 0x07]; + } + bits >>= 3; + } + } + + // Last three bytes + bits = *((ILint*)&alphamask[3]); + for (j = 2; j < 4; j++) { + for (i = 0; i < 4; i++) { + // only put pixels out < width or height + if (((x + i) < Width) && ((y + j) < Height)) { + Offset = z * Image->SizeOfPlane + (y + j) * Image->Bps + (x + i) * Image->Bpp + 0; + Image->Data[Offset] = alphas[bits & 0x07]; + } + bits >>= 3; + } + } + } + } + } + + return IL_TRUE; +} + + +//Taken from OpenEXR +unsigned int +halfToFloat (unsigned short y) +{ + int s = (y >> 15) & 0x00000001; + int e = (y >> 10) & 0x0000001f; + int m = y & 0x000003ff; + + if (e == 0) + { + if (m == 0) + { + // + // Plus or minus zero + // + return s << 31; + } + else + { + // + // Denormalized number -- renormalize it + // + while (!(m & 0x00000400)) + { + m <<= 1; + e -= 1; + } + + e += 1; + m &= ~0x00000400; + } + } + else if (e == 31) + { + if (m == 0) + { + // + // Positive or negative infinity + // + return (s << 31) | 0x7f800000; + } + else + { + // + // Nan -- preserve sign and significand bits + // + return (s << 31) | 0x7f800000 | (m << 13); + } + } + + // + // Normalized number + // + e = e + (127 - 15); + m = m << 13; + + // + // Assemble s, e and m. + // + return (s << 31) | (e << 23) | m; +} + + +ILboolean iConvFloat16ToFloat32(ILuint* dest, ILushort* src, ILuint size) +{ + ILuint i; + for (i = 0; i < size; ++i, ++dest, ++src) { + //float: 1 sign bit, 8 exponent bits, 23 mantissa bits + //half: 1 sign bit, 5 exponent bits, 10 mantissa bits + *dest = halfToFloat(*src); + } + + return IL_TRUE; +} + + +// Same as iConvFloat16ToFloat32, but we have to set the blue channel to 1.0f. +// The destination format is RGB, and the source is R16G16 (little endian). +ILboolean iConvG16R16ToFloat32(ILuint* dest, ILushort* src, ILuint size) +{ + ILuint i; + for (i = 0; i < size; i += 3) { + //float: 1 sign bit, 8 exponent bits, 23 mantissa bits + //half: 1 sign bit, 5 exponent bits, 10 mantissa bits + *dest++ = halfToFloat(*src++); + *dest++ = halfToFloat(*src++); + *((ILfloat*)dest++) = 1.0f; + } + + return IL_TRUE; +} + + +// Same as iConvFloat16ToFloat32, but we have to set the green and blue channels +// to 1.0f. The destination format is RGB, and the source is R16. +ILboolean iConvR16ToFloat32(ILuint* dest, ILushort* src, ILuint size) +{ + ILuint i; + for (i = 0; i < size; i += 3) { + //float: 1 sign bit, 8 exponent bits, 23 mantissa bits + //half: 1 sign bit, 5 exponent bits, 10 mantissa bits + *dest++ = halfToFloat(*src++); + *((ILfloat*)dest++) = 1.0f; + *((ILfloat*)dest++) = 1.0f; + } + + return IL_TRUE; +} + + +ILboolean DecompressFloat(ILuint lCompFormat) +{ + ILuint i, j, Size; + + switch (lCompFormat) + { + case PF_R32F: // Red float, green = blue = max + Size = Image->Width * Image->Height * Image->Depth * 3; + for (i = 0, j = 0; i < Size; i += 3, j++) { + ((ILfloat*)Image->Data)[i] = ((ILfloat*)CompData)[j]; + ((ILfloat*)Image->Data)[i+1] = 1.0f; + ((ILfloat*)Image->Data)[i+2] = 1.0f; + } + return IL_TRUE; + case PF_A32B32G32R32F: // Direct copy of float RGBA data + memcpy(Image->Data, CompData, Image->SizeOfData); + return IL_TRUE; + case PF_G32R32F: // Red float, green float, blue = max + Size = Image->Width * Image->Height * Image->Depth * 3; + for (i = 0, j = 0; i < Size; i += 3, j += 2) { + ((ILfloat*)Image->Data)[i] = ((ILfloat*)CompData)[j]; + ((ILfloat*)Image->Data)[i+1] = ((ILfloat*)CompData)[j+1]; + ((ILfloat*)Image->Data)[i+2] = 1.0f; + } + return IL_TRUE; + case PF_R16F: // Red float, green = blue = max + return iConvR16ToFloat32((ILuint*)Image->Data, (ILushort*)CompData, + Image->Width * Image->Height * Image->Depth * Image->Bpp); + case PF_A16B16G16R16F: // Just convert from half to float. + return iConvFloat16ToFloat32((ILuint*)Image->Data, (ILushort*)CompData, + Image->Width * Image->Height * Image->Depth * Image->Bpp); + case PF_G16R16F: // Convert from half to float, set blue = max. + return iConvG16R16ToFloat32((ILuint*)Image->Data, (ILushort*)CompData, + Image->Width * Image->Height * Image->Depth * Image->Bpp); + default: + return IL_FALSE; + } +} + + +void CorrectPreMult() +{ + ILuint i; + + for (i = 0; i < Image->SizeOfData; i += 4) { + if (Image->Data[i+3] != 0) { // Cannot divide by 0. + Image->Data[i] = (ILubyte)(((ILuint)Image->Data[i] << 8) / Image->Data[i+3]); + Image->Data[i+1] = (ILubyte)(((ILuint)Image->Data[i+1] << 8) / Image->Data[i+3]); + Image->Data[i+2] = (ILubyte)(((ILuint)Image->Data[i+2] << 8) / Image->Data[i+3]); + } + } + + return; +} + + +ILboolean DecompressARGB(ILuint CompFormat) +{ + ILuint ReadI = 0, TempBpp, i; + ILuint RedL, RedR; + ILuint GreenL, GreenR; + ILuint BlueL, BlueR; + ILuint AlphaL, AlphaR; + ILubyte *Temp; + + if (Has16BitComponents) + return DecompressARGB16(CompFormat); + + if (!CompData) + return IL_FALSE; + + if (CompFormat == PF_LUMINANCE && Head.RGBBitCount == 16 && Head.RBitMask == 0xFFFF) { //HACK + memcpy(Image->Data, CompData, Image->SizeOfData); + return IL_TRUE; + } + + GetBitsFromMask(Head.RBitMask, &RedL, &RedR); + GetBitsFromMask(Head.GBitMask, &GreenL, &GreenR); + GetBitsFromMask(Head.BBitMask, &BlueL, &BlueR); + GetBitsFromMask(Head.RGBAlphaBitMask, &AlphaL, &AlphaR); + Temp = CompData; + TempBpp = Head.RGBBitCount / 8; + + for (i = 0; i < Image->SizeOfData; i += Image->Bpp) { + + //@TODO: This is SLOOOW... + //but the old version crashed in release build under + //winxp (and xp is right to stop this code - I always + //wondered that it worked the old way at all) + if (Image->SizeOfData - i < 4) { //less than 4 byte to write? + if (TempBpp == 3) { //this branch is extra-SLOOOW + ReadI = + *Temp + | ((*(Temp + 1)) << 8) + | ((*(Temp + 2)) << 16); + } + else if (TempBpp == 1) + ReadI = *((ILubyte*)Temp); + else if (TempBpp == 2) + ReadI = Temp[0] | (Temp[1] << 8); + } + else + ReadI = Temp[0] | (Temp[1] << 8) | (Temp[2] << 16) | (Temp[3] << 24); + Temp += TempBpp; + + Image->Data[i] = ((ReadI & Head.RBitMask) >> RedR) << RedL; + + if (Image->Bpp >= 3) { + Image->Data[i+1] = ((ReadI & Head.GBitMask) >> GreenR) << GreenL; + Image->Data[i+2] = ((ReadI & Head.BBitMask) >> BlueR) << BlueL; + + if (Image->Bpp == 4) { + Image->Data[i+3] = ((ReadI & Head.RGBAlphaBitMask) >> AlphaR) << AlphaL; + if (AlphaL >= 7) { + Image->Data[i+3] = Image->Data[i+3] ? 0xFF : 0x00; + } + else if (AlphaL >= 4) { + Image->Data[i+3] = Image->Data[i+3] | (Image->Data[i+3] >> 4); + } + } + } + else if (Image->Bpp == 2) { + Image->Data[i+1] = ((ReadI & Head.RGBAlphaBitMask) >> AlphaR) << AlphaL; + if (AlphaL >= 7) { + Image->Data[i+1] = Image->Data[i+1] ? 0xFF : 0x00; + } + else if (AlphaL >= 4) { + Image->Data[i+1] = Image->Data[i+1] | (Image->Data[i+3] >> 4); + } + } + } + + return IL_TRUE; +} + + +// This function simply counts how many contiguous bits are in the mask. +ILuint CountBitsFromMask(ILuint Mask) +{ + ILuint i, TestBit = 0x01, Count = 0; + ILboolean FoundBit = IL_FALSE; + + for (i = 0; i < 32; i++, TestBit <<= 1) { + if (Mask & TestBit) { + if (!FoundBit) + FoundBit = IL_TRUE; + Count++; + } + else if (FoundBit) + return Count; + } + + return Count; +} + + +// Same as DecompressARGB, but it works on images with more than 8 bits +// per channel, such as a2r10g10b10 and a2b10g10r10. +ILboolean DecompressARGB16(ILuint CompFormat) +{ + ILuint ReadI = 0, TempBpp, i; + ILuint RedL, RedR; + ILuint GreenL, GreenR; + ILuint BlueL, BlueR; + ILuint AlphaL, AlphaR; + ILuint RedPad, GreenPad, BluePad, AlphaPad; + ILubyte *Temp; + + if (!CompData) + return IL_FALSE; + + GetBitsFromMask(Head.RBitMask, &RedL, &RedR); + GetBitsFromMask(Head.GBitMask, &GreenL, &GreenR); + GetBitsFromMask(Head.BBitMask, &BlueL, &BlueR); + GetBitsFromMask(Head.RGBAlphaBitMask, &AlphaL, &AlphaR); + RedPad = 16 - CountBitsFromMask(Head.RBitMask); + GreenPad = 16 - CountBitsFromMask(Head.GBitMask); + BluePad = 16 - CountBitsFromMask(Head.BBitMask); + AlphaPad = 16 - CountBitsFromMask(Head.RGBAlphaBitMask); + + RedL = RedL + RedPad; + GreenL = GreenL + GreenPad; + BlueL = BlueL + BluePad; + AlphaL = AlphaL + AlphaPad; + + Temp = CompData; + TempBpp = Head.RGBBitCount / 8; + + for (i = 0; i < Image->SizeOfData / 2; i += Image->Bpp) { + + //@TODO: This is SLOOOW... + //but the old version crashed in release build under + //winxp (and xp is right to stop this code - I always + //wondered that it worked the old way at all) + if (Image->SizeOfData - i < 4) { //less than 4 byte to write? + if (TempBpp == 3) { //this branch is extra-SLOOOW + ReadI = + *Temp + | ((*(Temp + 1)) << 8) + | ((*(Temp + 2)) << 16); + } + else if (TempBpp == 1) + ReadI = *((ILubyte*)Temp); + else if (TempBpp == 2) + ReadI = Temp[0] | (Temp[1] << 8); + } + else + ReadI = Temp[0] | (Temp[1] << 8) | (Temp[2] << 16) | (Temp[3] << 24); + Temp += TempBpp; + + ((ILushort*)Image->Data)[i+2] = ((ReadI & Head.RBitMask) >> RedR) << RedL; + + if (Image->Bpp >= 3) { + ((ILushort*)Image->Data)[i+1] = ((ReadI & Head.GBitMask) >> GreenR) << GreenL; + ((ILushort*)Image->Data)[i] = ((ReadI & Head.BBitMask) >> BlueR) << BlueL; + + if (Image->Bpp == 4) { + ((ILushort*)Image->Data)[i+3] = ((ReadI & Head.RGBAlphaBitMask) >> AlphaR) << AlphaL; + if (AlphaL >= 7) { + ((ILushort*)Image->Data)[i+3] = ((ILushort*)Image->Data)[i+3] ? 0xFF : 0x00; + } + else if (AlphaL >= 4) { + ((ILushort*)Image->Data)[i+3] = ((ILushort*)Image->Data)[i+3] | (((ILushort*)Image->Data)[i+3] >> 4); + } + } + } + else if (Image->Bpp == 2) { + ((ILushort*)Image->Data)[i+1] = ((ReadI & Head.RGBAlphaBitMask) >> AlphaR) << AlphaL; + if (AlphaL >= 7) { + ((ILushort*)Image->Data)[i+1] = ((ILushort*)Image->Data)[i+1] ? 0xFF : 0x00; + } + else if (AlphaL >= 4) { + ((ILushort*)Image->Data)[i+1] = ((ILushort*)Image->Data)[i+1] | (Image->Data[i+3] >> 4); + } + } + } + + return IL_TRUE; +} + + +// @TODO: Look at using the BSF/BSR operands for inline ASM here. +void GetBitsFromMask(ILuint Mask, ILuint *ShiftLeft, ILuint *ShiftRight) +{ + ILuint Temp, i; + + if (Mask == 0) { + *ShiftLeft = *ShiftRight = 0; + return; + } + + Temp = Mask; + for (i = 0; i < 32; i++, Temp >>= 1) { + if (Temp & 1) + break; + } + *ShiftRight = i; + + // Temp is preserved, so use it again: + for (i = 0; i < 8; i++, Temp >>= 1) { + if (!(Temp & 1)) + break; + } + *ShiftLeft = 8 - i; + + return; +} + + +// +// +// DXT extension code +// +// +ILubyte* ILAPIENTRY ilGetDxtcData() +{ + if (iCurImage == NULL) { + ilSetError(IL_INTERNAL_ERROR); + return NULL; + } + return iCurImage->DxtcData; +} + +void ilFreeSurfaceDxtcData() +{ + if (iCurImage != NULL && iCurImage->DxtcData != NULL) { + ifree(iCurImage->DxtcData); + iCurImage->DxtcData = NULL; + iCurImage->DxtcSize = 0; + iCurImage->DxtcFormat = IL_DXT_NO_COMP; + } +} + +void ilFreeImageDxtcData() +{ + ILint i, j; + ILuint ImgID = ilGetInteger(IL_CUR_IMAGE); + ILint ImgCount = ilGetInteger(IL_NUM_IMAGES); + ILint MipCount; + + for(i = 0; i <= ImgCount; ++i) { + ilBindImage(ImgID); + ilActiveImage(i); + + MipCount = ilGetInteger(IL_NUM_MIPMAPS); + for(j = 0; j <= MipCount; ++j) { + ilBindImage(ImgID); + ilActiveImage(i); + ilActiveMipmap(j); + + ilFreeSurfaceDxtcData(); + } + } +} + +/* + * This assumes DxtcData, DxtcFormat, width, height, and depth are valid + */ +ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface() +{ + ILuint CompFormat; + + if (iCurImage == NULL || iCurImage->DxtcData == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (!(iCurImage->DxtcFormat == IL_DXT1 || iCurImage->DxtcFormat == IL_DXT3 + || iCurImage->DxtcFormat == IL_DXT5)) { + ilSetError(IL_INVALID_PARAM); //TODO + return IL_FALSE; + } + + //@TODO: is this right for all dxt formats? works for + // DXT1, 3, 5 + iCurImage->Bpp = 4; + iCurImage->Bpc = 1; + iCurImage->Bps = iCurImage->Width*iCurImage->Bpp*iCurImage->Bpc; + iCurImage->SizeOfPlane = iCurImage->Height*iCurImage->Bps; + iCurImage->Format = IL_RGBA; + iCurImage->Type = IL_UNSIGNED_BYTE; + + if (iCurImage->SizeOfData != iCurImage->SizeOfPlane*iCurImage->Depth) { + iCurImage->SizeOfData = iCurImage->Depth*iCurImage->SizeOfPlane; + if (iCurImage->Data != NULL) + ifree(iCurImage->Data); + iCurImage->Data = NULL; + } + + if (iCurImage->Data == NULL) { + iCurImage->Data = ialloc(iCurImage->SizeOfData); + } + + Image = iCurImage; + Width = iCurImage->Width; + Height = iCurImage->Height; + Depth = iCurImage->Depth; + switch(iCurImage->DxtcFormat) + { + case IL_DXT1: CompFormat = PF_DXT1; break; + case IL_DXT3: CompFormat = PF_DXT3; break; + case IL_DXT5: CompFormat = PF_DXT5; break; + } + CompData = iCurImage->DxtcData; + DdsDecompress(CompFormat); //globals suck...fix this + + //@TODO: origin should be set in Decompress()... + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + return ilFixCur(); +} + + +ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage() +{ + ILint i, j; + ILuint ImgID = ilGetInteger(IL_CUR_IMAGE); + ILint ImgCount = ilGetInteger(IL_NUM_IMAGES); + ILint MipCount; + ILboolean ret = IL_TRUE; + + for(i = 0; i <= ImgCount; ++i) { + ilBindImage(ImgID); + ilActiveImage(i); + + MipCount = ilGetInteger(IL_NUM_MIPMAPS); + for(j = 0; j <= MipCount; ++j) { + ilBindImage(ImgID); + ilActiveImage(i); + ilActiveMipmap(j); + + if (!ilDxtcDataToSurface()) + ret = IL_FALSE; + } + } + ilBindImage(ImgID); + + return ret; +} + + +ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format) +{ + ILuint Size; + void* Data; + ilFreeSurfaceDxtcData(); + + Size = ilGetDXTCData(NULL, 0, Format); + if (Size == 0) { + return IL_FALSE; + } + + Data = ialloc(Size); + + if (Data == NULL) + return IL_FALSE; + + ilGetDXTCData(Data, Size, Format); + + //These have to be after the call to ilGetDXTCData() + iCurImage->DxtcData = Data; + iCurImage->DxtcFormat = Format; + iCurImage->DxtcSize = Size; + + return IL_TRUE; +} + + +ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format) +{ + ILint i, j; + ILuint ImgID = ilGetInteger(IL_CUR_IMAGE); + ILint ImgCount = ilGetInteger(IL_NUM_IMAGES); + ILint MipCount; + ILboolean ret = IL_TRUE; + + for (i = 0; i <= ImgCount; ++i) { + ilBindImage(ImgID); + ilActiveImage(i); + + MipCount = ilGetInteger(IL_NUM_MIPMAPS); + for(j = 0; j <= MipCount; ++j) { + ilBindImage(ImgID); + ilActiveImage(i); + ilActiveMipmap(j); + + if (!ilSurfaceToDxtcData(Format)) + ret = IL_FALSE; + } + } + + return ret; +} + + +//works like ilTexImage(), ie. destroys mipmaps etc (which sucks, but +//is consistent. There should be a ilTexSurface() and ilTexSurfaceDxtc() +//functions as well, but for now this is sufficient) +ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data) +{ + ILimage* Image = iCurImage; + + ILint xBlocks, yBlocks, BlockSize, LineSize, DataSize; + + + //The next few lines are copied from ilTexImage() and ilInitImage() - + //should be factored in more reusable functions... + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //// + + // Not sure if we should be getting rid of the palette... + if (Image->Pal.Palette && Image->Pal.PalSize && Image->Pal.PalType != IL_PAL_NONE) { + ifree(Image->Pal.Palette); + } + + // These are set NULL later by the memset call. + ilCloseImage(Image->Mipmaps); + ilCloseImage(Image->Next); + ilCloseImage(Image->Faces); + ilCloseImage(Image->Layers); + + if (Image->AnimList) ifree(Image->AnimList); + if (Image->Profile) ifree(Image->Profile); + if (Image->DxtcData) ifree(Image->DxtcData); + if (Image->Data) ifree(Image->Data); + + + //// + + memset(Image, 0, sizeof(ILimage)); + Image->Width = w; + Image->Height = h; + Image->Depth = d; + + //TODO: What about origin with dxtc data? + Image->Origin = IL_ORIGIN_LOWER_LEFT; + Image->Pal.PalType = IL_PAL_NONE; + + // Allocate DXT data buffer + xBlocks = (w + 3)/4; + yBlocks = (h + 3)/4; + if (DxtFormat == IL_DXT1) + BlockSize = 8; + else + BlockSize = 16; + + LineSize = xBlocks * BlockSize; + + DataSize = yBlocks * LineSize * d; + + Image->DxtcFormat = DxtFormat; + Image->DxtcSize = DataSize; + Image->DxtcData = ialloc(DataSize); + + if (Image->DxtcData == NULL) { + return IL_FALSE; + } + + if (data != NULL) + memcpy(Image->DxtcData, data, DataSize); + + return IL_TRUE; +} + + +/* ------------------------------------------------------------------- */ + +void iFlipColorBlock(ILubyte *data) +{ + ILubyte tmp; + + tmp = data[4]; + data[4] = data[7]; + data[7] = tmp; + + tmp = data[5]; + data[5] = data[6]; + data[6] = tmp; +} + +void iFlipSimpleAlphaBlock(ILushort *data) +{ + ILushort tmp; + + tmp = data[0]; + data[0] = data[3]; + data[3] = tmp; + + tmp = data[1]; + data[1] = data[2]; + data[2] = tmp; +} + +void iComplexAlphaHelper(ILubyte* Data) +{ + ILushort tmp[2]; + + //one 4 pixel line is 12 bit, copy each line into + //a ushort, swap them and copy back + tmp[0] = (Data[0] | (Data[1] << 8)) & 0xfff; + tmp[1] = ((Data[1] >> 4) | (Data[2] << 4)) & 0xfff; + + Data[0] = (ILubyte)tmp[1]; + Data[1] = (tmp[1] >> 8) | (tmp[0] << 4); + Data[2] = tmp[0] >> 4; +} + +void iFlipComplexAlphaBlock(ILubyte *Data) +{ + ILubyte tmp[3]; + Data += 2; //Skip 'palette' + + //swap upper two rows with lower two rows + memcpy(tmp, Data, 3); + memcpy(Data, Data + 3, 3); + memcpy(Data + 3, tmp, 3); + + //swap 1st with 2nd row, 3rd with 4th + iComplexAlphaHelper(Data); + iComplexAlphaHelper(Data + 3); +} + +void iFlipDxt1(ILubyte* data, ILuint count) +{ + ILuint i; + + for (i = 0; i < count; ++i) { + iFlipColorBlock(data); + data += 8; //advance to next block + } +} + +void iFlipDxt3(ILubyte* data, ILuint count) +{ + ILuint i; + for (i = 0; i < count; ++i) { + iFlipSimpleAlphaBlock((ILushort*)data); + iFlipColorBlock(data + 8); + data += 16; //advance to next block + } +} + +void iFlipDxt5(ILubyte* data, ILuint count) +{ + ILuint i; + for (i = 0; i < count; ++i) { + iFlipComplexAlphaBlock(data); + iFlipColorBlock(data + 8); + data += 16; //advance to next block + } +} + +void iFlip3dc(ILubyte* data, ILuint count) +{ + ILuint i; + for (i = 0; i < count; ++i) { + iFlipComplexAlphaBlock(data); + iFlipComplexAlphaBlock(data + 8); + data += 16; //advance to next block + } +} + + +ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData() +{ + ILuint y, z; + ILuint BlockSize, LineSize; + ILubyte *Temp, *Runner, *Top, *Bottom; + ILuint numXBlocks, numYBlocks; + void (*FlipBlocks)(ILubyte* data, ILuint count); + + if (iCurImage == NULL || iCurImage->DxtcData == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + + numXBlocks = (iCurImage->Width + 3)/4; + numYBlocks = (iCurImage->Height + 3)/4; + + switch (iCurImage->DxtcFormat) + { + case IL_DXT1: + BlockSize = 8; + FlipBlocks = iFlipDxt1; + break; + case IL_DXT2: + case IL_DXT3: + BlockSize = 16; + FlipBlocks = iFlipDxt3; + break; + case IL_DXT4: + case IL_DXT5: + case IL_RXGB: + BlockSize = 16; + FlipBlocks = iFlipDxt5; + break; + case IL_3DC: + BlockSize = 16; + FlipBlocks = iFlip3dc; + break; + default: + ilSetError(IL_INVALID_PARAM); + return; + } + + LineSize = numXBlocks * BlockSize; + Temp = ialloc(LineSize); + + if (Temp == NULL) + return; + + Runner = iCurImage->DxtcData; + for (z = 0; z < iCurImage->Depth; ++z) { + Top = Runner; + Bottom = Runner + (numYBlocks - 1)*LineSize; + + for (y = 0; y < numYBlocks/2; ++y) { + //swap block row + memcpy(Temp, Top, LineSize); + memcpy(Top, Bottom, LineSize); + memcpy(Bottom, Temp, LineSize); + + + //swap blocks + FlipBlocks(Top, numXBlocks); + FlipBlocks(Bottom, numXBlocks); + + Top += LineSize; + Bottom -= LineSize; + } + + //middle line + if (numYBlocks % 2 != 0) + FlipBlocks(Top, numXBlocks); + + Runner += LineSize * numYBlocks; + } + + ifree(Temp); +} + +/**********************************************************************/ + +void iInvertDxt3Alpha(ILubyte *data) +{ + ILint i; + + for (i = 0; i < 8; ++i) { + /* + ILubyte b, t1, t2; + b = data[i]; + + t1 = b & 0xf; + t1 = 15 - t1; + t2 = b >> 4; + t2 = 15 - t2; + + data[i] = (t2 << 4) | t1; + */ + //simpler: + data[i] = ~data[i]; + } +} + +void iInvertDxt5Alpha(ILubyte *data) +{ + ILubyte a0, a1; + ILint i, j; + const ILubyte map1[] = { 1, 0, 7, 6, 5, 4, 3, 2 }; + const ILubyte map2[] = { 1, 0, 5, 4, 3, 2, 7, 6 }; + + + a0 = data[0]; + a1 = data[1]; + + //a0 > a1 <=> 255 - a0 < 255 - a1. Because of this, + //a1 and a2 have to be swapped, and the indices + //have to be changed as well. + + //invert and swap alpha + data[0] = 255 - a1; + data[1] = 255 - a0; + data += 2; + + //fix indices + for (i = 0; i < 6; i += 3) { + ILuint in = data[i] | (data[i+1] << 8) | (data[i+2] << 16); + ILuint out = 0; + + for (j = 0; j < 24; j += 3) { + ILubyte b = (in >> j) & 0x7; + + if (a0 > a1) + b = map1[b]; + else + b = map2[b]; + + out |= b << j; + } + + data[i] = out; + data[i+1] = out >> 8; + data[i+2] = out >> 16; + } +} + + +ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha() +{ + ILint i; + ILuint BlockSize; + ILubyte *Runner; + ILint numXBlocks, numYBlocks, numBlocks; + void (*InvertAlpha)(ILubyte* data); + + if (iCurImage == NULL || iCurImage->DxtcData == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + numXBlocks = (iCurImage->Width + 3)/4; + numYBlocks = (iCurImage->Height + 3)/4; + numBlocks = numXBlocks*numYBlocks*iCurImage->Depth; + BlockSize = 16; + + switch (iCurImage->DxtcFormat) + { + case IL_DXT3: + InvertAlpha = iInvertDxt3Alpha; + break; + case IL_DXT5: + InvertAlpha = iInvertDxt5Alpha; + break; + default: + //DXT2/4 are not supported yet because nobody + //uses them anyway and I would have to change + //the color blocks as well... + //DXT1 is not supported because DXT1 alpha is + //seldom used and it's not easily invertable. + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + Runner = iCurImage->DxtcData; + for (i = 0; i < numBlocks; ++i, Runner += BlockSize) { + InvertAlpha(Runner); + } + + return IL_TRUE; +} + + + + +#endif//IL_NO_DDS diff --git a/libs/DevIL-1.7.8/src-IL/src/il_devil.c b/libs/DevIL-1.7.8/src-IL/src/il_devil.c new file mode 100644 index 00000000..88327dfc --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_devil.c @@ -0,0 +1,1069 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/01/2009 +// +// Filename: src-IL/src/il_devil.c +// +// Description: Functions for working with the ILimage's and the current image +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include +#include +#include "il_manip.h" + + +ILAPI ILboolean ILAPIENTRY ilInitImage(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) +{ + ILubyte BpcType = ilGetBpcType(Type); + if (BpcType == 0) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + memset(Image, 0, sizeof(ILimage)); + + //// + if (Width == 0) Width = 1; + if (Height == 0) Height = 1; + if (Depth == 0) Depth = 1; + Image->Width = Width; + Image->Height = Height; + Image->Depth = Depth; + Image->Bpp = Bpp; + Image->Bpc = BpcType; + Image->Bps = Width * Bpp * Image->Bpc; + Image->SizeOfPlane = Image->Bps * Height; + Image->SizeOfData = Image->SizeOfPlane * Depth; + Image->Format = Format; + Image->Type = Type; + Image->Origin = IL_ORIGIN_LOWER_LEFT; + Image->Pal.PalType = IL_PAL_NONE; + Image->DxtcFormat = IL_DXT_NO_COMP; + Image->DxtcData = NULL; + + Image->Data = (ILubyte*)ialloc(Image->SizeOfData); + if (Image->Data == NULL) { + return IL_FALSE; + } + + if (Data != NULL) { + memcpy(Image->Data, Data, Image->SizeOfData); + } + + return IL_TRUE; +} + + + +// Creates a new ILimage based on the specifications given +ILAPI ILimage* ILAPIENTRY ilNewImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc) +{ + ILimage *Image; + + if (Bpp == 0 || Bpp > 4) { + return NULL; + } + + Image = (ILimage*)ialloc(sizeof(ILimage)); + if (Image == NULL) { + return NULL; + } + + if (!ilInitImage(Image, Width, Height, Depth, Bpp, ilGetFormatBpp(Bpp), ilGetTypeBpc(Bpc), NULL)) { + if (Image->Data != NULL) { + ifree(Image->Data); + } + ifree(Image); + return NULL; + } + + return Image; +} + + +// Same as above but allows specification of Format and Type +ILAPI ILimage* ILAPIENTRY ilNewImageFull(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) +{ + ILimage *Image; + + if (Bpp == 0 || Bpp > 4) { + return NULL; + } + + Image = (ILimage*)ialloc(sizeof(ILimage)); + if (Image == NULL) { + return NULL; + } + + if (!ilInitImage(Image, Width, Height, Depth, Bpp, Format, Type, Data)) { + if (Image->Data != NULL) { + ifree(Image->Data); + } + ifree(Image); + return NULL; + } + + return Image; +} + + +//! Changes the current bound image to use these new dimensions (current data is destroyed). +/*! \param Width Specifies the new image width. This cannot be 0. + \param Height Specifies the new image height. This cannot be 0. + \param Depth Specifies the new image depth. This cannot be 0. + \param Bpp Number of channels (ex. 3 for RGB) + \param Format Enum of the desired format. Any format values are accepted. + \param Type Enum of the desired type. Any type values are accepted. + \param Data Specifies data that should be copied to the new image. If this parameter is NULL, no data is copied, and the new image data consists of undefined values. + \exception IL_ILLEGAL_OPERATION No currently bound image. + \exception IL_INVALID_PARAM One of the parameters is incorrect, such as one of the dimensions being 0. + \exception IL_OUT_OF_MEMORY Could not allocate enough memory. + \return Boolean value of failure or success*/ +ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) +{ + return ilTexImage_(iCurImage, Width, Height, Depth, Bpp, Format, Type, Data); +} + + +// Internal version of ilTexImage. +ILAPI ILboolean ILAPIENTRY ilTexImage_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) +{ + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //// + + // Not sure if we should be getting rid of the palette... + if (Image->Pal.Palette && Image->Pal.PalSize && Image->Pal.PalType != IL_PAL_NONE) { + ifree(Image->Pal.Palette); + } + + ilCloseImage(Image->Mipmaps); + ilCloseImage(Image->Next); + ilCloseImage(Image->Faces); + ilCloseImage(Image->Layers); + + if (Image->AnimList) ifree(Image->AnimList); + if (Image->Profile) ifree(Image->Profile); + if (Image->DxtcData) ifree(Image->DxtcData); + if (Image->Data) ifree(Image->Data); + + //// + + //@TODO: Also check against format? + /*if (Width == 0 || Height == 0 || Depth == 0 || Bpp == 0) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + }*/ + + return ilInitImage(Image, Width, Height, Depth, Bpp, Format, Type, Data); +} + + +//! Uploads Data of the same size to replace the current image's data. +/*! \param Data New image data to update the currently bound image + \exception IL_ILLEGAL_OPERATION No currently bound image + \exception IL_INVALID_PARAM Data was NULL. + \return Boolean value of failure or success +*/ +ILboolean ILAPIENTRY ilSetData(void *Data) +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + return ilTexSubImage_(iCurImage, Data); +} + + +// Internal version of ilTexSubImage. +ILAPI ILboolean ILAPIENTRY ilTexSubImage_(ILimage *Image, void *Data) +{ + if (Image == NULL || Data == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + if (!Image->Data) { + Image->Data = (ILubyte*)ialloc(Image->SizeOfData); + if (Image->Data == NULL) + return IL_FALSE; + } + memcpy(Image->Data, Data, Image->SizeOfData); + return IL_TRUE; +} + + +//! Returns a pointer to the current image's data. +/*! The pointer to the image data returned by this function is only valid until any + operations are done on the image. After any operations, this function should be + called again. The pointer can be cast to other types for images that have more + than one byte per channel for easier access to data. + \exception IL_ILLEGAL_OPERATION No currently bound image + \return ILubyte pointer to image data.*/ +ILubyte* ILAPIENTRY ilGetData(void) +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + return iCurImage->Data; +} + + +//! Returns a pointer to the current image's palette data. +/*! The pointer to the image palette data returned by this function is only valid until + any operations are done on the image. After any operations, this function should be + called again. + \exception IL_ILLEGAL_OPERATION No currently bound image + \return ILubyte pointer to image palette data.*/ +ILubyte* ILAPIENTRY ilGetPalette(void) +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + return iCurImage->Pal.Palette; +} + + +//ILfloat ClearRed = 0.0f, ClearGreen = 0.0f, ClearBlue = 0.0f, ClearAlpha = 0.0f; + +// Changed to the colour of the Universe +// (http://www.newscientist.com/news/news.jsp?id=ns99991775) +// *(http://www.space.com/scienceastronomy/universe_color_020308.html)* +//ILfloat ClearRed = 0.269f, ClearGreen = 0.388f, ClearBlue = 0.342f, ClearAlpha = 0.0f; +static ILfloat ClearRed = 1.0f; +static ILfloat ClearGreen = 0.972549f; +static ILfloat ClearBlue = 0.90588f; +static ILfloat ClearAlpha = 0.0f; +static ILfloat ClearLum = 1.0f; + +void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha) +{ + // Clamp to 0.0f - 1.0f. + ClearRed = Red < 0.0f ? 0.0f : (Red > 1.0f ? 1.0f : Red); + ClearGreen = Green < 0.0f ? 0.0f : (Green > 1.0f ? 1.0f : Green); + ClearBlue = Blue < 0.0f ? 0.0f : (Blue > 1.0f ? 1.0f : Blue); + ClearAlpha = Alpha < 0.0f ? 0.0f : (Alpha > 1.0f ? 1.0f : Alpha); + + if ((Red == Green) && (Red == Blue) && (Green == Blue)) { + ClearLum = Red < 0.0f ? 0.0f : (Red > 1.0f ? 1.0f : Red); + } + else { + ClearLum = 0.212671f * ClearRed + 0.715160f * ClearGreen + 0.072169f * ClearBlue; + ClearLum = ClearLum < 0.0f ? 0.0f : (ClearLum > 1.0f ? 1.0f : ClearLum); + } + + return; +} + + +ILAPI void ILAPIENTRY ilGetClear(void *Colours, ILenum Format, ILenum Type) +{ + ILubyte *BytePtr; + ILushort *ShortPtr; + ILuint *IntPtr; + ILfloat *FloatPtr; + ILdouble *DblPtr; + + switch (Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + BytePtr = (ILubyte*)Colours; + switch (Format) + { + case IL_RGB: + BytePtr[0] = (ILubyte)(ClearRed * UCHAR_MAX); + BytePtr[1] = (ILubyte)(ClearGreen * UCHAR_MAX); + BytePtr[2] = (ILubyte)(ClearBlue * UCHAR_MAX); + break; + + case IL_RGBA: + BytePtr[0] = (ILubyte)(ClearRed * UCHAR_MAX); + BytePtr[1] = (ILubyte)(ClearGreen * UCHAR_MAX); + BytePtr[2] = (ILubyte)(ClearBlue * UCHAR_MAX); + BytePtr[3] = (ILubyte)(ClearAlpha * UCHAR_MAX); + break; + + case IL_BGR: + BytePtr[2] = (ILubyte)(ClearRed * UCHAR_MAX); + BytePtr[1] = (ILubyte)(ClearGreen * UCHAR_MAX); + BytePtr[0] = (ILubyte)(ClearBlue * UCHAR_MAX); + BytePtr[3] = (ILubyte)(ClearAlpha * UCHAR_MAX); + break; + + case IL_BGRA: + BytePtr[2] = (ILubyte)(ClearRed * UCHAR_MAX); + BytePtr[1] = (ILubyte)(ClearGreen * UCHAR_MAX); + BytePtr[0] = (ILubyte)(ClearBlue * UCHAR_MAX); + BytePtr[3] = (ILubyte)(ClearAlpha * UCHAR_MAX); + break; + + case IL_LUMINANCE: + BytePtr[0] = (ILubyte)(ClearAlpha * UCHAR_MAX); + break; + + case IL_LUMINANCE_ALPHA: + BytePtr[0] = (ILubyte)(ClearLum * UCHAR_MAX); + BytePtr[1] = (ILubyte)(ClearAlpha * UCHAR_MAX); + + case IL_COLOUR_INDEX: + BytePtr[0] = (ILubyte)(ClearAlpha * UCHAR_MAX); + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + ShortPtr = (ILushort*)Colours; + switch (Format) + { + case IL_RGB: + ShortPtr[0] = (ILushort)(ClearRed * USHRT_MAX); + ShortPtr[1] = (ILushort)(ClearGreen * USHRT_MAX); + ShortPtr[2] = (ILushort)(ClearBlue * USHRT_MAX); + break; + + case IL_RGBA: + ShortPtr[0] = (ILushort)(ClearRed * USHRT_MAX); + ShortPtr[1] = (ILushort)(ClearGreen * USHRT_MAX); + ShortPtr[2] = (ILushort)(ClearBlue * USHRT_MAX); + ShortPtr[3] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + case IL_BGR: + ShortPtr[2] = (ILushort)(ClearRed * USHRT_MAX); + ShortPtr[1] = (ILushort)(ClearGreen * USHRT_MAX); + ShortPtr[0] = (ILushort)(ClearBlue * USHRT_MAX); + ShortPtr[3] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + case IL_BGRA: + ShortPtr[2] = (ILushort)(ClearRed * USHRT_MAX); + ShortPtr[1] = (ILushort)(ClearGreen * USHRT_MAX); + ShortPtr[0] = (ILushort)(ClearBlue * USHRT_MAX); + ShortPtr[3] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + case IL_LUMINANCE: + ShortPtr[0] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + case IL_LUMINANCE_ALPHA: + ShortPtr[0] = (ILushort)(ClearLum * USHRT_MAX); + ShortPtr[1] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + case IL_COLOUR_INDEX: + ShortPtr[0] = (ILushort)(ClearAlpha * USHRT_MAX); + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + IntPtr = (ILuint*)Colours; + switch (Format) + { + case IL_RGB: + IntPtr[0] = (ILuint)(ClearRed * UINT_MAX); + IntPtr[1] = (ILuint)(ClearGreen * UINT_MAX); + IntPtr[2] = (ILuint)(ClearBlue * UINT_MAX); + break; + + case IL_RGBA: + IntPtr[0] = (ILuint)(ClearRed * UINT_MAX); + IntPtr[1] = (ILuint)(ClearGreen * UINT_MAX); + IntPtr[2] = (ILuint)(ClearBlue * UINT_MAX); + IntPtr[3] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + case IL_BGR: + IntPtr[2] = (ILuint)(ClearRed * UINT_MAX); + IntPtr[1] = (ILuint)(ClearGreen * UINT_MAX); + IntPtr[0] = (ILuint)(ClearBlue * UINT_MAX); + IntPtr[3] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + case IL_BGRA: + IntPtr[2] = (ILuint)(ClearRed * UINT_MAX); + IntPtr[1] = (ILuint)(ClearGreen * UINT_MAX); + IntPtr[0] = (ILuint)(ClearBlue * UINT_MAX); + IntPtr[3] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + case IL_LUMINANCE: + IntPtr[0] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + case IL_LUMINANCE_ALPHA: + IntPtr[0] = (ILuint)(ClearLum * UINT_MAX); + IntPtr[1] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + case IL_COLOUR_INDEX: + IntPtr[0] = (ILuint)(ClearAlpha * UINT_MAX); + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + break; + + case IL_FLOAT: + FloatPtr = (ILfloat*)Colours; + switch (Format) + { + case IL_RGB: + FloatPtr[0] = ClearRed; + FloatPtr[1] = ClearGreen; + FloatPtr[2] = ClearBlue; + break; + + case IL_RGBA: + FloatPtr[0] = ClearRed; + FloatPtr[1] = ClearGreen; + FloatPtr[2] = ClearBlue; + FloatPtr[3] = ClearAlpha; + break; + + case IL_BGR: + FloatPtr[2] = ClearRed; + FloatPtr[1] = ClearGreen; + FloatPtr[0] = ClearBlue; + FloatPtr[3] = ClearAlpha; + break; + + case IL_BGRA: + FloatPtr[2] = ClearRed; + FloatPtr[1] = ClearGreen; + FloatPtr[0] = ClearBlue; + FloatPtr[3] = ClearAlpha; + break; + + case IL_LUMINANCE: + FloatPtr[0] = ClearAlpha; + break; + + case IL_LUMINANCE_ALPHA: + FloatPtr[0] = ClearLum; + FloatPtr[0] = ClearAlpha; + break; + + case IL_COLOUR_INDEX: + FloatPtr[0] = ClearAlpha; + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + break; + + case IL_DOUBLE: + DblPtr = (ILdouble*)Colours; + switch (Format) + { + case IL_RGB: + DblPtr[0] = ClearRed; + DblPtr[1] = ClearGreen; + DblPtr[2] = ClearBlue; + break; + + case IL_RGBA: + DblPtr[0] = ClearRed; + DblPtr[1] = ClearGreen; + DblPtr[2] = ClearBlue; + DblPtr[3] = ClearAlpha; + break; + + case IL_BGR: + DblPtr[2] = ClearRed; + DblPtr[1] = ClearGreen; + DblPtr[0] = ClearBlue; + DblPtr[3] = ClearAlpha; + break; + + case IL_BGRA: + DblPtr[2] = ClearRed; + DblPtr[1] = ClearGreen; + DblPtr[0] = ClearBlue; + DblPtr[3] = ClearAlpha; + break; + + case IL_LUMINANCE: + DblPtr[0] = ClearAlpha; + break; + + case IL_LUMINANCE_ALPHA: + DblPtr[0] = ClearLum; + DblPtr[1] = ClearAlpha; + break; + + case IL_COLOUR_INDEX: + DblPtr[0] = ClearAlpha; + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + break; + + default: + ilSetError(IL_INTERNAL_ERROR); + return; + } + + return; +} + + +//! Clears the current bound image to the values specified in ilClearColour +ILboolean ILAPIENTRY ilClearImage() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + return ilClearImage_(iCurImage); +} + + +ILAPI ILboolean ILAPIENTRY ilClearImage_(ILimage *Image) +{ + ILuint i, c, NumBytes; + ILubyte Colours[32]; // Maximum is sizeof(double) * 4 = 32 + ILubyte *BytePtr; + ILushort *ShortPtr; + ILuint *IntPtr; + ILfloat *FloatPtr; + ILdouble *DblPtr; + + NumBytes = Image->Bpp * Image->Bpc; + ilGetClear(Colours, Image->Format, Image->Type); + + if (Image->Format != IL_COLOUR_INDEX) { + switch (Image->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + BytePtr = (ILubyte*)Colours; + for (c = 0; c < NumBytes; c += Image->Bpc) { + for (i = c; i < Image->SizeOfData; i += NumBytes) { + Image->Data[i] = BytePtr[c]; + } + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + ShortPtr = (ILushort*)Colours; + for (c = 0; c < NumBytes; c += Image->Bpc) { + for (i = c; i < Image->SizeOfData; i += NumBytes) { + *((ILushort*)(Image->Data + i)) = ShortPtr[c / Image->Bpc]; + } + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + IntPtr = (ILuint*)Colours; + for (c = 0; c < NumBytes; c += Image->Bpc) { + for (i = c; i < Image->SizeOfData; i += NumBytes) { + *((ILuint*)(Image->Data + i)) = IntPtr[c / Image->Bpc]; + } + } + break; + + case IL_FLOAT: + FloatPtr = (ILfloat*)Colours; + for (c = 0; c < NumBytes; c += Image->Bpc) { + for (i = c; i < Image->SizeOfData; i += NumBytes) { + *((ILfloat*)(Image->Data + i)) = FloatPtr[c / Image->Bpc]; + } + } + break; + + case IL_DOUBLE: + DblPtr = (ILdouble*)Colours; + for (c = 0; c < NumBytes; c += Image->Bpc) { + for (i = c; i < Image->SizeOfData; i += NumBytes) { + *((ILdouble*)(Image->Data + i)) = DblPtr[c / Image->Bpc]; + } + } + break; + } + } + else { + imemclear(Image->Data, Image->SizeOfData); + + if (Image->Pal.Palette) + ifree(Image->Pal.Palette); + Image->Pal.Palette = (ILubyte*)ialloc(4); + if (Image->Pal.Palette == NULL) { + return IL_FALSE; + } + + Image->Pal.PalType = IL_PAL_RGBA32; + Image->Pal.PalSize = 4; + + Image->Pal.Palette[0] = Colours[0] * UCHAR_MAX; + Image->Pal.Palette[1] = Colours[1] * UCHAR_MAX; + Image->Pal.Palette[2] = Colours[2] * UCHAR_MAX; + Image->Pal.Palette[3] = Colours[3] * UCHAR_MAX; + } + + return IL_TRUE; +} + + +//! Overlays the image found in Src on top of the current bound image at the coords specified. +ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord) +{ + ILuint Width, Height, Depth; + ILuint Dest; + + Dest = ilGetCurName(); + ilBindImage(Source); + Width = iCurImage->Width; Height = iCurImage->Height; Depth = iCurImage->Depth; + ilBindImage(Dest); + + return ilBlit(Source, XCoord, YCoord, ZCoord, 0, 0, 0, Width, Height, Depth); +} + +//@NEXT DestX,DestY,DestZ must be set to ILuint +ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, + ILuint SrcX, ILuint SrcY, ILuint SrcZ, + ILuint Width, ILuint Height, ILuint Depth) +{ + ILuint x, y, z, ConvBps, ConvSizePlane; + ILimage *Dest,*Src; + ILubyte *Converted; + ILuint DestName = ilGetCurName(); + ILuint c; + ILuint StartX, StartY, StartZ; + ILboolean DestFlipped = IL_FALSE; + ILubyte *SrcTemp; + ILfloat Back; + + // Check if the desiination image really exists + if (DestName == 0 || iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + Dest = iCurImage; + + // set the destination image to upper left origin + if (Dest->Origin == IL_ORIGIN_LOWER_LEFT) { // Dest + DestFlipped = IL_TRUE; + ilFlipImage(); + } + //DestOrigin = Dest->Origin; + ilBindImage(Source); + + // Check if the source image really exists + if (iCurImage == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + Src = iCurImage; + + //@TODO test if coordinates are inside the images (hard limit for source) + + // set the source image to upper left origin + if (Src->Origin == IL_ORIGIN_LOWER_LEFT) + { + SrcTemp = iGetFlipped(iCurImage); + if (SrcTemp == NULL) + { + ilBindImage(DestName); + if (DestFlipped) + ilFlipImage(); + return IL_FALSE; + } + } + else + { + SrcTemp = iCurImage->Data; + } + + // convert source image to match the destination image type and format + Converted = (ILubyte*)ilConvertBuffer(Src->SizeOfData, Src->Format, Dest->Format, Src->Type, Dest->Type, NULL, SrcTemp); + if (Converted == NULL) + return IL_FALSE; + + ConvBps = Dest->Bpp * Src->Width; + ConvSizePlane = ConvBps * Src->Height; + + //@NEXT in next version this would have to be removed since Dest* will be unsigned + StartX = DestX >= 0 ? 0 : -DestX; + StartY = DestY >= 0 ? 0 : -DestY; + StartZ = DestZ >= 0 ? 0 : -DestZ; + + // Limit the copy of data inside of the destination image + if (Width + DestX > Dest->Width) Width = Dest->Width - DestX; + if (Height + DestY > Dest->Height) Height = Dest->Height - DestY; + if (Depth + DestZ > Dest->Depth) Depth = Dest->Depth - DestZ; + + //@TODO: non funziona con rgba + if (Src->Format == IL_RGBA || Src->Format == IL_BGRA || Src->Format == IL_LUMINANCE_ALPHA) { + const ILuint bpp_without_alpha = Dest->Bpp - 1; + for (z = 0; z < Depth; z++) { + for (y = 0; y < Height; y++) { + for (x = 0; x < Width; x++) { + const ILuint SrcIndex = (z+SrcZ)*ConvSizePlane + (y+SrcY)*ConvBps + (x+SrcX)*Dest->Bpp; + const ILuint DestIndex = (z+DestZ)*Dest->SizeOfPlane + (y+DestY)*Dest->Bps + (x+DestX)*Dest->Bpp; + const ILuint AlphaIdx = SrcIndex + bpp_without_alpha; + ILfloat Front = 0; + + switch (Dest->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + Front = Converted[AlphaIdx]/((float)IL_MAX_UNSIGNED_BYTE); + break; + case IL_SHORT: + case IL_UNSIGNED_SHORT: + Front = ((ILshort*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_SHORT); + break; + case IL_INT: + case IL_UNSIGNED_INT: + Front = ((ILint*)Converted)[AlphaIdx]/((float)IL_MAX_UNSIGNED_INT); + break; + case IL_FLOAT: + Front = ((ILfloat*)Converted)[AlphaIdx]; + break; + case IL_DOUBLE: + Front = (ILfloat)(((ILdouble*)Converted)[AlphaIdx]); + break; + } + Back = 1.0f - Front; + // In case of Alpha channel, the data is blended. Keeps the original alpha. + if (ilIsEnabled(IL_BLIT_BLEND)) { + for (c = 0; c < bpp_without_alpha; c++) + { + Dest->Data[DestIndex + c] = + (ILubyte)(Converted[SrcIndex + c] * Front + + Dest->Data[DestIndex + c] * Back); + } + } + else { + for (c = 0; c < Dest->Bpp; c++) + { + Dest->Data[DestIndex + c] = (ILubyte)(Converted[SrcIndex + c]); + } + } + } + } + } + } else { + for( z = 0; z < Depth; z++ ) { + for( y = 0; y < Height; y++ ) { + for( x = 0; x < Width; x++ ) { + for( c = 0; c < Dest->Bpp; c++ ) { + Dest->Data[(z+DestZ)*Dest->SizeOfPlane + (y+DestY)*Dest->Bps + (x+DestX)*Dest->Bpp + c] = + Converted[(z+SrcZ)*ConvSizePlane + (y+SrcY)*ConvBps + (x+SrcX)*Dest->Bpp + c]; + } + } + } + } + } + + if (SrcTemp != iCurImage->Data) + ifree(SrcTemp); + + ilBindImage(DestName); + if (DestFlipped) + ilFlipImage(); + + ifree(Converted); + + return IL_TRUE; +} + + +ILboolean iCopySubImage(ILimage *Dest, ILimage *Src) +{ + ILimage *DestTemp, *SrcTemp; + + DestTemp = Dest; + SrcTemp = Src; + + do { + ilCopyImageAttr(DestTemp, SrcTemp); + DestTemp->Data = (ILubyte*)ialloc(SrcTemp->SizeOfData); + if (DestTemp->Data == NULL) { + return IL_FALSE; + } + memcpy(DestTemp->Data, SrcTemp->Data, SrcTemp->SizeOfData); + + if (SrcTemp->Next) { + DestTemp->Next = (ILimage*)icalloc(1, sizeof(ILimage)); + if (!DestTemp->Next) { + return IL_FALSE; + } + } + else { + DestTemp->Next = NULL; + } + + DestTemp = DestTemp->Next; + SrcTemp = SrcTemp->Next; + } while (SrcTemp); + + return IL_TRUE; +} + + +ILboolean iCopySubImages(ILimage *Dest, ILimage *Src) +{ + if (Src->Faces) { + Dest->Faces = (ILimage*)icalloc(1, sizeof(ILimage)); + if (!Dest->Faces) { + return IL_FALSE; + } + if (!iCopySubImage(Dest->Faces, Src->Faces)) + return IL_FALSE; + } + + if (Src->Layers) { + Dest->Layers = (ILimage*)icalloc(1, sizeof(ILimage)); + if (!Dest->Layers) { + return IL_FALSE; + } + if (!iCopySubImage(Dest->Layers, Src->Layers)) + return IL_FALSE; + } + + if (Src->Mipmaps) { + Dest->Mipmaps = (ILimage*)icalloc(1, sizeof(ILimage)); + if (!Dest->Mipmaps) { + return IL_FALSE; + } + if (!iCopySubImage(Dest->Mipmaps, Src->Mipmaps)) + return IL_FALSE; + } + + if (Src->Next) { + Dest->Next = (ILimage*)icalloc(1, sizeof(ILimage)); + if (!Dest->Next) { + return IL_FALSE; + } + if (!iCopySubImage(Dest->Next, Src->Next)) + return IL_FALSE; + } + + return IL_TRUE; +} + + +// Copies everything but the Data from Src to Dest. +ILAPI ILboolean ILAPIENTRY ilCopyImageAttr(ILimage *Dest, ILimage *Src) +{ + if (Dest == NULL || Src == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (Dest->Pal.Palette && Dest->Pal.PalSize && Dest->Pal.PalType != IL_PAL_NONE) { + ifree(Dest->Pal.Palette); + Dest->Pal.Palette = NULL; + } + if (Dest->Faces) { + ilCloseImage(Dest->Faces); + Dest->Faces = NULL; + } + if (Dest->Layers) { + ilCloseImage(Dest->Layers); + Dest->Layers = NULL; + } + if (Dest->Mipmaps) { + ilCloseImage(Dest->Mipmaps); + Dest->Mipmaps = NULL; + } + if (Dest->Next) { + ilCloseImage(Dest->Next); + Dest->Next = NULL; + } + if (Dest->Profile) { + ifree(Dest->Profile); + Dest->Profile = NULL; + Dest->ProfileSize = 0; + } + if (Dest->DxtcData) { + ifree(Dest->DxtcData); + Dest->DxtcData = NULL; + Dest->DxtcFormat = IL_DXT_NO_COMP; + Dest->DxtcSize = 0; + } + + if (Src->AnimList && Src->AnimSize) { + Dest->AnimList = (ILuint*)ialloc(Src->AnimSize * sizeof(ILuint)); + if (Dest->AnimList == NULL) { + return IL_FALSE; + } + memcpy(Dest->AnimList, Src->AnimList, Src->AnimSize * sizeof(ILuint)); + } + if (Src->Profile) { + Dest->Profile = (ILubyte*)ialloc(Src->ProfileSize); + if (Dest->Profile == NULL) { + return IL_FALSE; + } + memcpy(Dest->Profile, Src->Profile, Src->ProfileSize); + Dest->ProfileSize = Src->ProfileSize; + } + if (Src->Pal.Palette) { + Dest->Pal.Palette = (ILubyte*)ialloc(Src->Pal.PalSize); + if (Dest->Pal.Palette == NULL) { + return IL_FALSE; + } + memcpy(Dest->Pal.Palette, Src->Pal.Palette, Src->Pal.PalSize); + } + else { + Dest->Pal.Palette = NULL; + } + + Dest->Pal.PalSize = Src->Pal.PalSize; + Dest->Pal.PalType = Src->Pal.PalType; + Dest->Width = Src->Width; + Dest->Height = Src->Height; + Dest->Depth = Src->Depth; + Dest->Bpp = Src->Bpp; + Dest->Bpc = Src->Bpc; + Dest->Bps = Src->Bps; + Dest->SizeOfPlane = Src->SizeOfPlane; + Dest->SizeOfData = Src->SizeOfData; + Dest->Format = Src->Format; + Dest->Type = Src->Type; + Dest->Origin = Src->Origin; + Dest->Duration = Src->Duration; + Dest->CubeFlags = Src->CubeFlags; + Dest->AnimSize = Src->AnimSize; + Dest->OffX = Src->OffX; + Dest->OffY = Src->OffY; + + return IL_TRUE/*iCopySubImages(Dest, Src)*/; +} + + +//! Copies everything from Src to the current bound image. +ILboolean ILAPIENTRY ilCopyImage(ILuint Src) +{ + ILuint DestName = ilGetCurName(); + ILimage *DestImage = iCurImage, *SrcImage; + + if (iCurImage == NULL || DestName == 0) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ilBindImage(Src); + SrcImage = iCurImage; + ilBindImage(DestName); + ilTexImage(SrcImage->Width, SrcImage->Height, SrcImage->Depth, SrcImage->Bpp, SrcImage->Format, SrcImage->Type, SrcImage->Data); + ilCopyImageAttr(DestImage, SrcImage); + + return IL_TRUE; +} + + +// Creates a copy of Src and returns it. +ILAPI ILimage* ILAPIENTRY ilCopyImage_(ILimage *Src) +{ + ILimage *Dest; + + if (Src == NULL) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + Dest = ilNewImage(Src->Width, Src->Height, Src->Depth, Src->Bpp, Src->Bpc); + if (Dest == NULL) { + return NULL; + } + + if (ilCopyImageAttr(Dest, Src) == IL_FALSE) + return NULL; + + memcpy(Dest->Data, Src->Data, Src->SizeOfData); + + return Dest; +} + + +ILuint ILAPIENTRY ilCloneCurImage() +{ + ILuint Id; + ILimage *CurImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return 0; + } + + ilGenImages(1, &Id); + if (Id == 0) + return 0; + + CurImage = iCurImage; + + ilBindImage(Id); + ilTexImage(CurImage->Width, CurImage->Height, CurImage->Depth, CurImage->Bpp, CurImage->Format, CurImage->Type, CurImage->Data); + ilCopyImageAttr(iCurImage, CurImage); + + iCurImage = CurImage; + + return Id; +} + + +// Like ilTexImage but doesn't destroy the palette. +ILAPI ILboolean ILAPIENTRY ilResizeImage(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc) +{ + if (Image == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (Image->Data != NULL) + ifree(Image->Data); + + Image->Depth = Depth; + Image->Width = Width; + Image->Height = Height; + Image->Bpp = Bpp; + Image->Bpc = Bpc; + Image->Bps = Bpp * Bpc * Width; + Image->SizeOfPlane = Image->Bps * Height; + Image->SizeOfData = Image->SizeOfPlane * Depth; + + Image->Data = (ILubyte*)ialloc(Image->SizeOfData); + if (Image->Data == NULL) { + return IL_FALSE; + } + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_dicom.c b/libs/DevIL-1.7.8/src-IL/src/il_dicom.c new file mode 100644 index 00000000..fbba48c4 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_dicom.c @@ -0,0 +1,606 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/src/il_dicom.c +// +// Description: Reads from a Digital Imaging and Communications in Medicine +// (DICOM) file. Specifications can be found at +// http://en.wikipedia.org/wiki/Dicom. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_DICOM + +typedef struct DICOMHEAD +{ + ILubyte Signature[4]; + ILuint Version; + ILuint Width; + ILuint Height; + ILuint Depth; + ILuint Samples; + ILuint BitsAllocated; + ILuint BitsStored; + ILuint DataLen; + ILboolean BigEndian; + ILenum Encoding; + + // For DevIL use only + ILenum Format; + ILenum Type; +} DICOMHEAD; + +ILboolean iIsValidDicom(void); +ILboolean iCheckDicom(DICOMHEAD *Header); +ILboolean iLoadDicomInternal(void); +ILboolean iGetDicomHead(DICOMHEAD *Header); +ILboolean SkipElement(DICOMHEAD *Header, ILushort GroupNum, ILushort ElementNum); +ILboolean GetNumericValue(DICOMHEAD *Header, ILushort GroupNum, ILuint *Number); +ILboolean GetUID(ILubyte *UID); +ILuint GetGroupNum(DICOMHEAD *Header); +ILuint GetShort(DICOMHEAD *Header, ILushort GroupNum); +ILuint GetInt(DICOMHEAD *Header, ILushort GroupNum); +ILfloat GetFloat(DICOMHEAD *Header, ILushort GroupNum); + +//! Checks if the file specified in FileName is a valid DICOM file. +ILboolean ilIsValidDicom(ILconst_string FileName) +{ + ILHANDLE DicomFile; + ILboolean bDicom = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("dicom")) && !iCheckExtension(FileName, IL_TEXT("dcm"))) { + ilSetError(IL_INVALID_EXTENSION); + return bDicom; + } + + DicomFile = iopenr(FileName); + if (DicomFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDicom; + } + + bDicom = ilIsValidDicomF(DicomFile); + icloser(DicomFile); + + return bDicom; +} + + +//! Checks if the ILHANDLE contains a valid DICOM file at the current position. +ILboolean ilIsValidDicomF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidDicom(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid DICOM lump. +ILboolean ilIsValidDicomL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidDicom(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidDicom(void) +{ + DICOMHEAD Header; + ILuint Pos = itell(); + + // Clear the header to all 0s to make checks later easier. + memset(&Header, 0, sizeof(DICOMHEAD)); + if (!iGetDicomHead(&Header)) + return IL_FALSE; + // The length of the header varies, so we just go back to the original position. + iseek(Pos, IL_SEEK_CUR); + + return iCheckDicom(&Header); +} + + +// Internal function used to get the DICOM header from the current file. +ILboolean iGetDicomHead(DICOMHEAD *Header) +{ + ILushort GroupNum, ElementNum; + ILboolean ReachedData = IL_FALSE; + ILubyte Var2, UID[65]; + + // Signature should be "DICM" at position 128. + iseek(128, IL_SEEK_SET); + if (iread(Header->Signature, 1, 4) != 4) + return IL_FALSE; + +//@TODO: What about the case when we are reading an image with Big Endian data? + + do { + GroupNum = GetGroupNum(Header); + ElementNum = GetShort(Header, GroupNum);; + + switch (GroupNum) + { + case 0x02: + switch (ElementNum) + { + /*case 0x01: // Version number + if (!GetNumericValue(&Header->Version)) + return IL_FALSE; + if (Header->Version != 0x0100) + return IL_FALSE; + break;*/ + + case 0x10: + //@TODO: Look at pg. 60 of 07_05pu.pdf (PS 3.5) for more UIDs. + if (!GetUID(UID)) + return IL_FALSE; + if (!strncmp(UID, "1.2.840.10008.1.2.2", 64)) // Explicit big endian + Header->BigEndian = IL_TRUE; + else if (!strncmp(UID, "1.2.840.10008.1.2.1", 64)) // Explicit little endian + Header->BigEndian = IL_FALSE; + else if (!strncmp(UID, "1.2.840.10008.1.2", 64)) // Implicit little endian + Header->BigEndian = IL_FALSE; + else + return IL_FALSE; // Unrecognized UID. + break; + + default: + if (!SkipElement(Header, GroupNum, ElementNum)) // We do not understand this entry, so we just skip it. + return IL_FALSE; + } + break; + + case 0x28: + switch (ElementNum) + { + case 0x02: // Samples per pixel + if (!GetNumericValue(Header, GroupNum, &Header->Samples)) + return IL_FALSE; + break; + + case 0x08: // Number of frames, or depth + if (!GetNumericValue(Header, GroupNum, &Header->Depth)) + return IL_FALSE; + break; + + case 0x10: // The number of rows + if (!GetNumericValue(Header, GroupNum, &Header->Height)) + return IL_FALSE; + break; + + case 0x11: // The number of columns + if (!GetNumericValue(Header, GroupNum, &Header->Width)) + return IL_FALSE; + break; + + case 0x100: // Bits allocated per sample + if (!GetNumericValue(Header, GroupNum, &Header->BitsAllocated)) + return IL_FALSE; + break; + + case 0x101: // Bits stored per sample - Do we really need this information? + if (!GetNumericValue(Header, GroupNum, &Header->BitsStored)) + return IL_FALSE; + break; + + default: + if (!SkipElement(Header, GroupNum, ElementNum)) // We do not understand this entry, so we just skip it. + return IL_FALSE; + } + break; + + case 0x7FE0: + switch (ElementNum) + { + case 0x10: // This element is the actual pixel data. We are done with the header here. + if (igetc() != 'O') // @TODO: Can we assume that this is always 'O'? + return IL_FALSE; + Var2 = igetc(); + if (Var2 != 'B' && Var2 != 'W' && Var2 != 'F') // 'OB', 'OW' and 'OF' accepted for this element. + return IL_FALSE; + GetLittleUShort(); // Skip the 2 reserved bytes. + Header->DataLen = GetInt(Header, GroupNum);//GetLittleUInt(); + ReachedData = IL_TRUE; + break; + default: + if (!SkipElement(Header, GroupNum, ElementNum)) // We do not understand this entry, so we just skip it. + return IL_FALSE; + } + break; + + default: + if (!SkipElement(Header, GroupNum, ElementNum)) // We do not understand this entry, so we just skip it. + return IL_FALSE; + } + } while (!ieof() && !ReachedData); + + if (ieof()) + return IL_FALSE; + + // Some DICOM images do not have the depth (number of frames) field. + if (Header->Depth == 0) + Header->Depth = 1; + + switch (Header->BitsAllocated) + { + case 8: + Header->Type = IL_UNSIGNED_BYTE; + break; + case 16: + Header->Type = IL_UNSIGNED_SHORT; + break; + case 32: + Header->Type = IL_FLOAT; //@TODO: Is this ever an integer? + break; + default: //@TODO: Any other types we can deal with? + return IL_FALSE; + } + + // Cannot handle more than 4 channels in an image. + if (Header->Samples > 4) + return IL_FALSE; + Header->Format = ilGetFormatBpp(Header->Samples); + + return IL_TRUE; +} + + +ILboolean SkipElement(DICOMHEAD *Header, ILushort GroupNum, ILushort ElementNum) +{ + ILubyte VR1, VR2; + ILuint ValLen; + + // 2 byte character string telling what type this element is ('OB', 'UI', etc.) + VR1 = igetc(); + VR2 = igetc(); + + if ((VR1 == 'O' && VR2 == 'B') || (VR1 == 'O' && VR2 == 'W') || (VR1 == 'O' && VR2 == 'F') || + (VR1 == 'S' && VR2 == 'Q') || (VR1 == 'U' && VR2 == 'T') || (VR1 == 'U' && VR2 == 'N')) { + // These all have a different format than the other formats, since they can be up to 32 bits long. + GetLittleUShort(); // Values reserved, we do not care about them. + ValLen = GetInt(Header, GroupNum);//GetLittleUInt(); // Length of the rest of the element + if (ValLen % 2) // This length must be even, according to the specs. + return IL_FALSE; + if (ElementNum != 0x00) // Element numbers of 0 tell the size of the full group, so we do not skip this. + // @TODO: We could use this to skip groups that we do not care about. + if (iseek(ValLen, IL_SEEK_CUR)) + return IL_FALSE; + } + else { + // These have a length of 16 bits. + ValLen = GetShort(Header, GroupNum);//GetLittleUShort(); + //if (ValLen % 2) // This length must be even, according to the specs. + // ValLen++; // Add the extra byte to seek. + //if (ElementNum != 0x00) // Element numbers of 0 tell the size of the full group, so we do not skip this. + // @TODO: We could use this to skip groups that we do not care about. + if (iseek(ValLen, IL_SEEK_CUR)) + return IL_FALSE; + } + + return IL_TRUE; +} + + +ILuint GetGroupNum(DICOMHEAD *Header) +{ + ILushort GroupNum; + + iread(&GroupNum, 1, 2); + // The 0x02 group is always little endian. + if (GroupNum == 0x02) { + UShort(&GroupNum); + return GroupNum; + } + // Now we have to swizzle it if it is not 0x02. + if (Header->BigEndian) + BigUShort(&GroupNum); + else + UShort(&GroupNum); + + return GroupNum; +} + + +ILuint GetShort(DICOMHEAD *Header, ILushort GroupNum) +{ + ILushort Num; + + iread(&Num, 1, 2); + // The 0x02 group is always little endian. + if (GroupNum == 0x02) { + UShort(&Num); + return Num; + } + // Now we have to swizzle it if it is not 0x02. + if (Header->BigEndian) + BigUShort(&Num); + else + UShort(&Num); + + return Num; +} + + +ILuint GetInt(DICOMHEAD *Header, ILushort GroupNum) +{ + ILuint Num; + + iread(&Num, 1, 4); + // The 0x02 group is always little endian. + if (GroupNum == 0x02) { + UInt(&Num); + return Num; + } + // Now we have to swizzle it if it is not 0x02. + if (Header->BigEndian) + BigUInt(&Num); + else + UInt(&Num); + + return Num; +} + + +ILfloat GetFloat(DICOMHEAD *Header, ILushort GroupNum) +{ + ILfloat Num; + + iread(&Num, 1, 4); + // The 0x02 group is always little endian. + if (GroupNum == 0x02) { + Float(&Num); + return Num; + } + // Now we have to swizzle it if it is not 0x02. + if (Header->BigEndian) + BigFloat(&Num); + else + Float(&Num); + + return Num; +} + + +ILboolean GetNumericValue(DICOMHEAD *Header, ILushort GroupNum, ILuint *Number) +{ + ILubyte VR1, VR2; + ILushort ValLen; + + // 2 byte character string telling what type this element is ('OB', 'UI', etc.) + VR1 = igetc(); + VR2 = igetc(); + + if (VR1 == 'U' && VR2 == 'S') { // Unsigned short + ValLen = GetShort(Header, GroupNum);//GetLittleUShort(); + if (ValLen != 2) // Must always be 2 for short ('US') + return IL_FALSE; + *((ILushort*)Number) = GetShort(Header, GroupNum);//GetLittleUShort(); + return IL_TRUE; + } + if (VR1 == 'U' && VR2 == 'L') { // Unsigned long + ValLen = GetInt(Header, GroupNum);//GetLittleUInt(); + if (ValLen != 4) // Must always be 4 for long ('UL') + return IL_FALSE; + *Number = GetInt(Header, GroupNum); + return IL_TRUE; + } + if (VR1 == 'S' && VR2 == 'S') { // Signed short + ValLen = GetShort(Header, GroupNum); + if (ValLen != 2) // Must always be 2 for short ('US') + return IL_FALSE; + *((ILshort*)Number) = GetShort(Header, GroupNum); + return IL_TRUE; + } + if (VR1 == 'S' && VR2 == 'L') { // Signed long + ValLen = GetInt(Header, GroupNum); + if (ValLen != 4) // Must always be 4 for long ('UL') + return IL_FALSE; + *((ILint*)Number) = GetInt(Header, GroupNum); + return IL_TRUE; + } + + return IL_FALSE; +} + + +ILboolean GetUID(ILubyte *UID) +{ + ILubyte VR1, VR2; + ILushort ValLen; + + // 2 byte character string telling what type this element is ('OB', 'UI', etc.) + VR1 = igetc(); + VR2 = igetc(); + + if (VR1 != 'U' || VR2 != 'I') // 'UI' == UID + return IL_FALSE; + + ValLen = GetLittleUShort(); + if (iread(UID, ValLen, 1) != 1) + return IL_FALSE; + UID[64] = 0; // Just to make sure that our string is terminated. + + return IL_TRUE; +} + +// Internal function used to check if the HEADER is a valid DICOM header. +ILboolean iCheckDicom(DICOMHEAD *Header) +{ + // Always has the signature "DICM" at position 0x80. + if (strncmp(Header->Signature, "DICM", 4)) + return IL_FALSE; + // Does not make sense to have any dimension = 0. + if (Header->Width == 0 || Header->Height == 0 || Header->Depth == 0) + return IL_FALSE; + // We can only deal with images that have byte-aligned data. + //@TODO: Take care of any others? + if (Header->BitsAllocated % 8) + return IL_FALSE; + // Check for an invalid format being set (or not set at all). + if (ilGetBppFormat(Header->Format) == 0) + return IL_FALSE; + // Check for an invalid type being set (or not set at all). + if (ilGetBpcType(Header->Type) == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Reads a DICOM file +ILboolean ilLoadDicom(ILconst_string FileName) +{ + ILHANDLE DicomFile; + ILboolean bDicom = IL_FALSE; + + DicomFile = iopenr(FileName); + if (DicomFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDicom; + } + + bDicom = ilLoadDicomF(DicomFile); + icloser(DicomFile); + + return bDicom; +} + + +//! Reads an already-opened DICOM file +ILboolean ilLoadDicomF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDicomInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a DICOM +ILboolean ilLoadDicomL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadDicomInternal(); +} + + +// Internal function used to load the DICOM. +ILboolean iLoadDicomInternal(void) +{ + DICOMHEAD Header; + ILuint i; + ILushort TempS, *ShortPtr; + ILfloat TempF, *FloatPtr; + ILboolean Swizzle = IL_FALSE; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Clear the header to all 0s to make checks later easier. + memset(&Header, 0, sizeof(DICOMHEAD)); + if (!iGetDicomHead(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + if (!iCheckDicom(&Header)) + return IL_FALSE; + + if (!ilTexImage(Header.Width, Header.Height, Header.Depth, ilGetBppFormat(Header.Format), Header.Format, Header.Type, NULL)) + return IL_FALSE; + //@TODO: Find out if the origin is always in the upper left. + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + // Header.DataLen may be larger than SizeOfData, since it has to be padded with a NULL if it is not an even length, + // so we just test to make sure it is at least large enough. + //@TODO: Do this check before ilTexImage call. + if (Header.DataLen < iCurImage->SizeOfData) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // We may have to swap the order of the data. +#ifdef __BIG_ENDIAN__ + if (!Header.BigEndian) { + if (Header.Format == IL_RGB) + Header.Format = IL_BGR; + else if (Header.Format == IL_RGBA) + Swizzle = IL_TRUE; + } +#else // Little endian + if (Header.BigEndian) { + if (Header.Format == IL_RGB) + Header.Format = IL_BGR; + if (Header.Format == IL_RGBA) + Swizzle = IL_TRUE; + } +#endif + + switch (Header.Type) + { + case IL_UNSIGNED_BYTE: + if (iread(iCurImage->Data, iCurImage->SizeOfData, 1) != 1) + return IL_FALSE; + + // Swizzle the data from ABGR to RGBA. + if (Swizzle) { + for (i = 0; i < iCurImage->SizeOfData; i += 4) { + iSwapUInt((ILuint*)(iCurImage->Data + i)); + } + } + break; + + case IL_UNSIGNED_SHORT: + for (i = 0; i < iCurImage->SizeOfData; i += 2) { + *((ILushort*)(iCurImage->Data + i)) = GetShort(&Header, 0);//GetLittleUShort(); + } + + // Swizzle the data from ABGR to RGBA. + if (Swizzle) { + ShortPtr = (ILushort*)iCurImage->Data; + for (i = 0; i < iCurImage->SizeOfData / 2; i += 4) { + TempS = ShortPtr[i]; + ShortPtr[i] = ShortPtr[i+3]; + ShortPtr[i+3] = TempS; + } + } + break; + + case IL_FLOAT: + for (i = 0; i < iCurImage->SizeOfData; i += 4) { + *((ILfloat*)(iCurImage->Data + i)) = GetFloat(&Header, 0);//GetLittleFloat(); + } + + // Swizzle the data from ABGR to RGBA. + if (Swizzle) { + FloatPtr = (ILfloat*)iCurImage->Data; + for (i = 0; i < iCurImage->SizeOfData / 4; i += 4) { + TempF = FloatPtr[i]; + FloatPtr[i] = FloatPtr[i+3]; + FloatPtr[i+3] = TempF; + } + } + break; + } + + return ilFixImage(); +} + + + +#endif//IL_NO_DICOM diff --git a/libs/DevIL-1.7.8/src-IL/src/il_doom.c b/libs/DevIL-1.7.8/src-IL/src/il_doom.c new file mode 100644 index 00000000..62a67cd6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_doom.c @@ -0,0 +1,272 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_doom.c +// +// Description: Reads Doom textures and flats +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_DOOM +#include "il_manip.h" +#include "il_pal.h" +#include "il_doompal.h" + + +ILboolean iLoadDoomInternal(void); +ILboolean iLoadDoomFlatInternal(void); + + +// +// READ A DOOM IMAGE +// + +//! Reads a Doom file +ILboolean ilLoadDoom(ILconst_string FileName) +{ + ILHANDLE DoomFile; + ILboolean bDoom = IL_FALSE; + + // Not sure of any kind of specified extension...maybe .lmp? + /*if (!iCheckExtension(FileName, "")) { + ilSetError(IL_INVALID_EXTENSION); + return NULL; + }*/ + + DoomFile = iopenr(FileName); + if (DoomFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDoom; + } + + bDoom = ilLoadDoomF(DoomFile); + icloser(DoomFile); + + return bDoom; +} + + +//! Reads an already-opened Doom file +ILboolean ilLoadDoomF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDoomInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Doom texture +ILboolean ilLoadDoomL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadDoomInternal(); +} + + +// From the DTE sources (mostly by Denton Woods with corrections by Randy Heit) +ILboolean iLoadDoomInternal() +{ + ILshort width, height, graphic_header[2], column_loop, row_loop; + ILint column_offset, pointer_position, first_pos; + ILubyte post, topdelta, length; + ILubyte *NewData; + ILuint i; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + first_pos = itell(); // Needed to go back to the offset table + width = GetLittleShort(); + height = GetLittleShort(); + graphic_header[0] = GetLittleShort(); // Not even used + graphic_header[1] = GetLittleShort(); // Not even used + + if (!ilTexImage(width, height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(IL_DOOMPAL_SIZE); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + iCurImage->Pal.PalSize = IL_DOOMPAL_SIZE; + iCurImage->Pal.PalType = IL_PAL_RGB24; + memcpy(iCurImage->Pal.Palette, ilDefaultDoomPal, IL_DOOMPAL_SIZE); + + // 247 is always the transparent colour (usually cyan) + memset(iCurImage->Data, 247, iCurImage->SizeOfData); + + for (column_loop = 0; column_loop < width; column_loop++) { + column_offset = GetLittleInt(); + pointer_position = itell(); + iseek(first_pos + column_offset, IL_SEEK_SET); + + while (1) { + if (iread(&topdelta, 1, 1) != 1) + return IL_FALSE; + if (topdelta == 255) + break; + if (iread(&length, 1, 1) != 1) + return IL_FALSE; + if (iread(&post, 1, 1) != 1) + return IL_FALSE; // Skip extra byte for scaling + + for (row_loop = 0; row_loop < length; row_loop++) { + if (iread(&post, 1, 1) != 1) + return IL_FALSE; + if (row_loop + topdelta < height) + iCurImage->Data[(row_loop+topdelta) * width + column_loop] = post; + } + iread(&post, 1, 1); // Skip extra scaling byte + } + + iseek(pointer_position, IL_SEEK_SET); + } + + // Converts palette entry 247 (cyan) to transparent. + if (ilGetBoolean(IL_CONV_PAL) == IL_TRUE) { + NewData = (ILubyte*)ialloc(iCurImage->SizeOfData * 4); + if (NewData == NULL) { + return IL_FALSE; + } + + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4 + 3] = iCurImage->Data[i] != 247 ? 255 : 0; + } + + if (!ilTexImage(iCurImage->Width, iCurImage->Height, iCurImage->Depth, + 4, IL_RGBA, iCurImage->Type, NewData)) { + ifree(NewData); + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + ifree(NewData); + } + + return ilFixImage(); +} + + +// +// READ A DOOM FLAT +// + +//! Reads a Doom flat file +ILboolean ilLoadDoomFlat(ILconst_string FileName) +{ + ILHANDLE FlatFile; + ILboolean bFlat = IL_FALSE; + + // Not sure of any kind of specified extension...maybe .lmp? + /*if (!iCheckExtension(FileName, "")) { + ilSetError(IL_INVALID_EXTENSION); + return NULL; + }*/ + + FlatFile = iopenr(FileName); + if (FlatFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bFlat; + } + + bFlat = ilLoadDoomF(FlatFile); + icloser(FlatFile); + + return bFlat; +} + + +//! Reads an already-opened Doom flat file +ILboolean ilLoadDoomFlatF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDoomFlatInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Doom flat +ILboolean ilLoadDoomFlatL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadDoomFlatInternal(); +} + + +// Basically just ireads 4096 bytes and copies the palette +ILboolean iLoadDoomFlatInternal() +{ + ILubyte *NewData; + ILuint i; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!ilTexImage(64, 64, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(IL_DOOMPAL_SIZE); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + iCurImage->Pal.PalSize = IL_DOOMPAL_SIZE; + iCurImage->Pal.PalType = IL_PAL_RGB24; + memcpy(iCurImage->Pal.Palette, ilDefaultDoomPal, IL_DOOMPAL_SIZE); + + if (iread(iCurImage->Data, 1, 4096) != 4096) + return IL_FALSE; + + if (ilGetBoolean(IL_CONV_PAL) == IL_TRUE) { + NewData = (ILubyte*)ialloc(iCurImage->SizeOfData * 4); + if (NewData == NULL) { + return IL_FALSE; + } + + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + NewData[i * 4 + 3] = iCurImage->Data[i] != 247 ? 255 : 0; + } + + if (!ilTexImage(iCurImage->Width, iCurImage->Height, iCurImage->Depth, + 4, IL_RGBA, iCurImage->Type, NewData)) { + ifree(NewData); + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + ifree(NewData); + } + + return ilFixImage(); +} + + +#endif diff --git a/libs/DevIL-1.7.8/src-IL/src/il_dpx.c b/libs/DevIL-1.7.8/src-IL/src/il_dpx.c new file mode 100644 index 00000000..bcc21035 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_dpx.c @@ -0,0 +1,325 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/26/2009 +// +// Filename: src-IL/src/il_dpx.c +// +// Description: Reads from a Digital Picture Exchange (.dpx) file. +// Specifications for this format were found at +// http://www.cineon.com/ff_draft.php and +// http://www.fileformat.info/format/dpx/. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_DPX +#include "il_dpx.h" +#include "il_bits.h" + +ILboolean iLoadDpxInternal(void); + + +//! Reads a DPX file +ILboolean ilLoadDpx(ILconst_string FileName) +{ + ILHANDLE DpxFile; + ILboolean bDpx = IL_FALSE; + + DpxFile = iopenr(FileName); + if (DpxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bDpx; + } + + bDpx = ilLoadDpxF(DpxFile); + icloser(DpxFile); + + return bDpx; +} + + +//! Reads an already-opened DPX file +ILboolean ilLoadDpxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDpxInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a DPX +ILboolean ilLoadDpxL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadDpxInternal(); +} + + +ILboolean DpxGetFileInfo(DPX_FILE_INFO *FileInfo) +{ + //if (iread(FileInfo, 768, 1) != 1) + // return IL_FALSE; + + FileInfo->MagicNum = GetBigUInt(); + FileInfo->Offset = GetBigUInt(); + iread(FileInfo->Vers, 8, 1); + FileInfo->FileSize = GetBigUInt(); + FileInfo->DittoKey = GetBigUInt(); + FileInfo->GenHdrSize = GetBigUInt(); + FileInfo->IndHdrSize = GetBigUInt(); + FileInfo->UserDataSize = GetBigUInt(); + iread(FileInfo->FileName, 100, 1); + iread(FileInfo->CreateTime, 24, 1); + iread(FileInfo->Creator, 100, 1); + iread(FileInfo->Project, 200, 1); + if (iread(FileInfo->Copyright, 200, 1) != 1) + return IL_FALSE; + FileInfo->Key = GetBigUInt(); + iseek(104, IL_SEEK_CUR); // Skip reserved section. + + return IL_TRUE; +} + + +ILboolean GetImageElement(DPX_IMAGE_ELEMENT *ImageElement) +{ + ImageElement->DataSign = GetBigUInt(); + ImageElement->RefLowData = GetBigUInt(); + iread(&ImageElement->RefLowQuantity, 1, 4); + ImageElement->RefHighData = GetBigUInt(); + iread(&ImageElement->RefHighQuantity, 1, 4); + ImageElement->Descriptor = igetc(); + ImageElement->Transfer = igetc(); + ImageElement->Colorimetric = igetc(); + ImageElement->BitSize = igetc(); + ImageElement->Packing = GetBigUShort(); + ImageElement->Encoding = GetBigUShort(); + ImageElement->DataOffset = GetBigUInt(); + ImageElement->EolPadding = GetBigUInt(); + ImageElement->EoImagePadding = GetBigUInt(); + if (iread(ImageElement->Description, 32, 1) != 1) + return IL_FALSE; + + return IL_TRUE; +} + + +ILboolean DpxGetImageInfo(DPX_IMAGE_INFO *ImageInfo) +{ + ILuint i; + + //if (iread(ImageInfo, sizeof(DPX_IMAGE_INFO), 1) != 1) + // return IL_FALSE; + ImageInfo->Orientation = GetBigUShort(); + ImageInfo->NumElements = GetBigUShort(); + ImageInfo->Width = GetBigUInt(); + ImageInfo->Height = GetBigUInt(); + + for (i = 0; i < 8; i++) { + GetImageElement(&ImageInfo->ImageElement[i]); + } + + iseek(52, IL_SEEK_CUR); // Skip padding bytes. + + return IL_TRUE; +} + + +ILboolean DpxGetImageOrient(DPX_IMAGE_ORIENT *ImageOrient) +{ + ImageOrient->XOffset = GetBigUInt(); + ImageOrient->YOffset = GetBigUInt(); + iread(&ImageOrient->XCenter, 4, 1); + iread(&ImageOrient->YCenter, 4, 1); + ImageOrient->XOrigSize = GetBigUInt(); + ImageOrient->YOrigSize = GetBigUInt(); + iread(ImageOrient->FileName, 100, 1); + iread(ImageOrient->CreationTime, 24, 1); + iread(ImageOrient->InputDev, 32, 1); + if (iread(ImageOrient->InputSerial, 32, 1) != 1) + return IL_FALSE; + ImageOrient->Border[0] = GetBigUShort(); + ImageOrient->Border[1] = GetBigUShort(); + ImageOrient->Border[2] = GetBigUShort(); + ImageOrient->Border[3] = GetBigUShort(); + ImageOrient->PixelAspect[0] = GetBigUInt(); + ImageOrient->PixelAspect[1] = GetBigUInt(); + iseek(28, IL_SEEK_CUR); // Skip reserved bytes. + + return IL_TRUE; +} + + +// Internal function used to load the DPX. +ILboolean iLoadDpxInternal(void) +{ + DPX_FILE_INFO FileInfo; + DPX_IMAGE_INFO ImageInfo; + DPX_IMAGE_ORIENT ImageOrient; +// BITFILE *File; + ILuint i, NumElements, CurElem = 0; + ILushort Val, *ShortData; + ILubyte Data[8]; + ILenum Format = 0; + ILubyte NumChans = 0; + + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!DpxGetFileInfo(&FileInfo)) + return IL_FALSE; + if (!DpxGetImageInfo(&ImageInfo)) + return IL_FALSE; + if (!DpxGetImageOrient(&ImageOrient)) + return IL_FALSE; + + iseek(ImageInfo.ImageElement[CurElem].DataOffset, IL_SEEK_SET); + +//@TODO: Deal with different origins! + + switch (ImageInfo.ImageElement[CurElem].Descriptor) + { + case 6: // Luminance data + Format = IL_LUMINANCE; + NumChans = 1; + break; + case 50: // RGB data + Format = IL_RGB; + NumChans = 3; + break; + case 51: // RGBA data + Format = IL_RGBA; + NumChans = 4; + break; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + // These are all on nice word boundaries. + switch (ImageInfo.ImageElement[CurElem].BitSize) + { + case 8: + case 16: + case 32: + if (!ilTexImage(ImageInfo.Width, ImageInfo.Height, 1, NumChans, Format, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + if (iread(iCurImage->Data, iCurImage->SizeOfData, 1) != 1) + return IL_FALSE; + goto finish; + } + + // The rest of these do not end on word boundaries. + if (ImageInfo.ImageElement[CurElem].Packing == 1) { + // Here we have it padded out to a word boundary, so the extra bits are filler. + switch (ImageInfo.ImageElement[CurElem].BitSize) + { + case 10: + //@TODO: Support other formats! + /*if (Format != IL_RGB) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + }*/ + switch (Format) + { + case IL_LUMINANCE: + if (!ilTexImage(ImageInfo.Width, ImageInfo.Height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_SHORT, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + ShortData = (ILushort*)iCurImage->Data; + NumElements = iCurImage->SizeOfData / 2; + + for (i = 0; i < NumElements;) { + iread(Data, 1, 2); + Val = ((Data[0] << 2) + ((Data[1] & 0xC0) >> 6)) << 6; // Use the first 10 bits of the word-aligned data. + ShortData[i++] = Val | ((Val & 0x3F0) >> 4); // Fill in the lower 6 bits with a copy of the higher bits. + } + break; + + case IL_RGB: + if (!ilTexImage(ImageInfo.Width, ImageInfo.Height, 1, 3, IL_RGB, IL_UNSIGNED_SHORT, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + ShortData = (ILushort*)iCurImage->Data; + NumElements = iCurImage->SizeOfData / 2; + + for (i = 0; i < NumElements;) { + iread(Data, 1, 4); + Val = ((Data[0] << 2) + ((Data[1] & 0xC0) >> 6)) << 6; // Use the first 10 bits of the word-aligned data. + ShortData[i++] = Val | ((Val & 0x3F0) >> 4); // Fill in the lower 6 bits with a copy of the higher bits. + Val = (((Data[1] & 0x3F) << 4) + ((Data[2] & 0xF0) >> 4)) << 6; // Use the next 10 bits. + ShortData[i++] = Val | ((Val & 0x3F0) >> 4); // Same fill + Val = (((Data[2] & 0x0F) << 6) + ((Data[3] & 0xFC) >> 2)) << 6; // And finally use the last 10 bits (ignores the last 2 bits). + ShortData[i++] = Val | ((Val & 0x3F0) >> 4); // Same fill + } + break; + + case IL_RGBA: // Is this even a possibility? There is a ton of wasted space here! + if (!ilTexImage(ImageInfo.Width, ImageInfo.Height, 1, 4, IL_RGBA, IL_UNSIGNED_SHORT, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + ShortData = (ILushort*)iCurImage->Data; + NumElements = iCurImage->SizeOfData / 2; + + for (i = 0; i < NumElements;) { + iread(Data, 1, 8); + Val = (Data[0] << 2) + ((Data[1] & 0xC0) >> 6); // Use the first 10 bits of the word-aligned data. + ShortData[i++] = (Val << 6) | ((Val & 0x3F0) >> 4); // Fill in the lower 6 bits with a copy of the higher bits. + Val = ((Data[1] & 0x3F) << 4) + ((Data[2] & 0xF0) >> 4); // Use the next 10 bits. + ShortData[i++] = (Val << 6) | ((Val & 0x3F0) >> 4); // Same fill + Val = ((Data[2] & 0x0F) << 6) + ((Data[3] & 0xFC) >> 2); // Use the next 10 bits. + ShortData[i++] = (Val << 6) | ((Val & 0x3F0) >> 4); // Same fill + Val = ((Data[3] & 0x03) << 8) + Data[4]; // And finally use the last 10 relevant bits (skips 3 whole bytes worth of padding!). + ShortData[i++] = (Val << 6) | ((Val & 0x3F0) >> 4); // Last fill + } + break; + } + break; + + //case 1: + //case 12: + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + } + else if (ImageInfo.ImageElement[0].Packing == 0) { + // Here we have the data packed so that it is never aligned on a word boundary. + /*File = bfile(iGetFile()); + if (File == NULL) + return IL_FALSE; //@TODO: Error? + ShortData = (ILushort*)iCurImage->Data; + NumElements = iCurImage->SizeOfData / 2; + for (i = 0; i < NumElements; i++) { + //bread(&Val, 1, 10, File); + Val = breadVal(10, File); + ShortData[i] = (Val << 6) | (Val >> 4); + } + bclose(File);*/ + + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + else { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; //@TODO: Take care of this in an iCheckDpx* function. + } + +finish: + return ilFixImage(); +} + +#endif//IL_NO_DPX + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_endian.c b/libs/DevIL-1.7.8/src-IL/src/il_endian.c new file mode 100644 index 00000000..82860f16 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_endian.c @@ -0,0 +1,278 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Last modified: 12/06/2006 +// +// Filename: src-IL/src/il_endian.c +// +// Description: Takes care of endian issues +// +//----------------------------------------------------------------------------- + + +#define IL_ENDIAN_C + +#include "il_endian.h" + +void EndianSwapData(void *_Image) +{ + ILuint i; + ILubyte *temp, *s, *d; + ILushort *ShortS, *ShortD; + ILuint *IntS, *IntD; + ILfloat *FltS, *FltD; + ILdouble *DblS, *DblD; + + ILimage *Image = (ILimage*)_Image; + + switch (Image->Type) { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + switch (Image->Bpp) { + case 3: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + s = Image->Data; + d = temp; + + for( i = Image->Width * Image->Height; i > 0; i-- ) { + *d++ = *(s+2); + *d++ = *(s+1); + *d++ = *s; + s += 3; + } + + ifree(Image->Data); + Image->Data = temp; + break; + + case 4: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + s = Image->Data; + d = temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *d++ = *(s+3); + *d++ = *(s+2); + *d++ = *(s+1); + *d++ = *s; + s += 4; + } + + ifree(Image->Data); + Image->Data = temp; + break; + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + switch (Image->Bpp) { + case 3: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + ShortS = (ILushort*)Image->Data; + ShortD = (ILushort*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *ShortD = *ShortS++; iSwapUShort(ShortD++); + *ShortD = *ShortS++; iSwapUShort(ShortD++); + *ShortD = *ShortS++; iSwapUShort(ShortD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + + case 4: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + ShortS = (ILushort*)Image->Data; + ShortD = (ILushort*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *ShortD = *ShortS++; iSwapUShort(ShortD++); + *ShortD = *ShortS++; iSwapUShort(ShortD++); + *ShortD = *ShortS++; iSwapUShort(ShortD++); + *ShortD = *ShortS++; iSwapUShort(ShortD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + } + break; + + case IL_INT: + case IL_UNSIGNED_INT: + switch (Image->Bpp) + { + case 3: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + IntS = (ILuint*)Image->Data; + IntD = (ILuint*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *IntD = *IntS++; iSwapUInt(IntD++); + *IntD = *IntS++; iSwapUInt(IntD++); + *IntD = *IntS++; iSwapUInt(IntD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + + case 4: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + IntS = (ILuint*)Image->Data; + IntD = (ILuint*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *IntD = *IntS++; iSwapUInt(IntD++); + *IntD = *IntS++; iSwapUInt(IntD++); + *IntD = *IntS++; iSwapUInt(IntD++); + *IntD = *IntS++; iSwapUInt(IntD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + } + break; + + case IL_FLOAT: + switch (Image->Bpp) + { + case 3: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + FltS = (ILfloat*)Image->Data; + FltD = (ILfloat*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *FltD = *FltS++; iSwapFloat(FltD++); + *FltD = *FltS++; iSwapFloat(FltD++); + *FltD = *FltS++; iSwapFloat(FltD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + + case 4: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + FltS = (ILfloat*)Image->Data; + FltD = (ILfloat*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *FltD = *FltS++; iSwapFloat(FltD++); + *FltD = *FltS++; iSwapFloat(FltD++); + *FltD = *FltS++; iSwapFloat(FltD++); + *FltD = *FltS++; iSwapFloat(FltD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + } + break; + + case IL_DOUBLE: + switch (Image->Bpp) + { + case 3: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + DblS = (ILdouble*)Image->Data; + DblD = (ILdouble*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *DblD = *DblS++; iSwapDouble(DblD++); + *DblD = *DblS++; iSwapDouble(DblD++); + *DblD = *DblS++; iSwapDouble(DblD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + + case 4: + temp = (ILubyte*)ialloc(Image->SizeOfData); + if (temp == NULL) + return; + DblS = (ILdouble*)Image->Data; + DblD = (ILdouble*)temp; + + for (i = Image->Width * Image->Height; i > 0; i--) { + *DblD = *DblS++; iSwapDouble(DblD++); + *DblD = *DblS++; iSwapDouble(DblD++); + *DblD = *DblS++; iSwapDouble(DblD++); + *DblD = *DblS++; iSwapDouble(DblD++); + } + + ifree(Image->Data); + Image->Data = temp; + break; + } + break; + } + + if( iCurImage->Format == IL_COLOUR_INDEX ) { + switch (iCurImage->Pal.PalType) { + case IL_PAL_RGB24: + case IL_PAL_BGR24: + temp = (ILubyte*)ialloc(Image->Pal.PalSize); + if (temp == NULL) + return; + s = Image->Pal.Palette; + d = temp; + + for (i = Image->Pal.PalSize / 3; i > 0; i--) { + *d++ = *(s+2); + *d++ = *(s+1); + *d++ = *s; + s += 3; + } + + ifree(Image->Pal.Palette); + Image->Pal.Palette = temp; + break; + + case IL_PAL_RGBA32: + case IL_PAL_RGB32: + case IL_PAL_BGRA32: + case IL_PAL_BGR32: + temp = (ILubyte*)ialloc(Image->Pal.PalSize); + if (temp == NULL) + return; + s = Image->Pal.Palette; + d = temp; + + for (i = Image->Pal.PalSize / 4; i > 0; i--) { + *d++ = *(s+3); + *d++ = *(s+2); + *d++ = *(s+1); + *d++ = *s; + s += 4; + } + + ifree(Image->Pal.Palette); + Image->Pal.Palette = temp; + break; + } + } + return; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_error.c b/libs/DevIL-1.7.8/src-IL/src/il_error.c new file mode 100644 index 00000000..2519240a --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_error.c @@ -0,0 +1,56 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 06/02/2007 +// +// Filename: src-IL/src/il_error.c +// +// Description: The error functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" + + +#define IL_ERROR_STACK_SIZE 32 // Needed elsewhere? + + +ILenum ilErrorNum[IL_ERROR_STACK_SIZE]; +ILint ilErrorPlace = (-1); + + +// Sets the current error +// If you go past the stack size for this, it cycles the errors, almost like a LRU algo. +ILAPI void ILAPIENTRY ilSetError(ILenum Error) +{ + ILuint i; + + ilErrorPlace++; + if (ilErrorPlace >= IL_ERROR_STACK_SIZE) { + for (i = 0; i < IL_ERROR_STACK_SIZE - 2; i++) { + ilErrorNum[i] = ilErrorNum[i+1]; + } + ilErrorPlace = IL_ERROR_STACK_SIZE - 1; + } + ilErrorNum[ilErrorPlace] = Error; + + return; +} + + +//! Gets the last error on the error stack +ILenum ILAPIENTRY ilGetError(void) +{ + ILenum ilReturn; + + if (ilErrorPlace >= 0) { + ilReturn = ilErrorNum[ilErrorPlace]; + ilErrorPlace--; + } + else + ilReturn = IL_NO_ERROR; + + return ilReturn; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_exr.cpp b/libs/DevIL-1.7.8/src-IL/src/il_exr.cpp new file mode 100644 index 00000000..6d1420a0 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_exr.cpp @@ -0,0 +1,435 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_exr.cpp +// +// Description: Reads from an OpenEXR (.exr) file using the OpenEXR library. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_EXR + +#ifndef HAVE_CONFIG_H // We are probably on a Windows box . +//#define OPENEXR_DLL +#define HALF_EXPORTS +#endif //HAVE_CONFIG_H + +#include "il_exr.h" +#include +#include +#include +//#include +//#include +//#include +//#include +//#include + + + +#if (defined(_WIN32) || defined(_WIN64)) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "openexr.lib") + #else + #pragma comment(lib, "openexr-d.lib") + #endif + #endif +#endif + + +//! Checks if the file specified in FileName is a valid EXR file. +ILboolean ilIsValidExr(ILconst_string FileName) +{ + ILHANDLE ExrFile; + ILboolean bExr = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("exr"))) { + ilSetError(IL_INVALID_EXTENSION); + return bExr; + } + + ExrFile = iopenr(FileName); + if (ExrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bExr; + } + + bExr = ilIsValidExrF(ExrFile); + icloser(ExrFile); + + return bExr; +} + + +//! Checks if the ILHANDLE contains a valid EXR file at the current position. +ILboolean ilIsValidExrF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidExr(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid EXR lump. +ILboolean ilIsValidExrL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidExr(); +} + + +// Internal function used to get the EXR header from the current file. +ILboolean iGetExrHead(EXRHEAD *Header) +{ + Header->MagicNumber = GetLittleUInt(); + Header->Version = GetLittleUInt(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidExr() +{ + EXRHEAD Head; + + if (!iGetExrHead(&Head)) + return IL_FALSE; + iseek(-8, IL_SEEK_CUR); + + return iCheckExr(&Head); +} + + +// Internal function used to check if the HEADER is a valid EXR header. +ILboolean iCheckExr(EXRHEAD *Header) +{ + // The file magic number (signature) is 0x76, 0x2f, 0x31, 0x01 + if (Header->MagicNumber != 0x01312F76) + return IL_FALSE; + // The only valid version so far is version 2. The upper value has + // to do with tiling. + if (Header->Version != 0x002 && Header->Version != 0x202) + return IL_FALSE; + + return IL_TRUE; +} + + +// Nothing to do here in the constructor. +ilIStream::ilIStream() : Imf::IStream("N/A") +{ + return; +} + + +bool ilIStream::read(char c[], int n) +{ + if (iread(c, 1, n) != n) + return false; + return true; +} + + +//@TODO: Make this work with 64-bit values. +Imf::Int64 ilIStream::tellg() +{ + Imf::Int64 Pos; + + // itell only returns a 32-bit value! + Pos = itell(); + + return Pos; +} + + +// Note that there is no return value here, even though there probably should be. +//@TODO: Make this work with 64-bit values. +void ilIStream::seekg(Imf::Int64 Pos) +{ + // iseek only uses a 32-bit value! + iseek((ILint)Pos, IL_SEEK_SET); // I am assuming this is seeking from the beginning. + return; +} + + +void ilIStream::clear() +{ + return; +} + + +//! Reads an .exr file. +ILboolean ilLoadExr(ILconst_string FileName) +{ + ILHANDLE ExrFile; + ILboolean bExr = IL_FALSE; + + ExrFile = iopenr(FileName); + if (ExrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bExr; + } + + bExr = ilLoadExrF(ExrFile); + icloser(ExrFile); + + return bExr; +} + + +//! Reads an already-opened .exr file +ILboolean ilLoadExrF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadExrInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains an .exr +ILboolean ilLoadExrL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadExrInternal(); +} + + +using namespace Imath; +using namespace Imf; +using namespace std; + + +ILboolean iLoadExrInternal() +{ + Array pixels; + Box2i dataWindow; + float pixelAspectRatio; + ILfloat *FloatData; + + ilIStream File; + RgbaInputFile in(File); + + Rgba a; + dataWindow = in.dataWindow(); + pixelAspectRatio = in.pixelAspectRatio(); + + int dw, dh, dx, dy; + + dw = dataWindow.max.x - dataWindow.min.x + 1; + dh = dataWindow.max.y - dataWindow.min.y + 1; + dx = dataWindow.min.x; + dy = dataWindow.min.y; + + pixels.resizeErase (dw * dh); + in.setFrameBuffer (pixels - dx - dy * dw, 1, dw); + + try + { + in.readPixels (dataWindow.min.y, dataWindow.max.y); + } + catch (const exception &e) + { + // If some of the pixels in the file cannot be read, + // print an error message, and return a partial image + // to the caller. + ilSetError(IL_LIB_EXR_ERROR); // Could I use something a bit more descriptive based on e? + e; // Prevent the compiler from yelling at us about this being unused. + return IL_FALSE; + } + + //if (ilTexImage(dw, dh, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL) == IL_FALSE) + //if (ilTexImage(dw, dh, 1, 4, IL_RGBA, IL_UNSIGNED_SHORT, NULL) == IL_FALSE) + if (ilTexImage(dw, dh, 1, 4, IL_RGBA, IL_FLOAT, NULL) == IL_FALSE) + return IL_FALSE; + + // Determine where the origin is in the original file. + if (in.lineOrder() == INCREASING_Y) + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + else + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + // Better to access FloatData instead of recasting everytime. + FloatData = (ILfloat*)iCurImage->Data; + + for (int i = 0; i < dw * dh; i++) + { + // Too much data lost + //iCurImage->Data[i * 4 + 0] = (ILubyte)(pixels[i].r.bits() >> 8); + //iCurImage->Data[i * 4 + 1] = (ILubyte)(pixels[i].g.bits() >> 8); + //iCurImage->Data[i * 4 + 2] = (ILubyte)(pixels[i].b.bits() >> 8); + //iCurImage->Data[i * 4 + 3] = (ILubyte)(pixels[i].a.bits() >> 8); + + // The images look kind of washed out with this. + //((ILshort*)(iCurImage->Data))[i * 4 + 0] = pixels[i].r.bits(); + //((ILshort*)(iCurImage->Data))[i * 4 + 1] = pixels[i].g.bits(); + //((ILshort*)(iCurImage->Data))[i * 4 + 2] = pixels[i].b.bits(); + //((ILshort*)(iCurImage->Data))[i * 4 + 3] = pixels[i].a.bits(); + + // This gives the best results, since no data is lost. + FloatData[i * 4] = pixels[i].r; + FloatData[i * 4 + 1] = pixels[i].g; + FloatData[i * 4 + 2] = pixels[i].b; + FloatData[i * 4 + 3] = pixels[i].a; + } + + // Converts the image to predefined type, format and/or origin if needed. + return ilFixImage(); +} + + + +// Nothing to do here in the constructor. +ilOStream::ilOStream() : Imf::OStream("N/A") +{ + return; +} + +void ilOStream::write(const char c[], int n) +{ + iwrite(c, 1, n); //@TODO: Throw an exception here. + return; +} + +//@TODO: Make this work with 64-bit values. +Imf::Int64 ilOStream::tellp() +{ + Imf::Int64 Pos; + + // itellw only returns a 32-bit value! + Pos = itellw(); + + return Pos; +} + +// Note that there is no return value here, even though there probably should be. +//@TODO: Make this work with 64-bit values. +void ilOStream::seekp(Imf::Int64 Pos) +{ + // iseekw only uses a 32-bit value! + iseekw((ILint)Pos, IL_SEEK_SET); // I am assuming this is seeking from the beginning. + return; +} + + +//! Writes a Exr file +ILboolean ilSaveExr(const ILstring FileName) +{ + ILHANDLE ExrFile; + ILuint ExrSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + ExrFile = iopenw(FileName); + if (ExrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + ExrSize = ilSaveExrF(ExrFile); + iclosew(ExrFile); + + if (ExrSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Exr to an already-opened file +ILuint ilSaveExrF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveExrInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Exr to a memory "lump" +ILuint ilSaveExrL(void *Lump, ILuint Size) +{ + ILuint Pos = itellw(); + iSetOutputLump(Lump, Size); + if (iSaveExrInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +ILboolean iSaveExrInternal() +{ + Imath::Box2i DataWindow(Imath::V2i(0, 0), Imath::V2i(iCurImage->Width-1, iCurImage->Height-1)); + Imf::LineOrder Order; + if (iCurImage->Origin == IL_ORIGIN_LOWER_LEFT) + Order = DECREASING_Y; + else + Order = INCREASING_Y; + Imf::Header Head(iCurImage->Width, iCurImage->Height, DataWindow, 1, Imath::V2f (0, 0), 1, Order); + + ilOStream File; + Imf::RgbaOutputFile Out(File, Head); + ILimage *TempImage = iCurImage; + + //@TODO: Can we always assume that Rgba is packed the same? + Rgba *HalfData = (Rgba*)ialloc(TempImage->Width * TempImage->Height * sizeof(Rgba)); + if (HalfData == NULL) + return IL_FALSE; + + if (iCurImage->Format != IL_RGBA || iCurImage->Type != IL_FLOAT) { + TempImage = iConvertImage(iCurImage, IL_RGBA, IL_FLOAT); + if (TempImage == NULL) { + ifree(HalfData); + return IL_FALSE; + } + } + + ILuint Offset = 0; + ILfloat *FloatPtr = (ILfloat*)TempImage->Data; + for (unsigned int y = 0; y < TempImage->Height; y++) { + for (unsigned int x = 0; x < TempImage->Width; x++) { + HalfData[y * TempImage->Width + x].r = FloatPtr[Offset]; + HalfData[y * TempImage->Width + x].g = FloatPtr[Offset + 1]; + HalfData[y * TempImage->Width + x].b = FloatPtr[Offset + 2]; + HalfData[y * TempImage->Width + x].a = FloatPtr[Offset + 3]; + Offset += 4; // 4 floats + } + } + + Out.setFrameBuffer(HalfData, 1, TempImage->Width); + Out.writePixels(TempImage->Height); //@TODO: Do each scanline separately to keep from using so much memory. + + // Free our half data. + ifree(HalfData); + // Destroy our temporary image if we used one. + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +#endif //IL_NO_EXR diff --git a/libs/DevIL-1.7.8/src-IL/src/il_fastconv.c b/libs/DevIL-1.7.8/src-IL/src/il_fastconv.c new file mode 100644 index 00000000..1103a878 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_fastconv.c @@ -0,0 +1,290 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 07/07/2006 +// +// Filename: src-IL/src/il_fastconv.c +// +// Description: Converts between several image formats +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifdef ALTIVEC_GCC +#include "altivec_typeconversion.h" +#endif + +ILboolean iFastConvert(ILenum DestFormat) +{ + ILubyte *BytePtr = iCurImage->Data; + ILushort *ShortPtr = (ILushort*)iCurImage->Data; + ILuint *IntPtr = (ILuint*)iCurImage->Data; + ILfloat *FloatPtr = (ILfloat*)iCurImage->Data; + ILdouble *DblPtr = (ILdouble*)iCurImage->Data; + +#ifndef ALTIVEC_GCC + ILuint SizeOfData, i=0; + ILubyte TempByte = 0; + ILushort TempShort = 0; + ILuint TempInt = 0; + ILfloat TempFloat = 0; + ILdouble TempDbl = 0; +#endif + + switch (DestFormat) + { + case IL_RGB: + case IL_BGR: + if (iCurImage->Format != IL_RGB && iCurImage->Format != IL_BGR) + return IL_FALSE; + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + #ifdef ALTIVEC_GCC + abc2cba_byte(BytePtr,iCurImage->SizeOfData,BytePtr); + #else + SizeOfData = iCurImage->SizeOfData / 3; + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, BytePtr + mov ecx, SizeOfData + L1: + mov al,[ebx+0] + xchg al,[ebx+2] + mov [ebx+0],al + add ebx,3 + loop L1 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempByte = BytePtr[0]; + BytePtr[0] = BytePtr[2]; + BytePtr[2] = TempByte; + BytePtr += 3; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + #ifdef ALTIVEC_GCC + abc2cba_short(ShortPtr,iCurImage->SizeOfData,ShortPtr); + #else + SizeOfData = iCurImage->SizeOfData / 6; // 3*2 + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, ShortPtr + mov ecx, SizeOfData + L2: + mov ax,[ebx+0] + xchg ax,[ebx+4] + mov [ebx+0],ax + add ebx,6 + loop L2 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempShort = ShortPtr[0]; + ShortPtr[0] = ShortPtr[2]; + ShortPtr[2] = TempShort; + ShortPtr += 3; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_INT: + case IL_UNSIGNED_INT: + #ifdef ALTIVEC_GCC + abc2cba_int(IntPtr,iCurImage->SizeOfData,IntPtr); + #else + SizeOfData = iCurImage->SizeOfData / 12; // 3*4 + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, IntPtr + mov ecx, SizeOfData + L3: + mov eax,[ebx+0] + xchg eax,[ebx+8] + mov [ebx+0],ax + add ebx,12 + loop L3 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempInt = IntPtr[0]; + IntPtr[0] = IntPtr[2]; + IntPtr[2] = TempInt; + IntPtr += 3; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abc2cba_float(FloatPtr,iCurImage->SizeOfData,FloatPtr); + #else + SizeOfData = iCurImage->SizeOfData / 12; // 3*4 + for (i = 0; i < SizeOfData; i++) { + TempFloat = FloatPtr[0]; + FloatPtr[0] = FloatPtr[2]; + FloatPtr[2] = TempFloat; + FloatPtr += 3; + } + #endif + return IL_TRUE; + + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abc2cba_double(DblPtr,iCurImage->SizeOfData,DblPtr); + #else + SizeOfData = iCurImage->SizeOfData / 24; // 3*8 + for (i = 0; i < SizeOfData; i++) { + TempDbl = DblPtr[0]; + DblPtr[0] = DblPtr[2]; + DblPtr[2] = TempDbl; + DblPtr += 3; + } + #endif + return IL_TRUE; + } + break; + + case IL_RGBA: + case IL_BGRA: + if (iCurImage->Format != IL_RGBA && iCurImage->Format != IL_BGRA) + return IL_FALSE; + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + #ifdef ALTIVEC_GCC + abcd2cbad_byte(BytePtr,iCurImage->SizeOfData,BytePtr); + #else + SizeOfData = iCurImage->SizeOfData / 4; + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, BytePtr + mov ecx, SizeOfData + L4: + mov eax,[ebx] + bswap eax + ror eax,8 + mov [ebx], eax + add ebx,4 + loop L4 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempByte = BytePtr[0]; + BytePtr[0] = BytePtr[2]; + BytePtr[2] = TempByte; + BytePtr += 4; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + #ifdef ALTIVEC_GCC + abcd2cbad_short(ShortPtr,iCurImage->SizeOfData,ShortPtr); + #else + SizeOfData = iCurImage->SizeOfData / 8; // 4*2 + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, ShortPtr + mov ecx, SizeOfData + L5: + mov ax,[ebx+0] + xchg ax,[ebx+4] + mov [ebx+0],ax + add ebx,8 + loop L5 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempShort = ShortPtr[0]; + ShortPtr[0] = ShortPtr[2]; + ShortPtr[2] = TempShort; + ShortPtr += 4; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_INT: + case IL_UNSIGNED_INT: + #ifdef ALTIVEC_GCC + abcd2cbad_int(IntPtr,iCurImage->SizeOfData,IntPtr); + #else + SizeOfData = iCurImage->SizeOfData / 16; // 4*4 + #ifdef USE_WIN32_ASM + __asm + { + mov ebx, IntPtr + mov ecx, SizeOfData + L6: + mov eax,[ebx+0] + xchg eax,[ebx+8] + mov [ebx+0],ax + add ebx,16 + loop L6 + } + #else + for (i = 0; i < SizeOfData; i++) { + TempInt = IntPtr[0]; + IntPtr[0] = IntPtr[2]; + IntPtr[2] = TempInt; + IntPtr += 4; + } + #endif//USE_WIN32_ASM + #endif + return IL_TRUE; + + case IL_FLOAT: + #ifdef ALTIVEC_GCC + abcd2cbad_float(FloatPtr,iCurImage->SizeOfData,FloatPtr); + #else + SizeOfData = iCurImage->SizeOfData / 16; // 4*4 + for (i = 0; i < SizeOfData; i++) { + TempFloat = FloatPtr[0]; + FloatPtr[0] = FloatPtr[2]; + FloatPtr[2] = TempFloat; + FloatPtr += 4; + } + #endif + return IL_TRUE; + + case IL_DOUBLE: + #ifdef ALTIVEC_GCC + abcd2cbad_double(DblPtr,iCurImage->SizeOfData,DblPtr); + #else + SizeOfData = iCurImage->SizeOfData / 32; // 4*8 + for (i = 0; i < SizeOfData; i++) { + TempDbl = DblPtr[0]; + DblPtr[0] = DblPtr[2]; + DblPtr[2] = TempDbl; + DblPtr += 4; + } + #endif + return IL_TRUE; + } + } + + + return IL_FALSE; +} + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_files.c b/libs/DevIL-1.7.8/src-IL/src/il_files.c new file mode 100644 index 00000000..4c987d5c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_files.c @@ -0,0 +1,773 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/04/2009 +// +// Filename: src-IL/src/il_files.c +// +// Description: File handling for DevIL +// +//----------------------------------------------------------------------------- + + +#define __FILES_C +#include "il_internal.h" +#include + + +// All specific to the next set of functions +ILboolean ILAPIENTRY iEofFile(void); +ILboolean ILAPIENTRY iEofLump(void); +ILint ILAPIENTRY iGetcFile(void); +ILint ILAPIENTRY iGetcLump(void); +ILuint ILAPIENTRY iReadFile(void *Buffer, ILuint Size, ILuint Number); +ILuint ILAPIENTRY iReadLump(void *Buffer, const ILuint Size, const ILuint Number); +ILint ILAPIENTRY iSeekRFile(ILint Offset, ILuint Mode); +ILint ILAPIENTRY iSeekRLump(ILint Offset, ILuint Mode); +ILint ILAPIENTRY iSeekWFile(ILint Offset, ILuint Mode); +ILint ILAPIENTRY iSeekWLump(ILint Offset, ILuint Mode); +ILuint ILAPIENTRY iTellRFile(void); +ILuint ILAPIENTRY iTellRLump(void); +ILuint ILAPIENTRY iTellWFile(void); +ILuint ILAPIENTRY iTellWLump(void); +ILint ILAPIENTRY iPutcFile(ILubyte Char); +ILint ILAPIENTRY iPutcLump(ILubyte Char); +ILint ILAPIENTRY iWriteFile(const void *Buffer, ILuint Size, ILuint Number); +ILint ILAPIENTRY iWriteLump(const void *Buffer, ILuint Size, ILuint Number); +ILHANDLE FileRead = NULL, FileWrite = NULL; +const void *ReadLump = NULL; +void *WriteLump = NULL; +ILuint ReadLumpPos = 0, ReadLumpSize = 0, ReadFileStart = 0, WriteFileStart = 0; +ILuint WriteLumpPos = 0, WriteLumpSize = 0; + +fGetcProc GetcProcCopy; +fReadProc ReadProcCopy; +fSeekRProc SeekProcCopy; +fTellRProc TellProcCopy; +ILHANDLE (ILAPIENTRY *iopenCopy)(ILconst_string); +void (ILAPIENTRY *icloseCopy)(ILHANDLE); + +fPutcProc PutcProcCopy; +fSeekWProc SeekWProcCopy; +fTellWProc TellWProcCopy; +fWriteProc WriteProcCopy; +ILHANDLE (ILAPIENTRY *iopenwCopy)(ILconst_string); +void (ILAPIENTRY *iclosewCopy)(ILHANDLE); + +ILboolean UseCache = IL_FALSE; +ILubyte *Cache = NULL; +ILuint CacheSize, CachePos, CacheStartPos, CacheBytesRead; + +// "Fake" size functions +// Definitions are in il_size.c. +ILint ILAPIENTRY iSizeSeek(ILint Offset, ILuint Mode); +ILuint ILAPIENTRY iSizeTell(void); +ILint ILAPIENTRY iSizePutc(ILubyte Char); +ILint ILAPIENTRY iSizeWrite(const void *Buffer, ILuint Size, ILuint Number); + +// Just preserves the current read functions and replaces +// the current read functions with the default read funcs. +void ILAPIENTRY iPreserveReadFuncs() +{ + // Create backups + GetcProcCopy = GetcProc; + ReadProcCopy = ReadProc; + SeekProcCopy = SeekRProc; + TellProcCopy = TellRProc; + iopenCopy = iopenr; + icloseCopy = icloser; + + // Set the standard procs to read + ilResetRead(); + + return; +} + + +// Restores the read functions - must be used after iPreserveReadFuncs(). +void ILAPIENTRY iRestoreReadFuncs() +{ + GetcProc = GetcProcCopy; + ReadProc = ReadProcCopy; + SeekRProc = SeekProcCopy; + TellRProc = TellProcCopy; + iopenr = iopenCopy; + icloser = icloseCopy; + + return; +} + + +// Just preserves the current read functions and replaces +// the current read functions with the default read funcs. +void ILAPIENTRY iPreserveWriteFuncs() +{ + // Create backups + PutcProcCopy = PutcProc; + SeekWProcCopy = SeekWProc; + TellWProcCopy = TellWProc; + WriteProcCopy = WriteProc; + iopenwCopy = iopenw; + iclosewCopy = iclosew; + + // Set the standard procs to write + ilResetWrite(); + + return; +} + + +// Restores the read functions - must be used after iPreserveReadFuncs(). +void ILAPIENTRY iRestoreWriteFuncs() +{ + PutcProc = PutcProcCopy; + SeekWProc = SeekWProcCopy; + TellWProc = TellWProcCopy; + WriteProc = WriteProcCopy; + iopenw = iopenwCopy; + iclosew = iclosewCopy; + + return; +} + + +// Next 7 functions are the default read functions + +ILHANDLE ILAPIENTRY iDefaultOpenR(ILconst_string FileName) +{ +#ifndef _UNICODE + return (ILHANDLE)fopen((char*)FileName, "rb"); +#else + // Windows has a different function, _wfopen, to open UTF16 files, + // whereas Linux just uses fopen for its UTF8 files. + #ifdef _WIN32 + return (ILHANDLE)_wfopen(FileName, L"rb"); + #else + return (ILHANDLE)fopen((char*)FileName, "rb"); + #endif +#endif//UNICODE +} + + +void ILAPIENTRY iDefaultCloseR(ILHANDLE Handle) +{ + fclose((FILE*)Handle); + return; +} + + +ILboolean ILAPIENTRY iDefaultEof(ILHANDLE Handle) +{ + ILuint OrigPos, FileSize; + + // Find out the filesize for checking for the end of file + OrigPos = itell(); + iseek(0, IL_SEEK_END); + FileSize = itell(); + iseek(OrigPos, IL_SEEK_SET); + + if (itell() >= FileSize) + return IL_TRUE; + return IL_FALSE; +} + + +ILint ILAPIENTRY iDefaultGetc(ILHANDLE Handle) +{ + ILint Val; + + if (!UseCache) { + Val = fgetc((FILE*)Handle); + if (Val == IL_EOF) + ilSetError(IL_FILE_READ_ERROR); + } + else { + Val = 0; + if (iread(&Val, 1, 1) != 1) + return IL_EOF; + } + return Val; +} + + +ILint ILAPIENTRY iDefaultRead(void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle) +{ + return (ILint)fread(Buffer, Size, Number, (FILE*)Handle); +} + + +ILint ILAPIENTRY iDefaultRSeek(ILHANDLE Handle, ILint Offset, ILint Mode) +{ + return fseek((FILE*)Handle, Offset, Mode); +} + + +ILint ILAPIENTRY iDefaultWSeek(ILHANDLE Handle, ILint Offset, ILint Mode) +{ + return fseek((FILE*)Handle, Offset, Mode); +} + + +ILint ILAPIENTRY iDefaultRTell(ILHANDLE Handle) +{ + return ftell((FILE*)Handle); +} + + +ILint ILAPIENTRY iDefaultWTell(ILHANDLE Handle) +{ + return ftell((FILE*)Handle); +} + + +ILHANDLE ILAPIENTRY iDefaultOpenW(ILconst_string FileName) +{ +#ifndef _UNICODE + return (ILHANDLE)fopen((char*)FileName, "wb"); +#else + // Windows has a different function, _wfopen, to open UTF16 files, + // whereas Linux just uses fopen. + #ifdef _WIN32 + return (ILHANDLE)_wfopen(FileName, L"wb"); + #else + return (ILHANDLE)fopen((char*)FileName, "wb"); + #endif +#endif//UNICODE +} + + +void ILAPIENTRY iDefaultCloseW(ILHANDLE Handle) +{ + fclose((FILE*)Handle); + return; +} + + +ILint ILAPIENTRY iDefaultPutc(ILubyte Char, ILHANDLE Handle) +{ + return fputc(Char, (FILE*)Handle); +} + + +ILint ILAPIENTRY iDefaultWrite(const void *Buffer, ILuint Size, ILuint Number, ILHANDLE Handle) +{ + return (ILint)fwrite(Buffer, Size, Number, (FILE*)Handle); +} + + +void ILAPIENTRY ilResetRead() +{ + ilSetRead(iDefaultOpenR, iDefaultCloseR, iDefaultEof, iDefaultGetc, + iDefaultRead, iDefaultRSeek, iDefaultRTell); + return; +} + + +void ILAPIENTRY ilResetWrite() +{ + ilSetWrite(iDefaultOpenW, iDefaultCloseW, iDefaultPutc, + iDefaultWSeek, iDefaultWTell, iDefaultWrite); + return; +} + + +//! Allows you to override the default file-reading functions. +void ILAPIENTRY ilSetRead(fOpenRProc Open, fCloseRProc Close, fEofProc Eof, fGetcProc Getc, fReadProc Read, fSeekRProc Seek, fTellRProc Tell) +{ + iopenr = Open; + icloser = Close; + EofProc = Eof; + GetcProc = Getc; + ReadProc = Read; + SeekRProc = Seek; + TellRProc = Tell; + + return; +} + + +//! Allows you to override the default file-writing functions. +void ILAPIENTRY ilSetWrite(fOpenRProc Open, fCloseRProc Close, fPutcProc Putc, fSeekWProc Seek, fTellWProc Tell, fWriteProc Write) +{ + iopenw = Open; + iclosew = Close; + PutcProc = Putc; + WriteProc = Write; + SeekWProc = Seek; + TellWProc = Tell; + + return; +} + + +// Tells DevIL that we're reading from a file, not a lump +void iSetInputFile(ILHANDLE File) +{ + ieof = iEofFile; + igetc = iGetcFile; + iread = iReadFile; + iseek = iSeekRFile; + itell = iTellRFile; + FileRead = File; + ReadFileStart = itell(); +} + + +// Tells DevIL that we're reading from a lump, not a file +void iSetInputLump(const void *Lump, ILuint Size) +{ + ieof = iEofLump; + igetc = iGetcLump; + iread = iReadLump; + iseek = iSeekRLump; + itell = iTellRLump; + ReadLump = Lump; + ReadLumpPos = 0; + ReadLumpSize = Size; +} + + +// Tells DevIL that we're writing to a file, not a lump +void iSetOutputFile(ILHANDLE File) +{ + // Helps with ilGetLumpPos(). + WriteLump = NULL; + WriteLumpPos = 0; + WriteLumpSize = 0; + + iputc = iPutcFile; + iseekw = iSeekWFile; + itellw = iTellWFile; + iwrite = iWriteFile; + FileWrite = File; +} + + +// This is only called by ilDetermineSize. Associates iputc, etc. with +// "fake" writing functions in il_size.c. +void iSetOutputFake(void) +{ + iputc = iSizePutc; + iseekw = iSizeSeek; + itellw = iSizeTell; + iwrite = iSizeWrite; + return; +} + + +// Tells DevIL that we're writing to a lump, not a file +void iSetOutputLump(void *Lump, ILuint Size) +{ + // In this case, ilDetermineSize is currently trying to determine the + // output buffer size. It already has the write functions it needs. + if (Lump == NULL) + return; + + iputc = iPutcLump; + iseekw = iSeekWLump; + itellw = iTellWLump; + iwrite = iWriteLump; + WriteLump = Lump; + WriteLumpPos = 0; + WriteLumpSize = Size; +} + + +ILuint ILAPIENTRY ilGetLumpPos() +{ + if (WriteLump) + return WriteLumpPos; + return 0; +} + + +ILuint ILAPIENTRY ilprintf(const char *Line, ...) +{ + char Buffer[2048]; // Hope this is large enough + va_list VaLine; + ILuint i; + + va_start(VaLine, Line); + vsprintf(Buffer, Line, VaLine); + va_end(VaLine); + + i = ilCharStrLen(Buffer); + iwrite(Buffer, 1, i); + + return i; +} + + +// To pad zeros where needed... +void ipad(ILuint NumZeros) +{ + ILuint i = 0; + for (; i < NumZeros; i++) + iputc(0); + return; +} + + +// +// The rest of the functions following in this file are quite +// self-explanatory, except where commented. +// + +// Next 12 functions are the default write functions + +ILboolean ILAPIENTRY iEofFile(void) +{ + return EofProc((FILE*)FileRead); +} + + +ILboolean ILAPIENTRY iEofLump(void) +{ + if (ReadLumpSize) + return (ReadLumpPos >= ReadLumpSize); + return IL_FALSE; +} + + +ILint ILAPIENTRY iGetcFile(void) +{ + if (!UseCache) { + return GetcProc(FileRead); + } + if (CachePos >= CacheSize) { + iPreCache(CacheSize); + } + + CacheBytesRead++; + return Cache[CachePos++]; +} + + +ILint ILAPIENTRY iGetcLump(void) +{ + // If ReadLumpSize is 0, don't even check to see if we've gone past the bounds. + if (ReadLumpSize > 0) { + if (ReadLumpPos + 1 > ReadLumpSize) { + ReadLumpPos--; + ilSetError(IL_FILE_READ_ERROR); + return IL_EOF; + } + } + + return *((ILubyte*)ReadLump + ReadLumpPos++); +} + + +ILuint ILAPIENTRY iReadFile(void *Buffer, ILuint Size, ILuint Number) +{ + ILuint TotalBytes = 0, BytesCopied; + ILuint BuffSize = Size * Number; + ILuint NumRead; + + if (!UseCache) { + NumRead = ReadProc(Buffer, Size, Number, FileRead); + if (NumRead != Number) + ilSetError(IL_FILE_READ_ERROR); + return NumRead; + } + + /*if (Cache == NULL || CacheSize == 0) { // Shouldn't happen, but we check anyway. + return ReadProc(Buffer, Size, Number, FileRead); + }*/ + + if (BuffSize < CacheSize - CachePos) { + memcpy(Buffer, Cache + CachePos, BuffSize); + CachePos += BuffSize; + CacheBytesRead += BuffSize; + if (Size != 0) + BuffSize /= Size; + return BuffSize; + } + else { + while (TotalBytes < BuffSize) { + // If loop through more than once, after first, CachePos is 0. + if (TotalBytes + CacheSize - CachePos > BuffSize) + BytesCopied = BuffSize - TotalBytes; + else + BytesCopied = CacheSize - CachePos; + + memcpy((ILubyte*)Buffer + TotalBytes, Cache + CachePos, BytesCopied); + TotalBytes += BytesCopied; + CachePos += BytesCopied; + if (TotalBytes < BuffSize) { + iPreCache(CacheSize); + } + } + } + + // DW: Changed on 12-27-2008. Was causing the position to go too far if the + // cache was smaller than the buffer. + //CacheBytesRead += TotalBytes; + CacheBytesRead = CachePos; + if (Size != 0) + TotalBytes /= Size; + if (TotalBytes != Number) + ilSetError(IL_FILE_READ_ERROR); + return TotalBytes; +} + + +ILuint ILAPIENTRY iReadLump(void *Buffer, const ILuint Size, const ILuint Number) +{ + ILuint i, ByteSize = IL_MIN( Size*Number, ReadLumpSize-ReadLumpPos); + + for (i = 0; i < ByteSize; i++) { + *((ILubyte*)Buffer + i) = *((ILubyte*)ReadLump + ReadLumpPos + i); + if (ReadLumpSize > 0) { // ReadLumpSize is too large to care about apparently + if (ReadLumpPos + i > ReadLumpSize) { + ReadLumpPos += i; + if (i != Number) + ilSetError(IL_FILE_READ_ERROR); + return i; + } + } + } + + ReadLumpPos += i; + if (Size != 0) + i /= Size; + if (i != Number) + ilSetError(IL_FILE_READ_ERROR); + return i; +} + + +ILboolean iPreCache(ILuint Size) +{ + // Reading from a memory lump, so don't cache. + if (iread == iReadLump) { + //iUnCache(); // DW: Removed 06-10-2002. + return IL_TRUE; + } + + if (Cache) { + ifree(Cache); + } + + if (Size == 0) { + Size = 1; + } + + Cache = (ILubyte*)ialloc(Size); + if (Cache == NULL) { + return IL_FALSE; + } + + UseCache = IL_FALSE; + CacheStartPos = itell(); + CacheSize = iread(Cache, 1, Size); + if (CacheSize != Size) + ilGetError(); // Get rid of the IL_FILE_READ_ERROR. + + //2003-09-09: uncommented the following line to prevent + //an infinite loop in ilPreCache() + CacheSize = Size; + CachePos = 0; + UseCache = IL_TRUE; + CacheBytesRead = 0; + + return IL_TRUE; +} + + +void iUnCache() +{ + //changed 2003-09-01: + //make iUnCache smart enough to return if + //no cache is used + if (!UseCache) + return; + + if (iread == iReadLump) + return; + + CacheSize = 0; + CachePos = 0; + if (Cache) { + ifree(Cache); + Cache = NULL; + } + UseCache = IL_FALSE; + + iseek(CacheStartPos + CacheBytesRead, IL_SEEK_SET); + + return; +} + + +ILint ILAPIENTRY iSeekRFile(ILint Offset, ILuint Mode) +{ + if (Mode == IL_SEEK_SET) + Offset += ReadFileStart; // This allows us to use IL_SEEK_SET in the middle of a file. + return SeekRProc(FileRead, Offset, Mode); +} + + +// Returns 1 on error, 0 on success +ILint ILAPIENTRY iSeekRLump(ILint Offset, ILuint Mode) +{ + switch (Mode) + { + case IL_SEEK_SET: + if (Offset > (ILint)ReadLumpSize) + return 1; + ReadLumpPos = Offset; + break; + + case IL_SEEK_CUR: + if (ReadLumpPos + Offset > ReadLumpSize) + return 1; + ReadLumpPos += Offset; + break; + + case IL_SEEK_END: + if (Offset > 0) + return 1; + // Should we use >= instead? + if (abs(Offset) > (ILint)ReadLumpSize) // If ReadLumpSize == 0, too bad + return 1; + ReadLumpPos = ReadLumpSize + Offset; + break; + + default: + return 1; + } + + return 0; +} + + +ILuint ILAPIENTRY iTellRFile(void) +{ + return TellRProc(FileRead); +} + + +ILuint ILAPIENTRY iTellRLump(void) +{ + return ReadLumpPos; +} + + +ILHANDLE ILAPIENTRY iGetFile(void) +{ + return FileRead; +} + + +const ILubyte* ILAPIENTRY iGetLump(void) { + return (ILubyte*)ReadLump; +} + + + +// Next 4 functions are the default write functions + +ILint ILAPIENTRY iPutcFile(ILubyte Char) +{ + return PutcProc(Char, FileWrite); +} + + +ILint ILAPIENTRY iPutcLump(ILubyte Char) +{ + if (WriteLumpPos >= WriteLumpSize) + return IL_EOF; // IL_EOF + *((ILubyte*)(WriteLump) + WriteLumpPos++) = Char; + return Char; +} + + +ILint ILAPIENTRY iWriteFile(const void *Buffer, ILuint Size, ILuint Number) +{ + ILuint NumWritten; + NumWritten = WriteProc(Buffer, Size, Number, FileWrite); + if (NumWritten != Number) { + ilSetError(IL_FILE_WRITE_ERROR); + return 0; + } + return NumWritten; +} + + +ILint ILAPIENTRY iWriteLump(const void *Buffer, ILuint Size, ILuint Number) +{ + ILuint SizeBytes = Size * Number; + ILuint i = 0; + + for (; i < SizeBytes; i++) { + if (WriteLumpSize > 0) { + if (WriteLumpPos + i >= WriteLumpSize) { // Should we use > instead? + ilSetError(IL_FILE_WRITE_ERROR); + WriteLumpPos += i; + return i; + } + } + + *((ILubyte*)WriteLump + WriteLumpPos + i) = *((ILubyte*)Buffer + i); + } + + WriteLumpPos += SizeBytes; + + return SizeBytes; +} + + +ILint ILAPIENTRY iSeekWFile(ILint Offset, ILuint Mode) +{ + if (Mode == IL_SEEK_SET) + Offset += WriteFileStart; // This allows us to use IL_SEEK_SET in the middle of a file. + return SeekWProc(FileWrite, Offset, Mode); +} + + +// Returns 1 on error, 0 on success +ILint ILAPIENTRY iSeekWLump(ILint Offset, ILuint Mode) +{ + switch (Mode) + { + case IL_SEEK_SET: + if (Offset > (ILint)WriteLumpSize) + return 1; + WriteLumpPos = Offset; + break; + + case IL_SEEK_CUR: + if (WriteLumpPos + Offset > WriteLumpSize) + return 1; + WriteLumpPos += Offset; + break; + + case IL_SEEK_END: + if (Offset > 0) + return 1; + // Should we use >= instead? + if (abs(Offset) > (ILint)WriteLumpSize) // If WriteLumpSize == 0, too bad + return 1; + WriteLumpPos = WriteLumpSize + Offset; + break; + + default: + return 1; + } + + return 0; +} + + +ILuint ILAPIENTRY iTellWFile(void) +{ + return TellWProc(FileWrite); +} + + +ILuint ILAPIENTRY iTellWLump(void) +{ + return WriteLumpPos; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_fits.c b/libs/DevIL-1.7.8/src-IL/src/il_fits.c new file mode 100644 index 00000000..bd3c04a2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_fits.c @@ -0,0 +1,472 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/src/il_fits.c +// +// Description: Reads from a Flexible Image Transport System (.fits) file. +// Specifications were found at +// http://www.fileformat.info/format/fits. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_FITS + +typedef struct FITSHEAD +{ + ILboolean IsSimple; + ILint BitsPixel; + ILint NumAxes; // Number of dimensions / axes + ILint Width; + ILint Height; + ILint Depth; + ILint NumChans; + + // Not in the header, but it keeps everything together. + ILenum Type; + ILenum Format; + +} FITSHEAD; + +enum { + CARD_READ_FAIL = -1, + CARD_END = 1, + CARD_SIMPLE, + CARD_NOT_SIMPLE, + CARD_BITPIX, + CARD_NUMAXES, + CARD_AXIS, + CARD_SKIP +}; + +ILboolean iIsValidFits(void); +ILboolean iCheckFits(FITSHEAD *Header); +ILboolean iLoadFitsInternal(void); +ILenum GetCardImage(FITSHEAD *Header); +ILboolean GetCardInt(char *Buffer, ILint *Val); + +//! Checks if the file specified in FileName is a valid FITS file. +ILboolean ilIsValidFits(ILconst_string FileName) +{ + ILHANDLE FitsFile; + ILboolean bFits = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("fits")) && !iCheckExtension(FileName, IL_TEXT("fit"))) { + ilSetError(IL_INVALID_EXTENSION); + return bFits; + } + + FitsFile = iopenr(FileName); + if (FitsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bFits; + } + + bFits = ilIsValidFitsF(FitsFile); + icloser(FitsFile); + + return bFits; +} + + +//! Checks if the ILHANDLE contains a valid FITS file at the current position. +ILboolean ilIsValidFitsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidFits(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid FITS lump. +ILboolean ilIsValidFitsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidFits(); +} + + +// Internal function used to get the FITS header from the current file. +ILboolean iGetFitsHead(FITSHEAD *Header) +{ + ILenum CardKey; + +//@TODO: Use something other than memset? + memset(Header, 0, sizeof(Header)); // Clear the header to all 0s first. + + do { + CardKey = GetCardImage(Header); + if (CardKey == CARD_END) // End of the header + break; + if (CardKey == CARD_READ_FAIL) + return IL_FALSE; + if (CardKey == CARD_NOT_SIMPLE) + return IL_FALSE; + } while (!ieof()); + + // The header should never reach the end of the file. + if (ieof()) + return IL_FALSE; // Error needed? + + // The header must always be a multiple of 2880, so we skip the padding bytes (spaces). + iseek((2880 - (itell() % 2880)) % 2880, IL_SEEK_CUR); + + switch (Header->BitsPixel) + { + case 8: + Header->Type = IL_UNSIGNED_BYTE; + break; + case 16: + Header->Type = IL_SHORT; + break; + case 32: + Header->Type = IL_INT; + break; + case -32: + Header->Type = IL_FLOAT; + break; + case -64: + Header->Type = IL_DOUBLE; + break; + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + switch (Header->NumAxes) + { + case 1: // Just a 1D image + Header->Format = IL_LUMINANCE; + Header->Height = 1; + Header->Depth = 1; + Header->NumChans = 1; + break; + + case 2: // Assuming it is a 2D image (width+height) + Header->Format = IL_LUMINANCE; + Header->Depth = 1; + Header->NumChans = 1; + break; + + case 3: + // We cannot deal with more than 3 channels in an image. + Header->Format = IL_LUMINANCE; + Header->NumChans = 1; + break; + + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidFits(void) +{ + FITSHEAD Header; + ILuint Pos = itell(); + + if (!iGetFitsHead(&Header)) + return IL_FALSE; + // The length of the header varies, so we just go back to the original position. + iseek(Pos, IL_SEEK_CUR); + + return iCheckFits(&Header); +} + + +// Internal function used to check if the HEADER is a valid FITS header. +ILboolean iCheckFits(FITSHEAD *Header) +{ + switch (Header->BitsPixel) + { + case 8: // These are the only values accepted. + case 16: + case 32: + case -32: + case -64: + break; + default: + return IL_FALSE; + } + + switch (Header->NumAxes) + { + case 1: // Just a 1D image + case 2: // Assuming it is a 2D image (width+height) + case 3: // 3D image (with depth) + break; + default: + return IL_FALSE; + } + + // Possibility that one of these values is returned as <= 0 by atoi, which we cannot use. + if (Header->Width <= 0 || Header->Height <= 0 || Header->Depth <= 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + return IL_TRUE; +} + + +//! Reads a FITS file +ILboolean ilLoadFits(ILconst_string FileName) +{ + ILHANDLE FitsFile; + ILboolean bFits = IL_FALSE; + + FitsFile = iopenr(FileName); + if (FitsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bFits; + } + + bFits = ilLoadFitsF(FitsFile); + icloser(FitsFile); + + return bFits; +} + + +//! Reads an already-opened FITS file +ILboolean ilLoadFitsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadFitsInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a FITS +ILboolean ilLoadFitsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadFitsInternal(); +} + + +// Internal function used to load the FITS. +ILboolean iLoadFitsInternal(void) +{ + FITSHEAD Header; + ILuint i, NumPix; + ILfloat MaxF = 0.0f; + ILdouble MaxD = 0.0f; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetFitsHead(&Header)) + return IL_FALSE; + if (!iCheckFits(&Header)) + return IL_FALSE; + + if (!ilTexImage(Header.Width, Header.Height, Header.Depth, Header.NumChans, Header.Format, Header.Type, NULL)) + return IL_FALSE; + + /*if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) + return IL_FALSE;*/ + + NumPix = Header.Width * Header.Height * Header.Depth; +//@TODO: Do some checks while reading to see if we have hit the end of the file. + switch (Header.Type) + { + case IL_UNSIGNED_BYTE: + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) + return IL_FALSE; + break; + case IL_SHORT: + for (i = 0; i < NumPix; i++) { + ((ILshort*)iCurImage->Data)[i] = GetBigShort(); + } + break; + case IL_INT: + for (i = 0; i < NumPix; i++) { + ((ILint*)iCurImage->Data)[i] = GetBigInt(); + } + break; + case IL_FLOAT: + for (i = 0; i < NumPix; i++) { + ((ILfloat*)iCurImage->Data)[i] = GetBigFloat(); + if (((ILfloat*)iCurImage->Data)[i] > MaxF) + MaxF = ((ILfloat*)iCurImage->Data)[i]; + } + + // Renormalize to [0..1]. + for (i = 0; i < NumPix; i++) { + // Change all negative numbers to 0. + if (((ILfloat*)iCurImage->Data)[i] < 0.0f) + ((ILfloat*)iCurImage->Data)[i] = 0.0f; + // Do the renormalization now, dividing by the maximum value. + ((ILfloat*)iCurImage->Data)[i] = ((ILfloat*)iCurImage->Data)[i] / MaxF; + } + break; + case IL_DOUBLE: + for (i = 0; i < NumPix; i++) { + ((ILdouble*)iCurImage->Data)[i] = GetBigDouble(); + if (((ILdouble*)iCurImage->Data)[i] > MaxD) + MaxD = ((ILdouble*)iCurImage->Data)[i]; + } + + // Renormalize to [0..1]. + for (i = 0; i < NumPix; i++) { + // Change all negative numbers to 0. + if (((ILdouble*)iCurImage->Data)[i] < 0.0f) + ((ILdouble*)iCurImage->Data)[i] = 0.0f; + // Do the renormalization now, dividing by the maximum value. + ((ILdouble*)iCurImage->Data)[i] = ((ILdouble*)iCurImage->Data)[i] / MaxD; + } break; + } + + return ilFixImage(); +} + + +//@TODO: NAXISx have to come in order. Check this! +ILenum GetCardImage(FITSHEAD *Header) +{ + char Buffer[80]; + + if (iread(Buffer, 1, 80) != 80) // Each card image is exactly 80 bytes long. + return CARD_READ_FAIL; + +//@TODO: Use something other than !strncmp? + if (!strncmp(Buffer, "END ", 4)) + return CARD_END; + + else if (!strncmp(Buffer, "SIMPLE ", 7)) { + // The true value 'T' is always in the 30th position. + if (Buffer[29] != 'T') { + // We cannot support FITS files that do not correspond to the standard. + Header->IsSimple = IL_FALSE; //@TODO: Does this even need to be set? Should exit loading anyway. + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return CARD_NOT_SIMPLE; + } + Header->IsSimple = IL_TRUE; + return CARD_SIMPLE; + } + + else if (!strncmp(Buffer, "BITPIX ", 7)) { + // The specs state that BITPIX has to come after SIMPLE. + if (Header->IsSimple != IL_TRUE) { + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + if (GetCardInt(Buffer, &Header->BitsPixel) != IL_TRUE) + return CARD_READ_FAIL; +//@TODO: Should I do this check from the calling function? Does it really matter? + if (Header->BitsPixel == 0) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return CARD_READ_FAIL; + } + return CARD_BITPIX; + } + + // Needs the space after NAXIS so that it does not get this confused with NAXIS1, NAXIS2, etc. + else if (!strncmp(Buffer, "NAXIS ", 6)) { + if (GetCardInt(Buffer, &Header->NumAxes) != IL_TRUE) + return CARD_READ_FAIL; +//@TODO: Should I do this check from the calling function? Does it really matter? + if (Header->NumAxes < 1 || Header->NumAxes > 3) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return CARD_READ_FAIL; + } + return CARD_NUMAXES; + } + + else if (!strncmp(Buffer, "NAXIS1 ", 7)) { + if (Header->NumAxes == 0) { // Has not been initialized, and it has to come first. + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + // First one will always be the width. + if (GetCardInt(Buffer, &Header->Width) != IL_TRUE) + return CARD_READ_FAIL; + return CARD_AXIS; + } + + else if (!strncmp(Buffer, "NAXIS2 ", 7)) { + if (Header->NumAxes == 0) { // Has not been initialized, and it has to come first. + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + // Cannot have a 2nd axis for 0 or 1. + if (Header->NumAxes == 0 || Header->NumAxes == 1) { + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + +//@TODO: We are assuming that this is the height right now. Could it just be a +// 1D image with multiple bytes per pixel? + if (GetCardInt(Buffer, &Header->Height) != IL_TRUE) + return CARD_READ_FAIL; + return CARD_AXIS; + } + + else if (!strncmp(Buffer, "NAXIS3 ", 7)) { + if (Header->NumAxes == 0) { // Has not been initialized, and it has to come first. + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + // Cannot have a 3rd axis for 0, 1 and 2. + if (Header->NumAxes < 3) { + ilSetError(IL_INVALID_FILE_HEADER); + return CARD_READ_FAIL; + } + + if (GetCardInt(Buffer, &Header->Depth) != IL_TRUE) + return CARD_READ_FAIL; + return CARD_AXIS; + } + + return CARD_SKIP; // This is a card that we do not recognize, so skip it. +} + + +ILboolean GetCardInt(char *Buffer, ILint *Val) +{ + ILuint i; + char ValString[22]; + + if (Buffer[7] != '=' && Buffer[8] != '=') + return IL_FALSE; + for (i = 9; i < 30; i++) { + if (Buffer[i] != ' ' && Buffer[i] != 0) // Right-aligned with ' ' or 0, so skip. + break; + } + if (i == 30) // Did not find the integer in positions 10 - 30. + return IL_FALSE; + + //@TODO: Safest way to do this? + memcpy(ValString, &Buffer[i], 30-i); + ValString[30-i] = 0; // Terminate the string. + + //@TODO: Check the return somehow? + *Val = atoi(ValString); + + return IL_TRUE; +} + +#endif//IL_NO_FITS diff --git a/libs/DevIL-1.7.8/src-IL/src/il_ftx.c b/libs/DevIL-1.7.8/src-IL/src/il_ftx.c new file mode 100644 index 00000000..3de00c02 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_ftx.c @@ -0,0 +1,101 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/12/2009 +// +// Filename: src-IL/src/il_ftx.c +// +// Description: Reads from a Heavy Metal: FAKK2 (.ftx) file. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_FTX + +ILboolean iLoadFtxInternal(void); + + +//! Reads a FTX file +ILboolean ilLoadFtx(ILconst_string FileName) +{ + ILHANDLE FtxFile; + ILboolean bFtx = IL_FALSE; + + FtxFile = iopenr(FileName); + if (FtxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bFtx; + } + + bFtx = ilLoadFtxF(FtxFile); + icloser(FtxFile); + + return bFtx; +} + + +//! Reads an already-opened FTX file +ILboolean ilLoadFtxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadFtxInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a FTX +ILboolean ilLoadFtxL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadFtxInternal(); +} + + +// Internal function used to load the FTX. +ILboolean iLoadFtxInternal(void) +{ + ILuint Width, Height, HasAlpha; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Width = GetLittleUInt(); + Height = GetLittleUInt(); + HasAlpha = GetLittleUInt(); // Kind of backwards from what I would think... + + //@TODO: Right now, it appears that all images are in RGBA format. See if I can find specs otherwise + // or images that load incorrectly like this. + //if (HasAlpha == 0) { // RGBA format + if (!ilTexImage(Width, Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + //} + //else if (HasAlpha == 1) { // RGB format + // if (!ilTexImage(Width, Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + // return IL_FALSE; + //} + //else { // Unknown format + // ilSetError(IL_INVALID_FILE_HEADER); + // return IL_FALSE; + //} + + // The origin will always be in the upper left. + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + // All we have to do for this format is read the raw, uncompressed data. + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) + return IL_FALSE; + + return ilFixImage(); +} + +#endif//IL_NO_FTX + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_gif.c b/libs/DevIL-1.7.8/src-IL/src/il_gif.c new file mode 100644 index 00000000..1ba78885 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_gif.c @@ -0,0 +1,755 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_gif.c +// +// Description: Reads from a Graphics Interchange Format (.gif) file. +// +// The LZW decompression code is based on code released to the public domain +// by Javier Arevalo and can be found at +// http://www.programmersheaven.com/zone10/cat452 +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_GIF + +#include "il_gif.h" + + +ILenum GifType; + +//! Checks if the file specified in FileName is a valid Gif file. +ILboolean ilIsValidGif(ILconst_string FileName) +{ + ILHANDLE GifFile; + ILboolean bGif = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("gif"))) { + ilSetError(IL_INVALID_EXTENSION); + return bGif; + } + + GifFile = iopenr(FileName); + if (GifFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bGif; + } + + bGif = ilIsValidGifF(GifFile); + icloser(GifFile); + + return bGif; +} + + +//! Checks if the ILHANDLE contains a valid Gif file at the current position. +ILboolean ilIsValidGifF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidGif(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Gif lump. +ILboolean ilIsValidGifL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidGif(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidGif() +{ + char Header[6]; + + if (iread(Header, 1, 6) != 6) + return IL_FALSE; + iseek(-6, IL_SEEK_CUR); + + if (!strnicmp(Header, "GIF87A", 6)) + return IL_TRUE; + if (!strnicmp(Header, "GIF89A", 6)) + return IL_TRUE; + + return IL_FALSE; +} + + +//! Reads a Gif file +ILboolean ilLoadGif(ILconst_string FileName) +{ + ILHANDLE GifFile; + ILboolean bGif = IL_FALSE; + + GifFile = iopenr(FileName); + if (GifFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bGif; + } + + bGif = ilLoadGifF(GifFile); + icloser(GifFile); + + return bGif; +} + + +//! Reads an already-opened Gif file +ILboolean ilLoadGifF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadGifInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Gif +ILboolean ilLoadGifL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadGifInternal(); +} + + +// Internal function used to load the Gif. +ILboolean iLoadGifInternal() +{ + GIFHEAD Header; + ILpal GlobalPal; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + GlobalPal.Palette = NULL; + GlobalPal.PalSize = 0; + + //read header + iread(&Header.Sig, 1, 6); + Header.Width = GetLittleUShort(); + Header.Height = GetLittleUShort(); + Header.ColourInfo = igetc(); + Header.Background = igetc(); + Header.Aspect = igetc(); + + if (!strnicmp(Header.Sig, "GIF87A", 6)) { + GifType = GIF87A; + } + else if (!strnicmp(Header.Sig, "GIF89A", 6)) { + GifType = GIF89A; + } + else { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + // Check for a global colour map. + if (Header.ColourInfo & (1 << 7)) { + if (!iGetPalette(Header.ColourInfo, &GlobalPal, IL_FALSE, NULL)) { + return IL_FALSE; + } + } + + if (!GetImages(&GlobalPal, &Header)) + return IL_FALSE; + + if (GlobalPal.Palette && GlobalPal.PalSize) + ifree(GlobalPal.Palette); + GlobalPal.Palette = NULL; + GlobalPal.PalSize = 0; + + return ilFixImage(); +} + + +ILboolean iGetPalette(ILubyte Info, ILpal *Pal, ILboolean UsePrevPal, ILimage *PrevImage) +{ + ILuint PalSize, PalOffset = 0; + + // If we have a local palette and have to use the previous frame as well, + // we have to copy the palette from the previous frame, in addition + // to the data, which we copy in GetImages. + + // The ld(palettes bpp - 1) is stored in the lower + // 3 bits of Info (weird gif format ... :) ) + PalSize = (1 << ((Info & 0x7) + 1)) * 3; + if (UsePrevPal) { + if (PrevImage == NULL) { // Cannot use the previous palette if it does not exist. + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + PalSize = PalSize + PrevImage->Pal.PalSize; + PalOffset = PrevImage->Pal.PalSize; + } + if (PalSize > 256 * 3) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + Pal->PalSize = PalSize; + + Pal->PalType = IL_PAL_RGB24; + //Pal->Palette = (ILubyte*)ialloc(Pal->PalSize); + Pal->Palette = (ILubyte*)ialloc(256 * 3); + if (Pal->Palette == NULL) + return IL_FALSE; + if (UsePrevPal) + memcpy(Pal->Palette, PrevImage->Pal.Palette, PrevImage->Pal.PalSize); // Copy the old palette over. + if (iread(Pal->Palette + PalOffset, 1, Pal->PalSize) != Pal->PalSize) { // Read the new palette. + ifree(Pal->Palette); + Pal->Palette = NULL; + return IL_FALSE; + } + + return IL_TRUE; +} + + +ILboolean GetImages(ILpal *GlobalPal, GIFHEAD *GifHead) +{ + IMAGEDESC ImageDesc, OldImageDesc; + GFXCONTROL Gfx; + ILboolean BaseImage = IL_TRUE; + ILimage *Image = iCurImage, *TempImage = NULL, *PrevImage = NULL; + ILuint NumImages = 0, i; + ILint input; + ILuint PalOffset; + + OldImageDesc.ImageInfo = 0; // to initialize the data with an harmless value + Gfx.Used = IL_TRUE; + + while (!ieof()) { + ILubyte DisposalMethod = 1; + + i = itell(); + if (!SkipExtensions(&Gfx)) + goto error_clean; + i = itell(); + + if (!Gfx.Used) + DisposalMethod = (Gfx.Packed & 0x1C) >> 2; + + //read image descriptor + ImageDesc.Separator = igetc(); + if (ImageDesc.Separator != 0x2C) //end of image + break; + ImageDesc.OffX = GetLittleUShort(); + ImageDesc.OffY = GetLittleUShort(); + ImageDesc.Width = GetLittleUShort(); + ImageDesc.Height = GetLittleUShort(); + ImageDesc.ImageInfo = igetc(); + + if (ieof()) { + ilGetError(); // Gets rid of the IL_FILE_READ_ERROR that inevitably results. + break; + } + + + if (!BaseImage) { + NumImages++; + Image->Next = ilNewImage(iCurImage->Width, iCurImage->Height, 1, 1, 1); + if (Image->Next == NULL) + goto error_clean; + //20040612: DisposalMethod controls how the new images data is to be combined + //with the old image. 0 means that it doesn't matter how they are combined, + //1 means keep the old image, 2 means set to background color, 3 is + //load the image that was in place before the current (this is not implemented + //here! (TODO?)) + if (DisposalMethod == 2 || DisposalMethod == 3) + //Note that this is actually wrong, too: If the image has a local + //color table, we should really search for the best fit of the + //background color table and use that index (?). Furthermore, + //we should only memset the part of the image that is not read + //later (if we are sure that no parts of the read image are transparent). + if (!Gfx.Used && Gfx.Packed & 0x1) + memset(Image->Next->Data, Gfx.Transparent, Image->SizeOfData); + else + memset(Image->Next->Data, GifHead->Background, Image->SizeOfData); + else if (DisposalMethod == 1 || DisposalMethod == 0) + memcpy(Image->Next->Data, Image->Data, Image->SizeOfData); + //Interlacing has to be removed after the image was copied (line above) + if (OldImageDesc.ImageInfo & (1 << 6)) { // Image is interlaced. + if (!RemoveInterlace(Image)) + goto error_clean; + } + + PrevImage = Image; + Image = Image->Next; + Image->Format = IL_COLOUR_INDEX; + Image->Origin = IL_ORIGIN_UPPER_LEFT; + } else { + BaseImage = IL_FALSE; + if (!Gfx.Used && Gfx.Packed & 0x1) + memset(Image->Data, Gfx.Transparent, Image->SizeOfData); + else + memset(Image->Data, GifHead->Background, Image->SizeOfData); + } + + Image->OffX = ImageDesc.OffX; + Image->OffY = ImageDesc.OffY; + PalOffset = 0; + + // Check to see if the image has its own palette. + if (ImageDesc.ImageInfo & (1 << 7)) { + ILboolean UsePrevPal = IL_FALSE; + if (DisposalMethod == 1 && NumImages != 0) { // Cannot be the first image for this. + PalOffset = PrevImage->Pal.PalSize; + UsePrevPal = IL_TRUE; + } + if (!iGetPalette(ImageDesc.ImageInfo, &Image->Pal, UsePrevPal, PrevImage)) { + goto error_clean; + } + } else { + if (!iCopyPalette(&Image->Pal, GlobalPal)) { + goto error_clean; + } + } + + if (!GifGetData(Image, Image->Data + ImageDesc.OffX + ImageDesc.OffY*Image->Width, Image->SizeOfData, + ImageDesc.Width, ImageDesc.Height, Image->Width, PalOffset, &Gfx)) { + memset(Image->Data, 0, Image->SizeOfData); //@TODO: Remove this. For debugging purposes right now. + ilSetError(IL_ILLEGAL_FILE_VALUE); + goto error_clean; + } + + // See if there was a valid graphics control extension. + if (!Gfx.Used) { + Gfx.Used = IL_TRUE; + Image->Duration = Gfx.Delay * 10; // We want it in milliseconds. + + // See if a transparent colour is defined. + if (Gfx.Packed & 1) { + if (!ConvertTransparent(Image, Gfx.Transparent)) { + goto error_clean; + } + } + } + i = itell(); + // Terminates each block. + if((input = igetc()) == IL_EOF) + goto error_clean; + + if (input != 0x00) + iseek(-1, IL_SEEK_CUR); + // break; + + OldImageDesc = ImageDesc; + } + + //Deinterlace last image + if (OldImageDesc.ImageInfo & (1 << 6)) { // Image is interlaced. + if (!RemoveInterlace(Image)) + goto error_clean; + } + + if (BaseImage) // Was not able to load any images in... + return IL_FALSE; + + return IL_TRUE; + +error_clean: + Image = iCurImage->Next; + /* while (Image) { + TempImage = Image; + Image = Image->Next; + ilCloseImage(TempImage); + }*/ + return IL_FALSE; +} + + +ILboolean SkipExtensions(GFXCONTROL *Gfx) +{ + ILint Code; + ILint Label; + ILint Size; + + // DW (06-03-2002): Apparently there can be... + //if (GifType == GIF87A) + // return IL_TRUE; // No extensions in the GIF87a format. + + do { + if((Code = igetc()) == IL_EOF) + return IL_FALSE; + + if (Code != 0x21) { + iseek(-1, IL_SEEK_CUR); + return IL_TRUE; + } + + if((Label = igetc()) == IL_EOF) + return IL_FALSE; + + switch (Label) + { + case 0xF9: + Gfx->Size = igetc(); + Gfx->Packed = igetc(); + Gfx->Delay = GetLittleUShort(); + Gfx->Transparent = igetc(); + Gfx->Terminator = igetc(); + if (ieof()) + return IL_FALSE; + Gfx->Used = IL_FALSE; + break; + /*case 0xFE: + break; + + case 0x01: + break;*/ + default: + do { + if((Size = igetc()) == IL_EOF) + return IL_FALSE; + iseek(Size, IL_SEEK_CUR); + } while (!ieof() && Size != 0); + } + + // @TODO: Handle this better. + if (ieof()) { + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + } while (1); + + return IL_TRUE; +} + + +#define MAX_CODES 4096 + +ILint curr_size, clear, ending, newcodes, top_slot, slot, navail_bytes = 0, nbits_left = 0; +ILubyte b1; +ILubyte byte_buff[257]; +ILubyte *pbytes; +ILubyte *stack; +ILubyte *suffix; +ILshort *prefix; + +ILboolean success; + +ILuint code_mask[13] = +{ + 0L, + 0x0001L, 0x0003L, + 0x0007L, 0x000FL, + 0x001FL, 0x003FL, + 0x007FL, 0x00FFL, + 0x01FFL, 0x03FFL, + 0x07FFL, 0x0FFFL +}; + + +ILint get_next_code(void) { + ILint i, t; + ILuint ret; + + //20050102: Tests for IL_EOF were added because this function + //crashed sometimes if igetc() returned IL_EOF + //(for example "table-add-column-before-active.gif" included in the + //mozilla source package) + + if (!nbits_left) { + if (navail_bytes <= 0) { + pbytes = byte_buff; + navail_bytes = igetc(); + + if(navail_bytes == IL_EOF) { + success = IL_FALSE; + return ending; + } + + if (navail_bytes) { + for (i = 0; i < navail_bytes; i++) { + if((t = igetc()) == IL_EOF) { + success = IL_FALSE; + return ending; + } + byte_buff[i] = t; + } + } + } + b1 = *pbytes++; + nbits_left = 8; + navail_bytes--; + } + + ret = b1 >> (8 - nbits_left); + while (curr_size > nbits_left) { + if (navail_bytes <= 0) { + pbytes = byte_buff; + navail_bytes = igetc(); + + if(navail_bytes == IL_EOF) { + success = IL_FALSE; + return ending; + } + + if (navail_bytes) { + for (i = 0; i < navail_bytes; i++) { + if((t = igetc()) == IL_EOF) { + success = IL_FALSE; + return ending; + } + byte_buff[i] = t; + } + } + } + b1 = *pbytes++; + ret |= b1 << nbits_left; + nbits_left += 8; + navail_bytes--; + } + nbits_left -= curr_size; + + return (ret & code_mask[curr_size]); +} + +static void cleanUpGifLoadState() +{ + ifree(stack); + ifree(suffix); + ifree(prefix); + +} + +ILboolean GifGetData(ILimage *Image, ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, ILuint PalOffset, GFXCONTROL *Gfx) +{ + ILubyte *sp; + ILint code, fc, oc; + ILubyte DisposalMethod = 0; + ILint c, size; + ILuint i = 0, Read = 0, j = 0; + ILubyte *DataPtr = Data; + + if (!Gfx->Used) + DisposalMethod = (Gfx->Packed & 0x1C) >> 2; + if((size = igetc()) == IL_EOF) + return IL_FALSE; + + if (size < 2 || 9 < size) { + return IL_FALSE; + } + + stack = (ILubyte*)ialloc(MAX_CODES + 1); + suffix = (ILubyte*)ialloc(MAX_CODES + 1); + prefix = (ILshort*)ialloc(sizeof(*prefix) * (MAX_CODES + 1)); + if (!stack || !suffix || !prefix) + { + cleanUpGifLoadState(); + return IL_FALSE; + } + + curr_size = size + 1; + top_slot = 1 << curr_size; + clear = 1 << size; + ending = clear + 1; + slot = newcodes = ending + 1; + navail_bytes = nbits_left = 0; + oc = fc = 0; + sp = stack; + + while ((c = get_next_code()) != ending && Read < Height) { + if (c == clear) + { + curr_size = size + 1; + slot = newcodes; + top_slot = 1 << curr_size; + while ((c = get_next_code()) == clear); + if (c == ending) + break; + if (c >= slot) + c = 0; + oc = fc = c; + + if (DisposalMethod == 1 && !Gfx->Used && Gfx->Transparent == c && (Gfx->Packed & 0x1) != 0) + i++; + else if (i < Width) + DataPtr[i++] = c + PalOffset; + + if (i == Width) + { + DataPtr += Stride; + i = 0; + Read += 1; + ++j; + if (j >= Height) { + cleanUpGifLoadState(); + return IL_FALSE; + } + } + } + else + { + code = c; + //BG-2007-01-10: several fixes for incomplete GIFs + if (code >= slot) + { + code = oc; + if (sp >= stack + MAX_CODES) { + cleanUpGifLoadState(); + return IL_FALSE; + } + *sp++ = fc; + } + + if (code >= MAX_CODES) + return IL_FALSE; + while (code >= newcodes) + { + if (sp >= stack + MAX_CODES) + { + cleanUpGifLoadState(); + return IL_FALSE; + } + *sp++ = suffix[code]; + code = prefix[code]; + } + + if (sp >= stack + MAX_CODES) { + cleanUpGifLoadState(); + return IL_FALSE; + } + + *sp++ = (ILbyte)code; + if (slot < top_slot) + { + fc = code; + suffix[slot] = fc; + prefix[slot++] = oc; + oc = c; + } + if (slot >= top_slot && curr_size < 12) + { + top_slot <<= 1; + curr_size++; + } + while (sp > stack) + { + sp--; + if (DisposalMethod == 1 && !Gfx->Used && Gfx->Transparent == *sp && (Gfx->Packed & 0x1) != 0) + i++; + else if (i < Width) + DataPtr[i++] = *sp + PalOffset; + + if (i == Width) + { + i = 0; + Read += 1; + j = (j+1) % Height; + // Needs to start from Data, not Image->Data. + DataPtr = Data + j * Stride; + } + } + } + } + cleanUpGifLoadState(); + return IL_TRUE; +} + + +/*From the GIF spec: + + The rows of an Interlaced images are arranged in the following order: + + Group 1 : Every 8th. row, starting with row 0. (Pass 1) + Group 2 : Every 8th. row, starting with row 4. (Pass 2) + Group 3 : Every 4th. row, starting with row 2. (Pass 3) + Group 4 : Every 2nd. row, starting with row 1. (Pass 4) +*/ + +ILboolean RemoveInterlace(ILimage *image) +{ + ILubyte *NewData; + ILuint i, j = 0; + + NewData = (ILubyte*)ialloc(image->SizeOfData); + if (NewData == NULL) + return IL_FALSE; + + //changed 20041230: images with offsety != 0 were not + //deinterlaced correctly before... + for (i = 0; i < image->OffY; i++, j++) { + memcpy(&NewData[i * image->Bps], &image->Data[j * image->Bps], image->Bps); + } + + for (i = 0 + image->OffY; i < image->Height; i += 8, j++) { + memcpy(&NewData[i * image->Bps], &image->Data[j * image->Bps], image->Bps); + } + + for (i = 4 + image->OffY; i < image->Height; i += 8, j++) { + memcpy(&NewData[i * image->Bps], &image->Data[j * image->Bps], image->Bps); + } + + for (i = 2 + image->OffY; i < image->Height; i += 4, j++) { + memcpy(&NewData[i * image->Bps], &image->Data[j * image->Bps], image->Bps); + } + + for (i = 1 + image->OffY; i < image->Height; i += 2, j++) { + memcpy(&NewData[i * image->Bps], &image->Data[j * image->Bps], image->Bps); + } + + ifree(image->Data); + image->Data = NewData; + + return IL_TRUE; +} + + +// Uses the transparent colour index to make an alpha channel. +ILboolean ConvertTransparent(ILimage *Image, ILubyte TransColour) +{ + ILubyte *Palette; + ILuint i, j; + + if (!Image->Pal.Palette || !Image->Pal.PalSize) { + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + Palette = (ILubyte*)ialloc(Image->Pal.PalSize / 3 * 4); + if (Palette == NULL) + return IL_FALSE; + + for (i = 0, j = 0; i < Image->Pal.PalSize; i += 3, j += 4) { + Palette[j ] = Image->Pal.Palette[i ]; + Palette[j+1] = Image->Pal.Palette[i+1]; + Palette[j+2] = Image->Pal.Palette[i+2]; + if (j/4 == TransColour) + Palette[j+3] = 0x00; + else + Palette[j+3] = 0xFF; + } + + ifree(Image->Pal.Palette); + Image->Pal.Palette = Palette; + Image->Pal.PalSize = Image->Pal.PalSize / 3 * 4; + Image->Pal.PalType = IL_PAL_RGBA32; + + return IL_TRUE; +} + +#endif //IL_NO_GIF diff --git a/libs/DevIL-1.7.8/src-IL/src/il_hdr.c b/libs/DevIL-1.7.8/src-IL/src/il_hdr.c new file mode 100644 index 00000000..55b9bd16 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_hdr.c @@ -0,0 +1,659 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods (this file by thakis / Denton) +// Last modified: 02/09/2009 +// +// Filename: src-IL/src/il_hdr.c +// +// Description: Reads/writes a RADIANCE High Dynamic Range Image +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_HDR +#include "il_hdr.h" +#include "il_endian.h" + + +//! Checks if the file specified in FileName is a valid .hdr file. +ILboolean ilIsValidHdr(ILconst_string FileName) +{ + ILHANDLE HdrFile; + ILboolean bHdr = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("hdr"))) { + ilSetError(IL_INVALID_EXTENSION); + return bHdr; + } + + HdrFile = iopenr(FileName); + if (HdrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bHdr; + } + + bHdr = ilIsValidHdrF(HdrFile); + icloser(HdrFile); + + return bHdr; +} + + +//! Checks if the ILHANDLE contains a valid .hdr file at the current position. +ILboolean ilIsValidHdrF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidHdr(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .hdr lump. +ILboolean ilIsValidHdrL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidHdr(); +} + + +// Internal function used to get the .hdr header from the current file. +ILboolean iGetHdrHead(HDRHEADER *Header) +{ + ILboolean done = IL_FALSE; + char a, b; + char x[3], y[3]; //changed 20050217: added space for the '\0' char + char buff[81]; // 01-19-2009: Added space for the '\0'. + ILuint count = 0; + + iread(Header->Signature, 1, 10); + + //skip lines until an empty line is found. + //this marks the end of header information, + //the next line contains the image's dimension. + + //TODO: read header contents into variables + //(EXPOSURE, orientation, xyz correction, ...) + + if (iread(&a, 1, 1) != 1) + return IL_FALSE; + + while (!done) { + if (iread(&b, 1, 1) != 1) + return IL_FALSE; + if (b == '\n' && a == '\n') + done = IL_TRUE; + else + a = b; + } + + //read dimensions (note that this assumes a somewhat valid image) + if (iread(&a, 1, 1) != 1) + return IL_FALSE; + while (a != '\n') { + if (count >= 80) { // Line shouldn't be this long at all. + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + buff[count] = a; + if (iread(&a, 1, 1) != 1) + return IL_FALSE; + ++count; + } + buff[count] = '\0'; + + //note that this is not the 100% correct way to load hdr images: + //in a perfect world we would check if there's a +/- X/Y in front + //of width and heigth and mirror + rotate the image after decoding + //according to that. But HDRShop doesn't do that either (and that's + //my reference program :) ) and it's just a rotate and a mirror, + //nothing that really changes the appearance of the loaded image... + //(The code as it is now assumes that y contains "-Y" and x contains + //"+X" after the following line) + + // The 2 has to be in the %s format specifier to prevent buffer overruns. + sscanf(buff, "%2s %d %2s %d", y, &Header->Height, x, &Header->Width); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidHdr() +{ + char Head[10]; + ILint Read; + + Read = iread(Head, 1, 10); + iseek(-Read, IL_SEEK_CUR); // Go ahead and restore to previous state + if (Read != 10) + return IL_FALSE; + + return + strnicmp(Head, "#?RADIANCE", 10) == 0 + || strnicmp(Head, "#?RGBE", 6) == 0; +} + + +// Internal function used to check if the HEADER is a valid .hdr header. +ILboolean iCheckHdr(HDRHEADER *Header) +{ + return + strnicmp(Header->Signature, "#?RADIANCE", 10) == 0 + || strnicmp(Header->Signature, "#?RGBE", 6) == 0; +} + + +//! Reads a .hdr file +ILboolean ilLoadHdr(ILconst_string FileName) +{ + ILHANDLE HdrFile; + ILboolean bHdr = IL_FALSE; + + HdrFile = iopenr(FileName); + if (HdrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bHdr; + } + + bHdr = ilLoadHdrF(HdrFile); + icloser(HdrFile); + + return bHdr; +} + + +//! Reads an already-opened .hdr file +ILboolean ilLoadHdrF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadHdrInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .hdr +ILboolean ilLoadHdrL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadHdrInternal(); +} + + +// Internal function used to load the .hdr. +ILboolean iLoadHdrInternal() +{ + HDRHEADER Header; + ILfloat *data; + ILubyte *scanline; + ILuint i, j, e, r, g, b; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetHdrHead(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + if (!iCheckHdr(&Header)) { + //iseek(-(ILint)sizeof(HDRHEAD), IL_SEEK_CUR); + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Update the current image with the new dimensions + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_RGB, IL_FLOAT, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + //read image data + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->Width / 8 * iCurImage->Height); + + data = (ILfloat*)iCurImage->Data; + scanline = (ILubyte*)ialloc(Header.Width*4); + for (i = 0; i < Header.Height; ++i) { + ReadScanline(scanline, Header.Width); + + //convert hdrs internal format to floats + for (j = 0; j < 4*Header.Width; j += 4) { + ILuint *ee; + ILfloat t, *ff; + e = scanline[j + 3]; + r = scanline[j + 0]; + g = scanline[j + 1]; + b = scanline[j + 2]; + + //t = (float)pow(2.f, ((ILint)e) - 128); + if (e != 0) + e = (e - 1) << 23; + + // All this just to avoid stric-aliasing warnings... + // was: t = *(ILfloat*)&e + ee = &e; + ff = (ILfloat*)ee; + t = *ff; + + data[0] = (r/255.0f)*t; + data[1] = (g/255.0f)*t; + data[2] = (b/255.0f)*t; + data += 3; + } + } + iUnCache(); + ifree(scanline); + + return ilFixImage(); +} + +void ReadScanline(ILubyte *scanline, ILuint w) { + ILubyte *runner; + ILuint r, g, b, e, read, shift; + + r = igetc(); + g = igetc(); + b = igetc(); + e = igetc(); + + //check if the scanline is in the new format + //if so, e, r, g, g are stored separated and are + //rle-compressed independently. + if (r == 2 && g == 2) { + ILuint length = (b << 8) | e; + ILuint j, t, k; + if (length > w) + length = w; //fix broken files + for (k = 0; k < 4; ++k) { + runner = scanline + k; + j = 0; + while (j < length) { + t = igetc(); + if (t > 128) { //Run? + ILubyte val = igetc(); + t &= 127; + //copy current byte + while (t > 0 && j < length) { + *runner = val; + runner += 4; + --t; + ++j; + } + } + else { //No Run. + //read new bytes + while (t > 0 && j < length) { + *runner = igetc(); + runner += 4; + --t; + ++j; + } + } + } + } + return; //done decoding a scanline in separated format + } + + //if we come here, we are dealing with old-style scanlines + shift = 0; + read = 0; + runner = scanline; + while (read < w) { + if (read != 0) { + r = igetc(); + g = igetc(); + b = igetc(); + e = igetc(); + } + + //if all three mantissas are 1, then this is a rle + //count dword + if (r == 1 && g == 1 && b == 1) { + ILuint length = e; + ILuint j; + for (j = length << shift; j > 0 && read < w; --j) { + memcpy(runner, runner - 4, 4); + runner += 4; + ++read; + } + //if more than one rle count dword is read + //consecutively, they are higher order bytes + //of the first read value. shift keeps track of + //that. + shift += 8; + } + else { + runner[0] = r; + runner[1] = g; + runner[2] = b; + runner[3] = e; + + shift = 0; + runner += 4; + ++read; + } + } +} + + + +//! Writes a Hdr file +ILboolean ilSaveHdr(const ILstring FileName) +{ + ILHANDLE HdrFile; + ILuint HdrSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + HdrFile = iopenw(FileName); + if (HdrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + HdrSize = ilSaveHdrF(HdrFile); + iclosew(HdrFile); + + if (HdrSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Hdr to an already-opened file +ILuint ilSaveHdrF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveHdrInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Hdr to a memory "lump" +ILuint ilSaveHdrL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveHdrInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// +// Much of the saving code is based on the code by Bruce Walter, +// available at http://www.graphics.cornell.edu/online/formats/rgbe/. +// +// The actual source code file is +// http://www.graphics.cornell.edu/online/formats/rgbe/rgbe.c +// + + +/* standard conversion from float pixels to rgbe pixels */ +/* note: you can remove the "inline"s if your compiler complains about it */ +//static INLINE void +static void +float2rgbe(unsigned char rgbe[4], float red, float green, float blue) +{ + float v; + int e; + + v = red; + if (green > v) v = green; + if (blue > v) v = blue; + if (v < 1e-32) { + rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0; + } + else { + v = (float)(frexp(v,&e) * 256.0/v); + rgbe[0] = (unsigned char) (red * v); + rgbe[1] = (unsigned char) (green * v); + rgbe[2] = (unsigned char) (blue * v); + rgbe[3] = (unsigned char) (e + 128); + } +} + + +typedef struct { + ILuint valid; /* indicate which fields are valid */ + ILbyte programtype[16]; /* listed at beginning of file to identify it + * after "#?". defaults to "RGBE" */ + ILfloat gamma; /* image has already been gamma corrected with + * given gamma. defaults to 1.0 (no correction) */ + ILfloat exposure; /* a value of 1.0 in an image corresponds to + * watts/steradian/m^2. + * defaults to 1.0 */ +} rgbe_header_info; + +/* flags indicating which fields in an rgbe_header_info are valid */ +#define RGBE_VALID_PROGRAMTYPE 0x01 +#define RGBE_VALID_GAMMA 0x02 +#define RGBE_VALID_EXPOSURE 0x04 + +/* offsets to red, green, and blue components in a data (float) pixel */ +#define RGBE_DATA_RED 0 +#define RGBE_DATA_GREEN 1 +#define RGBE_DATA_BLUE 2 +/* number of floats per pixel */ +#define RGBE_DATA_SIZE 3 + + +/* default minimal header. modify if you want more information in header */ +ILboolean RGBE_WriteHeader(ILuint width, ILuint height, rgbe_header_info *info) +{ + char *programtype = "RGBE"; + + if (info && (info->valid & RGBE_VALID_PROGRAMTYPE)) + programtype = info->programtype; + if (ilprintf("#?%s\n",programtype) < 0) + return IL_FALSE; + /* The #? is to identify file type, the programtype is optional. */ + if (info && (info->valid & RGBE_VALID_GAMMA)) { + if (ilprintf("GAMMA=%g\n",info->gamma) < 0) + return IL_FALSE; + } + if (info && (info->valid & RGBE_VALID_EXPOSURE)) { + if (ilprintf("EXPOSURE=%g\n",info->exposure) < 0) + return IL_FALSE; + } + if (ilprintf("FORMAT=32-bit_rle_rgbe\n\n") < 0) + return IL_FALSE; + if (ilprintf("-Y %d +X %d\n", height, width) < 0) + return IL_FALSE; + return IL_TRUE; +} + + +/* simple write routine that does not use run length encoding */ +/* These routines can be made faster by allocating a larger buffer and + fread-ing and iwrite-ing the data in larger chunks */ +int RGBE_WritePixels(float *data, int numpixels) +{ + unsigned char rgbe[4]; + + while (numpixels-- > 0) { + float2rgbe(rgbe,data[RGBE_DATA_RED],data[RGBE_DATA_GREEN],data[RGBE_DATA_BLUE]); + data += RGBE_DATA_SIZE; + if (iwrite(rgbe, sizeof(rgbe), 1) < 1) + return IL_FALSE; + } + return IL_TRUE; +} + + +/* The code below is only needed for the run-length encoded files. */ +/* Run length encoding adds considerable complexity but does */ +/* save some space. For each scanline, each channel (r,g,b,e) is */ +/* encoded separately for better compression. */ + +ILboolean RGBE_WriteBytes_RLE(ILubyte *data, ILuint numbytes) +{ +#define MINRUNLENGTH 4 + ILuint cur, beg_run, run_count, old_run_count, nonrun_count; + ILubyte buf[2]; + + cur = 0; + while (cur < numbytes) { + beg_run = cur; + /* find next run of length at least 4 if one exists */ + run_count = old_run_count = 0; + while((run_count < MINRUNLENGTH) && (beg_run < numbytes)) { + beg_run += run_count; + old_run_count = run_count; + run_count = 1; + // 01-25-2009: Moved test for beg_run + run_count first so that it is + // tested first. This keeps it from going out of bounds by 1. + while((beg_run + run_count < numbytes) && (run_count < 127) && + (data[beg_run] == data[beg_run + run_count])) + run_count++; + } + /* if data before next big run is a short run then write it as such */ + if ((old_run_count > 1)&&(old_run_count == beg_run - cur)) { + buf[0] = 128 + old_run_count; /*write short run*/ + buf[1] = data[cur]; + if (iwrite(buf,sizeof(buf[0])*2,1) < 1) + return IL_FALSE; + cur = beg_run; + } + /* write out bytes until we reach the start of the next run */ + while(cur < beg_run) { + nonrun_count = beg_run - cur; + if (nonrun_count > 128) + nonrun_count = 128; + buf[0] = nonrun_count; + if (iwrite(buf,sizeof(buf[0]),1) < 1) + return IL_FALSE; + if (iwrite(&data[cur],sizeof(data[0])*nonrun_count,1) < 1) + return IL_FALSE; + cur += nonrun_count; + } + /* write out next run if one was found */ + if (run_count >= MINRUNLENGTH) { + buf[0] = 128 + run_count; + buf[1] = data[beg_run]; + if (iwrite(buf,sizeof(buf[0])*2,1) < 1) + return IL_FALSE; + cur += run_count; + } + } + return IL_TRUE; +#undef MINRUNLENGTH +} + + +// Internal function used to save the Hdr. +ILboolean iSaveHdrInternal() +{ + ILimage *TempImage; + rgbe_header_info stHeader; + unsigned char rgbe[4]; + ILubyte *buffer; + ILfloat *data; + ILuint i; + ILboolean bRet; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + stHeader.exposure = 0; + stHeader.gamma = 0; + stHeader.programtype[0] = 0; + stHeader.valid = 0; + + if (iCurImage->Format != IL_UNSIGNED_BYTE) { + TempImage = iConvertImage(iCurImage, IL_RGB, IL_FLOAT); + if (TempImage == NULL) + return IL_FALSE; + } + else + TempImage = iCurImage; + + if (!RGBE_WriteHeader(TempImage->Width, TempImage->Height, &stHeader)) + return IL_FALSE; + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + iFlipBuffer(TempImage->Data, TempImage->Depth, TempImage->Bps, TempImage->Height); + data = (ILfloat*)TempImage->Data; + + if ((TempImage->Width < 8)||(TempImage->Width > 0x7fff)) { + /* run length encoding is not allowed so write flat*/ + bRet = RGBE_WritePixels(data,TempImage->Width*TempImage->Height); + if (iCurImage != TempImage) + ilCloseImage(TempImage); + return bRet; + } + buffer = (ILubyte*)ialloc(sizeof(ILubyte)*4*TempImage->Width); + if (buffer == NULL) { + /* no buffer space so write flat */ + bRet = RGBE_WritePixels(data,TempImage->Width*TempImage->Height); + if (iCurImage != TempImage) + ilCloseImage(TempImage); + return bRet; + } + + while(TempImage->Height-- > 0) { + rgbe[0] = 2; + rgbe[1] = 2; + rgbe[2] = TempImage->Width >> 8; + rgbe[3] = TempImage->Width & 0xFF; + if (iwrite(rgbe, sizeof(rgbe), 1) < 1) { + free(buffer); + if (iCurImage != TempImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + + for(i=0;iWidth;i++) { + float2rgbe(rgbe,data[RGBE_DATA_RED],data[RGBE_DATA_GREEN],data[RGBE_DATA_BLUE]); + buffer[i] = rgbe[0]; + buffer[i+TempImage->Width] = rgbe[1]; + buffer[i+2*TempImage->Width] = rgbe[2]; + buffer[i+3*TempImage->Width] = rgbe[3]; + data += RGBE_DATA_SIZE; + } + /* write out each of the four channels separately run length encoded */ + /* first red, then green, then blue, then exponent */ + for(i=0;i<4;i++) { + if (RGBE_WriteBytes_RLE(&buffer[i*TempImage->Width],TempImage->Width) != IL_TRUE) { + ifree(buffer); + if (iCurImage != TempImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + } + } + ifree(buffer); + + if (iCurImage != TempImage) + ilCloseImage(TempImage); + return IL_TRUE; +} + + +#endif//IL_NO_HDR diff --git a/libs/DevIL-1.7.8/src-IL/src/il_header.c b/libs/DevIL-1.7.8/src-IL/src/il_header.c new file mode 100644 index 00000000..d92903d6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_header.c @@ -0,0 +1,135 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 10/10/2006 +// +// Filename: src-IL/src/il_header.c +// +// Description: Generates a C-style header file for the current image. +// +//----------------------------------------------------------------------------- + +#ifndef IL_NO_CHEAD + +#include "il_internal.h" + +// Just a guess...let's see what's purty! +#define MAX_LINE_WIDTH 14 + +//! Generates a C-style header file for the current image. +ILboolean ilSaveCHeader(ILconst_string FileName, char *InternalName) +{ + FILE *HeadFile; + ILuint i = 0, j; + ILimage *TempImage; + const char *Name; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Name = iGetString(IL_CHEAD_HEADER_STRING); + if (Name == NULL) + Name = InternalName; + + if (FileName == NULL || Name == NULL || + ilStrLen(FileName) < 1 || ilCharStrLen(Name) < 1) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + if (!iCheckExtension(FileName, IL_TEXT("h"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + if (iCurImage->Bpc > 1) { + TempImage = iConvertImage(iCurImage, iCurImage->Format, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } else { + TempImage = iCurImage; + } + +#ifndef _UNICODE + HeadFile = fopen(FileName, "wb"); +#else + #ifdef _WIN32 + HeadFile = _wfopen(FileName, L"rb"); + #else + HeadFile = fopen((char*)FileName, "rb"); + #endif + +#endif//_UNICODE + + if (HeadFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + fprintf(HeadFile, "//#include \n"); + fprintf(HeadFile, "// C Image Header:\n\n\n"); + fprintf(HeadFile, "// IMAGE_BPP is in bytes per pixel, *not* bits\n"); + fprintf(HeadFile, "#define IMAGE_BPP %d\n",iCurImage->Bpp); + fprintf(HeadFile, "#define IMAGE_WIDTH %d\n", iCurImage->Width); + fprintf(HeadFile, "#define IMAGE_HEIGHT %d\n", iCurImage->Height); + fprintf(HeadFile, "#define IMAGE_DEPTH %d\n\n\n", iCurImage->Depth); + fprintf(HeadFile, "#define IMAGE_TYPE 0x%X\n", iCurImage->Type); + fprintf(HeadFile, "#define IMAGE_FORMAT 0x%X\n\n\n", iCurImage->Format); + fprintf(HeadFile, "ILubyte %s[] = {\n", Name); + + + for (; i < TempImage->SizeOfData; i += MAX_LINE_WIDTH) { + fprintf(HeadFile, "\t"); + for (j = 0; j < MAX_LINE_WIDTH; j++) { + if (i + j >= TempImage->SizeOfData - 1) { + fprintf(HeadFile, "%4d", TempImage->Data[i+j]); + break; + } + else + fprintf(HeadFile, "%4d,", TempImage->Data[i+j]); + } + fprintf(HeadFile, "\n"); + } + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + fprintf(HeadFile, "};\n"); + + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize && iCurImage->Pal.PalType != IL_PAL_NONE) { + fprintf(HeadFile, "\n\n"); + fprintf(HeadFile, "#define IMAGE_PALSIZE %u\n\n", iCurImage->Pal.PalSize); + fprintf(HeadFile, "#define IMAGE_PALTYPE 0x%X\n\n", iCurImage->Pal.PalType); + fprintf(HeadFile, "ILubyte %sPal[] = {\n", Name); + for (i = 0; i < iCurImage->Pal.PalSize; i += MAX_LINE_WIDTH) { + fprintf(HeadFile, "\t"); + for (j = 0; j < MAX_LINE_WIDTH; j++) { + if (i + j >= iCurImage->Pal.PalSize - 1) { + fprintf(HeadFile, " %4d", iCurImage->Pal.Palette[i+j]); + break; + } + else + fprintf(HeadFile, " %4d,", iCurImage->Pal.Palette[i+j]); + } + fprintf(HeadFile, "\n"); + } + + fprintf(HeadFile, "};\n"); + } + fclose(HeadFile); + return IL_TRUE; +} + + + +#endif//IL_NO_CHEAD diff --git a/libs/DevIL-1.7.8/src-IL/src/il_icns.c b/libs/DevIL-1.7.8/src-IL/src/il_icns.c new file mode 100644 index 00000000..c723300d --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_icns.c @@ -0,0 +1,362 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2001-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_icns.c +// +// Description: Reads from a Mac OS X icon (.icns) file. +// Credit for the format of .icns files goes to +// http://www.macdisk.com/maciconen.php3 and +// http://ezix.org/project/wiki/MacOSXIcons +// +//----------------------------------------------------------------------------- + +//@TODO: Put ilSetError calls in when errors occur. +//@TODO: Should we clear the alpha channel just in case there isn't one in the file? +//@TODO: Checks on iread + +#include "il_internal.h" +#ifndef IL_NO_ICNS +#include "il_icns.h" + +#ifndef IL_NO_JP2 + #if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "libjasper.lib") + #else + #pragma comment(lib, "libjasper-d.lib") + #endif + #endif + #endif +#endif//IL_NO_JP2 + + +//! Checks if the file specified in FileName is a valid .icns file. +ILboolean ilIsValidIcns(ILconst_string FileName) +{ + ILHANDLE IcnsFile; + ILboolean bIcns = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("icns"))) { + ilSetError(IL_INVALID_EXTENSION); + return bIcns; + } + + IcnsFile = iopenr(FileName); + if (IcnsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIcns; + } + + bIcns = ilIsValidIcnsF(IcnsFile); + icloser(IcnsFile); + + return bIcns; +} + + +//! Checks if the ILHANDLE contains a valid .icns file at the current position. +ILboolean ilIsValidIcnsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidIcns(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .icns lump. +ILboolean ilIsValidIcnsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidIcns(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidIcns() +{ + ICNSHEAD Header; + + iread(Header.Head, 1, 4); + iseek(-4, IL_SEEK_CUR); // Go ahead and restore to previous state + + if (strncmp(Header.Head, "icns", 4)) // First 4 bytes have to be 'icns'. + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads an icon file. +ILboolean ilLoadIcns(ILconst_string FileName) +{ + ILHANDLE IcnsFile; + ILboolean bIcns = IL_FALSE; + + IcnsFile = iopenr(FileName); + if (IcnsFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIcns; + } + + bIcns = ilLoadIcnsF(IcnsFile); + icloser(IcnsFile); + + return bIcns; +} + + +//! Reads an already-opened icon file. +ILboolean ilLoadIcnsF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadIcnsInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains an icon. +ILboolean ilLoadIcnsL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadIcnsInternal(); +} + + +// Internal function used to load the icon. +ILboolean iLoadIcnsInternal() +{ + ICNSHEAD Header; + ICNSDATA Entry; + ILimage *Image = NULL; + ILboolean BaseCreated = IL_FALSE; + + + if (iCurImage == NULL) + { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iread(Header.Head, 4, 1); + Header.Size = GetBigInt(); + + if (strncmp(Header.Head, "icns", 4)) // First 4 bytes have to be 'icns'. + return IL_FALSE; + + while ((ILint)itell() < Header.Size && !ieof()) + { + iread(Entry.ID, 4, 1); + Entry.Size = GetBigInt(); + + if (!strncmp(Entry.ID, "it32", 4)) // 128x128 24-bit + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 128, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "t8mk", 4)) // 128x128 alpha mask + { + if (iIcnsReadData(&BaseCreated, IL_TRUE, 128, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "ih32", 4)) // 48x48 24-bit + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 48, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "h8mk", 4)) // 48x48 alpha mask + { + if (iIcnsReadData(&BaseCreated, IL_TRUE, 48, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "il32", 4)) // 32x32 24-bit + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 32, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "l8mk", 4)) // 32x32 alpha mask + { + if (iIcnsReadData(&BaseCreated, IL_TRUE, 32, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "is32", 4)) // 16x16 24-bit + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 16, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "s8mk", 4)) // 16x16 alpha mask + { + if (iIcnsReadData(&BaseCreated, IL_TRUE, 16, &Entry, &Image) == IL_FALSE) + goto icns_error; + } +#ifndef IL_NO_JP2 + else if (!strncmp(Entry.ID, "ic09", 4)) // 512x512 JPEG2000 encoded - Uses JasPer + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 512, &Entry, &Image) == IL_FALSE) + goto icns_error; + } + else if (!strncmp(Entry.ID, "ic08", 4)) // 256x256 JPEG2000 encoded - Uses JasPer + { + if (iIcnsReadData(&BaseCreated, IL_FALSE, 256, &Entry, &Image) == IL_FALSE) + goto icns_error; + } +#endif//IL_NO_JP2 + else // Not a valid format or one that we can use + { + iseek(Entry.Size - 8, IL_SEEK_CUR); + } + } + + return ilFixImage(); + +icns_error: + return IL_FALSE; +} + +ILboolean iIcnsReadData(ILboolean *BaseCreated, ILboolean IsAlpha, ILint Width, ICNSDATA *Entry, ILimage **Image) +{ + ILint Position = 0, RLEPos = 0, Channel, i; + ILubyte RLERead, *Data = NULL; + ILimage *TempImage = NULL; + ILboolean ImageAlreadyExists = IL_FALSE; + + // The .icns format stores the alpha and RGB as two separate images, so this + // checks to see if one exists for that particular size. Unfortunately, + // there is no guarantee that they are in any particular order. + if (*BaseCreated && iCurImage != NULL) + { + TempImage = iCurImage; + while (TempImage != NULL) + { + if ((ILuint)Width == TempImage->Width) + { + ImageAlreadyExists = IL_TRUE; + break; + } + TempImage = TempImage->Next; + } + } + + Data = ialloc(Entry->Size - 8); + if (Data == NULL) + return IL_FALSE; + + if (!ImageAlreadyExists) + { + if (!*BaseCreated) // Create base image + { + ilTexImage(Width, Width, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + *Image = iCurImage; + *BaseCreated = IL_TRUE; + } + else // Create next image in list + { + (*Image)->Next = ilNewImage(Width, Width, 1, 4, 1); + *Image = (*Image)->Next; + (*Image)->Format = IL_RGBA; + (*Image)->Origin = IL_ORIGIN_UPPER_LEFT; + } + + TempImage = *Image; + } + + if (IsAlpha) // Alpha is never compressed. + { + iread(Data, Entry->Size - 8, 1); // Size includes the header + if (Entry->Size - 8 != Width * Width) + { + ifree(Data); + return IL_FALSE; + } + + for (i = 0; i < Width * Width; i++) + { + TempImage->Data[(i * 4) + 3] = Data[i]; + } + } + else if (Width == 256 || Width == 512) // JPEG2000 encoded - uses JasPer + { +#ifndef IL_NO_JP2 + iread(Data, Entry->Size - 8, 1); // Size includes the header + if (ilLoadJp2LInternal(Data, Entry->Size - 8, TempImage) == IL_FALSE) + { + ifree(Data); + ilSetError(IL_LIB_JP2_ERROR); + return IL_TRUE; + } +#else // Cannot handle this size. + ilSetError(IL_LIB_JP2_ERROR); //@TODO: Handle this better...just skip the data. + return IL_FALSE; +#endif//IL_NO_JP2 + } + else // RGB data + { + iread(Data, Entry->Size - 8, 1); // Size includes the header + if (Width == 128) + RLEPos += 4; // There are an extra 4 bytes here of zeros. + //@TODO: Should we check to make sure they are all 0? + + if (Entry->Size - 8 == Width * Width * 4) // Uncompressed + { + //memcpy(TempImage->Data, Data, Entry->Size); + for (i = 0; i < Width * Width; i++, Position += 4) + { + TempImage->Data[i * 4 + 0] = Data[Position+1]; + TempImage->Data[i * 4 + 1] = Data[Position+2]; + TempImage->Data[i * 4 + 2] = Data[Position+3]; + } + } + else // RLE decoding + { + for (Channel = 0; Channel < 3; Channel++) + { + Position = 0; + while (Position < Width * Width) + { + RLERead = Data[RLEPos]; + RLEPos++; + + if (RLERead >= 128) + { + for (i = 0; i < RLERead - 125 && (Position + i) < Width * Width; i++) + { + TempImage->Data[Channel + (Position + i) * 4] = Data[RLEPos]; + } + RLEPos++; + Position += RLERead - 125; + } + else + { + for (i = 0; i < RLERead + 1 && (Position + i) < Width * Width; i++) + { + TempImage->Data[Channel + (Position + i) * 4] = Data[RLEPos + i]; + } + RLEPos += RLERead + 1; + Position += RLERead + 1; + } + } + } + } + } + + ifree(Data); + return IL_TRUE; +} + +#endif//IL_NO_ICNS diff --git a/libs/DevIL-1.7.8/src-IL/src/il_icon.c b/libs/DevIL-1.7.8/src-IL/src/il_icon.c new file mode 100644 index 00000000..2ccb1a30 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_icon.c @@ -0,0 +1,674 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2001-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_icon.c +// +// Description: Reads from a Windows icon (.ico) file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_ICO +#include "il_icon.h" +#ifndef IL_NO_PNG + #include +#endif + +//! Reads an icon file. +ILboolean ilLoadIcon(ILconst_string FileName) +{ + ILHANDLE IconFile; + ILboolean bIcon = IL_FALSE; + + IconFile = iopenr(FileName); + if (IconFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIcon; + } + + bIcon = ilLoadIconF(IconFile); + icloser(IconFile); + + return bIcon; +} + + +//! Reads an already-opened icon file. +ILboolean ilLoadIconF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadIconInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains an icon. +ILboolean ilLoadIconL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadIconInternal(); +} + + +// Internal function used to load the icon. +ILboolean iLoadIconInternal() +{ + ICODIR IconDir; + ICODIRENTRY *DirEntries = NULL; + ICOIMAGE *IconImages = NULL; + ILimage *Image = NULL; + ILint i; + ILuint Size, PadSize, ANDPadSize, j, k, l, m, x, w, CurAndByte, AndBytes; + ILboolean BaseCreated = IL_FALSE; + ILubyte PNGTest[3]; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + IconDir.Reserved = GetLittleShort(); + IconDir.Type = GetLittleShort(); + IconDir.Count = GetLittleShort(); + + if (ieof()) + goto file_read_error; + + DirEntries = (ICODIRENTRY*)ialloc(sizeof(ICODIRENTRY) * IconDir.Count); + IconImages = (ICOIMAGE*)ialloc(sizeof(ICOIMAGE) * IconDir.Count); + if (DirEntries == NULL || IconImages == NULL) { + ifree(DirEntries); + ifree(IconImages); + return IL_FALSE; + } + + // Make it easier for file_read_error. + for (i = 0; i < IconDir.Count; i++) + imemclear(&IconImages[i], sizeof(ICOIMAGE)); + + for (i = 0; i < IconDir.Count; ++i) { + DirEntries[i].Width = (ILubyte)igetc(); + DirEntries[i].Height = (ILubyte)igetc(); + DirEntries[i].NumColours = (ILubyte)igetc(); + DirEntries[i].Reserved = (ILubyte)igetc(); + DirEntries[i].Planes = GetLittleShort(); + DirEntries[i].Bpp = GetLittleShort(); + DirEntries[i].SizeOfData = GetLittleUInt(); + DirEntries[i].Offset = GetLittleUInt(); + + if (ieof()) + goto file_read_error; + } + + for (i = 0; i < IconDir.Count; i++) { + iseek(DirEntries[i].Offset, IL_SEEK_SET); + + // 08-22-2008: Adding test for compressed PNG data + igetc(); // Skip the first character...seems to vary. + iread(PNGTest, 3, 1); + if (!strnicmp((char*)PNGTest, "PNG", 3)) // Characters 'P', 'N', 'G' for PNG header + { +#ifdef IL_NO_PNG + ilSetError(IL_FORMAT_NOT_SUPPORTED); // Cannot handle these without libpng. + goto file_read_error; +#else + iseek(DirEntries[i].Offset, IL_SEEK_SET); + if (!iLoadIconPNG(&IconImages[i])) + goto file_read_error; +#endif + } + else + { + // Need to go back the 4 bytes that were just read. + iseek(DirEntries[i].Offset, IL_SEEK_SET); + + IconImages[i].Head.Size = GetLittleInt(); + IconImages[i].Head.Width = GetLittleInt(); + IconImages[i].Head.Height = GetLittleInt(); + IconImages[i].Head.Planes = GetLittleShort(); + IconImages[i].Head.BitCount = GetLittleShort(); + IconImages[i].Head.Compression = GetLittleInt(); + IconImages[i].Head.SizeImage = GetLittleInt(); + IconImages[i].Head.XPixPerMeter = GetLittleInt(); + IconImages[i].Head.YPixPerMeter = GetLittleInt(); + IconImages[i].Head.ColourUsed = GetLittleInt(); + IconImages[i].Head.ColourImportant = GetLittleInt(); + + if (ieof()) + goto file_read_error; + + if (IconImages[i].Head.BitCount < 8) { + if (IconImages[i].Head.ColourUsed == 0) { + switch (IconImages[i].Head.BitCount) + { + case 1: + IconImages[i].Head.ColourUsed = 2; + break; + case 4: + IconImages[i].Head.ColourUsed = 16; + break; + } + } + IconImages[i].Pal = (ILubyte*)ialloc(IconImages[i].Head.ColourUsed * 4); + if (IconImages[i].Pal == NULL) + goto file_read_error; // @TODO: Rename the label. + if (iread(IconImages[i].Pal, IconImages[i].Head.ColourUsed * 4, 1) != 1) + goto file_read_error; + } + else if (IconImages[i].Head.BitCount == 8) { + IconImages[i].Pal = (ILubyte*)ialloc(256 * 4); + if (IconImages[i].Pal == NULL) + goto file_read_error; + if (iread(IconImages[i].Pal, 1, 256 * 4) != 256*4) + goto file_read_error; + } + else { + IconImages[i].Pal = NULL; + } + + PadSize = (4 - ((IconImages[i].Head.Width*IconImages[i].Head.BitCount + 7) / 8) % 4) % 4; // Has to be DWORD-aligned. + ANDPadSize = (4 - ((IconImages[i].Head.Width + 7) / 8) % 4) % 4; // AND is 1 bit/pixel + Size = ((IconImages[i].Head.Width*IconImages[i].Head.BitCount + 7) / 8 + PadSize) + * (IconImages[i].Head.Height / 2); + + + IconImages[i].Data = (ILubyte*)ialloc(Size); + if (IconImages[i].Data == NULL) + goto file_read_error; + if (iread(IconImages[i].Data, 1, Size) != Size) + goto file_read_error; + + Size = (((IconImages[i].Head.Width + 7) /8) + ANDPadSize) * (IconImages[i].Head.Height / 2); + IconImages[i].AND = (ILubyte*)ialloc(Size); + if (IconImages[i].AND == NULL) + goto file_read_error; + if (iread(IconImages[i].AND, 1, Size) != Size) + goto file_read_error; + } + } + + + for (i = 0; i < IconDir.Count; i++) { + if (IconImages[i].Head.BitCount != 1 && IconImages[i].Head.BitCount != 4 && + IconImages[i].Head.BitCount != 8 && IconImages[i].Head.BitCount != 24 && + + IconImages[i].Head.BitCount != 32) + continue; + + if (!BaseCreated) { + if (IconImages[i].Head.Size == 0) // PNG compressed icon + ilTexImage(IconImages[i].Head.Width, IconImages[i].Head.Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL); + else + ilTexImage(IconImages[i].Head.Width, IconImages[i].Head.Height / 2, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL); + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + Image = iCurImage; + BaseCreated = IL_TRUE; + } + else { + if (IconImages[i].Head.Size == 0) // PNG compressed icon + Image->Next = ilNewImage(IconImages[i].Head.Width, IconImages[i].Head.Height, 1, 4, 1); + else + Image->Next = ilNewImage(IconImages[i].Head.Width, IconImages[i].Head.Height / 2, 1, 4, 1); + Image = Image->Next; + Image->Format = IL_BGRA; + } + Image->Type = IL_UNSIGNED_BYTE; + + j = 0; k = 0; l = 128; CurAndByte = 0; x = 0; + + w = IconImages[i].Head.Width; + PadSize = (4 - ((w*IconImages[i].Head.BitCount + 7) / 8) % 4) % 4; // Has to be DWORD-aligned. + + ANDPadSize = (4 - ((w + 7) / 8) % 4) % 4; // AND is 1 bit/pixel + AndBytes = (w + 7) / 8; + + if (IconImages[i].Head.BitCount == 1) { + for (; j < Image->SizeOfData; k++) { + for (m = 128; m && x < w; m >>= 1) { + Image->Data[j] = IconImages[i].Pal[!!(IconImages[i].Data[k] & m) * 4]; + Image->Data[j+1] = IconImages[i].Pal[!!(IconImages[i].Data[k] & m) * 4 + 1]; + Image->Data[j+2] = IconImages[i].Pal[!!(IconImages[i].Data[k] & m) * 4 + 2]; + Image->Data[j+3] = (IconImages[i].AND[CurAndByte] & l) != 0 ? 0 : 255; + j += 4; + l >>= 1; + + ++x; + } + if (l == 0 || x == w) { + l = 128; + CurAndByte++; + if (x == w) { + CurAndByte += ANDPadSize; + k += PadSize; + x = 0; + } + + } + } + } + else if (IconImages[i].Head.BitCount == 4) { + for (; j < Image->SizeOfData; j += 8, k++) { + Image->Data[j] = IconImages[i].Pal[((IconImages[i].Data[k] & 0xF0) >> 4) * 4]; + Image->Data[j+1] = IconImages[i].Pal[((IconImages[i].Data[k] & 0xF0) >> 4) * 4 + 1]; + Image->Data[j+2] = IconImages[i].Pal[((IconImages[i].Data[k] & 0xF0) >> 4) * 4 + 2]; + Image->Data[j+3] = (IconImages[i].AND[CurAndByte] & l) != 0 ? 0 : 255; + l >>= 1; + + ++x; + + if(x < w) { + Image->Data[j+4] = IconImages[i].Pal[(IconImages[i].Data[k] & 0x0F) * 4]; + Image->Data[j+5] = IconImages[i].Pal[(IconImages[i].Data[k] & 0x0F) * 4 + 1]; + Image->Data[j+6] = IconImages[i].Pal[(IconImages[i].Data[k] & 0x0F) * 4 + 2]; + Image->Data[j+7] = (IconImages[i].AND[CurAndByte] & l) != 0 ? 0 : 255; + l >>= 1; + + ++x; + + } + + else + + j -= 4; + + + if (l == 0 || x == w) { + l = 128; + CurAndByte++; + if (x == w) { + CurAndByte += ANDPadSize; + + k += PadSize; + x = 0; + } + } + } + } + else if (IconImages[i].Head.BitCount == 8) { + for (; j < Image->SizeOfData; j += 4, k++) { + Image->Data[j] = IconImages[i].Pal[IconImages[i].Data[k] * 4]; + Image->Data[j+1] = IconImages[i].Pal[IconImages[i].Data[k] * 4 + 1]; + Image->Data[j+2] = IconImages[i].Pal[IconImages[i].Data[k] * 4 + 2]; + if (IconImages[i].AND == NULL) // PNG Palette + { + Image->Data[j+3] = IconImages[i].Pal[IconImages[i].Data[k] * 4 + 3]; + } + else + { + Image->Data[j+3] = (IconImages[i].AND[CurAndByte] & l) != 0 ? 0 : 255; + } + l >>= 1; + + ++x; + if (l == 0 || x == w) { + l = 128; + CurAndByte++; + if (x == w) { + CurAndByte += ANDPadSize; + + k += PadSize; + x = 0; + } + } + } + } + else if (IconImages[i].Head.BitCount == 24) { + for (; j < Image->SizeOfData; j += 4, k += 3) { + Image->Data[j] = IconImages[i].Data[k]; + Image->Data[j+1] = IconImages[i].Data[k+1]; + Image->Data[j+2] = IconImages[i].Data[k+2]; + Image->Data[j+3] = (IconImages[i].AND[CurAndByte] & l) != 0 ? 0 : 255; + l >>= 1; + + ++x; + if (l == 0 || x == w) { + l = 128; + CurAndByte++; + if (x == w) { + CurAndByte += ANDPadSize; + + k += PadSize; + x = 0; + } + } + } + } + + else if (IconImages[i].Head.BitCount == 32) { + for (; j < Image->SizeOfData; j += 4, k += 4) { + Image->Data[j] = IconImages[i].Data[k]; + Image->Data[j+1] = IconImages[i].Data[k+1]; + Image->Data[j+2] = IconImages[i].Data[k+2]; + + //If the icon has 4 channels, use 4th channel for alpha... + //(for Windows XP style icons with true alpha channel + Image->Data[j+3] = IconImages[i].Data[k+3]; + } + } + } + + + for (i = 0; i < IconDir.Count; i++) { + ifree(IconImages[i].Pal); + ifree(IconImages[i].Data); + ifree(IconImages[i].AND); + } + ifree(IconImages); + ifree(DirEntries); + + return ilFixImage(); + +file_read_error: + if (IconImages) { + for (i = 0; i < IconDir.Count; i++) { + if (IconImages[i].Pal) + ifree(IconImages[i].Pal); + if (IconImages[i].Data) + ifree(IconImages[i].Data); + if (IconImages[i].AND) + ifree(IconImages[i].AND); + } + ifree(IconImages); + } + if (DirEntries) + ifree(DirEntries); + return IL_FALSE; +} + + +#ifndef IL_NO_PNG +// 08-22-2008: Copying a lot of this over from il_png.c for the moment. +// @TODO: Make .ico and .png use the same functions. +png_structp ico_png_ptr = NULL; +png_infop ico_info_ptr = NULL; +ILint ico_color_type; + +#define GAMMA_CORRECTION 1.0 // Doesn't seem to be doing anything... + +ILint ico_readpng_init(); +ILboolean ico_readpng_get_image(ICOIMAGE *Icon, ILdouble display_exponent); +void ico_readpng_cleanup(); +#endif + +ILboolean iLoadIconPNG(ICOIMAGE *Icon) +{ +#ifndef IL_NO_PNG + ILint init; + init = ico_readpng_init(); + if (init) + return IL_FALSE; + if (!ico_readpng_get_image(Icon, GAMMA_CORRECTION)) + return IL_FALSE; + + ico_readpng_cleanup(); + Icon->Head.Size = 0; // Easiest way to tell that this is a PNG. + // In the normal routine, it will not be 0. + + return IL_TRUE; +#else + Icon; + return IL_FALSE; +#endif +} + +#ifndef IL_NO_PNG +static void ico_png_read(png_structp png_ptr, png_bytep data, png_size_t length) +{ + (void)png_ptr; + iread(data, 1, (ILuint)length); + return; +} + + +static void ico_png_error_func(png_structp png_ptr, png_const_charp message) +{ + message; + ilSetError(IL_LIB_PNG_ERROR); + + /* + changed 20040224 + From the libpng docs: + "Errors handled through png_error() are fatal, meaning that png_error() + should never return to its caller. Currently, this is handled via + setjmp() and longjmp()" + */ + //return; + longjmp(png_jmpbuf(png_ptr), 1); +} + +static void ico_png_warn_func(png_structp png_ptr, png_const_charp message) +{ + png_ptr; message; + return; +} + + +ILint ico_readpng_init() +{ + ico_png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, ico_png_error_func, ico_png_warn_func); + if (!ico_png_ptr) + return 4; /* out of memory */ + + ico_info_ptr = png_create_info_struct(ico_png_ptr); + if (!ico_info_ptr) { + png_destroy_read_struct(&ico_png_ptr, NULL, NULL); + return 4; /* out of memory */ + } + + + /* we could create a second info struct here (end_info), but it's only + * useful if we want to keep pre- and post-IDAT chunk info separated + * (mainly for PNG-aware image editors and converters) */ + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(ico_png_ptr))) { + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return 2; + } + + + png_set_read_fn(ico_png_ptr, NULL, ico_png_read); + png_set_error_fn(ico_png_ptr, NULL, ico_png_error_func, ico_png_warn_func); + +// png_set_sig_bytes(ico_png_ptr, 8); /* we already read the 8 signature bytes */ + + png_read_info(ico_png_ptr, ico_info_ptr); /* read all PNG info up to image data */ + + /* alternatively, could make separate calls to png_get_image_width(), + * etc., but want bit_depth and ico_color_type for later [don't care about + * compression_type and filter_type => NULLs] */ + + /* OK, that's all we need for now; return happy */ + + return 0; +} + + +ILboolean ico_readpng_get_image(ICOIMAGE *Icon, ILdouble display_exponent) +{ + png_bytepp row_pointers = NULL; + png_uint_32 width, height; // Changed the type to fix AMD64 bit problems, thanks to Eric Werness + ILdouble screen_gamma = 1.0; + ILuint i, channels; + ILenum format; + png_colorp palette; + ILint num_palette, j, bit_depth; +#if _WIN32 || DJGPP + ILdouble image_gamma; +#endif + + display_exponent; + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(ico_png_ptr))) { + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return IL_FALSE; + } + + png_get_IHDR(ico_png_ptr, ico_info_ptr, (png_uint_32*)&width, (png_uint_32*)&height, + &bit_depth, &ico_color_type, NULL, NULL, NULL); + + // Expand low-bit-depth grayscale images to 8 bits + if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { + png_set_gray_1_2_4_to_8(ico_png_ptr); + } + + // Expand RGB images with transparency to full alpha channels + // so the data will be available as RGBA quartets. + // But don't expand paletted images, since we want alpha palettes! + if (png_get_valid(ico_png_ptr, ico_info_ptr, PNG_INFO_tRNS) && !(png_get_valid(ico_png_ptr, ico_info_ptr, PNG_INFO_PLTE))) + png_set_tRNS_to_alpha(ico_png_ptr); + + //refresh information (added 20040224) + png_get_IHDR(ico_png_ptr, ico_info_ptr, (png_uint_32*)&width, (png_uint_32*)&height, + &bit_depth, &ico_color_type, NULL, NULL, NULL); + + if (bit_depth < 8) { // Expanded earlier for grayscale, now take care of palette and rgb + bit_depth = 8; + png_set_packing(ico_png_ptr); + } + + // Perform gamma correction. + // @TODO: Determine if we should call png_set_gamma if image_gamma is 1.0. +#if _WIN32 || DJGPP + screen_gamma = 2.2; + if (png_get_gAMA(ico_png_ptr, ico_info_ptr, &image_gamma)) + png_set_gamma(ico_png_ptr, screen_gamma, image_gamma); +#else + screen_gamma = screen_gamma; +#endif + + //fix endianess +#ifdef __LITTLE_ENDIAN__ + if (bit_depth == 16) + png_set_swap(ico_png_ptr); +#endif + + + png_read_update_info(ico_png_ptr, ico_info_ptr); + channels = (ILint)png_get_channels(ico_png_ptr, ico_info_ptr); + // added 20040224: update ico_color_type so that it has the correct value + // in iLoadPngInternal (globals rule...) + ico_color_type = png_get_color_type(ico_png_ptr, ico_info_ptr); + + // Determine internal format + switch (ico_color_type) + { + case PNG_COLOR_TYPE_PALETTE: + Icon->Head.BitCount = 8; + format = IL_COLOUR_INDEX; + break; + case PNG_COLOR_TYPE_RGB: + Icon->Head.BitCount = 24; + format = IL_RGB; + break; + case PNG_COLOR_TYPE_RGB_ALPHA: + Icon->Head.BitCount = 32; + format = IL_RGBA; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return IL_FALSE; + } + + if (ico_color_type & PNG_COLOR_MASK_COLOR) + png_set_bgr(ico_png_ptr); + + Icon->Head.Width = width; + Icon->Head.Height = height; + Icon->Data = ialloc(width * height * Icon->Head.BitCount / 8); + if (Icon->Data == NULL) + { + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return IL_FALSE; + } + + // Copy Palette + if (format == IL_COLOUR_INDEX) + { + int chans; + png_bytep trans = NULL; + int num_trans = -1; + if (!png_get_PLTE(ico_png_ptr, ico_info_ptr, &palette, &num_palette)) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return IL_FALSE; + } + + chans = 4; + + if (png_get_valid(ico_png_ptr, ico_info_ptr, PNG_INFO_tRNS)) { + png_get_tRNS(ico_png_ptr, ico_info_ptr, &trans, &num_trans, NULL); + } + +// @TODO: We may need to keep track of the size of the palette. + Icon->Pal = (ILubyte*)ialloc(num_palette * chans); + + for (j = 0; j < num_palette; ++j) { + Icon->Pal[chans*j + 0] = palette[j].blue; + Icon->Pal[chans*j + 1] = palette[j].green; + Icon->Pal[chans*j + 2] = palette[j].red; + if (trans != NULL) { + if (j < num_trans) + Icon->Pal[chans*j + 3] = trans[j]; + else + Icon->Pal[chans*j + 3] = 255; + } + } + + Icon->AND = NULL; // Transparency information is obtained from libpng. + } + + //allocate row pointers + if ((row_pointers = (png_bytepp)ialloc(height * sizeof(png_bytep))) == NULL) { + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + return IL_FALSE; + } + + + // Set the individual row_pointers to point at the correct offsets + // Needs to be flipped + for (i = 0; i < height; i++) + row_pointers[height - i - 1] = Icon->Data + i * width * Icon->Head.BitCount / 8; + //row_pointers[i] = Icon->Data + i * width * Icon->Head.BitCount / 8; + + + // Now we can go ahead and just read the whole image + png_read_image(ico_png_ptr, row_pointers); + + /* and we're done! (png_read_end() can be omitted if no processing of + * post-IDAT text/time/etc. is desired) */ + //png_read_end(ico_png_ptr, NULL); + ifree(row_pointers); + + return IL_TRUE; +} + + +void ico_readpng_cleanup() +{ + if (ico_png_ptr && ico_info_ptr) { + png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); + ico_png_ptr = NULL; + ico_info_ptr = NULL; + } +} +#endif//IL_NO_PNG + +#endif//IL_NO_ICO diff --git a/libs/DevIL-1.7.8/src-IL/src/il_iff.c b/libs/DevIL-1.7.8/src-IL/src/il_iff.c new file mode 100644 index 00000000..e4ad8070 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_iff.c @@ -0,0 +1,479 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Last modified: 03/0/2009 +// +// Filename: src-IL/src/il_iff.c +// +// Description: Reads from an .iff file. Contribution from GAIA: +// http://gaia.fdi.ucm.es/grupo/projects/javy/devzone.html#DevILNotes. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" + +#ifndef IL_NO_IFF + +// Chunk type, data and functions: +typedef struct _iff_chunk { + ILuint tag; + ILuint start; + ILuint size; + ILuint chunkType; +} iff_chunk; + +#define CHUNK_STACK_SIZE (32) +static iff_chunk chunkStack[CHUNK_STACK_SIZE]; +static int chunkDepth = -1; + +iff_chunk iff_begin_read_chunk(); +void iff_end_read_chunk(); +char *iff_read_data(int size); +ILboolean iLoadIffInternal(void); + + +/* Define the IFF tags we are looking for in the file. */ +const ILuint IFF_TAG_CIMG = ('C' << 24) | ('I' << 16) | ('M' << 8) | ('G'); +const ILuint IFF_TAG_FOR4 = ('F' << 24) | ('O' << 16) | ('R' << 8) | ('4'); +const ILuint IFF_TAG_TBHD = ('T' << 24) | ('B' << 16) | ('H' << 8) | ('D'); +const ILuint IFF_TAG_TBMP = ('T' << 24) | ('B' << 16) | ('M' << 8) | ('P'); +const ILuint IFF_TAG_RGBA = ('R' << 24) | ('G' << 16) | ('B' << 8) | ('A'); +const ILuint IFF_TAG_CLPZ = ('C' << 24) | ('L' << 16) | ('P' << 8) | ('Z'); +const ILuint IFF_TAG_ESXY = ('E' << 24) | ('S' << 16) | ('X' << 8) | ('Y'); +const ILuint IFF_TAG_ZBUF = ('Z' << 24) | ('B' << 16) | ('U' << 8) | ('F'); +const ILuint IFF_TAG_BLUR = ('B' << 24) | ('L' << 16) | ('U' << 8) | ('R'); +const ILuint IFF_TAG_BLRT = ('B' << 24) | ('L' << 16) | ('R' << 8) | ('T'); +const ILuint IFF_TAG_HIST = ('H' << 24) | ('I' << 16) | ('S' << 8) | ('T'); + +// Flags +#define RGB_FLAG (1) +#define ALPHA_FLAG (2) +#define ZBUFFER_FLAG (4) + +// Function for decompress the file. +char *iff_decompress_rle(ILuint numBytes, char *compressedData, + ILuint compressedDataSize, + ILuint *compressedStartIndex); + +char *iffReadUncompressedTile(ILushort width, ILushort height, ILbyte depth); +char *iff_decompress_tile_rle(ILushort width, ILushort height, ILushort depth, + char *compressedData, ILuint compressedDataSize); + + +//! Reads an IFF file +ILboolean ilLoadIff(const ILstring FileName) +{ + ILHANDLE iffFile; + ILboolean ret = IL_FALSE; + + iffFile = iopenr(FileName); + if (iffFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return ret; + } + ret = ilLoadIffF(iffFile); + icloser(iffFile); + return ret; +} + + +//! Reads an already-opened IFF file +ILboolean ilLoadIffF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadIffInternal(); + iseek(FirstPos, IL_SEEK_SET); + + // Lbm files can have the .iff extension as well, so if Iff-loading failed, + // try to load it as a Lbm. + if (bRet == IL_FALSE) + return ilLoadIlbmF(File); + + return bRet; +} + + +//! Reads from a memory "lump" that contains an IFF +ILboolean ilLoadIffL(const void *Lump, ILuint Size) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputLump(Lump, Size); + FirstPos = itell(); + bRet = iLoadIffInternal(); + iseek(FirstPos, IL_SEEK_SET); + + // Lbm files can have the .iff extension as well, so if Iff-loading failed, + // try to load it as a Lbm. + if (bRet == IL_FALSE) + return ilLoadIlbmL(Lump, Size); + + return IL_TRUE; +} + +ILboolean iLoadIffInternal(void) +{ + iff_chunk chunkInfo; + + // -- Header info. + ILuint width, height; + ILuint flags, compress; + ILushort tiles; + + ILenum format; + ILubyte bpp; + + ILboolean tileImageDataFound; + + // -- Initialize the top of the chunk stack. + chunkDepth = -1; + + // -- File should begin with a FOR4 chunk of type CIMG + chunkInfo = iff_begin_read_chunk(); + if (chunkInfo.chunkType != IFF_TAG_CIMG) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + + /* + * Read the image header + * OK, we have a FOR4 of type CIMG, look for the following tags + * FVER + * TBHD bitmap header, definition of size, etc. + * AUTH + * DATE + */ + while (1) { + + chunkInfo = iff_begin_read_chunk(); + + // -- Right now, the only info we need about the image is in TBHD + // -- so search this level until we find it. + if( chunkInfo.tag == IFF_TAG_TBHD ) { + // -- Header chunk found + width = GetBigUInt(); + height = GetBigUInt(); + GetBigShort(); // -- Don't support + GetBigShort(); // -- Don't support + flags = GetBigUInt(); + GetBigShort(); // -- Don't support + tiles = GetBigUShort(); + compress = GetBigUInt(); + + iff_end_read_chunk(); + + if( compress > 1 ) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + break; + } else + iff_end_read_chunk(); + } /* END find TBHD while loop */ + + if (!(flags & RGB_FLAG)) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + if (flags & ALPHA_FLAG) { + format = IL_RGBA; bpp = 4; + } else { + format = IL_RGB; bpp = 3; + } + + if (!ilTexImage(width, height, 1, bpp, format, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + tileImageDataFound = IL_FALSE; + + while (!tileImageDataFound) { + ILuint tileImage; + ILuint tileZ; + + chunkInfo = iff_begin_read_chunk(); + + /* + * OK, we have a FOR4 of type TBMP, (embedded FOR4) + * look for the following tags + * RGBA color data, RLE compressed tiles of 32 bbp data + * ZBUF z-buffer data, 32 bit float values + * CLPZ depth map specific, clipping planes, 2 float values + * ESXY depth map specific, eye x-y ratios, 2 float values + * HIST + * VERS + * FOR4 BLUR (twice embedded FOR4) + */ + if (chunkInfo.chunkType != IFF_TAG_TBMP) { + iff_end_read_chunk(); + continue; + } + tileImageDataFound = IL_TRUE; + tileImage = 0; // Si no RGBA, tileImage = tiles... + if (flags & ZBUFFER_FLAG) + tileZ = 0; + else + tileZ = tiles; + + // Read tiles + while ( (tileImage < tiles) || (tileZ < tiles)) { + char *tileData; + ILushort x1, x2, y1, y2, tile_width, tile_height; + ILuint remainingDataSize; + ILushort tile_area; + ILuint tileCompressed; + + chunkInfo = iff_begin_read_chunk(); + if ((chunkInfo.tag != IFF_TAG_RGBA) && (chunkInfo.tag != IFF_TAG_ZBUF)) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + x1 = GetBigUShort(); y1 = GetBigUShort(); + x2 = GetBigUShort(); y2 = GetBigUShort(); + + remainingDataSize = chunkInfo.size - 4*sizeof(ILushort); + tile_width = x2 - x1 + 1; + tile_height = y2 - y1 + 1; + tile_area = tile_width * tile_height; + + if ((ILint)remainingDataSize >= (tile_width * tile_height * bpp)) + tileCompressed = 0; + else + tileCompressed = 1; + + if (chunkInfo.tag == IFF_TAG_RGBA) { + if (tileCompressed) { + char *data = iff_read_data(remainingDataSize); + if (data) { + tileData = iff_decompress_tile_rle(tile_width, tile_height, + bpp, data, remainingDataSize); + ifree(data); + } + } else { + tileData = iffReadUncompressedTile(tile_width, tile_height, bpp); + } + + if (tileData) { + // Dump RGBA data to our data structure + ILushort i; + ILuint base; + base = bpp*(width * y1 + x1); + for (i = 0; i < tile_height; i++) { + memcpy(&iCurImage->Data[base + bpp*i*width], + &tileData[bpp*i*tile_width], + tile_width*bpp*sizeof(char)); + } + ifree(tileData); + tileData = NULL; + + iff_end_read_chunk(); + tileImage++; + } else + return IL_FALSE; + } else if (chunkInfo.tag == IFF_TAG_ZBUF) { + tileZ++; + iff_end_read_chunk(); + } + + } + } + //ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); // Why was this here? + return ilFixImage(); +} + +/* + * IFF Chunking Routines. + * + */ + +iff_chunk iff_begin_read_chunk() +{ + chunkDepth++; + if (chunkDepth >= CHUNK_STACK_SIZE){ + ilSetError(IL_STACK_OVERFLOW); + return chunkStack[0]; + } + if (chunkDepth < 0) { + ilSetError(IL_STACK_UNDERFLOW); + return chunkStack[0]; + } + + chunkStack[chunkDepth].start = itell(); + chunkStack[chunkDepth].tag = GetBigInt(); + chunkStack[chunkDepth].size = GetBigInt(); + + if (chunkStack[chunkDepth].tag == IFF_TAG_FOR4) { + // -- We have a form, so read the form type tag as well. + chunkStack[chunkDepth].chunkType = GetBigInt(); + } else { + chunkStack[chunkDepth].chunkType = 0; + } + + return chunkStack[chunkDepth]; +} + +void iff_end_read_chunk() +{ + ILuint end; + int part; + + end = chunkStack[chunkDepth].start + chunkStack[chunkDepth].size + 8; + + if (chunkStack[chunkDepth].chunkType != 0) { + end += 4; + } + // Add padding + part = end % 4; + if (part != 0) { + end += 4 - part; + } + + iseek(end, IL_SEEK_SET); + + chunkDepth--; +} + +char * iff_read_data(int size) +{ + char *buffer = ialloc(size * sizeof(char)); + if (buffer == NULL) + return NULL; + + if (iread(buffer, size*sizeof(char), 1) != 1) { + ifree(buffer); + return NULL; + } + + return buffer; +} + +/* + IFF decompress functions +*/ + +char *iffReadUncompressedTile(ILushort width, ILushort height, ILbyte depth) +{ + + char *data = NULL; + char *iniPixel; + char *finPixel; + int i, j; + int tam = width* height * depth * sizeof(char); + + data = ialloc(tam); + if (data == NULL) + return NULL; + + if (iread(data, tam, 1) != 1) { + ifree(data); + return NULL; + } + + iniPixel = data; + for (i = 0; i < tam / depth; i++) { + finPixel = iniPixel + depth; + for (j = 0; j < (depth /2); j++) { + char aux; + aux = *iniPixel; + *(finPixel--) = *iniPixel; + *(iniPixel++) = aux; + } + } + return data; +} + + +char *iff_decompress_tile_rle(ILushort width, ILushort height, ILushort depth, + char *compressedData, ILuint compressedDataSize) +{ + + char *channels[4]; + char *data; + int i, k, row, column; + ILuint compressedStart = 0; + + // Decompress only in RGBA. + if (depth != 4) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return NULL; + } + + for (i = depth-1; i >= 0; --i) { + channels[i] = iff_decompress_rle(width * height, compressedData, + compressedDataSize, &compressedStart); + if (channels[i] == NULL) + return NULL; + } + + // Build all the channels from the decompression into an RGBA array. + data = ialloc(width * height * depth * sizeof(char)); + if (data == NULL) + return NULL; + + for (row = 0; row < height; row++) + for (column = 0; column < width; column++) + for (k = 0; k < depth; k++) + data[depth*(row*width + column) + k] = + channels[k][row*width + column]; + + ifree(channels[0]); ifree(channels[1]); + ifree(channels[2]); ifree(channels[3]); + + return data; +} + +char *iff_decompress_rle(ILuint numBytes, char *compressedData, + ILuint compressedDataSize, + ILuint *compressedStartIndex) +{ + + char *data = ialloc(numBytes * sizeof(char)); + unsigned char nextChar, count; + int i; + ILuint byteCount = 0; + + if (data == NULL) + return NULL; + + memset(data, 0, numBytes*sizeof(char)); + + while (byteCount < numBytes) { + if (*compressedStartIndex >= compressedDataSize) + break; + nextChar = compressedData[*compressedStartIndex]; + (*compressedStartIndex)++; + count = (nextChar & 0x7f) + 1; + if ((byteCount + count) > numBytes) break; + if (nextChar & 0x80) { + // Duplication run + nextChar = compressedData[*compressedStartIndex]; + (*compressedStartIndex)++; + // assert ((byteCount + count) <= numBytes); + for (i = 0; i < count; i++) { + data[byteCount]= nextChar; + byteCount++; + } + } else { + // Verbatim run + for (i = 0; i < count; i++) { + data[byteCount] = compressedData[*compressedStartIndex]; + (*compressedStartIndex)++; + byteCount++; + } + } + //assert(byteCount <= numBytes); + } + + return data; + +} + +#endif //IL_NO_IFF diff --git a/libs/DevIL-1.7.8/src-IL/src/il_ilbm.c b/libs/DevIL-1.7.8/src-IL/src/il_ilbm.c new file mode 100644 index 00000000..810383cd --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_ilbm.c @@ -0,0 +1,658 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/08/2009 +// +// Filename: src-IL/src/il_ilbm.c +// +// Description: IFF ILBM file (.iff, .ilbm, .lbm) functions +// IFF ILBM loader, ported from SDL_Image library (IMG_lbm.c) +// http://www.libsdl.org/cgi/viewvc.cgi/trunk/SDL_image/IMG_lbm.c?view=markup +// +// Handles Amiga ILBM and PBM images (including .lbm files saved by the PC +// version of dpaint) +// Handles ExtraHalfBright and HAM images. +// +// Adapted from SDL_image by Ben Campbell (http://scumways.com) 2009-02-23 +// +//----------------------------------------------------------------------------- + + +// TODO: sort out the .iff extension confusion: .iff is currently handled by +// Maya IFF/CIMG handler (il_iff.c), but it should defer to this one if +// fileturns out to be an ILBM. I think the best solution would be to +// rename the IFF handler to CIMG, and create a new iff handler to act as +// a front end, passing off to either il_ilbm or il_cimg... +// For now, this handler only handles .lbm and .ilbm extenstions (but +// traditionally, .iff is more common). + +#include "il_internal.h" +#ifndef IL_NO_ILBM +#include + +ILboolean iIsValidIlbm(void); +ILboolean iLoadIlbmInternal(void); +static ILboolean load_ilbm(void); +static int isLBM(void ); + + +ILboolean ilIsValidIlbm(ILconst_string FileName) +{ + ILHANDLE f; + ILboolean bIlbm = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("iff")) && + !iCheckExtension(FileName, IL_TEXT("ilbm")) && + !iCheckExtension(FileName, IL_TEXT("lbm")) && + !iCheckExtension(FileName, IL_TEXT("ham")) ) { + ilSetError(IL_INVALID_EXTENSION); + return bIlbm; + } + + f = iopenr(FileName); + if (f == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIlbm; + } + + bIlbm = ilIsValidIlbmF(f); + icloser(f); + + return bIlbm; +} + + +ILboolean ilIsValidIlbmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidIlbm(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +ILboolean ilIsValidIlbmL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidIlbm(); +} + + +ILboolean iIsValidIlbm() +{ + return isLBM() ? IL_TRUE:IL_FALSE; +} + + +// Reads a file +ILboolean ilLoadIlbm(ILconst_string FileName) +{ + ILHANDLE IlbmFile; + ILboolean bIlbm = IL_FALSE; + + IlbmFile = iopenr(FileName); + if (IlbmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIlbm; + } + + bIlbm = ilLoadIlbmF(IlbmFile); + icloser(IlbmFile); + + return bIlbm; +} + + +// Reads an already-opened file +ILboolean ilLoadIlbmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadIlbmInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +// Reads from a memory "lump" +ILboolean ilLoadIlbmL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadIlbmInternal(); +} + + +ILboolean iLoadIlbmInternal() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + if (!iIsValidIlbm()) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + if (!load_ilbm() ) + { + return IL_FALSE; + } + + return ilFixImage(); +} + + +/* some defines to allow us to use the SDL_image source in as unmodified form + * as possible, so it'll be easy to diff. Yes, it does look evil, but it's + * really just some local syntactic sugar - most things correspond directly + * to DevIL calls. It's not that bad, honest ;-) + * This will make it _much_ easier to track changes to SDL_Image. + * - BenC + */ + +#define Sint8 ILbyte +#define Sint16 ILshort +#define Sint32 ILint +#define Uint8 ILubyte +#define Uint16 ILushort +#define Uint32 ILuint + +#define SDL_RWops void +#define SDL_RWtell(s) itell() +#define SDL_RWread(s,ptr,size,nmemb) iread(ptr,size,nmemb) +#define SDL_RWseek(s,offset,whence) iseek(offset, IL_ ## whence) + + +/* use different function names to avoid any possible symbol contamination + * (user might also be linking with libSDL) */ +#define SDL_SwapBE32(i) iSDL_SwapBE32(i) +#define SDL_SwapBE16(s) iSDL_SwapBE16(s) +static Uint16 iSDL_SwapBE16( Uint16 s ) + { Uint16 foo = s; iSwapUShort(&foo); return foo; } +static Uint32 iSDL_SwapBE32( Uint32 i ) + { Uint32 foo = i; iSwapUInt(&foo); return foo; } + +/* rest of this file is as unchanged as possible from IMG_lbm.c - BenC */ +/***************************************************************************/ + +/* This is a ILBM image file loading framework + Load IFF pictures, PBM & ILBM packing methods, with or without stencil + Written by Daniel Morais ( Daniel AT Morais DOT com ) in September 2001. + 24 bits ILBM files support added by Marc Le Douarain (http://www.multimania.com/mavati) + in December 2002. + EHB and HAM (specific Amiga graphic chip modes) support added by Marc Le Douarain + (http://www.multimania.com/mavati) in December 2003. + Stencil and colorkey fixes by David Raulo (david.raulo AT free DOT fr) in February 2004. + Buffer overflow fix in RLE decompression by David Raulo in January 2008. +*/ + + +#define MAXCOLORS 256 + +/* Structure for an IFF picture ( BMHD = Bitmap Header ) */ + +/* TODO: SDL_Image seems to get away without any struct + * packing... should it be added? */ +typedef struct +{ + Uint16 w, h; /* width & height of the bitmap in pixels */ + Sint16 x, y; /* screen coordinates of the bitmap */ + Uint8 planes; /* number of planes of the bitmap */ + Uint8 mask; /* mask type ( 0 => no mask ) */ + Uint8 tcomp; /* compression type */ + Uint8 pad1; /* dummy value, for padding */ + Uint16 tcolor; /* transparent color */ + Uint8 xAspect, /* pixel aspect ratio */ + yAspect; + Sint16 Lpage; /* width of the screen in pixels */ + Sint16 Hpage; /* height of the screen in pixels */ +} BMHD; + +static int isLBM() +{ + SDL_RWops* src = 0; + int start; + int is_LBM; + Uint8 magic[4+4+4]; + + start = SDL_RWtell(src); + is_LBM = 0; + if ( SDL_RWread( src, magic, sizeof(magic), 1 ) ) + { + if ( !memcmp( magic, "FORM", 4 ) && + ( !memcmp( magic + 8, "PBM ", 4 ) || + !memcmp( magic + 8, "ILBM", 4 ) ) ) + { + is_LBM = 1; + } + } + SDL_RWseek(src, start, SEEK_SET); + return( is_LBM ); +} + +static ILboolean load_ilbm(void) +{ + SDL_RWops* src = 0; + struct { Uint8 r; Uint8 g; Uint8 b; } scratch_pal[MAXCOLORS]; + ILenum format; /* IL_RGB (ham or 24bit) or IL_COLOUR_INDEX */ + + int start; + Uint8 id[4], pbm, colormap[MAXCOLORS*3], *MiniBuf, *ptr, count, color, msk; + Uint32 size, bytesloaded, nbcolors; + Uint32 i, j, bytesperline, nbplanes, plane, h; + Uint32 remainingbytes; + Uint32 width; + BMHD bmhd; + char *error; + Uint8 flagHAM,flagEHB; + + error = NULL; + MiniBuf = NULL; + + start = SDL_RWtell(src); + if ( !SDL_RWread( src, id, 4, 1 ) ) + { + error="error reading IFF chunk"; + goto done; + } + + /* Should be the size of the file minus 4+4 ( 'FORM'+size ) */ + if ( !SDL_RWread( src, &size, 4, 1 ) ) + { + error="error reading IFF chunk size"; + goto done; + } + + /* As size is not used here, no need to swap it */ + + if ( memcmp( id, "FORM", 4 ) != 0 ) + { + ilSetError(IL_INVALID_FILE_HEADER); + error="not a IFF file"; + goto done; + } + + if ( !SDL_RWread( src, id, 4, 1 ) ) + { + error="error reading IFF chunk"; + goto done; + } + + pbm = 0; + + /* File format : PBM=Packed Bitmap, ILBM=Interleaved Bitmap */ + if ( !memcmp( id, "PBM ", 4 ) ) pbm = 1; + else if ( memcmp( id, "ILBM", 4 ) ) + { + ilSetError(IL_INVALID_FILE_HEADER); + error="not a IFF picture"; + goto done; + } + + nbcolors = 0; + + memset( &bmhd, 0, sizeof( BMHD ) ); + flagHAM = 0; + flagEHB = 0; + + while ( memcmp( id, "BODY", 4 ) != 0 ) + { + if ( !SDL_RWread( src, id, 4, 1 ) ) + { + error="error reading IFF chunk"; + goto done; + } + + if ( !SDL_RWread( src, &size, 4, 1 ) ) + { + error="error reading IFF chunk size"; + goto done; + } + + bytesloaded = 0; + + size = SDL_SwapBE32( size ); + + if ( !memcmp( id, "BMHD", 4 ) ) /* Bitmap header */ + { + if ( !SDL_RWread( src, &bmhd, sizeof( BMHD ), 1 ) ) + { + error="error reading BMHD chunk"; + goto done; + } + + bytesloaded = sizeof( BMHD ); + + bmhd.w = SDL_SwapBE16( bmhd.w ); + bmhd.h = SDL_SwapBE16( bmhd.h ); + bmhd.x = SDL_SwapBE16( bmhd.x ); + bmhd.y = SDL_SwapBE16( bmhd.y ); + bmhd.tcolor = SDL_SwapBE16( bmhd.tcolor ); + bmhd.Lpage = SDL_SwapBE16( bmhd.Lpage ); + bmhd.Hpage = SDL_SwapBE16( bmhd.Hpage ); + } + + if ( !memcmp( id, "CMAP", 4 ) ) /* palette ( Color Map ) */ + { + if ( !SDL_RWread( src, &colormap, size, 1 ) ) + { + error="error reading CMAP chunk"; + goto done; + } + + bytesloaded = size; + nbcolors = size / 3; + } + + if ( !memcmp( id, "CAMG", 4 ) ) /* Amiga ViewMode */ + { + Uint32 viewmodes; + if ( !SDL_RWread( src, &viewmodes, sizeof(viewmodes), 1 ) ) + { + error="error reading CAMG chunk"; + goto done; + } + + bytesloaded = size; + viewmodes = SDL_SwapBE32( viewmodes ); + if ( viewmodes & 0x0800 ) + flagHAM = 1; + if ( viewmodes & 0x0080 ) + flagEHB = 1; + } + + if ( memcmp( id, "BODY", 4 ) ) + { + if ( size & 1 ) ++size; /* padding ! */ + size -= bytesloaded; + /* skip the remaining bytes of this chunk */ + if ( size ) SDL_RWseek( src, size, SEEK_CUR ); + } + } + + /* compute some usefull values, based on the bitmap header */ + + width = ( bmhd.w + 15 ) & 0xFFFFFFF0; /* Width in pixels modulo 16 */ + + bytesperline = ( ( bmhd.w + 15 ) / 16 ) * 2; + + nbplanes = bmhd.planes; + + if ( pbm ) /* File format : 'Packed Bitmap' */ + { + bytesperline *= 8; + nbplanes = 1; + } + + if ( bmhd.mask & 1 ) ++nbplanes; /* There is a mask ( 'stencil' ) */ + + /* Allocate memory for a temporary buffer ( used for + decompression/deinterleaving ) */ + + if ( ( MiniBuf = (void *)malloc( bytesperline * nbplanes ) ) == NULL ) + { + ilSetError( IL_OUT_OF_MEMORY ); + error="no enough memory for temporary buffer"; + goto done; + } + + if( bmhd.planes==24 || flagHAM==1 ) { + format = IL_BGR; + } else { + format = IL_COLOUR_INDEX; + } + if( !ilTexImage( width, bmhd.h, 1, (format==IL_COLOUR_INDEX)?1:3, format, IL_UNSIGNED_BYTE, NULL ) ) + goto done; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + +#if 0 /* No transparent colour support in DevIL? (TODO: confirm) */ + if ( bmhd.mask & 2 ) /* There is a transparent color */ + SDL_SetColorKey( Image, SDL_SRCCOLORKEY, bmhd.tcolor ); +#endif + + /* Update palette informations */ + + /* There is no palette in 24 bits ILBM file */ + if ( nbcolors>0 && flagHAM==0 ) + { + int nbrcolorsfinal = 1 << nbplanes; + ptr = &colormap[0]; + + for ( i=0; i (1< remainingbytes ) || !SDL_RWread( src, &color, 1, 1 ) ) + { + if( count>remainingbytes) + ilSetError(IL_ILLEGAL_FILE_VALUE ); + error="error reading BODY chunk"; + goto done; + } + memset( ptr, color, count ); + } + else + { + ++count; + + if ( ( count > remainingbytes ) || !SDL_RWread( src, ptr, count, 1 ) ) + { + if( count>remainingbytes) + ilSetError(IL_ILLEGAL_FILE_VALUE ); + error="error reading BODY chunk"; + goto done; + } + } + + ptr += count; + remainingbytes -= count; + + } while ( remainingbytes > 0 ); + } + else + { + if ( !SDL_RWread( src, ptr, bytesperline, 1 ) ) + { + error="error reading BODY chunk"; + goto done; + } + } + } + + /* One line has been read, store it ! */ + + ptr = ilGetData(); + if ( nbplanes==24 || flagHAM==1 ) + ptr += h * width * 3; + else + ptr += h * width; + + if ( pbm ) /* File format : 'Packed Bitmap' */ + { + memcpy( ptr, MiniBuf, width ); + } + else /* We have to un-interlace the bits ! */ + { + if ( nbplanes!=24 && flagHAM==0 ) + { + size = ( width + 7 ) / 8; + + for ( i=0; i < size; i++ ) + { + memset( ptr, 0, 8 ); + + for ( plane=0; plane < nbplanes; plane++ ) + { + color = *( MiniBuf + i + ( plane * bytesperline ) ); + msk = 0x80; + + for ( j=0; j<8; j++ ) + { + if ( ( plane + j ) <= 7 ) ptr[j] |= (Uint8)( color & msk ) >> ( 7 - plane - j ); + else ptr[j] |= (Uint8)( color & msk ) << ( plane + j - 7 ); + + msk >>= 1; + } + } + ptr += 8; + } + } + else + { + Uint32 finalcolor = 0; + size = ( width + 7 ) / 8; + /* 24 bitplanes ILBM : R0...R7,G0...G7,B0...B7 */ + /* or HAM (6 bitplanes) or HAM8 (8 bitplanes) modes */ + for ( i=0; i>(nbplanes-2) ) + { + case 0: /* take direct color from palette */ + finalcolor = colormap[ pixelcolor*3 ] + (colormap[ pixelcolor*3+1 ]<<8) + (colormap[ pixelcolor*3+2 ]<<16); + break; + case 1: /* modify only blue component */ + finalcolor = finalcolor&0x00FFFF; + finalcolor = finalcolor | (pixelcolor<<(16+(10-nbplanes))); + break; + case 2: /* modify only red component */ + finalcolor = finalcolor&0xFFFF00; + finalcolor = finalcolor | pixelcolor<<(10-nbplanes); + break; + case 3: /* modify only green component */ + finalcolor = finalcolor&0xFF00FF; + finalcolor = finalcolor | (pixelcolor<<(8+(10-nbplanes))); + break; + } + } + else + { + finalcolor = pixelcolor; + } +#if defined( __LITTLE_ENDIAN__ ) + { + *ptr++ = (Uint8)(finalcolor>>16); + *ptr++ = (Uint8)(finalcolor>>8); + *ptr++ = (Uint8)(finalcolor); + } +#else + { + *ptr++ = (Uint8)(finalcolor); + *ptr++ = (Uint8)(finalcolor>>8); + *ptr++ = (Uint8)(finalcolor>>16); + } +#endif + maskBit = maskBit>>1; + } + } + } + } + } + +done: + + if ( MiniBuf ) free( MiniBuf ); + + if ( error ) + { + /* fprintf(stderr,"il_ilbm.c: '%s'\n",error); */ + return IL_FALSE; + } + + return IL_TRUE; +} + + + +#endif//IL_NO_ILBM + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_internal.c b/libs/DevIL-1.7.8/src-IL/src/il_internal.c new file mode 100644 index 00000000..35fe9391 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_internal.c @@ -0,0 +1,271 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/08/2008 +// +// Filename: src-IL/src/il_internal.c +// +// Description: Internal stuff for DevIL +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include +#include + + +ILimage *iCurImage = NULL; + + +/* Siigron: added this for Linux... a #define should work, but for some reason + it doesn't (anyone who knows why?) */ +#if !_WIN32 || (_WIN32 && __GNUC__) // Cygwin + int stricmp(const char *src1, const char *src2) + { + return strcasecmp(src1, src2); + } + int strnicmp(const char *src1, const char *src2, size_t max) + { + return strncasecmp(src1, src2, max); + } +#elif _WIN32_WCE + int stricmp(const char *src1, const char *src2) + { + return _stricmp(src1, src2); + } + int strnicmp(const char *src1, const char *src2, size_t max) + { + return _strnicmp(src1, src2, max); + } +#endif /* _WIN32 */ + +#ifdef _WIN32_WCE + char *strdup(const char *src) + { + return _strdup(src); + } +#endif//_WIN32_WCE + + +#ifdef _UNICODE + int iStrCmp(ILconst_string src1, ILconst_string src2) + { + return wcsicmp(src1, src2); + } +#else + int iStrCmp(ILconst_string src1, ILconst_string src2) + { + return stricmp(src1, src2); + } +#endif + + +//! Glut's portability.txt says to use this... +ILstring ilStrDup(ILconst_string Str) +{ + ILstring copy; + + copy = (ILstring)ialloc((ilStrLen(Str) + 1) * sizeof(ILchar)); + if (copy == NULL) + return NULL; + iStrCpy(copy, Str); + return copy; +} + + +// Because MSVC++'s version is too stupid to check for NULL... +ILuint ilStrLen(ILconst_string Str) +{ + ILconst_string eos = Str; + + if (Str == NULL) + return 0; + + while (*eos++); + + return((int)(eos - Str - 1)); +} + + +// Because MSVC++'s version is too stupid to check for NULL... +// Passing NULL to strlen will definitely cause a crash. +ILuint ilCharStrLen(const char *Str) +{ + const char *eos = Str; + + if (Str == NULL) + return 0; + + while (*eos++); + + return((int)(eos - Str - 1)); +} + + +// Simple function to test if a filename has a given extension, disregarding case +ILboolean iCheckExtension(ILconst_string Arg, ILconst_string Ext) +{ + ILboolean PeriodFound = IL_FALSE; + ILint i, Len; + ILstring Argu = (ILstring)Arg; + + if (Arg == NULL || Ext == NULL || !ilStrLen(Arg) || !ilStrLen(Ext)) // if not a good filename/extension, exit early + return IL_FALSE; + + Len = ilStrLen(Arg); + Argu += Len; // start at the end + + for (i = Len; i >= 0; i--) { + if (*Argu == '.') { // try to find a period + PeriodFound = IL_TRUE; + break; + } + Argu--; + } + + if (!PeriodFound) // if no period, no extension + return IL_FALSE; + + if (!iStrCmp(Argu+1, Ext)) // extension and ext match? + return IL_TRUE; + + return IL_FALSE; // if all else fails, return IL_FALSE +} + + +ILstring iGetExtension(ILconst_string FileName) +{ + ILboolean PeriodFound = IL_FALSE; + ILstring Ext = (ILstring)FileName; + ILint i, Len = ilStrLen(FileName); + + if (FileName == NULL || !Len) // if not a good filename/extension, exit early + return NULL; + + Ext += Len; // start at the end + + for (i = Len; i >= 0; i--) { + if (*Ext == '.') { // try to find a period + PeriodFound = IL_TRUE; + break; + } + Ext--; + } + + if (!PeriodFound) // if no period, no extension + return NULL; + + return Ext+1; +} + + +// Checks if the file exists +ILboolean iFileExists(ILconst_string FileName) +{ +#if (!defined(_UNICODE) || !defined(_WIN32)) + FILE *CheckFile = fopen(FileName, "rb"); +#else // Windows uses _wfopen instead. + FILE *CheckFile = _wfopen(FileName, L"rb"); +#endif//_UNICODE + + if (CheckFile) { + fclose(CheckFile); + return IL_TRUE; + } + return IL_FALSE; +} + + +// Last time I tried, MSVC++'s fgets() was really really screwy +ILbyte *iFgets(char *buffer, ILuint maxlen) +{ + ILuint counter = 0; + ILint temp = '\0'; + + while ((temp = igetc()) && temp != '\n' && temp != IL_EOF && counter < maxlen) { + buffer[counter] = temp; + counter++; + } + buffer[counter] = '\0'; + + if (temp == IL_EOF && counter == 0) // Only return NULL if no data was "got". + return NULL; + + return (ILbyte*)buffer; +} + + +// A fast integer squareroot, completely accurate for x < 289. +// Taken from http://atoms.org.uk/sqrt/ +// There is also a version that is accurate for all integers +// < 2^31, if we should need it + +static int table[] = { + 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57, + 59, 61, 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83, + 84, 86, 87, 89, 90, 91, 93, 94, 96, 97, 98, 99, 101, 102, + 103, 104, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 128, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 144, 145, + 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, 156, 157, + 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168, + 169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178, + 179, 180, 181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, + 189, 189, 190, 191, 192, 192, 193, 193, 194, 195, 195, 196, 197, 197, + 198, 199, 199, 200, 201, 201, 202, 203, 203, 204, 204, 205, 206, 206, + 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 213, 214, 214, 215, + 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, 221, 222, 222, 223, + 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, 230, 231, + 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, + 239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, + 246, 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, + 253, 254, 254, 255 +}; + +int iSqrt(int x) { + if (x >= 0x10000) { + if (x >= 0x1000000) { + if (x >= 0x10000000) { + if (x >= 0x40000000) { + return (table[x >> 24] << 8); + } else { + return (table[x >> 22] << 7); + } + } else if (x >= 0x4000000) { + return (table[x >> 20] << 6); + } else { + return (table[x >> 18] << 5); + } + } else if (x >= 0x100000) { + if (x >= 0x400000) { + return (table[x >> 16] << 4); + } else { + return (table[x >> 14] << 3); + } + } else if (x >= 0x40000) { + return (table[x >> 12] << 2); + } else { + return (table[x >> 10] << 1); + } + } else if (x >= 0x100) { + if (x >= 0x1000) { + if (x >= 0x4000) { + return (table[x >> 8]); + } else { + return (table[x >> 6] >> 1); + } + } else if (x >= 0x400) { + return (table[x >> 4] >> 2); + } else { + return (table[x >> 2] >> 3); + } + } else if (x >= 0) { + return table[x] >> 4; + } + + //hm, x was negative.... + return -1; +} + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_io.c b/libs/DevIL-1.7.8/src-IL/src/il_io.c new file mode 100644 index 00000000..80958fe3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_io.c @@ -0,0 +1,2643 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_io.c +// +// Description: Determines image types and loads/saves images +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#include "il_register.h" +#include "il_pal.h" +#include + + +// Returns a widened version of a string. +// Make sure to free this after it is used. Code help from +// https://buildsecurityin.us-cert.gov/daisy/bsi-rules/home/g1/769-BSI.html +#if defined(_UNICODE) +wchar_t *WideFromMultiByte(const char *Multi) +{ + ILint Length; + wchar_t *Temp; + + Length = (ILint)mbstowcs(NULL, (const char*)Multi, 0) + 1; // note error return of -1 is possible + if (Length == 0) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + if (Length > ULONG_MAX/sizeof(wchar_t)) { + ilSetError(IL_INTERNAL_ERROR); + return NULL; + } + Temp = (wchar_t*)ialloc(Length * sizeof(wchar_t)); + mbstowcs(Temp, (const char*)Multi, Length); + + return Temp; +} +#endif + + +ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName) +{ + ILenum Type; + ILstring Ext; + + if (FileName == NULL || ilStrLen(FileName) < 1) { + ilSetError(IL_INVALID_PARAM); + return IL_TYPE_UNKNOWN; + } + + Ext = iGetExtension(FileName); + //added 2003-08-31: fix sf bug 789535 + if (Ext == NULL) { + return IL_TYPE_UNKNOWN; + } + + if (!iStrCmp(Ext, IL_TEXT("tga")) || !iStrCmp(Ext, IL_TEXT("vda")) || + !iStrCmp(Ext, IL_TEXT("icb")) || !iStrCmp(Ext, IL_TEXT("vst"))) + Type = IL_TGA; + else if (!iStrCmp(Ext, IL_TEXT("jpg")) || !iStrCmp(Ext, IL_TEXT("jpe")) || + !iStrCmp(Ext, IL_TEXT("jpeg")) || !iStrCmp(Ext, IL_TEXT("jif")) || !iStrCmp(Ext, IL_TEXT("jfif"))) + Type = IL_JPG; + else if (!iStrCmp(Ext, IL_TEXT("jp2")) || !iStrCmp(Ext, IL_TEXT("jpx")) || + !iStrCmp(Ext, IL_TEXT("j2k")) || !iStrCmp(Ext, IL_TEXT("j2c"))) + Type = IL_JP2; + else if (!iStrCmp(Ext, IL_TEXT("dds"))) + Type = IL_DDS; + else if (!iStrCmp(Ext, IL_TEXT("png"))) + Type = IL_PNG; + else if (!iStrCmp(Ext, IL_TEXT("bmp")) || !iStrCmp(Ext, IL_TEXT("dib"))) + Type = IL_BMP; + else if (!iStrCmp(Ext, IL_TEXT("gif"))) + Type = IL_GIF; + else if (!iStrCmp(Ext, IL_TEXT("blp"))) + Type = IL_BLP; + else if (!iStrCmp(Ext, IL_TEXT("cut"))) + Type = IL_CUT; + else if (!iStrCmp(Ext, IL_TEXT("dcm")) || !iStrCmp(Ext, IL_TEXT("dicom"))) + Type = IL_DICOM; + else if (!iStrCmp(Ext, IL_TEXT("dpx"))) + Type = IL_DPX; + else if (!iStrCmp(Ext, IL_TEXT("exr"))) + Type = IL_EXR; + else if (!iStrCmp(Ext, IL_TEXT("fit")) || !iStrCmp(Ext, IL_TEXT("fits"))) + Type = IL_FITS; + else if (!iStrCmp(Ext, IL_TEXT("ftx"))) + Type = IL_FTX; + else if (!iStrCmp(Ext, IL_TEXT("hdr"))) + Type = IL_HDR; + else if (!iStrCmp(Ext, IL_TEXT("iff"))) + Type = IL_IFF; + else if (!iStrCmp(Ext, IL_TEXT("ilbm")) || !iStrCmp(Ext, IL_TEXT("lbm")) || + !iStrCmp(Ext, IL_TEXT("ham"))) + Type = IL_ILBM; + else if (!iStrCmp(Ext, IL_TEXT("ico")) || !iStrCmp(Ext, IL_TEXT("cur"))) + Type = IL_ICO; + else if (!iStrCmp(Ext, IL_TEXT("icns"))) + Type = IL_ICNS; + else if (!iStrCmp(Ext, IL_TEXT("iwi"))) + Type = IL_IWI; + else if (!iStrCmp(Ext, IL_TEXT("iwi"))) + Type = IL_IWI; + else if (!iStrCmp(Ext, IL_TEXT("jng"))) + Type = IL_JNG; + else if (!iStrCmp(Ext, IL_TEXT("lif"))) + Type = IL_LIF; + else if (!iStrCmp(Ext, IL_TEXT("mdl"))) + Type = IL_MDL; + else if (!iStrCmp(Ext, IL_TEXT("mng")) || !iStrCmp(Ext, IL_TEXT("jng"))) + Type = IL_MNG; + else if (!iStrCmp(Ext, IL_TEXT("mp3"))) + Type = IL_MP3; + else if (!iStrCmp(Ext, IL_TEXT("pcd"))) + Type = IL_PCD; + else if (!iStrCmp(Ext, IL_TEXT("pcx"))) + Type = IL_PCX; + else if (!iStrCmp(Ext, IL_TEXT("pic"))) + Type = IL_PIC; + else if (!iStrCmp(Ext, IL_TEXT("pix"))) + Type = IL_PIX; + else if (!iStrCmp(Ext, IL_TEXT("pbm")) || !iStrCmp(Ext, IL_TEXT("pgm")) || + !iStrCmp(Ext, IL_TEXT("pnm")) || !iStrCmp(Ext, IL_TEXT("ppm"))) + Type = IL_PNM; + else if (!iStrCmp(Ext, IL_TEXT("psd")) || !iStrCmp(Ext, IL_TEXT("pdd"))) + Type = IL_PSD; + else if (!iStrCmp(Ext, IL_TEXT("psp"))) + Type = IL_PSP; + else if (!iStrCmp(Ext, IL_TEXT("pxr"))) + Type = IL_PXR; + else if (!iStrCmp(Ext, IL_TEXT("rot"))) + Type = IL_ROT; + else if (!iStrCmp(Ext, IL_TEXT("sgi")) || !iStrCmp(Ext, IL_TEXT("bw")) || + !iStrCmp(Ext, IL_TEXT("rgb")) || !iStrCmp(Ext, IL_TEXT("rgba"))) + Type = IL_SGI; + else if (!iStrCmp(Ext, IL_TEXT("sun")) || !iStrCmp(Ext, IL_TEXT("ras")) || + !iStrCmp(Ext, IL_TEXT("rs")) || !iStrCmp(Ext, IL_TEXT("im1")) || + !iStrCmp(Ext, IL_TEXT("im8")) || !iStrCmp(Ext, IL_TEXT("im24")) || + !iStrCmp(Ext, IL_TEXT("im32"))) + Type = IL_SUN; + else if (!iStrCmp(Ext, IL_TEXT("texture"))) + Type = IL_TEXTURE; + else if (!iStrCmp(Ext, IL_TEXT("tif")) || !iStrCmp(Ext, IL_TEXT("tiff"))) + Type = IL_TIF; + else if (!iStrCmp(Ext, IL_TEXT("tpl"))) + Type = IL_TPL; + else if (!iStrCmp(Ext, IL_TEXT("utx"))) + Type = IL_UTX; + else if (!iStrCmp(Ext, IL_TEXT("vtf"))) + Type = IL_VTF; + else if (!iStrCmp(Ext, IL_TEXT("wal"))) + Type = IL_WAL; + else if (!iStrCmp(Ext, IL_TEXT("wbmp"))) + Type = IL_WBMP; + else if (!iStrCmp(Ext, IL_TEXT("wdp")) || !iStrCmp(Ext, IL_TEXT("hdp"))) + Type = IL_WDP; + else if (!iStrCmp(Ext, IL_TEXT("xpm"))) + Type = IL_XPM; + else + Type = IL_TYPE_UNKNOWN; + + return Type; +} + + +//changed 2003-09-17 to ILAPIENTRY +ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName) +{ + ILHANDLE File; + ILenum Type; + + if (FileName == NULL) + return IL_TYPE_UNKNOWN; + + File = iopenr(FileName); + if (File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + Type = ilDetermineTypeF(File); + icloser(File); + + return Type; +} + + +ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File) +{ + if (File == NULL) + return IL_TYPE_UNKNOWN; + + #ifndef IL_NO_JPG + if (ilIsValidJpegF(File)) + return IL_JPG; + #endif + + #ifndef IL_NO_DDS + if (ilIsValidDdsF(File)) + return IL_DDS; + #endif + + #ifndef IL_NO_PNG + if (ilIsValidPngF(File)) + return IL_PNG; + #endif + + #ifndef IL_NO_BMP + if (ilIsValidBmpF(File)) + return IL_BMP; + #endif + + #ifndef IL_NO_EXR + if (ilIsValidExrF(File)) + return IL_EXR; + #endif + + #ifndef IL_NO_GIF + if (ilIsValidGifF(File)) + return IL_GIF; + #endif + + #ifndef IL_NO_HDR + if (ilIsValidHdrF(File)) + return IL_HDR; + #endif + + #ifndef IL_NO_ICNS + if (ilIsValidIcnsF(File)) + return IL_ICNS; + #endif + + #ifndef IL_NO_ILBM + if (ilIsValidIlbmF(File)) + return IL_ILBM; + #endif + + #ifndef IL_NO_IWI + if (ilIsValidIwiF(File)) + return IL_IWI; + #endif + + #ifndef IL_NO_JP2 + if (ilIsValidJp2F(File)) + return IL_JP2; + #endif + + #ifndef IL_NO_LIF + if (ilIsValidLifF(File)) + return IL_LIF; + #endif + + #ifndef IL_NO_MDL + if (ilIsValidMdlF(File)) + return IL_MDL; + #endif + + #ifndef IL_NO_MDL + if (ilIsValidMp3F(File)) + return IL_MP3; + #endif + + #ifndef IL_NO_PCX + if (ilIsValidPcxF(File)) + return IL_PCX; + #endif + + #ifndef IL_NO_PIC + if (ilIsValidPicF(File)) + return IL_PIC; + #endif + + #ifndef IL_NO_PNM + if (ilIsValidPnmF(File)) + return IL_PNM; + #endif + + #ifndef IL_NO_PSD + if (ilIsValidPsdF(File)) + return IL_PSD; + #endif + + #ifndef IL_NO_PSP + if (ilIsValidPspF(File)) + return IL_PSP; + #endif + + #ifndef IL_NO_SGI + if (ilIsValidSgiF(File)) + return IL_SGI; + #endif + + #ifndef IL_NO_SUN + if (ilIsValidSunF(File)) + return IL_SUN; + #endif + + #ifndef IL_NO_TIF + if (ilIsValidTiffF(File)) + return IL_TIF; + #endif + + #ifndef IL_NO_TPL + if (ilIsValidTplF(File)) + return IL_TPL; + #endif + + #ifndef IL_NO_VTF + if (ilIsValidVtfF(File)) + return IL_VTF; + #endif + + #ifndef IL_NO_XPM + if (ilIsValidXpmF(File)) + return IL_XPM; + #endif + + //moved tga to end of list because it has no magic number + //in header to assure that this is really a tga... (20040218) + #ifndef IL_NO_TGA + if (ilIsValidTgaF(File)) + return IL_TGA; + #endif + + return IL_TYPE_UNKNOWN; +} + + +ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size) +{ + if (Lump == NULL) + return IL_TYPE_UNKNOWN; + + #ifndef IL_NO_JPG + if (ilIsValidJpegL(Lump, Size)) + return IL_JPG; + #endif + + #ifndef IL_NO_DDS + if (ilIsValidDdsL(Lump, Size)) + return IL_DDS; + #endif + + #ifndef IL_NO_PNG + if (ilIsValidPngL(Lump, Size)) + return IL_PNG; + #endif + + #ifndef IL_NO_BMP + if (ilIsValidBmpL(Lump, Size)) + return IL_BMP; + #endif + + #ifndef IL_NO_EXR + if (ilIsValidExrL(Lump, Size)) + return IL_EXR; + #endif + + #ifndef IL_NO_GIF + if (ilIsValidGifL(Lump, Size)) + return IL_GIF; + #endif + + #ifndef IL_NO_HDR + if (ilIsValidHdrL(Lump, Size)) + return IL_HDR; + #endif + + #ifndef IL_NO_ICNS + if (ilIsValidIcnsL(Lump, Size)) + return IL_ICNS; + #endif + + #ifndef IL_NO_IWI + if (ilIsValidIwiL(Lump, Size)) + return IL_IWI; + #endif + + #ifndef IL_NO_ILBM + if (ilIsValidIlbmL(Lump,Size)) + return IL_ILBM; + #endif + + #ifndef IL_NO_JP2 + if (ilIsValidJp2L(Lump, Size)) + return IL_JP2; + #endif + + #ifndef IL_NO_LIF + if (ilIsValidLifL(Lump, Size)) + return IL_LIF; + #endif + + #ifndef IL_NO_MDL + if (ilIsValidMdlL(Lump, Size)) + return IL_MDL; + #endif + + #ifndef IL_NO_MP3 + if (ilIsValidMp3L(Lump, Size)) + return IL_MP3; + #endif + + #ifndef IL_NO_PCX + if (ilIsValidPcxL(Lump, Size)) + return IL_PCX; + #endif + + #ifndef IL_NO_PIC + if (ilIsValidPicL(Lump, Size)) + return IL_PIC; + #endif + + #ifndef IL_NO_PNM + if (ilIsValidPnmL(Lump, Size)) + return IL_PNM; + #endif + + #ifndef IL_NO_PSD + if (ilIsValidPsdL(Lump, Size)) + return IL_PSD; + #endif + + #ifndef IL_NO_PSP + if (ilIsValidPspL(Lump, Size)) + return IL_PSP; + #endif + + #ifndef IL_NO_SGI + if (ilIsValidSgiL(Lump, Size)) + return IL_SGI; + #endif + + #ifndef IL_NO_SUN + if (ilIsValidSunL(Lump, Size)) + return IL_SUN; + #endif + + #ifndef IL_NO_TIF + if (ilIsValidTiffL(Lump, Size)) + return IL_TIF; + #endif + + #ifndef IL_NO_TPL + if (ilIsValidTplL(Lump, Size)) + return IL_TPL; + #endif + + #ifndef IL_NO_VTF + if (ilIsValidVtfL(Lump, Size)) + return IL_VTF; + #endif + + #ifndef IL_NO_XPM + if (ilIsValidXpmL(Lump, Size)) + return IL_XPM; + #endif + + //Moved Targa to end of list because it has no magic number + // in header to assure that this is really a tga... (20040218). + #ifndef IL_NO_TGA + if (ilIsValidTgaL(Lump, Size)) + return IL_TGA; + #endif + + return IL_TYPE_UNKNOWN; +} + + +ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName) +{ + if (FileName == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + switch (Type) + { + #ifndef IL_NO_TGA + case IL_TGA: + return ilIsValidTga(FileName); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilIsValidJpeg(FileName); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilIsValidDds(FileName); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilIsValidPng(FileName); + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + return ilIsValidBmp(FileName); + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + return ilIsValidDicom(FileName); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilIsValidExr(FileName); + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + return ilIsValidGif(FileName); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilIsValidHdr(FileName); + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + return ilIsValidIcns(FileName); + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + return ilIsValidIwi(FileName); + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + return ilIsValidIlbm(FileName); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilIsValidJp2(FileName); + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + return ilIsValidLif(FileName); + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + return ilIsValidMdl(FileName); + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + return ilIsValidMp3(FileName); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilIsValidPcx(FileName); + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + return ilIsValidPic(FileName); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilIsValidPnm(FileName); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilIsValidPsd(FileName); + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + return ilIsValidPsp(FileName); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilIsValidSgi(FileName); + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + return ilIsValidSun(FileName); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilIsValidTiff(FileName); + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + return ilIsValidTpl(FileName); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilIsValidVtf(FileName); + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + return ilIsValidXpm(FileName); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File) +{ + if (File == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + switch (Type) + { + #ifndef IL_NO_TGA + case IL_TGA: + return ilIsValidTgaF(File); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilIsValidJpegF(File); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilIsValidDdsF(File); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilIsValidPngF(File); + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + return ilIsValidBmpF(File); + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + return ilIsValidDicomF(File); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilIsValidExrF(File); + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + return ilIsValidGifF(File); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilIsValidHdrF(File); + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + return ilIsValidIcnsF(File); + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + return ilIsValidIwiF(File); + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + return ilIsValidIlbmF(File); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilIsValidJp2F(File); + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + return ilIsValidLifF(File); + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + return ilIsValidMdlF(File); + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + return ilIsValidMp3F(File); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilIsValidPcxF(File); + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + return ilIsValidPicF(File); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilIsValidPnmF(File); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilIsValidPsdF(File); + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + return ilIsValidPspF(File); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilIsValidSgiF(File); + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + return ilIsValidSunF(File); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilIsValidTiffF(File); + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + return ilIsValidTplF(File); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilIsValidVtfF(File); + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + return ilIsValidXpmF(File); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size) +{ + if (Lump == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + switch (Type) + { + #ifndef IL_NO_TGA + case IL_TGA: + return ilIsValidTgaL(Lump, Size); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilIsValidJpegL(Lump, Size); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilIsValidDdsL(Lump, Size); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilIsValidPngL(Lump, Size); + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + return ilIsValidBmpL(Lump, Size); + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + return ilIsValidDicomL(Lump, Size); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilIsValidExrL(Lump, Size); + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + return ilIsValidGifL(Lump, Size); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilIsValidHdrL(Lump, Size); + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + return ilIsValidIcnsL(Lump, Size); + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + return ilIsValidIwiL(Lump, Size); + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + return ilIsValidIlbmL(Lump, Size); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilIsValidJp2L(Lump, Size); + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + return ilIsValidLifL(Lump, Size); + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + return ilIsValidMdlL(Lump, Size); + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + return ilIsValidMp3L(Lump, Size); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilIsValidPcxL(Lump, Size); + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + return ilIsValidPicL(Lump, Size); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilIsValidPnmL(Lump, Size); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilIsValidPsdL(Lump, Size); + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + return ilIsValidPspL(Lump, Size); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilIsValidSgiL(Lump, Size); + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + return ilIsValidSunL(Lump, Size); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilIsValidTiffL(Lump, Size); + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + return ilIsValidTplL(Lump, Size); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilIsValidVtfL(Lump, Size); + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + return ilIsValidXpmL(Lump, Size); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +//! Attempts to load an image from a file. The file format is specified by the user. +/*! \param Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, + IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, + IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, + IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, + IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. + If IL_TYPE_UNKNOWN is specified, ilLoad will try to determine the type of the file and load it. + \param FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives + the filename of the file to load. + \return Boolean value of failure or success. Returns IL_FALSE if all three loading methods + have been tried and failed.*/ +ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName) +{ + ILboolean bRet; + + if (FileName == NULL || ilStrLen(FileName) < 1) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + switch (Type) + { + case IL_TYPE_UNKNOWN: + bRet = ilLoadImage(FileName); + break; + + #ifndef IL_NO_TGA + case IL_TGA: + bRet = ilLoadTarga(FileName); + break; + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + bRet = ilLoadJpeg(FileName); + break; + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + bRet = ilLoadJp2(FileName); + break; + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + bRet = ilLoadDds(FileName); + break; + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + bRet = ilLoadPng(FileName); + break; + #endif + + #ifndef IL_NO_BLP + case IL_BLP: + bRet = ilLoadBlp(FileName); + break; + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + bRet = ilLoadBmp(FileName); + break; + #endif + + #ifndef IL_NO_DPX + case IL_DPX: + bRet = ilLoadDpx(FileName); + break; + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + bRet = ilLoadGif(FileName); + break; + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + bRet = ilLoadHdr(FileName); + break; + #endif + + #ifndef IL_NO_CUT + case IL_CUT: + bRet = ilLoadCut(FileName); + break; + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + bRet = ilLoadDicom(FileName); + break; + #endif + + #ifndef IL_NO_DOOM + case IL_DOOM: + bRet = ilLoadDoom(FileName); + break; + case IL_DOOM_FLAT: + bRet = ilLoadDoomFlat(FileName); + break; + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + bRet = ilLoadExr(FileName); + break; + #endif + + #ifndef IL_NO_FITS + case IL_FITS: + bRet = ilLoadFits(FileName); + break; + #endif + + #ifndef IL_NO_FTX + case IL_FTX: + bRet = ilLoadFtx(FileName); + break; + #endif + + #ifndef IL_NO_ICO + case IL_ICO: + bRet = ilLoadIcon(FileName); + break; + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + bRet = ilLoadIcns(FileName); + break; + #endif + + #ifndef IL_NO_IFF + case IL_IFF: + bRet = ilLoadIff(FileName); + break; + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + bRet = ilLoadIlbm(FileName); + break; + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + bRet = ilLoadIwi(FileName); + break; + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + bRet = ilLoadLif(FileName); + break; + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + bRet = ilLoadMdl(FileName); + break; + #endif + + #ifndef IL_NO_MNG + case IL_MNG: + bRet = ilLoadMng(FileName); + break; + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + bRet = ilLoadMp3(FileName); + break; + #endif + + #ifndef IL_NO_PCD + case IL_PCD: + ilLoadPcd(FileName); + break; + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + bRet = ilLoadPcx(FileName); + break; + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + bRet = ilLoadPic(FileName); + break; + #endif + + #ifndef IL_NO_PIX + case IL_PIX: + bRet = ilLoadPix(FileName); + break; + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + bRet = ilLoadPnm(FileName); + break; + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + bRet = ilLoadPsd(FileName); + break; + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + bRet = ilLoadPsp(FileName); + break; + #endif + + #ifndef IL_NO_PXR + case IL_PXR: + bRet = ilLoadPxr(FileName); + break; + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + bRet = ilLoadRaw(FileName); + break; + #endif + + #ifndef IL_NO_ROT + case IL_ROT: + bRet = ilLoadRot(FileName); + break; + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + bRet = ilLoadSgi(FileName); + break; + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + bRet = ilLoadSun(FileName); + break; + #endif + + #ifndef IL_NO_TEXTURE + case IL_TEXTURE: + bRet = ilLoadTexture(FileName); + break; + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + bRet = ilLoadTiff(FileName); + break; + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + bRet = ilLoadTpl(FileName); + break; + #endif + + #ifndef IL_NO_UTX + case IL_UTX: + bRet = ilLoadUtx(FileName); + break; + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + bRet = ilLoadVtf(FileName); + break; + #endif + + #ifndef IL_NO_WAL + case IL_WAL: + bRet = ilLoadWal(FileName); + break; + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + bRet = ilLoadWbmp(FileName); + break; + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + bRet = ilLoadXpm(FileName); + break; + #endif + + #ifndef IL_NO_WDP + case IL_WDP: + bRet = ilLoadWdp(FileName); + break; + #endif + + default: + ilSetError(IL_INVALID_ENUM); + bRet = IL_FALSE; + } + + return bRet; +} + + +//! Attempts to load an image from a file stream. The file format is specified by the user. +/*! \param Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, + IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, + IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, + IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, + IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. + If IL_TYPE_UNKNOWN is specified, ilLoadF will try to determine the type of the file and load it. + \param File File stream to load from. + \return Boolean value of failure or success. Returns IL_FALSE if loading fails.*/ +ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File) +{ + if (File == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (Type == IL_TYPE_UNKNOWN) + Type = ilDetermineTypeF(File); + + switch (Type) + { + case IL_TYPE_UNKNOWN: + return IL_FALSE; + + #ifndef IL_NO_TGA + case IL_TGA: + return ilLoadTargaF(File); + #endif + + #ifndef IL_NO_JPG + #ifndef IL_USE_IJL + case IL_JPG: + return ilLoadJpegF(File); + #endif + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilLoadJp2F(File); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilLoadDdsF(File); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilLoadPngF(File); + #endif + + #ifndef IL_NO_BLP + case IL_BLP: + return ilLoadBlpF(File); + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + return ilLoadBmpF(File); + #endif + + #ifndef IL_NO_CUT + case IL_CUT: + return ilLoadCutF(File); + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + return ilLoadDicomF(File); + #endif + + #ifndef IL_NO_DOOM + case IL_DOOM: + return ilLoadDoomF(File); + case IL_DOOM_FLAT: + return ilLoadDoomFlatF(File); + #endif + + #ifndef IL_NO_DPX + case IL_DPX: + return ilLoadDpxF(File); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilLoadExrF(File); + #endif + + #ifndef IL_NO_FITS + case IL_FITS: + return ilLoadFitsF(File); + #endif + + #ifndef IL_NO_FTX + case IL_FTX: + return ilLoadFtxF(File); + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + return ilLoadGifF(File); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilLoadHdrF(File); + #endif + + #ifndef IL_NO_ICO + case IL_ICO: + return ilLoadIconF(File); + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + return ilLoadIcnsF(File); + #endif + + #ifndef IL_NO_IFF + case IL_IFF: + return ilLoadIffF(File); + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + return ilLoadIlbmF(File); + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + return ilLoadIwiF(File); + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + return ilLoadLifF(File); + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + return ilLoadMdlF(File); + #endif + + #ifndef IL_NO_MNG + case IL_MNG: + return ilLoadMngF(File); + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + return ilLoadMp3F(File); + #endif + + #ifndef IL_NO_PCD + case IL_PCD: + return ilLoadPcdF(File); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilLoadPcxF(File); + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + return ilLoadPicF(File); + #endif + + #ifndef IL_NO_PIX + case IL_PIX: + return ilLoadPixF(File); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilLoadPnmF(File); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilLoadPsdF(File); + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + return ilLoadPspF(File); + #endif + + #ifndef IL_NO_PXR + case IL_PXR: + return ilLoadPxrF(File); + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + return ilLoadRawF(File); + #endif + + #ifndef IL_NO_ROT + case IL_ROT: + return ilLoadRotF(File); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilLoadSgiF(File); + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + return ilLoadSunF(File); + #endif + + #ifndef IL_NO_TEXTURE + case IL_TEXTURE: + return ilLoadTextureF(File); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilLoadTiffF(File); + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + return ilLoadTplF(File); + #endif + + #ifndef IL_NO_UTX + case IL_UTX: + return ilLoadUtxF(File); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilLoadVtfF(File); + #endif + + #ifndef IL_NO_WAL + case IL_WAL: + return ilLoadWalF(File); + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + return ilLoadWbmpF(File); + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + return ilLoadXpmF(File); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +//! Attempts to load an image from a memory buffer. The file format is specified by the user. +/*! \param Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, + IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, + IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, + IL_PNM, IL_PSD, IL_PSP, IL_PXR, IL_ROT, IL_SGI, IL_SUN, IL_TEXTURE, IL_TGA, IL_TIF, IL_TPL, + IL_UTX, IL_VTF, IL_WAL, IL_WBMP, IL_XPM, IL_RAW, IL_JASC_PAL and IL_TYPE_UNKNOWN. + If IL_TYPE_UNKNOWN is specified, ilLoadL will try to determine the type of the file and load it. + \param Lump The buffer where the file data is located + \param Size Size of the buffer + \return Boolean value of failure or success. Returns IL_FALSE if loading fails.*/ +ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size) +{ + if (Lump == NULL || Size == 0) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (Type == IL_TYPE_UNKNOWN) + Type = ilDetermineTypeL(Lump, Size); + + switch (Type) + { + case IL_TYPE_UNKNOWN: + return IL_FALSE; + + #ifndef IL_NO_TGA + case IL_TGA: + return ilLoadTargaL(Lump, Size); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilLoadJpegL(Lump, Size); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilLoadJp2L(Lump, Size); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilLoadDdsL(Lump, Size); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilLoadPngL(Lump, Size); + #endif + + #ifndef IL_NO_BLP + case IL_BLP: + return ilLoadBlpL(Lump, Size); + #endif + + #ifndef IL_NO_BMP + case IL_BMP: + return ilLoadBmpL(Lump, Size); + #endif + + #ifndef IL_NO_CUT + case IL_CUT: + return ilLoadCutL(Lump, Size); + #endif + + #ifndef IL_NO_DICOM + case IL_DICOM: + return ilLoadDicomL(Lump, Size); + #endif + + #ifndef IL_NO_DOOM + case IL_DOOM: + return ilLoadDoomL(Lump, Size); + case IL_DOOM_FLAT: + return ilLoadDoomFlatL(Lump, Size); + #endif + + #ifndef IL_NO_DPX + case IL_DPX: + return ilLoadDpxL(Lump, Size); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilLoadExrL(Lump, Size); + #endif + + #ifndef IL_NO_FITS + case IL_FITS: + return ilLoadFitsL(Lump, Size); + #endif + + #ifndef IL_NO_FTX + case IL_FTX: + return ilLoadFtxL(Lump, Size); + #endif + + #ifndef IL_NO_GIF + case IL_GIF: + return ilLoadGifL(Lump, Size); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilLoadHdrL(Lump, Size); + #endif + + #ifndef IL_NO_ICO + case IL_ICO: + return ilLoadIconL(Lump, Size); + #endif + + #ifndef IL_NO_ICNS + case IL_ICNS: + return ilLoadIcnsL(Lump, Size); + #endif + + #ifndef IL_NO_IFF + case IL_IFF: + return ilLoadIffL(Lump, Size); + #endif + + #ifndef IL_NO_ILBM + case IL_ILBM: + return ilLoadIlbmL(Lump, Size); + #endif + + #ifndef IL_NO_IWI + case IL_IWI: + return ilLoadIwiL(Lump, Size); + #endif + + #ifndef IL_NO_LIF + case IL_LIF: + return ilLoadLifL(Lump, Size); + #endif + + #ifndef IL_NO_MDL + case IL_MDL: + return ilLoadMdlL(Lump, Size); + #endif + + #ifndef IL_NO_MNG + case IL_MNG: + return ilLoadMngL(Lump, Size); + #endif + + #ifndef IL_NO_MP3 + case IL_MP3: + return ilLoadMp3L(Lump, Size); + #endif + + #ifndef IL_NO_PCD + case IL_PCD: + return ilLoadPcdL(Lump, Size); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilLoadPcxL(Lump, Size); + #endif + + #ifndef IL_NO_PIC + case IL_PIC: + return ilLoadPicL(Lump, Size); + #endif + + #ifndef IL_NO_PIX + case IL_PIX: + return ilLoadPixL(Lump, Size); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilLoadPnmL(Lump, Size); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilLoadPsdL(Lump, Size); + #endif + + #ifndef IL_NO_PSP + case IL_PSP: + return ilLoadPspL(Lump, Size); + #endif + + #ifndef IL_NO_PXR + case IL_PXR: + return ilLoadPxrL(Lump, Size); + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + return ilLoadRawL(Lump, Size); + #endif + + #ifndef IL_NO_ROT + case IL_ROT: + return ilLoadRotL(Lump, Size); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilLoadSgiL(Lump, Size); + #endif + + #ifndef IL_NO_SUN + case IL_SUN: + return ilLoadSunL(Lump, Size); + #endif + + #ifndef IL_NO_TEXTURE + case IL_TEXTURE: + return ilLoadTextureL(Lump, Size); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilLoadTiffL(Lump, Size); + #endif + + #ifndef IL_NO_TPL + case IL_TPL: + return ilLoadTplL(Lump, Size); + #endif + + #ifndef IL_NO_UTX + case IL_UTX: + return ilLoadUtxL(Lump, Size); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilLoadVtfL(Lump, Size); + #endif + + #ifndef IL_NO_WAL + case IL_WAL: + return ilLoadWalL(Lump, Size); + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + return ilLoadWbmpL(Lump, Size); + #endif + + #ifndef IL_NO_XPM + case IL_XPM: + return ilLoadXpmL(Lump, Size); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +//! Attempts to load an image from a file with various different methods before failing - very generic. +/*! The ilLoadImage function allows a general interface to the specific internal file-loading + routines. First, it finds the extension and checks to see if any user-registered functions + (registered through ilRegisterLoad) match the extension. If nothing matches, it takes the + extension and determines which function to call based on it. Lastly, it attempts to identify + the image based on various image header verification functions, such as ilIsValidPngF. + If all this checking fails, IL_FALSE is returned with no modification to the current bound image. + \param FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives + the filename of the file to load. + \return Boolean value of failure or success. Returns IL_FALSE if all three loading methods + have been tried and failed.*/ +ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName) +{ + ILstring Ext; + ILenum Type; + ILboolean bRet = IL_FALSE; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (FileName == NULL || ilStrLen(FileName) < 1) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + Ext = iGetExtension(FileName); + + // Try registered procedures first (so users can override default lib functions). + if (Ext) { + if (iRegisterLoad(FileName)) + return IL_TRUE; + + #ifndef IL_NO_TGA + if (!iStrCmp(Ext, IL_TEXT("tga")) || !iStrCmp(Ext, IL_TEXT("vda")) || + !iStrCmp(Ext, IL_TEXT("icb")) || !iStrCmp(Ext, IL_TEXT("vst"))) { + bRet = ilLoadTarga(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_JPG + if (!iStrCmp(Ext, IL_TEXT("jpg")) || !iStrCmp(Ext, IL_TEXT("jpe")) || + !iStrCmp(Ext, IL_TEXT("jpeg")) || !iStrCmp(Ext, IL_TEXT("jif")) || !iStrCmp(Ext, IL_TEXT("jfif"))) { + bRet = ilLoadJpeg(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_JP2 + if (!iStrCmp(Ext, IL_TEXT("jp2")) || !iStrCmp(Ext, IL_TEXT("jpx")) || + !iStrCmp(Ext, IL_TEXT("j2k")) || !iStrCmp(Ext, IL_TEXT("j2c"))) { + bRet = ilLoadJp2(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_DDS + if (!iStrCmp(Ext, IL_TEXT("dds"))) { + bRet = ilLoadDds(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PNG + if (!iStrCmp(Ext, IL_TEXT("png"))) { + bRet = ilLoadPng(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_BMP + if (!iStrCmp(Ext, IL_TEXT("bmp")) || !iStrCmp(Ext, IL_TEXT("dib"))) { + bRet = ilLoadBmp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_BLP + if (!iStrCmp(Ext, IL_TEXT("blp"))) { + bRet = ilLoadBlp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_DPX + if (!iStrCmp(Ext, IL_TEXT("dpx"))) { + bRet = ilLoadDpx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_EXR + if (!iStrCmp(Ext, IL_TEXT("exr"))) { + bRet = ilLoadExr(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_GIF + if (!iStrCmp(Ext, IL_TEXT("gif"))) { + bRet = ilLoadGif(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_HDR + if (!iStrCmp(Ext, IL_TEXT("hdr"))) { + bRet = ilLoadHdr(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_CUT + if (!iStrCmp(Ext, IL_TEXT("cut"))) { + bRet = ilLoadCut(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_DCX + if (!iStrCmp(Ext, IL_TEXT("dcx"))) { + bRet = ilLoadDcx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_DICOM + if (!iStrCmp(Ext, IL_TEXT("dicom")) || !iStrCmp(Ext, IL_TEXT("dcm"))) { + bRet = ilLoadDicom(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_FITS + if (!iStrCmp(Ext, IL_TEXT("fits")) || !iStrCmp(Ext, IL_TEXT("fit"))) { + bRet = ilLoadFits(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_FTX + if (!iStrCmp(Ext, IL_TEXT("ftx"))) { + bRet = ilLoadFtx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_ICO + if (!iStrCmp(Ext, IL_TEXT("ico")) || !iStrCmp(Ext, IL_TEXT("cur"))) { + bRet = ilLoadIcon(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_ICNS + if (!iStrCmp(Ext, IL_TEXT("icns"))) { + bRet = ilLoadIcns(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_IFF + if (!iStrCmp(Ext, IL_TEXT("iff"))) { + bRet = ilLoadIff(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_ILBM + if (!iStrCmp(Ext, IL_TEXT("ilbm")) || !iStrCmp(Ext, IL_TEXT("lbm")) || + !iStrCmp(Ext, IL_TEXT("ham")) ) { + bRet = ilLoadIlbm(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_IWI + if (!iStrCmp(Ext, IL_TEXT("iwi"))) { + bRet = ilLoadIwi(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_LIF + if (!iStrCmp(Ext, IL_TEXT("lif"))) { + bRet = ilLoadLif(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_MDL + if (!iStrCmp(Ext, IL_TEXT("mdl"))) { + bRet = ilLoadMdl(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_MNG + if (!iStrCmp(Ext, IL_TEXT("mng")) || !iStrCmp(Ext, IL_TEXT("jng"))) { + bRet = ilLoadMng(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_MP3 + if (!iStrCmp(Ext, IL_TEXT("mp3"))) { + bRet = ilLoadMp3(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PCD + if (!iStrCmp(Ext, IL_TEXT("pcd"))) { + bRet = ilLoadPcd(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PCX + if (!iStrCmp(Ext, IL_TEXT("pcx"))) { + bRet = ilLoadPcx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PIC + if (!iStrCmp(Ext, IL_TEXT("pic"))) { + bRet = ilLoadPic(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PIX + if (!iStrCmp(Ext, IL_TEXT("pix"))) { + bRet = ilLoadPix(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PNM + if (!iStrCmp(Ext, IL_TEXT("pbm"))) { + bRet = ilLoadPnm(FileName); + goto finish; + } + if (!iStrCmp(Ext, IL_TEXT("pgm"))) { + bRet = ilLoadPnm(FileName); + goto finish; + } + if (!iStrCmp(Ext, IL_TEXT("pnm"))) { + bRet = ilLoadPnm(FileName); + goto finish; + } + if (!iStrCmp(Ext, IL_TEXT("ppm"))) { + bRet = ilLoadPnm(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PSD + if (!iStrCmp(Ext, IL_TEXT("psd")) || !iStrCmp(Ext, IL_TEXT("pdd"))) { + bRet = ilLoadPsd(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PSP + if (!iStrCmp(Ext, IL_TEXT("psp"))) { + bRet = ilLoadPsp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PXR + if (!iStrCmp(Ext, IL_TEXT("pxr"))) { + bRet = ilLoadPxr(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_ROT + if (!iStrCmp(Ext, IL_TEXT("rot"))) { + bRet = ilLoadRot(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_SGI + if (!iStrCmp(Ext, IL_TEXT("sgi")) || !iStrCmp(Ext, IL_TEXT("bw")) || + !iStrCmp(Ext, IL_TEXT("rgb")) || !iStrCmp(Ext, IL_TEXT("rgba"))) { + bRet = ilLoadSgi(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_SUN + if (!iStrCmp(Ext, IL_TEXT("sun")) || !iStrCmp(Ext, IL_TEXT("ras")) || + !iStrCmp(Ext, IL_TEXT("rs")) || !iStrCmp(Ext, IL_TEXT("im1")) || + !iStrCmp(Ext, IL_TEXT("im8")) || !iStrCmp(Ext, IL_TEXT("im24")) || + !iStrCmp(Ext, IL_TEXT("im32"))) { + bRet = ilLoadSun(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_TEXTURE + if (!iStrCmp(Ext, IL_TEXT("texture"))) { + bRet = ilLoadTexture(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_TIF + if (!iStrCmp(Ext, IL_TEXT("tif")) || !iStrCmp(Ext, IL_TEXT("tiff"))) { + bRet = ilLoadTiff(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_TPL + if (!iStrCmp(Ext, IL_TEXT("tpl"))) { + bRet = ilLoadTpl(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_UTX + if (!iStrCmp(Ext, IL_TEXT("utx"))) { + bRet = ilLoadUtx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_VTF + if (!iStrCmp(Ext, IL_TEXT("vtf"))) { + bRet = ilLoadVtf(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_WAL + if (!iStrCmp(Ext, IL_TEXT("wal"))) { + bRet = ilLoadWal(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_WBMP + if (!iStrCmp(Ext, IL_TEXT("wbmp"))) { + bRet = ilLoadWbmp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_WDP + if (!iStrCmp(Ext, IL_TEXT("wdp")) || !iStrCmp(Ext, IL_TEXT("hdp")) ) { + bRet = ilLoadWdp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_XPM + if (!iStrCmp(Ext, IL_TEXT("xpm"))) { + bRet = ilLoadXpm(FileName); + goto finish; + } + #endif + } + + // As a last-ditch effort, try to identify the image + Type = ilDetermineType(FileName); + if (Type == IL_TYPE_UNKNOWN) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + return ilLoad(Type, FileName); + +finish: + return bRet; +} + + +//! Attempts to save an image to a file. The file format is specified by the user. +/*! \param Type Format of this file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, + IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, + IL_VTF, IL_WBMP and IL_JASC_PAL. + \param FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives + the filename to save to. + \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ +ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName) +{ + switch (Type) + { + case IL_TYPE_UNKNOWN: + return ilSaveImage(FileName); + + #ifndef IL_NO_BMP + case IL_BMP: + return ilSaveBmp(FileName); + #endif + + #ifndef IL_NO_CHEAD + case IL_CHEAD: + return ilSaveCHeader(FileName, "IL_IMAGE"); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilSaveDds(FileName); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilSaveExr(FileName); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilSaveHdr(FileName); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilSaveJp2(FileName); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilSaveJpeg(FileName); + #endif + + #ifndef IL_NO_PCX + case IL_PCX: + return ilSavePcx(FileName); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilSavePng(FileName); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilSavePnm(FileName); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilSavePsd(FileName); + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + return ilSaveRaw(FileName); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilSaveSgi(FileName); + #endif + + #ifndef IL_NO_TGA + case IL_TGA: + return ilSaveTarga(FileName); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilSaveTiff(FileName); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilSaveVtf(FileName); + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + return ilSaveWbmp(FileName); + #endif + + case IL_JASC_PAL: + return ilSaveJascPal(FileName); + } + + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; +} + + +//! Attempts to save an image to a file stream. The file format is specified by the user. +/*! \param Type Format of this file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, + IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, + IL_VTF, IL_WBMP and IL_JASC_PAL. + \param File File stream to save to. + \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ +ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File) +{ + ILboolean Ret; + + if (File == NULL) { + ilSetError(IL_INVALID_PARAM); + return 0; + } + + switch (Type) + { + #ifndef IL_NO_BMP + case IL_BMP: + Ret = ilSaveBmpF(File); + break; + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + Ret = ilSaveDdsF(File); + break; + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + Ret = ilSaveExrF(File); + break; + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + Ret = ilSaveHdrF(File); + break; + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + Ret = ilSaveJp2F(File); + break; + #endif + + #ifndef IL_NO_JPG + #ifndef IL_USE_IJL + case IL_JPG: + Ret = ilSaveJpegF(File); + break; + #endif + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + Ret = ilSavePnmF(File); + break; + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + Ret = ilSavePngF(File); + break; + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + Ret = ilSavePsdF(File); + break; + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + Ret = ilSaveRawF(File); + break; + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + Ret = ilSaveSgiF(File); + break; + #endif + + #ifndef IL_NO_TGA + case IL_TGA: + Ret = ilSaveTargaF(File); + break; + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + Ret = ilSaveVtfF(File); + break; + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + Ret = ilSaveWbmpF(File); + break; + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + Ret = ilSaveTiffF(File); + break; + #endif + + default: + ilSetError(IL_INVALID_ENUM); + return 0; + } + + if (Ret == IL_FALSE) + return 0; + + return itellw(); +} + + +//! Attempts to save an image to a memory buffer. The file format is specified by the user. +/*! \param Type Format of this image file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, + IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, + IL_VTF, IL_WBMP and IL_JASC_PAL. + \param Lump Memory buffer to save to + \param Size Size of the memory buffer + \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ +ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size) +{ + if (Lump == NULL) { + if (Size != 0) { + ilSetError(IL_INVALID_PARAM); + return 0; + } + // The user wants to know how large of a buffer they need. + else { + return ilDetermineSize(Type); + } + } + + switch (Type) + { + #ifndef IL_NO_BMP + case IL_BMP: + return ilSaveBmpL(Lump, Size); + #endif + + #ifndef IL_NO_EXR + case IL_EXR: + return ilSaveExrL(Lump, Size); + #endif + + #ifndef IL_NO_HDR + case IL_HDR: + return ilSaveHdrL(Lump, Size); + #endif + + #ifndef IL_NO_JP2 + case IL_JP2: + return ilSaveJp2L(Lump, Size); + #endif + + #ifndef IL_NO_JPG + case IL_JPG: + return ilSaveJpegL(Lump, Size); + #endif + + #ifndef IL_NO_PNG + case IL_PNG: + return ilSavePngL(Lump, Size); + #endif + + #ifndef IL_NO_PNM + case IL_PNM: + return ilSavePnmL(Lump, Size); + #endif + + #ifndef IL_NO_PSD + case IL_PSD: + return ilSavePsdL(Lump, Size); + #endif + + #ifndef IL_NO_RAW + case IL_RAW: + return ilSaveRawL(Lump, Size); + #endif + + #ifndef IL_NO_SGI + case IL_SGI: + return ilSaveSgiL(Lump, Size); + #endif + + #ifndef IL_NO_TGA + case IL_TGA: + return ilSaveTargaL(Lump, Size); + #endif + + #ifndef IL_NO_DDS + case IL_DDS: + return ilSaveDdsL(Lump, Size); + #endif + + #ifndef IL_NO_VTF + case IL_VTF: + return ilSaveVtfL(Lump, Size); + #endif + + #ifndef IL_NO_WBMP + case IL_WBMP: + return ilSaveWbmpL(Lump, Size); + #endif + + #ifndef IL_NO_TIF + case IL_TIF: + return ilSaveTiffL(Lump, Size); + #endif + } + + ilSetError(IL_INVALID_ENUM); + return 0; +} + + +//! Saves the current image based on the extension given in FileName. +/*! \param FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives + the filename to save to. + \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ +ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName) +{ + ILstring Ext; + ILboolean bRet = IL_FALSE; + + if (FileName == NULL || ilStrLen(FileName) < 1) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Ext = iGetExtension(FileName); + if (Ext == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + #ifndef IL_NO_BMP + if (!iStrCmp(Ext, IL_TEXT("bmp"))) { + bRet = ilSaveBmp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_CHEAD + if (!iStrCmp(Ext, IL_TEXT("h"))) { + bRet = ilSaveCHeader(FileName, "IL_IMAGE"); + goto finish; + } + #endif + + #ifndef IL_NO_DDS + if (!iStrCmp(Ext, IL_TEXT("dds"))) { + bRet = ilSaveDds(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_EXR + if (!iStrCmp(Ext, IL_TEXT("exr"))) { + bRet = ilSaveExr(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_HDR + if (!iStrCmp(Ext, IL_TEXT("hdr"))) { + bRet = ilSaveHdr(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_JP2 + if (!iStrCmp(Ext, IL_TEXT("jp2"))) { + bRet = ilSaveJp2(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_JPG + if (!iStrCmp(Ext, IL_TEXT("jpg")) || !iStrCmp(Ext, IL_TEXT("jpeg")) || !iStrCmp(Ext, IL_TEXT("jpe"))) { + bRet = ilSaveJpeg(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PCX + if (!iStrCmp(Ext, IL_TEXT("pcx"))) { + bRet = ilSavePcx(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PNG + if (!iStrCmp(Ext, IL_TEXT("png"))) { + bRet = ilSavePng(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PNM // Not sure if binary or ascii should be defaulted...maybe an option? + if (!iStrCmp(Ext, IL_TEXT("pbm"))) { + bRet = ilSavePnm(FileName); + goto finish; + } + if (!iStrCmp(Ext, IL_TEXT("pgm"))) { + bRet = ilSavePnm(FileName); + goto finish; + } + if (!iStrCmp(Ext, IL_TEXT("ppm"))) { + bRet = ilSavePnm(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_PSD + if (!iStrCmp(Ext, IL_TEXT("psd"))) { + bRet = ilSavePsd(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_RAW + if (!iStrCmp(Ext, IL_TEXT("raw"))) { + bRet = ilSaveRaw(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_SGI + if (!iStrCmp(Ext, IL_TEXT("sgi")) || !iStrCmp(Ext, IL_TEXT("bw")) || + !iStrCmp(Ext, IL_TEXT("rgb")) || !iStrCmp(Ext, IL_TEXT("rgba"))) { + bRet = ilSaveSgi(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_TGA + if (!iStrCmp(Ext, IL_TEXT("tga"))) { + bRet = ilSaveTarga(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_TIF + if (!iStrCmp(Ext, IL_TEXT("tif")) || !iStrCmp(Ext, IL_TEXT("tiff"))) { + bRet = ilSaveTiff(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_VTF + if (!iStrCmp(Ext, IL_TEXT("vtf"))) { + bRet = ilSaveVtf(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_WBMP + if (!iStrCmp(Ext, IL_TEXT("wbmp"))) { + bRet = ilSaveWbmp(FileName); + goto finish; + } + #endif + + #ifndef IL_NO_MNG + if (!iStrCmp(Ext, IL_TEXT("mng"))) { + bRet = ilSaveMng(FileName); + goto finish; + } + #endif + + // Check if we just want to save the palette. + if (!iStrCmp(Ext, IL_TEXT("pal"))) { + bRet = ilSavePal(FileName); + goto finish; + } + + // Try registered procedures + if (iRegisterSave(FileName)) + return IL_TRUE; + + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + +finish: + return bRet; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_iwi.c b/libs/DevIL-1.7.8/src-IL/src/il_iwi.c new file mode 100644 index 00000000..dac2dfcf --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_iwi.c @@ -0,0 +1,401 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/04/2009 +// +// Filename: src-IL/src/il_iwi.c +// +// Description: Reads from an Infinity Ward Image (.iwi) file from Call of Duty. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_IWI +#include "il_dds.h" + +typedef struct IWIHEAD +{ + ILuint Signature; + ILubyte Format; + ILubyte Flags; + ILushort Width; + ILushort Height; +} IWIHEAD; + +#define IWI_ARGB8 0x01 +#define IWI_RGB8 0x02 +#define IWI_ARGB4 0x03 +#define IWI_A8 0x04 +#define IWI_JPG 0x07 +#define IWI_DXT1 0x0B +#define IWI_DXT3 0x0C +#define IWI_DXT5 0x0D + +ILboolean iIsValidIwi(void); +ILboolean iCheckIwi(IWIHEAD *Header); +ILboolean iLoadIwiInternal(void); +ILboolean IwiInitMipmaps(ILimage *BaseImage, ILuint *NumMips); +ILboolean IwiReadImage(ILimage *BaseImage, IWIHEAD *Header, ILuint NumMips); +ILenum IwiGetFormat(ILubyte Format, ILubyte *Bpp); + +//! Checks if the file specified in FileName is a valid IWI file. +ILboolean ilIsValidIwi(ILconst_string FileName) +{ + ILHANDLE IwiFile; + ILboolean bIwi = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("iwi"))) { + ilSetError(IL_INVALID_EXTENSION); + return bIwi; + } + + IwiFile = iopenr(FileName); + if (IwiFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIwi; + } + + bIwi = ilIsValidIwiF(IwiFile); + icloser(IwiFile); + + return bIwi; +} + + +//! Checks if the ILHANDLE contains a valid IWI file at the current position. +ILboolean ilIsValidIwiF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidIwi(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid IWI lump. +ILboolean ilIsValidIwiL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidIwi(); +} + + +// Internal function used to get the IWI header from the current file. +ILboolean iGetIwiHead(IWIHEAD *Header) +{ + Header->Signature = GetLittleUInt(); + Header->Format = igetc(); + Header->Flags = igetc(); //@TODO: Find out what the flags mean. + Header->Width = GetLittleUShort(); + Header->Height = GetLittleUShort(); + + // @TODO: Find out what is in the rest of the header. + iseek(18, IL_SEEK_CUR); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidIwi(void) +{ + IWIHEAD Header; + ILuint Pos = itell(); + + if (!iGetIwiHead(&Header)) + return IL_FALSE; + // The length of the header varies, so we just go back to the original position. + iseek(Pos, IL_SEEK_CUR); + + return iCheckIwi(&Header); +} + + +// Internal function used to check if the HEADER is a valid IWI header. +ILboolean iCheckIwi(IWIHEAD *Header) +{ + if (Header->Signature != 0x06695749 && Header->Signature != 0x05695749) // 'IWi-' (version 6, and version 5 is the second). + return IL_FALSE; + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + // DXT images must have power-of-2 dimensions. + if (Header->Format == IWI_DXT1 || Header->Format == IWI_DXT3 || Header->Format == IWI_DXT5) + if (Header->Width != ilNextPower2(Header->Width) || Header->Height != ilNextPower2(Header->Height)) + return IL_FALSE; + // 0x0B, 0x0C and 0x0D are DXT formats. + if (Header->Format != IWI_ARGB4 && Header->Format != IWI_RGB8 && Header->Format != IWI_ARGB8 && Header->Format != IWI_A8 + && Header->Format != IWI_DXT1 && Header->Format != IWI_DXT3 && Header->Format != IWI_DXT5) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a IWI file +ILboolean ilLoadIwi(ILconst_string FileName) +{ + ILHANDLE IwiFile; + ILboolean bIwi = IL_FALSE; + + IwiFile = iopenr(FileName); + if (IwiFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bIwi; + } + + bIwi = ilLoadIwiF(IwiFile); + icloser(IwiFile); + + return bIwi; +} + + +//! Reads an already-opened IWI file +ILboolean ilLoadIwiF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadIwiInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a IWI +ILboolean ilLoadIwiL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadIwiInternal(); +} + + +// Internal function used to load the IWI. +ILboolean iLoadIwiInternal(void) +{ + IWIHEAD Header; + ILuint NumMips = 0; + ILboolean HasMipmaps = IL_TRUE; + ILenum Format; + ILubyte Bpp; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Read the header and check it. + if (!iGetIwiHead(&Header)) + return IL_FALSE; + if (!iCheckIwi(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // From a post by Pointy on http://iwnation.com/forums/index.php?showtopic=27903, + // flags ending with 0x3 have no mipmaps. + HasMipmaps = ((Header.Flags & 0x03) == 0x03) ? IL_FALSE : IL_TRUE; + + // Create the image, then create the mipmaps, then finally read the image. + Format = IwiGetFormat(Header.Format, &Bpp); + if (!ilTexImage(Header.Width, Header.Height, 1, Bpp, Format, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + if (HasMipmaps) + if (!IwiInitMipmaps(iCurImage, &NumMips)) + return IL_FALSE; + if (!IwiReadImage(iCurImage, &Header, NumMips)) + return IL_FALSE; + + return ilFixImage(); +} + + +// Helper function to convert IWI formats to DevIL formats and Bpp. +ILenum IwiGetFormat(ILubyte Format, ILubyte *Bpp) +{ + switch (Format) + { + case IWI_ARGB8: + *Bpp = 4; + return IL_BGRA; + case IWI_RGB8: + *Bpp = 3; + return IL_BGR; + case IWI_ARGB4: + *Bpp = 4; + return IL_BGRA; + case IWI_A8: + *Bpp = 1; + return IL_ALPHA; + case IWI_DXT1: + *Bpp = 4; + return IL_RGBA; + case IWI_DXT3: + *Bpp = 4; + return IL_RGBA; + case IWI_DXT5: + *Bpp = 4; + return IL_RGBA; + } + + return 0; // Will never reach this. +} + + +// Function to intialize the mipmaps and determine the number of mipmaps. +ILboolean IwiInitMipmaps(ILimage *BaseImage, ILuint *NumMips) +{ + ILimage *Image; + ILuint Width, Height, Mipmap; + + Image = BaseImage; + Width = BaseImage->Width; Height = BaseImage->Height; + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + for (Mipmap = 0; Width != 1 && Height != 1; Mipmap++) { + // 1 is the smallest dimension possible. + Width = (Width >> 1) == 0 ? 1 : (Width >> 1); + Height = (Height >> 1) == 0 ? 1 : (Height >> 1); + + Image->Mipmaps = ilNewImageFull(Width, Height, 1, BaseImage->Bpp, BaseImage->Format, BaseImage->Type, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + Image = Image->Mipmaps; + + // ilNewImage does not set these. + Image->Format = BaseImage->Format; + Image->Type = BaseImage->Type; + // The origin is in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + } + + *NumMips = Mipmap; + return IL_TRUE; +} + + +ILboolean IwiReadImage(ILimage *BaseImage, IWIHEAD *Header, ILuint NumMips) +{ + ILimage *Image; + ILuint SizeOfData; + ILubyte *CompData = NULL; + ILint i, j, k, m; + + for (i = NumMips; i >= 0; i--) { + Image = BaseImage; + // Go to the ith mipmap level. + // The mipmaps go from smallest to the largest. + for (j = 0; j < i; j++) + Image = Image->Mipmaps; + + switch (Header->Format) + { + case IWI_ARGB8: // These are all + case IWI_RGB8: // uncompressed data, + case IWI_A8: // so just read it. + if (iread(Image->Data, 1, Image->SizeOfData) != Image->SizeOfData) + return IL_FALSE; + break; + + case IWI_ARGB4: //@TODO: Find some test images for this. + // Data is in ARGB4 format - 4 bits per component. + SizeOfData = Image->Width * Image->Height * 2; + CompData = ialloc(SizeOfData); // Not really compressed - just in ARGB4 format. + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + ifree(CompData); + return IL_FALSE; + } + for (k = 0, m = 0; k < (ILint)Image->SizeOfData; k += 4, m += 2) { + // @TODO: Double the image data into the low and high nibbles for a better range of values. + Image->Data[k+0] = CompData[m] & 0xF0; + Image->Data[k+1] = (CompData[m] & 0x0F) << 4; + Image->Data[k+2] = CompData[m+1] & 0xF0; + Image->Data[k+3] = (CompData[m+1] & 0x0F) << 4; + } + break; + + case IWI_DXT1: + // DXT1 data has at least 8 bytes, even for one pixel. + SizeOfData = IL_MAX(Image->Width * Image->Height / 2, 8); + CompData = ialloc(SizeOfData); // Gives a 6:1 compression ratio (or 8:1 for DXT1 with alpha) + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + ifree(CompData); + return IL_FALSE; + } + + // Decompress the DXT1 data into Image (ith mipmap). + if (!DecompressDXT1(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + + // Keep a copy of the DXTC data if the user wants it. + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = SizeOfData; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT1; + CompData = NULL; + } + + break; + + case IWI_DXT3: + // DXT3 data has at least 16 bytes, even for one pixel. + SizeOfData = IL_MAX(Image->Width * Image->Height, 16); + CompData = ialloc(SizeOfData); // Gives a 4:1 compression ratio + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + ifree(CompData); + return IL_FALSE; + } + + // Decompress the DXT3 data into Image (ith mipmap). + if (!DecompressDXT3(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + break; + + case IWI_DXT5: + // DXT5 data has at least 16 bytes, even for one pixel. + SizeOfData = IL_MAX(Image->Width * Image->Height, 16); + CompData = ialloc(SizeOfData); // Gives a 4:1 compression ratio + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + ifree(CompData); + return IL_FALSE; + } + + // Decompress the DXT5 data into Image (ith mipmap). + if (!DecompressDXT5(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + break; + } + + ifree(CompData); + } + + return IL_TRUE; +} + + +#endif//IL_NO_IWI diff --git a/libs/DevIL-1.7.8/src-IL/src/il_jp2.c b/libs/DevIL-1.7.8/src-IL/src/il_jp2.c new file mode 100644 index 00000000..1273a285 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_jp2.c @@ -0,0 +1,823 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_jp2.c +// +// Description: Jpeg-2000 (.jp2) functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_JP2 +#include +#include "il_jp2.h" + +#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "libjasper.lib") + #else + #pragma comment(lib, "libjasper-d.lib") + #endif + #endif +#endif + +ILboolean iIsValidJp2(void); + +ILboolean JasperInit = IL_FALSE; + + +//! Checks if the file specified in FileName is a valid .jp2 file. +ILboolean ilIsValidJp2(ILconst_string FileName) +{ + ILHANDLE Jp2File; + ILboolean bJp2 = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("jp2")) && !iCheckExtension(FileName, IL_TEXT("jpx")) && + !iCheckExtension(FileName, IL_TEXT("j2k")) && !iCheckExtension(FileName, IL_TEXT("j2c"))) { + ilSetError(IL_INVALID_EXTENSION); + return bJp2; + } + + Jp2File = iopenr(FileName); + if (Jp2File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bJp2; + } + + bJp2 = ilIsValidJp2F(Jp2File); + icloser(Jp2File); + + return bJp2; +} + + +//! Checks if the ILHANDLE contains a valid .jp2 file at the current position. +ILboolean ilIsValidJp2F(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidJp2(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .jp2 lump. +ILboolean ilIsValidJp2L(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidJp2(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidJp2(void) +{ + ILubyte Signature[4]; + + iseek(4, IL_SEEK_CUR); // Skip the 4 bytes that tell the size of the signature box. + if (iread(Signature, 1, 4) != 4) { + iseek(-4, IL_SEEK_CUR); + return IL_FALSE; // File read error + } + + iseek(-8, IL_SEEK_CUR); // Restore to previous state + + // Signature is 'jP\040\040' by the specs (or 0x6A502020). + // http://www.jpeg.org/public/fcd15444-6.pdf + if (Signature[0] != 0x6A || Signature[1] != 0x50 || + Signature[2] != 0x20 || Signature[3] != 0x20) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a Jpeg2000 file. +ILboolean ilLoadJp2(ILconst_string FileName) +{ + ILHANDLE Jp2File; + ILboolean bRet; + + Jp2File = iopenr(FileName); + if (Jp2File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + bRet = ilLoadJp2F(Jp2File); + icloser(Jp2File); + + return bRet; +} + + +//! Reads an already-opened Jpeg2000 file. +ILboolean ilLoadJp2F(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + jas_stream_t *Stream; + + iSetInputFile(File); + FirstPos = itell(); + + if (!JasperInit) { + if (jas_init()) { + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + JasperInit = IL_TRUE; + } + Stream = iJp2ReadStream(); + if (!Stream) + { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + bRet = iLoadJp2Internal(Stream, NULL); + // Close the input stream. + jas_stream_close(Stream); + + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Jpeg2000 stream. +ILboolean ilLoadJp2L(const void *Lump, ILuint Size) +{ + return ilLoadJp2LInternal(Lump, Size, NULL); +} + + +//! This is separated so that it can be called for other file types, such as .icns. +ILboolean ilLoadJp2LInternal(const void *Lump, ILuint Size, ILimage *Image) +{ + ILboolean bRet; + jas_stream_t *Stream; + + if (!JasperInit) { + if (jas_init()) { + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + JasperInit = IL_TRUE; + } + Stream = jas_stream_memopen((char*)Lump, Size); + if (!Stream) + { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + bRet = iLoadJp2Internal(Stream, Image); + // Close the input stream. + jas_stream_close(Stream); + + return bRet; +} + + +// Internal function used to load the Jpeg2000 stream. +ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image) +{ + jas_image_t *Jp2Image = NULL; + jas_matrix_t *origdata; + ILuint x, y, c, Error; + ILimage *TempImage; + + // Decode image + Jp2Image = jas_image_decode(Stream, -1, 0); + if (!Jp2Image) + { + ilSetError(IL_ILLEGAL_FILE_VALUE); + jas_stream_close(Stream); + return IL_FALSE; + } + + // JasPer likes to buffer a lot, so it may try buffering past the end + // of the file. iread naturally sets IL_FILE_READ_ERROR if it tries + // reading past the end of the file, but this actually is not an error. + Error = ilGetError(); + // Put the error back if it is not IL_FILE_READ_ERROR. + if (Error != IL_FILE_READ_ERROR) + ilSetError(Error); + + + // We're not supporting anything other than 8 bits/component yet. + if (jas_image_cmptprec(Jp2Image, 0) != 8) + { + jas_image_destroy(Jp2Image); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + switch (jas_image_numcmpts(Jp2Image)) + { + //@TODO: Can we do alpha data? jas_image_cmpttype always returns 0 for this case. + case 1: // Assuming this is luminance data. + if (Image == NULL) { + ilTexImage(jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL); + TempImage = iCurImage; + } + else { + ifree(Image->Data); // @TODO: Not really the most efficient way to do this... + ilInitImage(Image, jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL); + TempImage = Image; + } + break; + + case 2: // Assuming this is luminance-alpha data. + if (Image == NULL) { + ilTexImage(jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 2, IL_LUMINANCE_ALPHA, IL_UNSIGNED_BYTE, NULL); + TempImage = iCurImage; + } + else { + ifree(Image->Data); // @TODO: Not really the most efficient way to do this... + ilInitImage(Image, jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 2, IL_LUMINANCE_ALPHA, IL_UNSIGNED_BYTE, NULL); + TempImage = Image; + } + break; + + case 3: + if (Image == NULL) { + ilTexImage(jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL); + TempImage = iCurImage; + } + else { + ifree(Image->Data); // @TODO: Not really the most efficient way to do this... + ilInitImage(Image, jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL); + TempImage = Image; + } + break; + case 4: + if (Image == NULL) { + ilTexImage(jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + TempImage = iCurImage; + } + else { + ifree(Image->Data); // @TODO: Not really the most efficient way to do this... + ilInitImage(Image, jas_image_width(Jp2Image), jas_image_height(Jp2Image), 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + TempImage = Image; + } + break; + default: + jas_image_destroy(Jp2Image); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + TempImage->Origin = IL_ORIGIN_UPPER_LEFT; + + // JasPer stores the data channels separately. + // I am assuming RGBA format. Is it possible for other formats to be included? + for (c = 0; c < TempImage->Bpp; c++) + { + origdata = jas_matrix_create(TempImage->Height, TempImage->Width); + if (!origdata) + { + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; // @TODO: Error + } + // Have to convert data into an intermediate matrix format. + if (jas_image_readcmpt(Jp2Image, c, 0, 0, TempImage->Width, TempImage->Height, origdata)) + { + return IL_FALSE; + } + + for (y = 0; y < TempImage->Height; y++) + { + for (x = 0; x < TempImage->Width; x++) + { + TempImage->Data[y * TempImage->Width * TempImage->Bpp + x * TempImage->Bpp + c] = origdata->data_[y * origdata->numcols_ + x]; + } + } + + jas_matrix_destroy(origdata); + } + + jas_image_destroy(Jp2Image); + + return ilFixImage(); +} + + + +static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt) +{ + obj; + return iread(buf, 1, cnt); +} + +static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt) +{ + obj; + return iwrite(buf, 1, cnt); +} + +static long iJp2_file_seek(jas_stream_obj_t *obj, long offset, int origin) +{ + obj; + + // We could just pass origin to iseek, but this is probably more portable. + switch (origin) + { + case SEEK_SET: + return iseek(offset, IL_SEEK_SET); + case SEEK_CUR: + return iseek(offset, IL_SEEK_CUR); + case SEEK_END: + return iseek(offset, IL_SEEK_END); + } + return 0; // Failed +} + +static int iJp2_file_close(jas_stream_obj_t *obj) +{ + obj; + return 0; // We choose when we want to close the file. +} + +static jas_stream_ops_t jas_stream_devilops = { + iJp2_file_read, + iJp2_file_write, + iJp2_file_seek, + iJp2_file_close +}; + +static jas_stream_t *jas_stream_create(void); +static void jas_stream_destroy(jas_stream_t *stream); +static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, int bufsize); + + +// Modified version of jas_stream_fopen and jas_stream_memopen from jas_stream.c of JasPer +// so that we can use our own file routines. +jas_stream_t *iJp2ReadStream() +{ + jas_stream_t *stream; + jas_stream_memobj_t *obj; + + if (!(stream = jas_stream_create())) { + return 0; + } + + /* A stream associated with a memory buffer is always opened + for both reading and writing in binary mode. */ + stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_BINARY; + + /* We use buffering whether it is from memory or a file. */ + jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); + + /* Select the operations for a memory stream. */ + stream->ops_ = &jas_stream_devilops; + + /* Allocate memory for the underlying memory stream object. */ + if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + jas_stream_destroy(stream); + return 0; + } + stream->obj_ = (void *) obj; + + /* Initialize a few important members of the memory stream object. */ + obj->myalloc_ = 0; + obj->buf_ = 0; + + // Shouldn't need any of this. + + ///* If the buffer size specified is nonpositive, then the buffer + //is allocated internally and automatically grown as needed. */ + //if (bufsize <= 0) { + // obj->bufsize_ = 1024; + // obj->growable_ = 1; + //} else { + // obj->bufsize_ = bufsize; + // obj->growable_ = 0; + //} + //if (buf) { + // obj->buf_ = (unsigned char *) buf; + //} else { + // obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char)); + // obj->myalloc_ = 1; + //} + //if (!obj->buf_) { + // jas_stream_close(stream); + // return 0; + //} + + //if (bufsize > 0 && buf) { + // /* If a buffer was supplied by the caller and its length is positive, + // make the associated buffer data appear in the stream initially. */ + // obj->len_ = bufsize; + //} else { + // /* The stream is initially empty. */ + // obj->len_ = 0; + //} + //obj->pos_ = 0; + + return stream; +} + + +// The following functions are taken directly from jas_stream.c of JasPer, +// since they are designed to be used within JasPer only. + +static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, + int bufsize) +{ + /* If this function is being called, the buffer should not have been + initialized yet. */ + assert(!stream->bufbase_); + + if (bufmode != JAS_STREAM_UNBUF) { + /* The full- or line-buffered mode is being employed. */ + if (!buf) { + /* The caller has not specified a buffer to employ, so allocate + one. */ + if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE + + JAS_STREAM_MAXPUTBACK))) { + stream->bufmode_ |= JAS_STREAM_FREEBUF; + stream->bufsize_ = JAS_STREAM_BUFSIZE; + } else { + /* The buffer allocation has failed. Resort to unbuffered + operation. */ + stream->bufbase_ = stream->tinybuf_; + stream->bufsize_ = 1; + } + } else { + /* The caller has specified a buffer to employ. */ + /* The buffer must be large enough to accommodate maximum + putback. */ + assert(bufsize > JAS_STREAM_MAXPUTBACK); + stream->bufbase_ = JAS_CAST(uchar *, buf); + stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK; + } + } else { + /* The unbuffered mode is being employed. */ + /* A buffer should not have been supplied by the caller. */ + assert(!buf); + /* Use a trivial one-character buffer. */ + stream->bufbase_ = stream->tinybuf_; + stream->bufsize_ = 1; + } + stream->bufstart_ = &stream->bufbase_[JAS_STREAM_MAXPUTBACK]; + stream->ptr_ = stream->bufstart_; + stream->cnt_ = 0; + stream->bufmode_ |= bufmode & JAS_STREAM_BUFMODEMASK; +} + +static jas_stream_t *jas_stream_create() +{ + jas_stream_t *stream; + + if (!(stream = jas_malloc(sizeof(jas_stream_t)))) { + return 0; + } + stream->openmode_ = 0; + stream->bufmode_ = 0; + stream->flags_ = 0; + stream->bufbase_ = 0; + stream->bufstart_ = 0; + stream->bufsize_ = 0; + stream->ptr_ = 0; + stream->cnt_ = 0; + stream->ops_ = 0; + stream->obj_ = 0; + stream->rwcnt_ = 0; + stream->rwlimit_ = -1; + + return stream; +} + +static void jas_stream_destroy(jas_stream_t *stream) +{ + /* If the memory for the buffer was allocated with malloc, free + this memory. */ + if ((stream->bufmode_ & JAS_STREAM_FREEBUF) && stream->bufbase_) { + jas_free(stream->bufbase_); + stream->bufbase_ = 0; + } + jas_free(stream); +} + + + + +jas_stream_t *iJp2WriteStream() +{ + jas_stream_t *stream; + jas_stream_memobj_t *obj; + + if (!(stream = jas_stream_create())) { + return 0; + } + + /* A stream associated with a memory buffer is always opened + for both reading and writing in binary mode. */ + stream->openmode_ = JAS_STREAM_WRITE | JAS_STREAM_BINARY; + + /* We use buffering whether it is from memory or a file. */ + jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0); + + /* Select the operations for a memory stream. */ + stream->ops_ = &jas_stream_devilops; + + /* Allocate memory for the underlying memory stream object. */ + if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + jas_stream_destroy(stream); + return 0; + } + stream->obj_ = (void *) obj; + + /* Initialize a few important members of the memory stream object. */ + obj->myalloc_ = 0; + obj->buf_ = 0; + + return stream; +} + + + +//! Writes a Jp2 file +ILboolean ilSaveJp2(const ILstring FileName) +{ + ILHANDLE Jp2File; + ILuint Jp2Size; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + Jp2File = iopenw(FileName); + if (Jp2File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + Jp2Size = ilSaveJp2F(Jp2File); + iclosew(Jp2File); + + if (Jp2Size == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Jp2 to an already-opened file +ILuint ilSaveJp2F(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveJp2Internal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Jp2 to a memory "lump" +ILuint ilSaveJp2L(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveJp2Internal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + + +// Function from OpenSceneGraph (originally called getdata in their sources): +// http://openscenegraph.sourcearchive.com/documentation/2.2.0/ReaderWriterJP2_8cpp-source.html +ILint Jp2ConvertData(jas_stream_t *in, jas_image_t *image) +{ + int ret; + int numcmpts; + int cmptno; + jas_matrix_t *data[4]; + int x; + int y; + int width, height; + + width = jas_image_cmptwidth(image, 0); + height = jas_image_cmptheight(image, 0); + numcmpts = jas_image_numcmpts(image); + + ret = -1; + + data[0] = 0; + data[1] = 0; + data[2] = 0; + data[3] = 0; + for (cmptno = 0; cmptno < numcmpts; ++cmptno) { + if (!(data[cmptno] = jas_matrix_create(1, width))) { + goto done; + } + } + + for (y = height - 1; y >= 0; --y) + // for (y = 0; y < height; ++y) + { + for (x = 0; x < width; ++x) + { + for (cmptno = 0; cmptno < numcmpts; ++cmptno) + { + // The sample data is unsigned. + int c; + if ((c = jas_stream_getc(in)) == EOF) { + return -1; + } + jas_matrix_set(data[cmptno], 0, x, c); + } + } + for (cmptno = 0; cmptno < numcmpts; ++cmptno) { + if (jas_image_writecmpt(image, cmptno, 0, y, width, 1, + data[cmptno])) { + goto done; + } + } + } + + jas_stream_flush(in); + ret = 0; + +done: + for (cmptno = 0; cmptno < numcmpts; ++cmptno) { + if (data[cmptno]) { + jas_matrix_destroy(data[cmptno]); + } + } + + return ret; +} + + +// Internal function used to save the Jp2. +// Since the JasPer documentation is extremely incomplete, I had to look at how OpenSceneGraph uses it: +// http://openscenegraph.sourcearchive.com/documentation/2.2.0/ReaderWriterJP2_8cpp-source.html + +//@TODO: Do we need to worry about images with depths > 1? +ILboolean iSaveJp2Internal() +{ + jas_image_t *Jp2Image; + jas_image_cmptparm_t cmptparm[4]; + jas_stream_t *Mem, *Stream; + ILuint NumChans, i; + ILenum NewFormat, NewType = IL_UNSIGNED_BYTE; + ILimage *TempImage = iCurImage; + + if (!JasperInit) { + if (jas_init()) { + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + JasperInit = IL_TRUE; + } + + if (iCurImage->Type != IL_UNSIGNED_BYTE) { //@TODO: Support greater than 1 bpc. + NewType = IL_UNSIGNED_BYTE; + } + //@TODO: Do luminance/luminance-alpha/alpha separately. + switch (iCurImage->Format) + { + case IL_LUMINANCE: + NewFormat = IL_LUMINANCE; + NumChans = 1; + break; + case IL_ALPHA: + NewFormat = IL_ALPHA; + NumChans = 1; + break; + case IL_LUMINANCE_ALPHA: + NewFormat = IL_LUMINANCE_ALPHA; + NumChans = 2; + break; + case IL_COLOUR_INDEX: // Assuming the color palette does not have an alpha value. + //@TODO: Check for this in the future. + case IL_RGB: + case IL_BGR: + NewFormat = IL_RGB; + NumChans = 3; + break; + case IL_RGBA: + case IL_BGRA: + NewFormat = IL_RGBA; + NumChans = 4; + break; + } + + if (NewType != iCurImage->Type || NewFormat != iCurImage->Format) { + TempImage = iConvertImage(iCurImage, NewFormat, NewType); + if (TempImage == NULL) + return IL_FALSE; + } + + // The origin is always in the lower left corner. Flip the buffer if it is not. + if (TempImage->Origin == IL_ORIGIN_UPPER_LEFT) + iFlipBuffer(TempImage->Data, TempImage->Depth, TempImage->Bps, TempImage->Height); + + // Have to tell JasPer about each channel. In our case, they all have the same information. + for (i = 0; i < NumChans; i++) { + cmptparm[i].width = iCurImage->Width; + cmptparm[i].height = iCurImage->Height; + cmptparm[i].hstep = 1; + cmptparm[i].vstep = 1; + cmptparm[i].tlx = 0; + cmptparm[i].tly = 0; + cmptparm[i].prec = 8; + cmptparm[i].sgnd = 0; // Unsigned data + } + + // Using the unknown color space, since we have not determined the space yet. + // This is done in the following switch statement. + Jp2Image = jas_image_create(NumChans, cmptparm, JAS_CLRSPC_UNKNOWN); + if (Jp2Image == NULL) { + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + + switch (NumChans) + { + case 1: + jas_image_setclrspc(Jp2Image, JAS_CLRSPC_SGRAY); + if (NewFormat == IL_LUMINANCE) + jas_image_setcmpttype(Jp2Image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); + else // IL_ALPHA + jas_image_setcmpttype(Jp2Image, 0, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_OPACITY)); + break; + case 2: + jas_image_setclrspc(Jp2Image, JAS_CLRSPC_SGRAY); + jas_image_setcmpttype(Jp2Image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y)); + jas_image_setcmpttype(Jp2Image, 1, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_OPACITY)); + break; + case 3: + jas_image_setclrspc(Jp2Image, JAS_CLRSPC_SRGB); + jas_image_setcmpttype(Jp2Image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); + jas_image_setcmpttype(Jp2Image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); + jas_image_setcmpttype(Jp2Image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); + break; + case 4: + jas_image_setclrspc(Jp2Image, JAS_CLRSPC_SRGB); + jas_image_setcmpttype(Jp2Image, 0, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R)); + jas_image_setcmpttype(Jp2Image, 1, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G)); + jas_image_setcmpttype(Jp2Image, 2, JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B)); + jas_image_setcmpttype(Jp2Image, 3, JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_OPACITY)); + break; + } + + Mem = jas_stream_memopen((char*)TempImage->Data, TempImage->SizeOfData); + if (Mem == NULL) { + jas_image_destroy(Jp2Image); + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + Stream = iJp2WriteStream(); + if (Stream == NULL) { + jas_stream_close(Mem); + jas_image_destroy(Jp2Image); + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + + // Puts data in the format that JasPer wants it in. + Jp2ConvertData(Mem, Jp2Image); + + // Does all of the encoding. + if (jas_image_encode(Jp2Image, Stream, jas_image_strtofmt("jp2"), NULL)) { //@TODO: Do we want to use any options? + jas_stream_close(Mem); + jas_stream_close(Stream); + jas_image_destroy(Jp2Image); + ilSetError(IL_LIB_JP2_ERROR); + return IL_FALSE; + } + jas_stream_flush(Stream); // Do any final writing. + + // Close the memory and output streams. + jas_stream_close(Mem); + jas_stream_close(Stream); + // Destroy the JasPer image. + jas_image_destroy(Jp2Image); + + // Destroy our temporary image if we used one. + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +#endif//IL_NO_JP2 diff --git a/libs/DevIL-1.7.8/src-IL/src/il_jpeg.c b/libs/DevIL-1.7.8/src-IL/src/il_jpeg.c new file mode 100644 index 00000000..0e81d0bf --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_jpeg.c @@ -0,0 +1,1001 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/src/il_jpeg.c +// +// Description: Jpeg (.jpg) functions +// +//----------------------------------------------------------------------------- +// +// Most of the comments here are sufficient, as we're just using libjpeg. +// I have left most of the libjpeg example's comments intact, though. +// + +#include "il_internal.h" + +#ifndef IL_NO_JPG + #ifndef IL_USE_IJL + #ifdef RGB_RED + #undef RGB_RED + #undef RGB_GREEN + #undef RGB_BLUE + #endif + #define RGB_RED 0 + #define RGB_GREEN 1 + #define RGB_BLUE 2 + + #if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable : 4005) // Redefinitions in + #pragma warning(disable : 4142) // jmorecfg.h + #endif + + #include "jpeglib.h" + + #if JPEG_LIB_VERSION < 62 + #warning DevIL was designed with libjpeg 6b or higher in mind. Consider upgrading at www.ijg.org + #endif + #else + #include + #include + #endif + +#include "il_jpeg.h" +#include "il_manip.h" +#include + + +#if (defined(_WIN32) || defined(_WIN64)) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifdef IL_USE_IJL + //pragma comment(lib, "ijl15.lib") + #else + #ifndef _DEBUG + #pragma comment(lib, "libjpeg.lib") + #else + #pragma comment(lib, "libjpeg-d.lib") + #endif + #endif//IL_USE_IJL + #endif +#endif + + +static ILboolean jpgErrorOccured = IL_FALSE; + +// define a protype of ilLoadFromJpegStruct +ILboolean ilLoadFromJpegStruct(void *_JpegInfo); + +// Internal function used to get the .jpg header from the current file. +void iGetJpgHead(ILubyte *Header) +{ + Header[0] = igetc(); + Header[1] = igetc(); + return; +} + + +// Internal function used to check if the HEADER is a valid .Jpg header. +ILboolean iCheckJpg(ILubyte Header[2]) +{ + if (Header[0] != 0xFF || Header[1] != 0xD8) + return IL_FALSE; + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidJpeg() +{ + ILubyte Head[2]; + + iGetJpgHead(Head); + iseek(-2, IL_SEEK_CUR); // Go ahead and restore to previous state + + return iCheckJpg(Head); +} + + +//! Checks if the file specified in FileName is a valid .jpg file. +ILboolean ilIsValidJpeg(ILconst_string FileName) +{ + ILHANDLE JpegFile; + ILboolean bJpeg = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("jpg")) && + !iCheckExtension(FileName, IL_TEXT("jpe")) && + !iCheckExtension(FileName, IL_TEXT("jpeg")) && + !iCheckExtension(FileName, IL_TEXT("jif")) && + !iCheckExtension(FileName, IL_TEXT("jfif"))) + { + ilSetError(IL_INVALID_EXTENSION); + return bJpeg; + } + + JpegFile = iopenr(FileName); + if (JpegFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bJpeg; + } + + bJpeg = ilIsValidJpegF(JpegFile); + icloser(JpegFile); + + return bJpeg; +} + + +//! Checks if the ILHANDLE contains a valid .jpg file at the current position. +ILboolean ilIsValidJpegF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidJpeg(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +ILboolean ilIsValidJpegL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidJpeg(); +} + + +#ifndef IL_USE_IJL // Use libjpeg instead of the IJL. + +// Overrides libjpeg's stupid error/warning handlers. =P +void ExitErrorHandle (struct jpeg_common_struct *JpegInfo) +{ + ilSetError(IL_LIB_JPEG_ERROR); + jpgErrorOccured = IL_TRUE; + return; +} +void OutputMsg(struct jpeg_common_struct *JpegInfo) +{ + return; +} + + +//! Reads a jpeg file +ILboolean ilLoadJpeg(ILconst_string FileName) +{ + ILHANDLE JpegFile; + ILboolean bJpeg = IL_FALSE; + + JpegFile = iopenr(FileName); + if (JpegFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bJpeg; + } + + bJpeg = ilLoadJpegF(JpegFile); + icloser(JpegFile); + + return bJpeg; +} + + +//! Reads an already-opened jpeg file +ILboolean ilLoadJpegF(ILHANDLE File) +{ + ILboolean bRet; + ILuint FirstPos; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadJpegInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +// Reads from a memory "lump" containing a jpeg +ILboolean ilLoadJpegL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadJpegInternal(); +} + + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + JOCTET * buffer; /* start of buffer */ + boolean start_of_file; /* have we gotten any data yet? */ +} iread_mgr; + +typedef iread_mgr * iread_ptr; + +#define INPUT_BUF_SIZE 4096 // choose an efficiently iread'able size + + +METHODDEF(void) +init_source (j_decompress_ptr cinfo) +{ + iread_ptr src = (iread_ptr) cinfo->src; + src->start_of_file = TRUE; +} + + +METHODDEF(boolean) +fill_input_buffer (j_decompress_ptr cinfo) +{ + iread_ptr src = (iread_ptr) cinfo->src; + ILint nbytes; + + nbytes = iread(src->buffer, 1, INPUT_BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) { // Treat empty input file as fatal error + //ERREXIT(cinfo, JERR_INPUT_EMPTY); + jpgErrorOccured = IL_TRUE; + } + //WARNMS(cinfo, JWRN_JPEG_EOF); + // Insert a fake EOI marker + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + return IL_FALSE; + } + if (nbytes < INPUT_BUF_SIZE) { + ilGetError(); // Gets rid of the IL_FILE_READ_ERROR. + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = IL_FALSE; + + return IL_TRUE; +} + + +METHODDEF(void) +skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + iread_ptr src = (iread_ptr) cinfo->src; + + if (num_bytes > 0) { + while (num_bytes > (long) src->pub.bytes_in_buffer) { + num_bytes -= (long) src->pub.bytes_in_buffer; + (void) fill_input_buffer(cinfo); + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + + +METHODDEF(void) +term_source (j_decompress_ptr cinfo) +{ + // no work necessary here +} + + +GLOBAL(void) +devil_jpeg_read_init (j_decompress_ptr cinfo) +{ + iread_ptr src; + + if ( cinfo->src == NULL ) { // first time for this JPEG object? + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small)( (j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(iread_mgr) ); + src = (iread_ptr) cinfo->src; + src->buffer = (JOCTET *) + (*cinfo->mem->alloc_small)( (j_common_ptr)cinfo, JPOOL_PERMANENT, + INPUT_BUF_SIZE * sizeof(JOCTET) ); + } + + src = (iread_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; // use default method + src->pub.term_source = term_source; + src->pub.bytes_in_buffer = 0; // forces fill_input_buffer on first read + src->pub.next_input_byte = NULL; // until buffer loaded +} + + +jmp_buf JpegJumpBuffer; + +static void iJpegErrorExit( j_common_ptr cinfo ) +{ + ilSetError( IL_LIB_JPEG_ERROR ); + jpeg_destroy( cinfo ); + longjmp( JpegJumpBuffer, 1 ); +} + +// Internal function used to load the jpeg. +ILboolean iLoadJpegInternal() +{ + struct jpeg_error_mgr Error; + struct jpeg_decompress_struct JpegInfo; + ILboolean result; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + JpegInfo.err = jpeg_std_error(&Error); // init standard error handlers + Error.error_exit = iJpegErrorExit; // add our exit handler + Error.output_message = OutputMsg; + + if ((result = setjmp(JpegJumpBuffer) == 0) != IL_FALSE) { + jpeg_create_decompress(&JpegInfo); + JpegInfo.do_block_smoothing = IL_TRUE; + JpegInfo.do_fancy_upsampling = IL_TRUE; + + //jpeg_stdio_src(&JpegInfo, iGetFile()); + + devil_jpeg_read_init(&JpegInfo); + jpeg_read_header(&JpegInfo, IL_TRUE); + + result = ilLoadFromJpegStruct(&JpegInfo); + + jpeg_finish_decompress(&JpegInfo); + jpeg_destroy_decompress(&JpegInfo); + + } + else + { + jpeg_destroy_decompress(&JpegInfo); + } + + //return ilFixImage(); // No need to call it again (called first in ilLoadFromJpegStruct). + return result; +} + + + +typedef struct +{ + struct jpeg_destination_mgr pub; + JOCTET *buffer; + ILboolean bah; +} iwrite_mgr; + +typedef iwrite_mgr *iwrite_ptr; + +#define OUTPUT_BUF_SIZE 4096 + + +METHODDEF(void) +init_destination(j_compress_ptr cinfo) +{ + iwrite_ptr dest = (iwrite_ptr)cinfo->dest; + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + OUTPUT_BUF_SIZE * sizeof(JOCTET)); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + return; +} + +METHODDEF(boolean) +empty_output_buffer (j_compress_ptr cinfo) +{ + iwrite_ptr dest = (iwrite_ptr)cinfo->dest; + iwrite(dest->buffer, 1, OUTPUT_BUF_SIZE); + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + return IL_TRUE; +} + +METHODDEF(void) +term_destination (j_compress_ptr cinfo) +{ + iwrite_ptr dest = (iwrite_ptr)cinfo->dest; + iwrite(dest->buffer, 1, OUTPUT_BUF_SIZE - (ILuint)dest->pub.free_in_buffer); + return; +} + + +GLOBAL(void) +devil_jpeg_write_init(j_compress_ptr cinfo) +{ + iwrite_ptr dest; + + if (cinfo->dest == NULL) { // first time for this JPEG object? + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(iwrite_mgr)); + dest = (iwrite_ptr)cinfo->dest; + } + + dest = (iwrite_ptr)cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + + return; +} + + +//! Writes a Jpeg file +ILboolean ilSaveJpeg(const ILstring FileName) +{ + ILHANDLE JpegFile; + ILuint JpegSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + JpegFile = iopenw(FileName); + if (JpegFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + JpegSize = ilSaveJpegF(JpegFile); + iclosew(JpegFile); + + if (JpegSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Jpeg to an already-opened file +ILuint ilSaveJpegF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveJpegInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Jpeg to a memory "lump" +ILuint ilSaveJpegL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveJpegInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Jpeg. +ILboolean iSaveJpegInternal() +{ + struct jpeg_compress_struct JpegInfo; + struct jpeg_error_mgr Error; + JSAMPROW row_pointer[1]; + ILimage *TempImage; + ILubyte *TempData; + ILenum Type = 0; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + /*if (iGetHint(IL_COMPRESSION_HINT) == IL_USE_COMPRESSION) + Quality = 85; // Not sure how low we should dare go... + else + Quality = 99;*/ + + if ((iCurImage->Format != IL_RGB && iCurImage->Format != IL_LUMINANCE) || iCurImage->Bpc != 1) { + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + if (TempImage == NULL) { + return IL_FALSE; + } + } + else { + TempImage = iCurImage; + } + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + + JpegInfo.err = jpeg_std_error(&Error); + // Now we can initialize the JPEG compression object. + jpeg_create_compress(&JpegInfo); + + //jpeg_stdio_dest(&JpegInfo, JpegFile); + devil_jpeg_write_init(&JpegInfo); + + JpegInfo.image_width = TempImage->Width; // image width and height, in pixels + JpegInfo.image_height = TempImage->Height; + JpegInfo.input_components = TempImage->Bpp; // # of color components per pixel + + // John Villar's addition + if (TempImage->Bpp == 1) + JpegInfo.in_color_space = JCS_GRAYSCALE; + else + JpegInfo.in_color_space = JCS_RGB; + + jpeg_set_defaults(&JpegInfo); + +/*#ifndef IL_USE_JPEGLIB_UNMODIFIED + Type = iGetInt(IL_JPG_SAVE_FORMAT); + if (Type == IL_EXIF) { + JpegInfo.write_JFIF_header = FALSE; + JpegInfo.write_EXIF_header = TRUE; + } + else if (Type == IL_JFIF) { + JpegInfo.write_JFIF_header = TRUE; + JpegInfo.write_EXIF_header = FALSE; + } //EXIF not present in libjpeg... +#else*/ + Type = Type; + JpegInfo.write_JFIF_header = TRUE; +//#endif//IL_USE_JPEGLIB_UNMODIFIED + + // Set the quality output + jpeg_set_quality(&JpegInfo, iGetInt(IL_JPG_QUALITY), IL_TRUE); + // Sets progressive saving here + if (ilGetBoolean(IL_JPG_PROGRESSIVE)) + jpeg_simple_progression(&JpegInfo); + + jpeg_start_compress(&JpegInfo, IL_TRUE); + + //row_stride = image_width * 3; // JSAMPLEs per row in image_buffer + + while (JpegInfo.next_scanline < JpegInfo.image_height) { + // jpeg_write_scanlines expects an array of pointers to scanlines. + // Here the array is only one element long, but you could pass + // more than one scanline at a time if that's more convenient. + row_pointer[0] = &TempData[JpegInfo.next_scanline * TempImage->Bps]; + (void) jpeg_write_scanlines(&JpegInfo, row_pointer, 1); + } + + // Step 6: Finish compression + jpeg_finish_compress(&JpegInfo); + + // Step 7: release JPEG compression object + + // This is an important step since it will release a good deal of memory. + jpeg_destroy_compress(&JpegInfo); + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + + +#else // Use the IJL instead of libjpeg. + + + +//! Reads a jpeg file +ILboolean ilLoadJpeg(ILconst_string FileName) +{ + if (!iFileExists(FileName)) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + return iLoadJpegInternal(FileName, NULL, 0); +} + + +// Reads from a memory "lump" containing a jpeg +ILboolean ilLoadJpegL(void *Lump, ILuint Size) +{ + return iLoadJpegInternal(NULL, Lump, Size); +} + + +// Internal function used to load the jpeg. +ILboolean iLoadJpegInternal(ILstring FileName, void *Lump, ILuint Size) +{ + JPEG_CORE_PROPERTIES Image; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (ijlInit(&Image) != IJL_OK) { + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + + if (FileName != NULL) { + Image.JPGFile = FileName; + if (ijlRead(&Image, IJL_JFILE_READPARAMS) != IJL_OK) { + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + else { + Image.JPGBytes = Lump; + Image.JPGSizeBytes = Size > 0 ? Size : UINT_MAX; + if (ijlRead(&Image, IJL_JBUFF_READPARAMS) != IJL_OK) { + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + + switch (Image.JPGChannels) + { + case 1: + Image.JPGColor = IJL_G; + Image.DIBChannels = 1; + Image.DIBColor = IJL_G; + iCurImage->Format = IL_LUMINANCE; + break; + + case 3: + Image.JPGColor = IJL_YCBCR; + Image.DIBChannels = 3; + Image.DIBColor = IJL_RGB; + iCurImage->Format = IL_RGB; + break; + + case 4: + Image.JPGColor = IJL_YCBCRA_FPX; + Image.DIBChannels = 4; + Image.DIBColor = IJL_RGBA_FPX; + iCurImage->Format = IL_RGBA; + break; + + default: + // This catches everything else, but no + // color twist will be performed by the IJL. + /*Image.DIBColor = (IJL_COLOR)IJL_OTHER; + Image.JPGColor = (IJL_COLOR)IJL_OTHER; + Image.DIBChannels = Image.JPGChannels; + break;*/ + ijlFree(&Image); + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + + if (!ilTexImage(Image.JPGWidth, Image.JPGHeight, 1, (ILubyte)Image.DIBChannels, iCurImage->Format, IL_UNSIGNED_BYTE, NULL)) { + ijlFree(&Image); + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + Image.DIBWidth = Image.JPGWidth; + Image.DIBHeight = Image.JPGHeight; + Image.DIBPadBytes = 0; + Image.DIBBytes = iCurImage->Data; + + if (FileName != NULL) { + if (ijlRead(&Image, IJL_JFILE_READWHOLEIMAGE) != IJL_OK) { + ijlFree(&Image); + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + else { + if (ijlRead(&Image, IJL_JBUFF_READWHOLEIMAGE) != IJL_OK) { + ijlFree(&Image); + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + + ijlFree(&Image); + return ilFixImage(); +} + + +//! Writes a Jpeg file +ILboolean ilSaveJpeg(ILconst_string FileName) +{ + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + return iSaveJpegInternal(FileName, NULL, 0); +} + + +//! Writes a Jpeg to a memory "lump" +ILboolean ilSaveJpegL(void *Lump, ILuint Size) +{ + return iSaveJpegInternal(NULL, Lump, Size); +} + + +// Internal function used to save the Jpeg. +ILboolean iSaveJpegInternal(ILstring FileName, void *Lump, ILuint Size) +{ + JPEG_CORE_PROPERTIES Image; + ILuint Quality; + ILimage *TempImage; + ILubyte *TempData; + + imemclear(&Image, sizeof(JPEG_CORE_PROPERTIES)); + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + if (FileName == NULL && Lump == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (iGetHint(IL_COMPRESSION_HINT) == IL_USE_COMPRESSION) + Quality = 85; // Not sure how low we should dare go... + else + Quality = 99; + + if (ijlInit(&Image) != IJL_OK) { + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + + if ((iCurImage->Format != IL_RGB && iCurImage->Format != IL_RGBA && iCurImage->Format != IL_LUMINANCE) + || iCurImage->Bpc != 1) { + if (iCurImage->Format == IL_BGRA) + Temp = iConvertImage(iCurImage, IL_RGBA, IL_UNSIGNED_BYTE); + else + Temp = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + if (Temp == NULL) { + return IL_FALSE; + } + } + else { + Temp = iCurImage; + } + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + // Setup DIB + Image.DIBWidth = TempImage->Width; + Image.DIBHeight = TempImage->Height; + Image.DIBChannels = TempImage->Bpp; + Image.DIBBytes = TempData; + Image.DIBPadBytes = 0; + + // Setup JPEG + Image.JPGWidth = TempImage->Width; + Image.JPGHeight = TempImage->Height; + Image.JPGChannels = TempImage->Bpp; + + switch (Temp->Bpp) + { + case 1: + Image.DIBColor = IJL_G; + Image.JPGColor = IJL_G; + Image.JPGSubsampling = IJL_NONE; + break; + case 3: + Image.DIBColor = IJL_RGB; + Image.JPGColor = IJL_YCBCR; + Image.JPGSubsampling = IJL_411; + break; + case 4: + Image.DIBColor = IJL_RGBA_FPX; + Image.JPGColor = IJL_YCBCRA_FPX; + Image.JPGSubsampling = IJL_4114; + break; + } + + if (FileName != NULL) { + Image.JPGFile = FileName; + if (ijlWrite(&Image, IJL_JFILE_WRITEWHOLEIMAGE) != IJL_OK) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + else { + Image.JPGBytes = Lump; + Image.JPGSizeBytes = Size; + if (ijlWrite(&Image, IJL_JBUFF_WRITEWHOLEIMAGE) != IJL_OK) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + ilSetError(IL_LIB_JPEG_ERROR); + return IL_FALSE; + } + } + + ijlFree(&Image); + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + ifree(TempData); + if (Temp != iCurImage) + ilCloseImage(Temp); + + return IL_TRUE; +} + +#endif//IL_USE_IJL + + +// Access point for applications wishing to use the jpeg library directly in +// conjunction with DevIL. +// +// The decompressor must be set up with an input source and all desired parameters +// this function is called. The caller must call jpeg_finish_decompress because +// the caller may still need decompressor after calling this for e.g. examining +// saved markers. +ILboolean ilLoadFromJpegStruct(void *_JpegInfo) +{ +#ifndef IL_NO_JPG +#ifndef IL_USE_IJL + // sam. void (*errorHandler)(j_common_ptr); + ILubyte *TempPtr[1]; + ILuint Returned; + j_decompress_ptr JpegInfo = (j_decompress_ptr)_JpegInfo; + + //added on 2003-08-31 as explained in sf bug 596793 + jpgErrorOccured = IL_FALSE; + + // sam. errorHandler = JpegInfo->err->error_exit; + // sam. JpegInfo->err->error_exit = ExitErrorHandle; + jpeg_start_decompress((j_decompress_ptr)JpegInfo); + + if (!ilTexImage(JpegInfo->output_width, JpegInfo->output_height, 1, (ILubyte)JpegInfo->output_components, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + switch (iCurImage->Bpp) + { + case 1: + iCurImage->Format = IL_LUMINANCE; + break; + case 3: + iCurImage->Format = IL_RGB; + break; + case 4: + iCurImage->Format = IL_RGBA; + break; + default: + //@TODO: Anyway to get here? Need to error out or something... + break; + } + + TempPtr[0] = iCurImage->Data; + while (JpegInfo->output_scanline < JpegInfo->output_height) { + Returned = jpeg_read_scanlines(JpegInfo, TempPtr, 1); // anyway to make it read all at once? + TempPtr[0] += iCurImage->Bps; + if (Returned == 0) + break; + } + + // sam. JpegInfo->err->error_exit = errorHandler; + + if (jpgErrorOccured) + return IL_FALSE; + + return ilFixImage(); +#endif +#endif + return IL_FALSE; +} + + + +// Access point for applications wishing to use the jpeg library directly in +// conjunction with DevIL. +// +// The caller must set up the desired parameters by e.g. calling +// jpeg_set_defaults and overriding the parameters the caller wishes +// to change, such as quality, before calling this function. The caller +// is also responsible for calling jpeg_finish_compress in case the +// caller still needs to compressor for something. +// +ILboolean ilSaveFromJpegStruct(void *_JpegInfo) +{ +#ifndef IL_NO_JPG +#ifndef IL_USE_IJL + void (*errorHandler)(); + JSAMPROW row_pointer[1]; + ILimage *TempImage; + ILubyte *TempData; + j_compress_ptr JpegInfo = (j_compress_ptr)_JpegInfo; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //added on 2003-08-31 as explained in SF bug 596793 + jpgErrorOccured = IL_FALSE; + + errorHandler = JpegInfo->err->error_exit; + JpegInfo->err->error_exit = ExitErrorHandle; + + + if ((iCurImage->Format != IL_RGB && iCurImage->Format != IL_LUMINANCE) || iCurImage->Bpc != 1) { + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + if (TempImage == NULL) { + return IL_FALSE; + } + } + else { + TempImage = iCurImage; + } + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + JpegInfo->image_width = TempImage->Width; // image width and height, in pixels + JpegInfo->image_height = TempImage->Height; + JpegInfo->input_components = TempImage->Bpp; // # of color components per pixel + + jpeg_start_compress(JpegInfo, IL_TRUE); + + //row_stride = image_width * 3; // JSAMPLEs per row in image_buffer + + while (JpegInfo->next_scanline < JpegInfo->image_height) { + // jpeg_write_scanlines expects an array of pointers to scanlines. + // Here the array is only one element long, but you could pass + // more than one scanline at a time if that's more convenient. + row_pointer[0] = &TempData[JpegInfo->next_scanline * TempImage->Bps]; + (void) jpeg_write_scanlines(JpegInfo, row_pointer, 1); + } + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return (!jpgErrorOccured); +#endif//IL_USE_IJL +#endif//IL_NO_JPG + return IL_FALSE; +} + + +#if defined(_MSC_VER) + #pragma warning(pop) + //#pragma warning(disable : 4756) // Disables 'named type definition in parentheses' warning +#endif + +#endif//IL_NO_JPG diff --git a/libs/DevIL-1.7.8/src-IL/src/il_lif.c b/libs/DevIL-1.7.8/src-IL/src/il_lif.c new file mode 100644 index 00000000..456975e6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_lif.c @@ -0,0 +1,198 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_lif.c +// +// Description: Reads a Homeworld image. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_LIF +#include "il_lif.h" + + +//! Checks if the file specified in FileName is a valid Lif file. +ILboolean ilIsValidLif(ILconst_string FileName) +{ + ILHANDLE LifFile; + ILboolean bLif = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("lif"))) { + ilSetError(IL_INVALID_EXTENSION); + return bLif; + } + + LifFile = iopenr(FileName); + if (LifFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bLif; + } + + bLif = ilIsValidLifF(LifFile); + icloser(LifFile); + + return bLif; +} + + +//! Checks if the ILHANDLE contains a valid Lif file at the current position. +ILboolean ilIsValidLifF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidLif(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Lif lump. +ILboolean ilIsValidLifL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidLif(); +} + + +// Internal function used to get the Lif header from the current file. +ILboolean iGetLifHead(LIF_HEAD *Header) +{ + + iread(Header->Id, 1, 8); + + Header->Version = GetLittleUInt(); + + Header->Flags = GetLittleUInt(); + + Header->Width = GetLittleUInt(); + + Header->Height = GetLittleUInt(); + + Header->PaletteCRC = GetLittleUInt(); + + Header->ImageCRC = GetLittleUInt(); + + Header->PalOffset = GetLittleUInt(); + + Header->TeamEffect0 = GetLittleUInt(); + + Header->TeamEffect1 = GetLittleUInt(); + + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidLif() +{ + LIF_HEAD Head; + + if (!iGetLifHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(LIF_HEAD), IL_SEEK_CUR); + + return iCheckLif(&Head); +} + + +// Internal function used to check if the HEADER is a valid Lif header. +ILboolean iCheckLif(LIF_HEAD *Header) +{ + if (Header->Version != 260 || Header->Flags != 50) + return IL_FALSE; + if (stricmp(Header->Id, "Willy 7")) + return IL_FALSE; + return IL_TRUE; +} + + +//! Reads a .Lif file +ILboolean ilLoadLif(ILconst_string FileName) +{ + ILHANDLE LifFile; + ILboolean bLif = IL_FALSE; + + LifFile = iopenr(FileName); + if (LifFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bLif; + } + + bLif = ilLoadLifF(LifFile); + icloser(LifFile); + + return bLif; +} + + +//! Reads an already-opened .Lif file +ILboolean ilLoadLifF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadLifInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .Lif +ILboolean ilLoadLifL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadLifInternal(); +} + + +ILboolean iLoadLifInternal() +{ + LIF_HEAD LifHead; + ILuint i; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetLifHead(&LifHead)) + return IL_FALSE; + + if (!ilTexImage(LifHead.Width, LifHead.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(1024); + if (iCurImage->Pal.Palette == NULL) + return IL_FALSE; + iCurImage->Pal.PalSize = 1024; + iCurImage->Pal.PalType = IL_PAL_RGBA32; + + if (iread(iCurImage->Data, LifHead.Width * LifHead.Height, 1) != 1) + return IL_FALSE; + if (iread(iCurImage->Pal.Palette, 1, 1024) != 1024) + return IL_FALSE; + + // Each data offset is offset by -1, so we add one. + for (i = 0; i < iCurImage->SizeOfData; i++) { + iCurImage->Data[i]++; + } + + return ilFixImage(); +} + +#endif//IL_NO_LIF diff --git a/libs/DevIL-1.7.8/src-IL/src/il_main.c b/libs/DevIL-1.7.8/src-IL/src/il_main.c new file mode 100644 index 00000000..ffde2052 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_main.c @@ -0,0 +1,30 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/16/2002 <--Y2K Compliant! =] +// +// Filename: src-IL/src/il_main.c +// +// Description: Startup function +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" + +/* Only needed for MSVC++ unless extended to actually do something =) */ +#if defined(_WIN32) && defined(_MSC_VER) +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + hModule; ul_reason_for_call; lpReserved; + + if (ul_reason_for_call == DLL_PROCESS_ATTACH) { + //ilInit(); + } + + return TRUE; +} +#endif + + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_manip.c b/libs/DevIL-1.7.8/src-IL/src/il_manip.c new file mode 100644 index 00000000..d244cf71 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_manip.c @@ -0,0 +1,948 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/24/2009 +// +// Filename: src-IL/src/il_manip.c +// +// Description: Image manipulation +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#include "il_manip.h" + + +ILAPI void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num) +{ + ILubyte *StartPtr, *EndPtr; + ILuint y, d; + const ILuint size = line_num * line_size; + + for (d = 0; d < depth; d++) { + StartPtr = buff + d * size; + EndPtr = buff + d * size + size; + + for (y = 0; y < (line_num/2); y++) { + EndPtr -= line_size; + iMemSwap(StartPtr, EndPtr, line_size); + StartPtr += line_size; + } + } +} + +// Just created for internal use. +ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num) +{ + ILubyte *data; + ILubyte *s1, *s2; + ILuint y, d; + const ILuint size = line_num * line_size; + + if ((data = (ILubyte*)ialloc(depth*size)) == NULL) + return IL_FALSE; + + for (d = 0; d < depth; d++) { + s1 = buff + d * size; + s2 = data + d * size+size; + + for (y = 0; y < line_num; y++) { + s2 -= line_size; + memcpy(s2,s1,line_size); + s1 += line_size; + } + } + return data; +} + + +// Flips an image over its x axis +ILboolean ilFlipImage() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iCurImage->Origin = (iCurImage->Origin == IL_ORIGIN_LOWER_LEFT) ? + IL_ORIGIN_UPPER_LEFT : IL_ORIGIN_LOWER_LEFT; + + iFlipBuffer(iCurImage->Data,iCurImage->Depth,iCurImage->Bps,iCurImage->Height); + + return IL_TRUE; +} + +// Just created for internal use. +ILubyte* ILAPIENTRY iGetFlipped(ILimage *img) +{ + if (img == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + return iFlipNewBuffer(img->Data,img->Depth,img->Bps,img->Height); +} + + +//@JASON New routine created 28/03/2001 +//! Mirrors an image over its y axis +ILboolean ILAPIENTRY iMirror() { + ILubyte *Data, *DataPtr, *Temp; + ILuint y, d, PixLine; + ILint x, c; + ILushort *ShortPtr, *TempShort; + ILuint *IntPtr, *TempInt; + ILdouble *DblPtr, *TempDbl; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Data = (ILubyte*)ialloc(iCurImage->SizeOfData); + if (Data == NULL) + return IL_FALSE; + + PixLine = iCurImage->Bps / iCurImage->Bpc; + switch (iCurImage->Bpc) + { + case 1: + Temp = iCurImage->Data; + for (d = 0; d < iCurImage->Depth; d++) { + DataPtr = Data + d * iCurImage->SizeOfPlane; + for (y = 0; y < iCurImage->Height; y++) { + for (x = iCurImage->Width - 1; x >= 0; x--) { + for (c = 0; c < iCurImage->Bpp; c++, Temp++) { + DataPtr[y * PixLine + x * iCurImage->Bpp + c] = *Temp; + } + } + } + } + break; + + case 2: + TempShort = (ILushort*)iCurImage->Data; + for (d = 0; d < iCurImage->Depth; d++) { + ShortPtr = (ILushort*)(Data + d * iCurImage->SizeOfPlane); + for (y = 0; y < iCurImage->Height; y++) { + for (x = iCurImage->Width - 1; x >= 0; x--) { + for (c = 0; c < iCurImage->Bpp; c++, TempShort++) { + ShortPtr[y * PixLine + x * iCurImage->Bpp + c] = *TempShort; + } + } + } + } + break; + + case 4: + TempInt = (ILuint*)iCurImage->Data; + for (d = 0; d < iCurImage->Depth; d++) { + IntPtr = (ILuint*)(Data + d * iCurImage->SizeOfPlane); + for (y = 0; y < iCurImage->Height; y++) { + for (x = iCurImage->Width - 1; x >= 0; x--) { + for (c = 0; c < iCurImage->Bpp; c++, TempInt++) { + IntPtr[y * PixLine + x * iCurImage->Bpp + c] = *TempInt; + } + } + } + } + break; + + case 8: + TempDbl = (ILdouble*)iCurImage->Data; + for (d = 0; d < iCurImage->Depth; d++) { + DblPtr = (ILdouble*)(Data + d * iCurImage->SizeOfPlane); + for (y = 0; y < iCurImage->Height; y++) { + for (x = iCurImage->Width - 1; x >= 0; x--) { + for (c = 0; c < iCurImage->Bpp; c++, TempDbl++) { + DblPtr[y * PixLine + x * iCurImage->Bpp + c] = *TempDbl; + } + } + } + } + break; + } + + ifree(iCurImage->Data); + iCurImage->Data = Data; + + return IL_TRUE; +} + + +// Should we add type to the parameter list? +// Copies a 1d block of pixels to the buffer pointed to by Data. +ILboolean ilCopyPixels1D(ILuint XOff, ILuint Width, void *Data) +{ + ILuint x, c, NewBps, NewOff, PixBpp; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (iCurImage->Width < XOff + Width) { + NewBps = (iCurImage->Width - XOff) * PixBpp; + } + else { + NewBps = Width * PixBpp; + } + NewOff = XOff * PixBpp; + + for (x = 0; x < NewBps; x += PixBpp) { + for (c = 0; c < PixBpp; c++) { + Temp[x + c] = TempData[(x + NewOff) + c]; + } + } + + if (TempData != iCurImage->Data) + ifree(TempData); + + return IL_TRUE; +} + + +// Copies a 2d block of pixels to the buffer pointed to by Data. +ILboolean ilCopyPixels2D(ILuint XOff, ILuint YOff, ILuint Width, ILuint Height, void *Data) +{ + ILuint x, y, c, NewBps, DataBps, NewXOff, NewHeight, PixBpp; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (iCurImage->Width < XOff + Width) + NewBps = (iCurImage->Width - XOff) * PixBpp; + else + NewBps = Width * PixBpp; + + if (iCurImage->Height < YOff + Height) + NewHeight = iCurImage->Height - YOff; + else + NewHeight = Height; + + DataBps = Width * PixBpp; + NewXOff = XOff * PixBpp; + + for (y = 0; y < NewHeight; y++) { + for (x = 0; x < NewBps; x += PixBpp) { + for (c = 0; c < PixBpp; c++) { + Temp[y * DataBps + x + c] = + TempData[(y + YOff) * iCurImage->Bps + x + NewXOff + c]; + } + } + } + + if (TempData != iCurImage->Data) + ifree(TempData); + + return IL_TRUE; +} + + +// Copies a 3d block of pixels to the buffer pointed to by Data. +ILboolean ilCopyPixels3D(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, void *Data) +{ + ILuint x, y, z, c, NewBps, DataBps, NewSizePlane, NewH, NewD, NewXOff, PixBpp; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (iCurImage->Width < XOff + Width) + NewBps = (iCurImage->Width - XOff) * PixBpp; + else + NewBps = Width * PixBpp; + + if (iCurImage->Height < YOff + Height) + NewH = iCurImage->Height - YOff; + else + NewH = Height; + + if (iCurImage->Depth < ZOff + Depth) + NewD = iCurImage->Depth - ZOff; + else + NewD = Depth; + + DataBps = Width * PixBpp; + NewSizePlane = NewBps * NewH; + + NewXOff = XOff * PixBpp; + + for (z = 0; z < NewD; z++) { + for (y = 0; y < NewH; y++) { + for (x = 0; x < NewBps; x += PixBpp) { + for (c = 0; c < PixBpp; c++) { + Temp[z * NewSizePlane + y * DataBps + x + c] = + TempData[(z + ZOff) * iCurImage->SizeOfPlane + (y + YOff) * iCurImage->Bps + x + NewXOff + c]; + //TempData[(z + ZOff) * iCurImage->SizeOfPlane + (y + YOff) * iCurImage->Bps + (x + XOff) * iCurImage->Bpp + c]; + } + } + } + } + + if (TempData != iCurImage->Data) + ifree(TempData); + + return IL_TRUE; +} + + +ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data) +{ + void *Converted = NULL; + ILubyte *TempBuff = NULL; + ILuint SrcSize, DestSize; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return 0; + } + DestSize = Width * Height * Depth * ilGetBppFormat(Format) * ilGetBpcType(Type); + if (DestSize == 0) { + return DestSize; + } + if (Data == NULL || Format == IL_COLOUR_INDEX) { + ilSetError(IL_INVALID_PARAM); + return 0; + } + SrcSize = Width * Height * Depth * iCurImage->Bpp * iCurImage->Bpc; + + if (Format == iCurImage->Format && Type == iCurImage->Type) { + TempBuff = (ILubyte*)Data; + } + else { + TempBuff = (ILubyte*)ialloc(SrcSize); + if (TempBuff == NULL) { + return 0; + } + } + + if (YOff + Height <= 1) { + if (!ilCopyPixels1D(XOff, Width, TempBuff)) { + goto failed; + } + } + else if (ZOff + Depth <= 1) { + if (!ilCopyPixels2D(XOff, YOff, Width, Height, TempBuff)) { + goto failed; + } + } + else { + if (!ilCopyPixels3D(XOff, YOff, ZOff, Width, Height, Depth, TempBuff)) { + goto failed; + } + } + + if (Format == iCurImage->Format && Type == iCurImage->Type) { + return DestSize; + } + + Converted = ilConvertBuffer(SrcSize, iCurImage->Format, Format, iCurImage->Type, Type, &iCurImage->Pal, TempBuff); + if (Converted == NULL) + goto failed; + + memcpy(Data, Converted, DestSize); + + ifree(Converted); + if (TempBuff != Data) + ifree(TempBuff); + + return DestSize; + +failed: + if (TempBuff != Data) + ifree(TempBuff); + ifree(Converted); + return 0; +} + + +ILboolean ilSetPixels1D(ILint XOff, ILuint Width, void *Data) +{ + ILuint c, SkipX = 0, PixBpp; + ILint x, NewWidth; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (XOff < 0) { + SkipX = abs(XOff); + XOff = 0; + } + + if (iCurImage->Width < XOff + Width) { + NewWidth = iCurImage->Width - XOff; + } + else { + NewWidth = Width; + } + + NewWidth -= SkipX; + + for (x = 0; x < NewWidth; x++) { + for (c = 0; c < PixBpp; c++) { + TempData[(x + XOff) * PixBpp + c] = Temp[(x + SkipX) * PixBpp + c]; + } + } + + if (TempData != iCurImage->Data) { + ifree(iCurImage->Data); + iCurImage->Data = TempData; + } + + return IL_TRUE; +} + + +ILboolean ilSetPixels2D(ILint XOff, ILint YOff, ILuint Width, ILuint Height, void *Data) +{ + ILuint c, SkipX = 0, SkipY = 0, NewBps, PixBpp; + ILint x, y, NewWidth, NewHeight; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (XOff < 0) { + SkipX = abs(XOff); + XOff = 0; + } + if (YOff < 0) { + SkipY = abs(YOff); + YOff = 0; + } + + if (iCurImage->Width < XOff + Width) + NewWidth = iCurImage->Width - XOff; + else + NewWidth = Width; + NewBps = Width * PixBpp; + + if (iCurImage->Height < YOff + Height) + NewHeight = iCurImage->Height - YOff; + else + NewHeight = Height; + + NewWidth -= SkipX; + NewHeight -= SkipY; + + for (y = 0; y < NewHeight; y++) { + for (x = 0; x < NewWidth; x++) { + for (c = 0; c < PixBpp; c++) { + TempData[(y + YOff) * iCurImage->Bps + (x + XOff) * PixBpp + c] = + Temp[(y + SkipY) * NewBps + (x + SkipX) * PixBpp + c]; + } + } + } + + if (TempData != iCurImage->Data) { + ifree(iCurImage->Data); + iCurImage->Data = TempData; + } + + return IL_TRUE; +} + + +ILboolean ilSetPixels3D(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, void *Data) +{ + ILuint SkipX = 0, SkipY = 0, SkipZ = 0, c, NewBps, NewSizePlane, PixBpp; + ILint x, y, z, NewW, NewH, NewD; + ILubyte *Temp = (ILubyte*)Data, *TempData = iCurImage->Data; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) { + TempData = iGetFlipped(iCurImage); + if (TempData == NULL) + return IL_FALSE; + } + } + + PixBpp = iCurImage->Bpp * iCurImage->Bpc; + + if (XOff < 0) { + SkipX = abs(XOff); + XOff = 0; + } + if (YOff < 0) { + SkipY = abs(YOff); + YOff = 0; + } + if (ZOff < 0) { + SkipZ = abs(ZOff); + ZOff = 0; + } + + if (iCurImage->Width < XOff + Width) + NewW = iCurImage->Width - XOff; + else + NewW = Width; + NewBps = Width * PixBpp; + + if (iCurImage->Height < YOff + Height) + NewH = iCurImage->Height - YOff; + else + NewH = Height; + + if (iCurImage->Depth < ZOff + Depth) + NewD = iCurImage->Depth - ZOff; + else + NewD = Depth; + NewSizePlane = NewBps * Height; + + NewW -= SkipX; + NewH -= SkipY; + NewD -= SkipZ; + + for (z = 0; z < NewD; z++) { + for (y = 0; y < NewH; y++) { + for (x = 0; x < NewW; x++) { + for (c = 0; c < PixBpp; c++) { + TempData[(z + ZOff) * iCurImage->SizeOfPlane + (y + YOff) * iCurImage->Bps + (x + XOff) * PixBpp + c] = + Temp[(z + SkipZ) * NewSizePlane + (y + SkipY) * NewBps + (x + SkipX) * PixBpp + c]; + } + } + } + } + + if (TempData != iCurImage->Data) { + ifree(iCurImage->Data); + iCurImage->Data = TempData; + } + + return IL_TRUE; +} + + +void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data) +{ + void *Converted; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return; + } + if (Data == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + + if (Format == iCurImage->Format && Type == iCurImage->Type) { + Converted = (void*)Data; + } + else { + Converted = ilConvertBuffer(Width * Height * Depth * ilGetBppFormat(Format) * ilGetBpcType(Type), Format, iCurImage->Format, Type, iCurImage->Type, NULL, Data); + if (!Converted) + return; + } + + if (YOff + Height <= 1) { + ilSetPixels1D(XOff, Width, Converted); + } + else if (ZOff + Depth <= 1) { + ilSetPixels2D(XOff, YOff, Width, Height, Converted); + } + else { + ilSetPixels3D(XOff, YOff, ZOff, Width, Height, Depth, Converted); + } + + if (Format == iCurImage->Format && Type == iCurImage->Type) { + return; + } + + if (Converted != Data) + ifree(Converted); + + return; +} + + + +// Ripped from Platinum (Denton's sources) +// This could very well easily be changed to a 128x128 image instead...needed? + +//! Creates an ugly 64x64 black and yellow checkerboard image. +ILboolean ILAPIENTRY ilDefaultImage() +{ + ILubyte *TempData; + ILubyte Yellow[3] = { 18, 246, 243 }; + ILubyte Black[3] = { 0, 0, 0 }; + ILubyte *ColorPtr = Yellow; // The start color + ILboolean Color = IL_TRUE; + + // Loop Variables + ILint v, w, x, y; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!ilTexImage(64, 64, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + TempData = iCurImage->Data; + + for (v = 0; v < 8; v++) { + // We do this because after a "block" line ends, the next row of blocks + // above starts with the ending colour, but the very inner loop switches them. + if (Color) { + Color = IL_FALSE; + ColorPtr = Black; + } + else { + Color = IL_TRUE; + ColorPtr = Yellow; + } + + for (w = 0; w < 8; w++) { + for (x = 0; x < 8; x++) { + for (y = 0; y < 8; y++, TempData += iCurImage->Bpp) { + TempData[0] = ColorPtr[0]; + TempData[1] = ColorPtr[1]; + TempData[2] = ColorPtr[2]; + } + + // Switch to alternate between black and yellow + if (Color) { + Color = IL_FALSE; + ColorPtr = Black; + } + else { + Color = IL_TRUE; + ColorPtr = Yellow; + } + } + } + } + + return IL_TRUE; +} + + +ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type) +{ + ILimage *TempImage; + ILubyte *Alpha; + ILushort *AlphaShort; + ILuint *AlphaInt; + ILdouble *AlphaDbl; + ILuint i, j, Bpc, Size, AlphaOff; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Bpc = ilGetBpcType(Type); + if (Bpc == 0) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + if (iCurImage->Type == Type) { + TempImage = iCurImage; + } else { + TempImage = iConvertImage(iCurImage, iCurImage->Format, Type); + if (TempImage == NULL) + return NULL; + } + + Size = iCurImage->Width * iCurImage->Height * iCurImage->Depth * TempImage->Bpp; + Alpha = (ILubyte*)ialloc(Size / TempImage->Bpp * Bpc); + if (Alpha == NULL) { + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return NULL; + } + + switch (TempImage->Format) + { + case IL_RGB: + case IL_BGR: + case IL_LUMINANCE: + case IL_COLOUR_INDEX: // @TODO: Make IL_COLOUR_INDEX separate. + memset(Alpha, 0xFF, Size / TempImage->Bpp * Bpc); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return Alpha; + } + + // If our format is alpha, just return a copy. + if (TempImage->Format == IL_ALPHA) { + memcpy(Alpha, TempImage->Data, TempImage->SizeOfData); + return Alpha; + } + + if (TempImage->Format == IL_LUMINANCE_ALPHA) + AlphaOff = 2; + else + AlphaOff = 4; + + switch (TempImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + Alpha[j] = TempImage->Data[i]; + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + AlphaShort = (ILushort*)Alpha; + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + AlphaShort[j] = ((ILushort*)TempImage->Data)[i]; + break; + + case IL_INT: + case IL_UNSIGNED_INT: + case IL_FLOAT: // Can throw float in here, because it's the same size. + AlphaInt = (ILuint*)Alpha; + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + AlphaInt[j] = ((ILuint*)TempImage->Data)[i]; + break; + + case IL_DOUBLE: + AlphaDbl = (ILdouble*)Alpha; + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + AlphaDbl[j] = ((ILdouble*)TempImage->Data)[i]; + break; + } + + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return Alpha; +} + +// sets the Alpha value to a specific value for each pixel in the image +ILboolean ILAPIENTRY ilSetAlpha(ILdouble AlphaValue) +{ + ILboolean ret = IL_TRUE; + ILuint i,Size; + ILimage *Image = iCurImage; + ILuint AlphaOff; + + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + AlphaValue = IL_CLAMP(AlphaValue); + + switch (Image->Format) + { + case IL_RGB: + ret = ilConvertImage(IL_RGBA, Image->Type); + case IL_RGBA: + AlphaOff = 4; + break; + case IL_BGR: + ret = ilConvertImage(IL_BGRA, Image->Type); + case IL_BGRA: + AlphaOff = 4; + break; + case IL_LUMINANCE: + ret = ilConvertImage(IL_LUMINANCE_ALPHA, Image->Type); + case IL_LUMINANCE_ALPHA: + AlphaOff = 2; + break; + case IL_ALPHA: + AlphaOff = 1; + case IL_COLOUR_INDEX: //@TODO use palette with alpha + ret = ilConvertImage(IL_RGBA, Image->Type); + AlphaOff = 4; + break; + } + if (ret == IL_FALSE) { + // Error has been set by ilConvertImage. + return IL_FALSE; + } + Size = Image->Width * Image->Height * Image->Depth * Image->Bpp; + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: { + const ILbyte alpha = (ILubyte)(AlphaValue * IL_MAX_UNSIGNED_BYTE + .5); + for (i = AlphaOff-1; i < Size; i += AlphaOff) + Image->Data[i] = alpha; + break; + } + case IL_SHORT: + case IL_UNSIGNED_SHORT: { + const ILushort alpha = (ILushort)(AlphaValue * IL_MAX_UNSIGNED_SHORT + .5); + for (i = AlphaOff-1; i < Size; i += AlphaOff) + ((ILushort*)Image->Data)[i] = alpha; + break; + } + case IL_INT: + case IL_UNSIGNED_INT: { + const ILushort alpha = (ILushort)(AlphaValue * IL_MAX_UNSIGNED_INT + .5); + for (i = AlphaOff-1; i < Size; i += AlphaOff) + ((ILuint*)Image->Data)[i] = alpha; + break; + } + case IL_FLOAT: { + const ILfloat alpha = (ILfloat)AlphaValue; + for (i = AlphaOff-1; i < Size; i += AlphaOff) + ((ILfloat*)Image->Data)[i] = alpha; + break; + } + case IL_DOUBLE: { + const ILdouble alpha = AlphaValue; + for (i = AlphaOff-1; i < Size; i += AlphaOff) + ((ILdouble*)Image->Data)[i] = alpha; + break; + } + } + + return IL_TRUE; +} + +void ILAPIENTRY ilModAlpha(ILdouble AlphaValue) +{ + ILuint AlphaOff = 0; + ILboolean ret = IL_FALSE; + ILuint i,j,Size; + + union { + ILubyte alpha_byte; + ILushort alpha_short; + ILuint alpha_int; + ILfloat alpha_float; + ILdouble alpha_double; + } Alpha; + + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return; + } + + switch (iCurImage->Format) + { + case IL_RGB: + ret = ilConvertImage(IL_RGBA,iCurImage->Type); + AlphaOff = 4; + break; + case IL_BGR: + ret = ilConvertImage(IL_BGRA,iCurImage->Type); + AlphaOff = 4; + break; + case IL_LUMINANCE: + ret = ilConvertImage(IL_LUMINANCE_ALPHA,iCurImage->Type); + AlphaOff = 2; + break; + case IL_COLOUR_INDEX: + ret = ilConvertImage(IL_RGBA,iCurImage->Type); + AlphaOff = 4; + break; + } + Size = iCurImage->Width * iCurImage->Height * iCurImage->Depth * iCurImage->Bpp; + + if (!ret) + return; + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + Alpha.alpha_byte = (ILubyte)(AlphaValue * 0x000000FF + .5); + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + iCurImage->Data[i] = Alpha.alpha_byte; + break; + case IL_SHORT: + case IL_UNSIGNED_SHORT: + Alpha.alpha_short = (ILushort)(AlphaValue * 0x0000FFFF + .5); + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + ((ILushort*)iCurImage->Data)[i] = Alpha.alpha_short; + break; + case IL_INT: + case IL_UNSIGNED_INT: + Alpha.alpha_int = (ILuint)(AlphaValue * 0xFFFFFFFF + .5); + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + ((ILuint*)iCurImage->Data)[i] = Alpha.alpha_int; + break; + case IL_FLOAT: + Alpha.alpha_float = (ILfloat)AlphaValue; + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + ((ILfloat*)iCurImage->Data)[i] = Alpha.alpha_float; + break; + case IL_DOUBLE: + Alpha.alpha_double = AlphaValue; + for (i = AlphaOff-1, j = 0; i < Size; i += AlphaOff, j++) + ((ILdouble*)iCurImage->Data)[i] = Alpha.alpha_double; + break; + } + + return; +} + + +//! Clamps data values of unsigned bytes from 16 to 235 for display on an +// NTSC television. Reasoning for this is given at +// http://msdn.microsoft.com/en-us/library/bb174608.aspx. +ILboolean ILAPIENTRY ilClampNTSC(void) +{ + ILuint x, y, z, c; + ILuint Offset = 0; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iCurImage->Type != IL_UNSIGNED_BYTE) // Should we set an error here? + return IL_FALSE; + + for (z = 0; z < iCurImage->Depth; z++) { + for (y = 0; y < iCurImage->Height; y++) { + for (x = 0; x < iCurImage->Width; x++) { + for (c = 0; c < iCurImage->Bpp; c++) { + iCurImage->Data[Offset + c] = IL_LIMIT(iCurImage->Data[Offset + c], 16, 235); + } + Offset += iCurImage->Bpp; + } + } + } + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_mdl.c b/libs/DevIL-1.7.8/src-IL/src/il_mdl.c new file mode 100644 index 00000000..d6b212a6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_mdl.c @@ -0,0 +1,218 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_mdl.c +// +// Description: Reads a Half-Life model file (.mdl). +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_MDL +#include "il_mdl.h" + + +ILboolean iLoadMdlInternal(void); +ILboolean iIsValidMdl(void); + +//! Checks if the file specified in FileName is a valid MDL file. +ILboolean ilIsValidMdl(ILconst_string FileName) +{ + ILHANDLE MdlFile; + ILboolean bMdl = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("mdl"))) { + ilSetError(IL_INVALID_EXTENSION); + return bMdl; + } + + MdlFile = iopenr(FileName); + if (MdlFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bMdl; + } + + bMdl = ilIsValidMdlF(MdlFile); + icloser(MdlFile); + + return bMdl; +} + + +//! Checks if the ILHANDLE contains a valid MDL file at the current position. +ILboolean ilIsValidMdlF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidMdl(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid MDL lump. +ILboolean ilIsValidMdlL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidMdl(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidMdl(void) +{ + ILuint Id, Version; + + Id = GetLittleUInt(); + Version = GetLittleUInt(); + iseek(-8, IL_SEEK_CUR); // Restore to previous position. + + // 0x54534449 == "IDST" + if (Id != 0x54534449 || Version != 10) + return IL_FALSE; + return IL_TRUE; +} + + +//! Reads a .mdl file +ILboolean ilLoadMdl(ILconst_string FileName) +{ + ILHANDLE MdlFile; + ILboolean bMdl = IL_FALSE; + + MdlFile = iopenr(FileName); + if (MdlFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bMdl; + } + + bMdl = ilLoadMdlF(MdlFile); + icloser(MdlFile); + + return bMdl; +} + + +//! Reads an already-opened .mdl file +ILboolean ilLoadMdlF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadMdlInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .mdl +ILboolean ilLoadMdlL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadMdlInternal(); +} + + +ILboolean iLoadMdlInternal() +{ + ILuint Id, Version, NumTex, TexOff, TexDataOff, Position, ImageNum; + ILubyte *TempPal; + TEX_HEAD TexHead; + ILimage *BaseImage=NULL; + ILboolean BaseCreated = IL_FALSE; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Id = GetLittleUInt(); + Version = GetLittleUInt(); + + // 0x54534449 == "IDST" + if (Id != 0x54534449 || Version != 10) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Skips the actual model header. + iseek(172, IL_SEEK_CUR); + + NumTex = GetLittleUInt(); + TexOff = GetLittleUInt(); + TexDataOff = GetLittleUInt(); + + if (NumTex == 0 || TexOff == 0 || TexDataOff == 0) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + iseek(TexOff, IL_SEEK_SET); + + for (ImageNum = 0; ImageNum < NumTex; ImageNum++) { + if (iread(TexHead.Name, 1, 64) != 64) + return IL_FALSE; + TexHead.Flags = GetLittleUInt(); + TexHead.Width = GetLittleUInt(); + TexHead.Height = GetLittleUInt(); + TexHead.Offset = GetLittleUInt(); + Position = itell(); + + if (TexHead.Offset == 0) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + if (!BaseCreated) { + ilTexImage(TexHead.Width, TexHead.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL); + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + BaseCreated = IL_TRUE; + BaseImage = iCurImage; + //iCurImage->NumNext = NumTex - 1; // Don't count the first image. + } + else { + //iCurImage->Next = ilNewImage(TexHead.Width, TexHead.Height, 1, 1, 1); + iCurImage = iCurImage->Next; + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Type = IL_UNSIGNED_BYTE; + } + + TempPal = (ILubyte*)ialloc(768); + if (TempPal == NULL) { + iCurImage = BaseImage; + return IL_FALSE; + } + iCurImage->Pal.Palette = TempPal; + iCurImage->Pal.PalSize = 768; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + iseek(TexHead.Offset, IL_SEEK_SET); + if (iread(iCurImage->Data, TexHead.Width * TexHead.Height, 1) != 1) + return IL_FALSE; + if (iread(iCurImage->Pal.Palette, 1, 768) != 768) + return IL_FALSE; + + if (ilGetBoolean(IL_CONV_PAL) == IL_TRUE) { + ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); + } + + iseek(Position, IL_SEEK_SET); + } + + iCurImage = BaseImage; + + return ilFixImage(); +} + +#endif//IL_NO_MDL diff --git a/libs/DevIL-1.7.8/src-IL/src/il_mng.c b/libs/DevIL-1.7.8/src-IL/src/il_mng.c new file mode 100644 index 00000000..660a190e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_mng.c @@ -0,0 +1,378 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_mng.c +// +// Description: Multiple Network Graphics (.mng) functions +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_MNG +#define MNG_SUPPORT_READ +#define MNG_SUPPORT_WRITE +#define MNG_SUPPORT_DISPLAY + +#ifdef _WIN32 +//#define MNG_USE_SO +#endif + +#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "libmng.lib") + #pragma comment(lib, "lcms.lib") + #pragma comment(lib, "libjpeg.lib") + #pragma comment(lib, "zlib.lib") + #else + #pragma comment(lib, "libmng-d.lib") + #pragma comment(lib, "lcms-d.lib") + #pragma comment(lib, "libjpeg-d.lib") + #pragma comment(lib, "zlib-d.lib") + #endif + #endif +#endif + + +#if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable : 4142) // Redefinition in jmorecfg.h +#endif + +#include + +#if defined(_MSC_VER) + #pragma warning(pop) +#endif + + +//--------------------------------------------------------------------------------------------- +// memory allocation; data must be zeroed +//--------------------------------------------------------------------------------------------- +mng_ptr MNG_DECL mymngalloc(mng_size_t size) +{ + return (mng_ptr)icalloc(1, size); +} + + +//--------------------------------------------------------------------------------------------- +// memory deallocation +//--------------------------------------------------------------------------------------------- +void MNG_DECL mymngfree(mng_ptr p, mng_size_t size) +{ + ifree(p); +} + + +//--------------------------------------------------------------------------------------------- +// Stream open: +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngopenstream(mng_handle mng) +{ + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// Stream open for Writing: +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngopenstreamwrite(mng_handle mng) +{ + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// Stream close: +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngclosestream(mng_handle mng) +{ + return MNG_TRUE; // We close the file ourself, mng_cleanup doesnt seem to do it... +} + + +//--------------------------------------------------------------------------------------------- +// feed data to the decoder +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngreadstream(mng_handle mng, mng_ptr buffer, mng_size_t size, mng_uint32 *bytesread) +{ + // read the requested amount of data from the file + *bytesread = iread(buffer, 1, (ILuint)size); + + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// callback for writing data +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngwritedata(mng_handle mng, mng_ptr buffer, mng_size_t size, mng_uint32 *byteswritten) +{ + *byteswritten = iwrite(buffer, 1, (ILuint)size); + + if (*byteswritten < size) { + ilSetError(IL_FILE_WRITE_ERROR); + return MNG_FALSE; + } + + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// the header's been read. set up the display stuff +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngprocessheader(mng_handle mng, mng_uint32 width, mng_uint32 height) +{ + ILuint AlphaDepth; + + AlphaDepth = mng_get_alphadepth(mng); + + if (AlphaDepth == 0) { + ilTexImage(width, height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL); + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + mng_set_canvasstyle(mng, MNG_CANVAS_BGR8); + } + else { // Use alpha channel + ilTexImage(width, height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL); + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + mng_set_canvasstyle(mng, MNG_CANVAS_BGRA8); + } + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// return a row pointer for the decoder to fill +//--------------------------------------------------------------------------------------------- +mng_ptr MNG_DECL mymnggetcanvasline(mng_handle mng, mng_uint32 line) +{ + return (mng_ptr)(iCurImage->Data + iCurImage->Bps * line); +} + + +//--------------------------------------------------------------------------------------------- +// timer +//--------------------------------------------------------------------------------------------- +mng_uint32 MNG_DECL mymnggetticks(mng_handle mng) +{ + return 0; +} + + +//--------------------------------------------------------------------------------------------- +// Refresh: +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngrefresh(mng_handle mng, mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h) +{ + return MNG_TRUE; +} + + +//--------------------------------------------------------------------------------------------- +// interframe delay callback +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngsettimer(mng_handle mng, mng_uint32 msecs) +{ + return MNG_TRUE; +} + + + +// Make this do something different soon! + +//--------------------------------------------------------------------------------------------- +// Error Callback; +//--------------------------------------------------------------------------------------------- +mng_bool MNG_DECL mymngerror( + mng_handle mng, mng_int32 code, mng_int8 severity, + mng_chunkid chunktype, mng_uint32 chunkseq, + mng_int32 extra1, mng_int32 extra2, mng_pchar text + ) +{ + // error occured; + return MNG_FALSE; +} + + +ILboolean iLoadMngInternal(void); + +// Reads a file +ILboolean ilLoadMng(ILconst_string FileName) +{ + ILHANDLE MngFile; + ILboolean bMng = IL_FALSE; + + MngFile = iopenr(FileName); + if (MngFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bMng; + } + + bMng = ilLoadMngF(MngFile); + icloser(MngFile); + + return bMng; +} + + +// Reads an already-opened file +ILboolean ilLoadMngF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadMngInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +// Reads from a memory "lump" +ILboolean ilLoadMngL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadMngInternal(); +} + + +ILboolean iLoadMngInternal() +{ + mng_handle mng; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + mng = mng_initialize(MNG_NULL, mymngalloc, mymngfree, MNG_NULL); + if (mng == MNG_NULL) { + ilSetError(IL_LIB_MNG_ERROR); + return IL_FALSE; + } + + // If .mng background is available, use it. + mng_set_usebkgd(mng, MNG_TRUE); + + // Set the callbacks. + mng_setcb_errorproc(mng, mymngerror); + mng_setcb_openstream(mng, mymngopenstream); + mng_setcb_closestream(mng, mymngclosestream); + mng_setcb_readdata(mng, (mng_readdata)mymngreadstream); + mng_setcb_gettickcount(mng, mymnggetticks); + mng_setcb_settimer(mng, mymngsettimer); + mng_setcb_processheader(mng, mymngprocessheader); + mng_setcb_getcanvasline(mng, mymnggetcanvasline); + mng_setcb_refresh(mng, mymngrefresh); + + mng_read(mng); + mng_display(mng); + + return ilFixImage(); +} + + +ILboolean iSaveMngInternal(void); + +//! Writes a Mng file +ILboolean ilSaveMng(const ILstring FileName) +{ + ILHANDLE MngFile; + ILuint MngSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + MngFile = iopenw(FileName); + if (MngFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + MngSize = ilSaveMngF(MngFile); + iclosew(MngFile); + + if (MngSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Mng to an already-opened file +ILuint ilSaveMngF(ILHANDLE File) +{ + ILuint Pos = itellw(); + iSetOutputFile(File); + if (iSaveMngInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Mng to a memory "lump" +ILuint ilSaveMngL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveMngInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Mng. +ILboolean iSaveMngInternal() +{ + //mng_handle mng; + + // Not working yet, so just error out. + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + + //if (iCurImage == NULL) { + // ilSetError(IL_ILLEGAL_OPERATION); + // return IL_FALSE; + //} + + //mng = mng_initialize(MNG_NULL, mymngalloc, mymngfree, MNG_NULL); + //if (mng == MNG_NULL) { + // ilSetError(IL_LIB_MNG_ERROR); + // return IL_FALSE; + //} + + //mng_setcb_openstream(mng, mymngopenstreamwrite); + //mng_setcb_closestream(mng, mymngclosestream); + //mng_setcb_writedata(mng, mymngwritedata); + + //// Write File: + // mng_create(mng); + + //// Check return value. + //mng_putchunk_mhdr(mng, iCurImage->Width, iCurImage->Height, 1000, 3, 1, 3, 0x0047); + //mng_putchunk_basi(mng, iCurImage->Width, iCurImage->Height, 8, MNG_COLORTYPE_RGB, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 1); + //mng_putchunk_iend(mng); + //mng_putimgdata_ihdr(mng, iCurImage->Width, iCurImage->Height, MNG_COLORTYPE_RGB, 8, 0, 0, 0, 0, mymnggetcanvasline); + + //// Now write file: + //mng_write(mng); + + //mng_cleanup(&mng); + + //return IL_TRUE; +} + +#endif//IL_NO_MNG diff --git a/libs/DevIL-1.7.8/src-IL/src/il_mp3.c b/libs/DevIL-1.7.8/src-IL/src/il_mp3.c new file mode 100644 index 00000000..d75711b9 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_mp3.c @@ -0,0 +1,280 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/05/2009 +// +// Filename: src-IL/src/il_mp3.c +// +// MimeType: Reads from an MPEG-1 Audio Layer 3 (.mp3) file. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_MP3 + +typedef struct MP3HEAD +{ + char Signature[3]; + ILubyte VersionMajor; + ILubyte VersionMinor; + ILubyte Flags; + ILuint Length; +} MP3HEAD; + +#define MP3_NONE 0 +#define MP3_JPG 1 +#define MP3_PNG 2 + +ILboolean iLoadMp3Internal(void); +ILboolean iIsValidMp3(void); +ILboolean iCheckMp3(MP3HEAD *Header); +ILboolean iLoadJpegInternal(void); +ILboolean iLoadPngInternal(void); + + +//! Checks if the file specified in FileName is a valid MP3 file. +ILboolean ilIsValidMp3(ILconst_string FileName) +{ + ILHANDLE Mp3File; + ILboolean bMp3 = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("mp3"))) { + ilSetError(IL_INVALID_EXTENSION); + return bMp3; + } + + Mp3File = iopenr(FileName); + if (Mp3File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bMp3; + } + + bMp3 = ilIsValidMp3F(Mp3File); + icloser(Mp3File); + + return bMp3; +} + + +//! Checks if the ILHANDLE contains a valid MP3 file at the current position. +ILboolean ilIsValidMp3F(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidMp3(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid MP3 lump. +ILboolean ilIsValidMp3L(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidMp3(); +} + + +ILuint GetSynchInt() +{ + ILuint SynchInt; + + SynchInt = GetBigUInt(); + + SynchInt = ((SynchInt & 0x7F000000) >> 3) | ((SynchInt & 0x7F0000) >> 2) + | ((SynchInt & 0x7F00) >> 1) | (SynchInt & 0x7F); + + return SynchInt; +} + + +// Internal function used to get the MP3 header from the current file. +ILboolean iGetMp3Head(MP3HEAD *Header) +{ + if (iread(Header->Signature, 3, 1) != 1) + return IL_FALSE; + Header->VersionMajor = igetc(); + Header->VersionMinor = igetc(); + Header->Flags = igetc(); + Header->Length = GetSynchInt(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidMp3(void) +{ + MP3HEAD Header; + ILuint Pos = itell(); + + if (!iGetMp3Head(&Header)) + return IL_FALSE; + // The length of the header varies, so we just go back to the original position. + iseek(Pos, IL_SEEK_CUR); + + return iCheckMp3(&Header); +} + + +// Internal function used to check if the HEADER is a valid MP3 header. +ILboolean iCheckMp3(MP3HEAD *Header) +{ + if (strncmp(Header->Signature, "ID3", 3)) + return IL_FALSE; + if (Header->VersionMajor != 3 && Header->VersionMinor != 4) + return IL_FALSE; + + return IL_TRUE; +} + + +ILuint iFindMp3Pic(MP3HEAD *Header) +{ + char ID[4]; + ILuint FrameSize; + ILubyte TextEncoding; + ILubyte MimeType[65], Description[65]; + ILubyte PicType; + ILuint i; + ILuint Type = MP3_NONE; + + do { + if (iread(ID, 4, 1) != 1) + return MP3_NONE; + if (Header->VersionMajor == 3) + FrameSize = GetBigUInt(); + else + FrameSize = GetSynchInt(); + + GetBigUShort(); // Skip the flags. + + //@TODO: Support multiple APIC entries in an mp3 file. + if (!strncmp(ID, "APIC", 4)) { + //@TODO: Use TextEncoding properly - UTF16 strings starting with FFFE or FEFF. + TextEncoding = igetc(); + // Get the MimeType (read until we hit 0). + for (i = 0; i < 65; i++) { + MimeType[i] = igetc(); + if (MimeType[i] == 0) + break; + } + // The MimeType must be terminated by 0 in the file by the specs. + if (MimeType[i] != 0) + return MP3_NONE; + if (!strcmp(MimeType, "image/jpeg")) + Type = MP3_JPG; + else if (!strcmp(MimeType, "image/png")) + Type = MP3_PNG; + else + Type = MP3_NONE; + + PicType = igetc(); // Whether this is a cover, band logo, etc. + + // Skip the description. + for (i = 0; i < 65; i++) { + Description[i] = igetc(); + if (Description[i] == 0) + break; + } + if (Description[i] != 0) + return MP3_NONE; + return Type; + } + else { + iseek(FrameSize, IL_SEEK_CUR); + } + + //if (!strncmp(MimeType, " + } while (!ieof() && itell() < Header->Length); + + return Type; +} + + +//! Reads a MP3 file +ILboolean ilLoadMp3(ILconst_string FileName) +{ + ILHANDLE Mp3File; + ILboolean bMp3 = IL_FALSE; + + Mp3File = iopenr(FileName); + if (Mp3File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bMp3; + } + + bMp3 = ilLoadMp3F(Mp3File); + icloser(Mp3File); + + return bMp3; +} + + +//! Reads an already-opened MP3 file +ILboolean ilLoadMp3F(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadMp3Internal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a MP3 +ILboolean ilLoadMp3L(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadMp3Internal(); +} + + +// Internal function used to load the MP3. +ILboolean iLoadMp3Internal(void) +{ + MP3HEAD Header; + ILuint Type; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetMp3Head(&Header)) + return IL_FALSE; + if (!iCheckMp3(&Header)) + return IL_FALSE; + Type = iFindMp3Pic(&Header); + + switch (Type) + { +#ifndef IL_NO_JPG + case MP3_JPG: + return iLoadJpegInternal(); +#endif//IL_NO_JPG + +#ifndef IL_NO_PNG + case MP3_PNG: + return iLoadPngInternal(); +#endif//IL_NO_PNG + + // Either a picture was not found, or the MIME type was not recognized. + default: + ilSetError(IL_INVALID_FILE_HEADER); + } + + return IL_FALSE; +} + +#endif//IL_NO_MP3 + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_neuquant.c b/libs/DevIL-1.7.8/src-IL/src/il_neuquant.c new file mode 100644 index 00000000..c00f4a00 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_neuquant.c @@ -0,0 +1,462 @@ +/* NeuQuant Neural-Net Quantization Algorithm + * ------------------------------------------ + * + * Copyright (c) 1994 Anthony Dekker + * + * NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. + * See "Kohonen neural networks for optimal colour quantization" + * in "Network: Computation in Neural Systems" Vol. 5 (1994) pp 351-367. + * for a discussion of the algorithm. + * See also http://www.acm.org/~dekker/NEUQUANT.HTML + * + * Any party obtaining a copy of these files from the author, directly or + * indirectly, is granted, free of charge, a full and unrestricted irrevocable, + * world-wide, paid up, royalty-free, nonexclusive right and license to deal + * in this software and documentation files (the "Software"), including without + * limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons who receive + * copies from any such party to do so, with the only requirement being + * that this copyright notice remain intact. + */ + +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// by Denton Woods +// Last modified: 01/04/2009 +// +// Filename: src-IL/src/il_neuquant.c +// +// Description: Heavily modified by Denton Woods. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" + + +// Function definitions +void initnet(ILubyte *thepic, ILint len, ILint sample); +void unbiasnet(); +void inxbuild(); +ILubyte inxsearch(ILint b, ILint g, ILint r); +void learn(); + +// four primes near 500 - assume no image has a length so large +// that it is divisible by all four primes +#define prime1 499 +#define prime2 491 +#define prime3 487 +#define prime4 503 + +#define minpicturebytes (3*prime4) // minimum size for input image + + +// Network Definitions +// ------------------- + +#define netsize 256 // number of colours used +#define maxnetpos (netsizethink-1) +#define netbiasshift 4 // bias for colour values +#define ncycles 100 // no. of learning cycles + +// defs for freq and bias +#define intbiasshift 16 // bias for fractions +#define intbias (((ILint) 1)<>betashift)// beta = 1/1024 +#define betagamma (intbias<<(gammashift-betashift)) + +// defs for decreasing radius factor +#define initrad (netsize>>3) // for 256 cols, radius starts +#define radiusbiasshift 6 // at 32.0 biased by 6 bits +#define radiusbias (((ILint) 1)<>= netbiasshift; + network[i][3] = i; // record colour no + } + return; +} + + +// Insertion sort of network and building of netindex[0..255] (to do after unbias) +// ------------------------------------------------------------------------------- + +void inxbuild() +{ + ILint i,j,smallpos,smallval; + ILint *p,*q; + ILint previouscol,startpos; + + previouscol = 0; + startpos = 0; + for (i=0; i>1; + for (j=previouscol+1; j>1; + for (j=previouscol+1; j<256; j++) netindex[j] = maxnetpos; // really 256 + return; +} + + +// Search for BGR values 0..255 (after net is unbiased) and return colour index +// ---------------------------------------------------------------------------- + +ILubyte inxsearch(ILint b, ILint g, ILint r) +{ + ILint i,j,dist,a,bestd; + ILint *p; + ILint best; + + bestd = 1000; // biggest possible dist is 256*3 + best = -1; + i = netindex[g]; // index on g + j = i-1; // start at netindex[g] and work outwards + + while ((i=0)) { + if (i= bestd) i = netsizethink; // stop iter + else { + i++; + if (dist<0) dist = -dist; + a = p[0] - b; if (a<0) a = -a; + dist += a; + if (dist=0) { + p = network[j]; + dist = g - p[1]; // inx key - reverse dif + if (dist >= bestd) j = -1; // stop iter + else { + j--; + if (dist<0) dist = -dist; + a = p[0] - b; if (a<0) a = -a; + dist += a; + if (dist>(intbiasshift-netbiasshift)); + if (biasdist> betashift); + *f++ -= betafreq; + *p++ += (betafreq<netsizethink) hi=netsizethink; + + j = i+1; + k = i-1; + q = radpower; + while ((jlo)) { + a = (*(++q)); + if (jlo) { + p = network[k]; + *p -= (a*(*p - b)) / alpharadbias; + p++; + *p -= (a*(*p - g)) / alpharadbias; + p++; + *p -= (a*(*p - r)) / alpharadbias; + k--; + } + } + return; +} + + +// Main Learning Loop +// ------------------ + +void learn() +{ + ILint i,j,b,g,r; + ILint radius,rad,alpha,step,delta,samplepixels; + ILubyte *p; + ILubyte *lim; + + alphadec = 30 + ((samplefac-1)/3); + p = thepicture; + lim = thepicture + lengthcount; + samplepixels = lengthcount/(3*samplefac); + delta = samplepixels/ncycles; + alpha = initalpha; + radius = initradius; + + rad = radius >> radiusbiasshift; + if (rad <= 1) rad = 0; + for (i=0; i= lim) p -= lengthcount; + + i++; + if (i%delta == 0) { + alpha -= alpha / alphadec; + radius -= radius / radiusdec; + rad = radius >> radiusbiasshift; + if (rad <= 1) rad = 0; + for (j=0; jData, TempImage->SizeOfData, sample); + learn(); + unbiasnet(); + + NewImage = (ILimage*)icalloc(sizeof(ILimage), 1); + if (NewImage == NULL) { + ilCloseImage(TempImage); + return NULL; + } + NewImage->Data = (ILubyte*)ialloc(TempImage->SizeOfData / 3); + if (NewImage->Data == NULL) { + ilCloseImage(TempImage); + ifree(NewImage); + return NULL; + } + ilCopyImageAttr(NewImage, Image); + NewImage->Bpp = 1; + NewImage->Bps = Image->Width; + NewImage->SizeOfPlane = NewImage->Bps * Image->Height; + NewImage->SizeOfData = NewImage->SizeOfPlane; + NewImage->Format = IL_COLOUR_INDEX; + NewImage->Type = IL_UNSIGNED_BYTE; + + NewImage->Pal.PalSize = netsizethink * 3; + NewImage->Pal.PalType = IL_PAL_BGR24; + NewImage->Pal.Palette = (ILubyte*)ialloc(256*3); + if (NewImage->Pal.Palette == NULL) { + ilCloseImage(TempImage); + ilCloseImage(NewImage); + return NULL; + } + + for (i = 0, j = 0; i < (unsigned)netsizethink; i++, j += 3) { + NewImage->Pal.Palette[j ] = network[i][0]; + NewImage->Pal.Palette[j+1] = network[i][1]; + NewImage->Pal.Palette[j+2] = network[i][2]; + } + + inxbuild(); + for (i = 0, j = 0; j < TempImage->SizeOfData; i++, j += 3) { + NewImage->Data[i] = inxsearch( + TempImage->Data[j], TempImage->Data[j+1], TempImage->Data[j+2]); + } + + ilCloseImage(TempImage); + + return NewImage; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_nvidia.cpp b/libs/DevIL-1.7.8/src-IL/src/il_nvidia.cpp new file mode 100644 index 00000000..e9492546 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_nvidia.cpp @@ -0,0 +1,227 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/19/2009 +// +// Filename: src-IL/src/il_nvidia.cpp +// +// Description: Implements access to the nVidia Texture Tools library. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_dds.h" +#include "il_manip.h" +#include + + +#ifdef IL_USE_DXTC_NVIDIA +#include +#include + +using namespace nvtt; + +#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "nvcore.lib") + #pragma comment(lib, "nvtt.lib") + #else + #pragma comment(lib, "nvcore-d.lib") + #pragma comment(lib, "nvtt-d.lib") + #endif + #endif +#endif + + +struct ilOutputHandlerMem : public nvtt::OutputHandler +{ + ilOutputHandlerMem(ILuint Width, ILuint Height, ILenum DxtType) + { + Width = Width + (4 - (Width % 4)) % 4; // Operates on 4x4 blocks, + Height = Height + (4 - (Height % 4)) % 4; // so gives extra room. + + switch (DxtType) + { + case IL_DXT1: + case IL_DXT1A: + Size = Width * Height / 2; + break; + case IL_DXT3: + case IL_DXT5: + Size = Width * Height; + break; + + default: // NVTT does not accept DXT2 or DXT4. + // Should error somehow... + break; + } + NewData = (ILubyte*)ialloc(Size); + if (NewData == NULL) + return; + Temp = NewData; + } + + virtual void beginImage(int size, int width, int height, int depth, int face, int miplevel) + { + // ignore. + } + virtual bool writeData(const void *data, int size) + { + memcpy(Temp, data, size); + Temp += size; + return true; + } + + ILubyte *NewData, *Temp; + ILuint Size; +}; + + +//! Compresses data to a DXT format using nVidia's Texture Tools library. +// The data must be in unsigned byte RGBA format. The alpha channel will be ignored if DxtType is IL_DXT1. +// DxtSize is used to return the size in bytes of the DXTC data returned. +ILAPI ILubyte* ILAPIENTRY ilNVidiaCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) +{ + if (Data == NULL) { // We cannot operate on a null pointer. + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + // The nVidia Texture Tools library does not support volume textures yet. + if (Depth != 1) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + InputOptions inputOptions; + inputOptions.setTextureLayout(TextureType_2D, Width, Height); + inputOptions.setMipmapData(Data, Width, Height); + inputOptions.setMipmapGeneration(false, -1); //@TODO: Use this in certain cases. + + OutputOptions outputOptions; + ilOutputHandlerMem outputHandler(Width, Height, DxtFormat); + outputOptions.setOutputHeader(false); + outputOptions.setOutputHandler(&outputHandler); + + if (outputHandler.NewData == NULL) + return NULL; + + CompressionOptions compressionOptions; + switch (DxtFormat) + { + case IL_DXT1: + compressionOptions.setFormat(Format_DXT1); + break; + case IL_DXT1A: + compressionOptions.setFormat(Format_DXT1a); + break; + case IL_DXT3: + compressionOptions.setFormat(Format_DXT1); + break; + case IL_DXT5: + compressionOptions.setFormat(Format_DXT5); + break; + default: // Does not support DXT2 or DXT4. + ilSetError(IL_INVALID_PARAM); + break; + } + + Compressor compressor; + compressor.process(inputOptions, compressionOptions, outputOptions); + + *DxtSize = outputHandler.Size; + return outputHandler.NewData; +} + + + +// +// +// The following is just a repeat of above, but it works generically on file streams or lumps. +// @TODO: Merge these two together. +// +// + + +struct ilOutputHandlerFile : public nvtt::OutputHandler +{ + ilOutputHandlerFile(ILuint Width, ILuint Height, ILenum DxtType) + { + return; + } + + virtual void beginImage(int size, int width, int height, int depth, int face, int miplevel) + { + // ignore. + } + virtual bool writeData(const void *data, int size) + { + if (iwrite(data, 1, size) == size) + return true; + return false; + } + +}; + + +//! Compresses data to a DXT format using nVidia's Texture Tools library. +// This version is supposed to be completely internal to DevIL. +// The data must be in unsigned byte RGBA format. The alpha channel will be ignored if DxtType is IL_DXT1. +ILuint ilNVidiaCompressDXTFile(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat) +{ + ILuint FilePos = itellw(); + + // The nVidia Texture Tools library does not support volume textures yet. + if (Depth != 1) { + ilSetError(IL_INVALID_PARAM); + return 0; + } + + InputOptions inputOptions; + inputOptions.setTextureLayout(TextureType_2D, Width, Height); + inputOptions.setMipmapData(Data, Width, Height); + inputOptions.setMipmapGeneration(false, -1); //@TODO: Use this in certain cases. + + OutputOptions outputOptions; + ilOutputHandlerFile outputHandler(Width, Height, DxtFormat); + outputOptions.setOutputHeader(false); + outputOptions.setOutputHandler(&outputHandler); + + CompressionOptions compressionOptions; + switch (DxtFormat) + { + case IL_DXT1: + compressionOptions.setFormat(Format_DXT1); + break; + case IL_DXT1A: + compressionOptions.setFormat(Format_DXT1a); + break; + case IL_DXT3: + compressionOptions.setFormat(Format_DXT1); + break; + case IL_DXT5: + compressionOptions.setFormat(Format_DXT5); + break; + default: // Does not support DXT2 or DXT4. + ilSetError(IL_INVALID_PARAM); + break; + } + + Compressor compressor; + compressor.process(inputOptions, compressionOptions, outputOptions); + + return itellw() - FilePos; // Return the number of characters written. +} + +#else +// Let's have this so that the function is always created and exported, even if it does nothing. +ILAPI ILubyte* ILAPIENTRY ilNVidiaCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) +{ + //@TODO: Do we need to set an error message? + return NULL; +} + +#endif//IL_NO_DXTC_NVIDIA diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pal.c b/libs/DevIL-1.7.8/src-IL/src/il_pal.c new file mode 100644 index 00000000..c66d5a70 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pal.c @@ -0,0 +1,1111 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/14/2009 +// +// Filename: src-IL/src/il_pal.c +// +// Description: Loads palettes from different file formats +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_pal.h" +#include +#include +#include + + +//! Loads a palette from FileName into the current image's palette. +ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName) +{ + FILE *f; + ILboolean IsPsp; + char Head[8]; + + if (FileName == NULL) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (iCheckExtension(FileName, IL_TEXT("col"))) { + return ilLoadColPal(FileName); + } + if (iCheckExtension(FileName, IL_TEXT("act"))) { + return ilLoadActPal(FileName); + } + if (iCheckExtension(FileName, IL_TEXT("plt"))) { + return ilLoadPltPal(FileName); + } + +#ifndef _UNICODE + f = fopen(FileName, "rt"); +#else + f = _wfopen(FileName, L"rt"); +#endif//_UNICODE + if (f == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + fread(Head, 1, 8, f); + if (!strncmp(Head, "JASC-PAL", 8)) + IsPsp = IL_TRUE; + else + IsPsp = IL_FALSE; + + fclose(f); + + if (IsPsp) + return ilLoadJascPal(FileName); + return ilLoadHaloPal(FileName); +} + + +//! Loads a Paint Shop Pro formatted palette (.pal) file. +ILboolean ilLoadJascPal(ILconst_string FileName) +{ + FILE *PalFile; + ILuint NumColours, i, c; + ILubyte Buff[BUFFLEN]; + ILboolean Error = IL_FALSE; + ILpal *Pal = &iCurImage->Pal; + + if (!iCheckExtension(FileName, IL_TEXT("pal"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + +#ifndef _UNICODE + PalFile = fopen(FileName, "rt"); +#else + PalFile = _wfopen(FileName, L"rt"); +#endif//_UNICODE + if (PalFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize > 0 && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + } + + iFgetw(Buff, BUFFLEN, PalFile); + if (stricmp((const char*)Buff, "JASC-PAL")) { + Error = IL_TRUE; + } + iFgetw(Buff, BUFFLEN, PalFile); + if (stricmp((const char*)Buff, "0100")) { + Error = IL_TRUE; + } + + iFgetw(Buff, BUFFLEN, PalFile); + NumColours = atoi((const char*)Buff); + if (NumColours == 0 || Error) { + ilSetError(IL_INVALID_FILE_HEADER); + fclose(PalFile); + return IL_FALSE; + } + + Pal->PalSize = NumColours * PALBPP; + Pal->PalType = IL_PAL_RGB24; + Pal->Palette = (ILubyte*)ialloc(NumColours * PALBPP); + if (Pal->Palette == NULL) { + fclose(PalFile); + return IL_FALSE; + } + + for (i = 0; i < NumColours; i++) { + for (c = 0; c < PALBPP; c++) { + iFgetw(Buff, BUFFLEN, PalFile); + Pal->Palette[i * PALBPP + c] = atoi((const char*)Buff); + } + } + + fclose(PalFile); + + return IL_TRUE; +} + + +// File Get Word +// MaxLen must be greater than 1, because the trailing NULL is always stored. +char *iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File) +{ + ILint Temp; + ILint i; + + if (Buff == NULL || File == NULL || MaxLen < 2) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + for (i = 0; i < MaxLen - 1; i++) { + Temp = fgetc(File); + if (Temp == '\n' || Temp == '\0' || Temp == IL_EOF || feof(File)) { + break; + } + + if (Temp == ' ') { + while (Temp == ' ') { // Just to get rid of any extra spaces + Temp = fgetc(File); + } + fseek(File, -1, IL_SEEK_CUR); // Go back one + break; + } + + if (!isprint(Temp)) { // Skips any non-printing characters + while (!isprint(Temp)) { + Temp = fgetc(File); + } + fseek(File, -1, IL_SEEK_CUR); + break; + } + + Buff[i] = Temp; + } + + Buff[i] = '\0'; + return (char *)Buff; +} + + +ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName) +{ + ILstring Ext = iGetExtension(FileName); + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + +#ifndef _UNICODE + if (FileName == NULL || strlen(FileName) < 1 || Ext == NULL) { +#else + if (FileName == NULL || wcslen(FileName) < 1 || Ext == NULL) { +#endif//_UNICODE + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (!iCurImage->Pal.Palette || !iCurImage->Pal.PalSize || iCurImage->Pal.PalType == IL_PAL_NONE) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iStrCmp(Ext, IL_TEXT("pal"))) { + return ilSaveJascPal(FileName); + } + + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; +} + + +//! Saves a Paint Shop Pro formatted palette (.pal) file. +ILboolean ilSaveJascPal(ILconst_string FileName) +{ + FILE *PalFile; + ILuint i, PalBpp, NumCols = ilGetInteger(IL_PALETTE_NUM_COLS); + ILubyte *CurPal; + + if (iCurImage == NULL || NumCols == 0 || NumCols > 256) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + +#ifndef _UNICODE + if (FileName == NULL || strlen(FileName) < 5) { +#else + if (FileName == NULL || wcslen(FileName) < 5) { +#endif//_UNICODE + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + if (!iCheckExtension(FileName, IL_TEXT("pal"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + // Create a copy of the current palette and convert it to RGB24 format. + CurPal = iCurImage->Pal.Palette; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (!iCurImage->Pal.Palette) { + iCurImage->Pal.Palette = CurPal; + return IL_FALSE; + } + + memcpy(iCurImage->Pal.Palette, CurPal, iCurImage->Pal.PalSize); + if (!ilConvertPal(IL_PAL_RGB24)) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = CurPal; + return IL_FALSE; + } + +#ifndef _UNICODE + PalFile = fopen(FileName, "wt"); +#else + PalFile = _wfopen(FileName, L"wt"); +#endif//_UNICODE + if (!PalFile) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + // Header needed on all .pal files + fputs("JASC-PAL\n0100\n256\n", PalFile); + + PalBpp = ilGetBppPal(iCurImage->Pal.PalType); + for (i = 0; i < iCurImage->Pal.PalSize; i += PalBpp) { + fprintf(PalFile, "%d %d %d\n", + iCurImage->Pal.Palette[i], iCurImage->Pal.Palette[i+1], iCurImage->Pal.Palette[i+2]); + } + + NumCols = 256 - NumCols; + for (i = 0; i < NumCols; i++) { + fprintf(PalFile, "0 0 0\n"); + } + + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = CurPal; + + fclose(PalFile); + + return IL_TRUE; +} + + +//! Loads a Halo formatted palette (.pal) file. +ILboolean ilLoadHaloPal(ILconst_string FileName) +{ + ILHANDLE HaloFile; + HALOHEAD HaloHead; + ILushort *TempPal; + ILuint i, Size; + + if (!iCheckExtension(FileName, IL_TEXT("pal"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + HaloFile = iopenr(FileName); + if (HaloFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + if (iread(&HaloHead, sizeof(HALOHEAD), 1) != 1) + return IL_FALSE; + + if (HaloHead.Id != 'A' + ('H' << 8) || HaloHead.Version != 0xe3) { + icloser(HaloFile); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + Size = (HaloHead.MaxIndex + 1) * 3; + TempPal = (ILushort*)ialloc(Size * sizeof(ILushort)); + if (TempPal == NULL) { + icloser(HaloFile); + return IL_FALSE; + } + + if (iread(TempPal, sizeof(ILushort), Size) != Size) { + icloser(HaloFile); + ifree(TempPal); + return IL_FALSE; + } + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize > 0 && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + } + iCurImage->Pal.PalType = IL_PAL_RGB24; + iCurImage->Pal.PalSize = Size; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) { + icloser(HaloFile); + return IL_FALSE; + } + + for (i = 0; i < iCurImage->Pal.PalSize; i++, TempPal++) { + iCurImage->Pal.Palette[i] = (ILubyte)*TempPal; + } + TempPal -= iCurImage->Pal.PalSize; + ifree(TempPal); + + icloser(HaloFile); + + return IL_TRUE; +} + + +// Hasn't been tested +// @TODO: Test the thing! + +//! Loads a .col palette file +ILboolean ilLoadColPal(ILconst_string FileName) +{ + ILuint RealFileSize, FileSize; + ILushort Version; + ILHANDLE ColFile; + + if (!iCheckExtension(FileName, IL_TEXT("col"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ColFile = iopenr(FileName); + if (ColFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize > 0 && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + } + + iseek(0, IL_SEEK_END); + RealFileSize = ftell((FILE*)ColFile); + iseek(0, IL_SEEK_SET); + + if (RealFileSize > 768) { // has a header + fread(&FileSize, 4, 1, (FILE*)ColFile); + if ((FileSize - 8) % 3 != 0) { // check to make sure an even multiple of 3! + icloser(ColFile); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + if (iread(&Version, 2, 1) != 1) { + icloser(ColFile); + return IL_FALSE; + } + if (Version != 0xB123) { + icloser(ColFile); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + if (iread(&Version, 2, 1) != 1) { + icloser(ColFile); + return IL_FALSE; + } + if (Version != 0) { + icloser(ColFile); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + } + + iCurImage->Pal.Palette = (ILubyte*)ialloc(768); + if (iCurImage->Pal.Palette == NULL) { + icloser(ColFile); + return IL_FALSE; + } + + if (iread(iCurImage->Pal.Palette, 1, 768) != 768) { + icloser(ColFile); + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + return IL_FALSE; + } + + iCurImage->Pal.PalSize = 768; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + icloser(ColFile); + + return IL_TRUE; +} + + +//! Loads an .act palette file. +ILboolean ilLoadActPal(ILconst_string FileName) +{ + ILHANDLE ActFile; + + if (!iCheckExtension(FileName, IL_TEXT("act"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ActFile = iopenr(FileName); + if (ActFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize > 0 && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + } + + iCurImage->Pal.PalType = IL_PAL_RGB24; + iCurImage->Pal.PalSize = 768; + iCurImage->Pal.Palette = (ILubyte*)ialloc(768); + if (!iCurImage->Pal.Palette) { + icloser(ActFile); + return IL_FALSE; + } + + if (iread(iCurImage->Pal.Palette, 1, 768) != 768) { + icloser(ActFile); + return IL_FALSE; + } + + icloser(ActFile); + + return IL_TRUE; +} + + +//! Loads an .plt palette file. +ILboolean ilLoadPltPal(ILconst_string FileName) +{ + ILHANDLE PltFile; + + if (!iCheckExtension(FileName, IL_TEXT("plt"))) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + } + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + PltFile = iopenr(FileName); + if (PltFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize > 0 && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + } + + iCurImage->Pal.PalSize = GetLittleUInt(); + if (iCurImage->Pal.PalSize == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + iCurImage->Pal.PalType = IL_PAL_RGB24; + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (!iCurImage->Pal.Palette) { + icloser(PltFile); + return IL_FALSE; + } + + if (iread(iCurImage->Pal.Palette, iCurImage->Pal.PalSize, 1) != 1) { + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = NULL; + icloser(PltFile); + return IL_FALSE; + } + + icloser(PltFile); + + return IL_TRUE; +} + + +// Assumes that Dest has nothing in it. +ILboolean iCopyPalette(ILpal *Dest, ILpal *Src) +{ + if (Src->Palette == NULL || Src->PalSize == 0) + return IL_FALSE; + + Dest->Palette = (ILubyte*)ialloc(Src->PalSize); + if (Dest->Palette == NULL) + return IL_FALSE; + + memcpy(Dest->Palette, Src->Palette, Src->PalSize); + + Dest->PalSize = Src->PalSize; + Dest->PalType = Src->PalType; + + return IL_TRUE; +} + + +ILAPI ILpal* ILAPIENTRY iCopyPal() +{ + ILpal *Pal; + + if (iCurImage == NULL || iCurImage->Pal.Palette == NULL || + iCurImage->Pal.PalSize == 0 || iCurImage->Pal.PalType == IL_PAL_NONE) { + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + Pal = (ILpal*)ialloc(sizeof(ILpal)); + if (Pal == NULL) { + return NULL; + } + if (!iCopyPalette(Pal, &iCurImage->Pal)) { + ifree(Pal); + return NULL; + } + + return Pal; +} + + +// Converts the palette to the DestFormat format. +ILAPI ILpal* ILAPIENTRY iConvertPal(ILpal *Pal, ILenum DestFormat) +{ + ILpal *NewPal = NULL; + ILuint i, j, NewPalSize; + + // Checks to see if the current image is valid and has a palette + if (Pal == NULL || Pal->PalSize == 0 || Pal->Palette == NULL || Pal->PalType == IL_PAL_NONE) { + ilSetError(IL_ILLEGAL_OPERATION); + return NULL; + } + + /*if (Pal->PalType == DestFormat) { + return NULL; + }*/ + + NewPal = (ILpal*)ialloc(sizeof(ILpal)); + if (NewPal == NULL) { + return NULL; + } + NewPal->PalSize = Pal->PalSize; + NewPal->PalType = Pal->PalType; + + switch (DestFormat) + { + case IL_PAL_RGB24: + case IL_PAL_BGR24: + switch (Pal->PalType) + { + case IL_PAL_RGB24: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_BGR24) { + j = ilGetBppPal(Pal->PalType); + for (i = 0; i < Pal->PalSize; i += j) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + } + } + else { + memcpy(NewPal->Palette, Pal->Palette, Pal->PalSize); + } + NewPal->PalType = DestFormat; + break; + + case IL_PAL_BGR24: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_RGB24) { + j = ilGetBppPal(Pal->PalType); + for (i = 0; i < Pal->PalSize; i += j) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + } + } + else { + memcpy(NewPal->Palette, Pal->Palette, Pal->PalSize); + } + NewPal->PalType = DestFormat; + break; + + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + NewPalSize = (ILuint)((ILfloat)Pal->PalSize * 3.0f / 4.0f); + NewPal->Palette = (ILubyte*)ialloc(NewPalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_RGB24) { + for (i = 0, j = 0; i < Pal->PalSize; i += 4, j += 3) { + NewPal->Palette[j] = Pal->Palette[i+2]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i]; + } + } + else { + for (i = 0, j = 0; i < Pal->PalSize; i += 4, j += 3) { + NewPal->Palette[j] = Pal->Palette[i]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i+2]; + } + } + NewPal->PalSize = NewPalSize; + NewPal->PalType = DestFormat; + break; + + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + NewPalSize = (ILuint)((ILfloat)Pal->PalSize * 3.0f / 4.0f); + NewPal->Palette = (ILubyte*)ialloc(NewPalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_RGB24) { + for (i = 0, j = 0; i < Pal->PalSize; i += 4, j += 3) { + NewPal->Palette[j] = Pal->Palette[i]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i+2]; + } + } + else { + for (i = 0, j = 0; i < Pal->PalSize; i += 4, j += 3) { + NewPal->Palette[j] = Pal->Palette[i+2]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i]; + } + } + NewPal->PalSize = NewPalSize; + NewPal->PalType = DestFormat; + break; + + default: + ilSetError(IL_INVALID_PARAM); + return NULL; + } + break; + + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + switch (Pal->PalType) + { + case IL_PAL_RGB24: + case IL_PAL_BGR24: + NewPalSize = Pal->PalSize * 4 / 3; + NewPal->Palette = (ILubyte*)ialloc(NewPalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if ((Pal->PalType == IL_PAL_BGR24 && (DestFormat == IL_PAL_RGB32 || DestFormat == IL_PAL_RGBA32)) || + (Pal->PalType == IL_PAL_RGB24 && (DestFormat == IL_PAL_BGR32 || DestFormat == IL_PAL_BGRA32))) { + for (i = 0, j = 0; i < Pal->PalSize; i += 3, j += 4) { + NewPal->Palette[j] = Pal->Palette[i+2]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i]; + NewPal->Palette[j+3] = 255; + } + } + else { + for (i = 0, j = 0; i < Pal->PalSize; i += 3, j += 4) { + NewPal->Palette[j] = Pal->Palette[i]; + NewPal->Palette[j+1] = Pal->Palette[i+1]; + NewPal->Palette[j+2] = Pal->Palette[i+2]; + NewPal->Palette[j+3] = 255; + } + } + NewPal->PalSize = NewPalSize; + NewPal->PalType = DestFormat; + break; + + case IL_PAL_RGB32: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + + if (DestFormat == IL_PAL_BGR32 || DestFormat == IL_PAL_BGRA32) { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + NewPal->Palette[i+3] = 255; + } + } + else { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i+2]; + NewPal->Palette[i+3] = 255; + } + } + NewPal->PalType = DestFormat; + break; + + case IL_PAL_RGBA32: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_BGR32 || DestFormat == IL_PAL_BGRA32) { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + NewPal->Palette[i+3] = Pal->Palette[i+3]; + } + } + else { + memcpy(NewPal->Palette, Pal->Palette, Pal->PalSize); + } + NewPal->PalType = DestFormat; + break; + + case IL_PAL_BGR32: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_RGB32 || DestFormat == IL_PAL_RGBA32) { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + NewPal->Palette[i+3] = 255; + } + } + else { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i+2]; + NewPal->Palette[i+3] = 255; + } + } + NewPal->PalType = DestFormat; + break; + + case IL_PAL_BGRA32: + NewPal->Palette = (ILubyte*)ialloc(Pal->PalSize); + if (NewPal->Palette == NULL) + goto alloc_error; + if (DestFormat == IL_PAL_RGB32 || DestFormat == IL_PAL_RGBA32) { + for (i = 0; i < Pal->PalSize; i += 4) { + NewPal->Palette[i] = Pal->Palette[i+2]; + NewPal->Palette[i+1] = Pal->Palette[i+1]; + NewPal->Palette[i+2] = Pal->Palette[i]; + NewPal->Palette[i+3] = Pal->Palette[i+3]; + } + } + else { + memcpy(NewPal->Palette, Pal->Palette, Pal->PalSize); + } + NewPal->PalType = DestFormat; + break; + + default: + ilSetError(IL_INVALID_PARAM); + return NULL; + } + break; + + + default: + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + NewPal->PalType = DestFormat; + + return NewPal; + +alloc_error: + ifree(NewPal); + return NULL; +} + + +//! Converts the current image to the DestFormat format. +ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat) +{ + ILpal *Pal; + + if (iCurImage == NULL || iCurImage->Pal.Palette == NULL || + iCurImage->Pal.PalSize == 0 || iCurImage->Pal.PalType == IL_PAL_NONE) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Pal = iConvertPal(&iCurImage->Pal, DestFormat); + if (Pal == NULL) + return IL_FALSE; + + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.PalSize = Pal->PalSize; + iCurImage->Pal.PalType = Pal->PalType; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(Pal->PalSize); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + memcpy(iCurImage->Pal.Palette, Pal->Palette, Pal->PalSize); + + ifree(Pal->Palette); + ifree(Pal); + + return IL_TRUE; +} + + +// Sets the current palette. +ILAPI void ILAPIENTRY ilSetPal(ILpal *Pal) +{ + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize && iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + } + + if (Pal->Palette && Pal->PalSize && Pal->PalType != IL_PAL_NONE) { + iCurImage->Pal.Palette = (ILubyte*)ialloc(Pal->PalSize); + if (iCurImage->Pal.Palette == NULL) + return; + memcpy(iCurImage->Pal.Palette, Pal->Palette, Pal->PalSize); + iCurImage->Pal.PalSize = Pal->PalSize; + iCurImage->Pal.PalType = Pal->PalType; + } + else { + iCurImage->Pal.Palette = NULL; + iCurImage->Pal.PalSize = 0; + iCurImage->Pal.PalType = IL_PAL_NONE; + } + + return; +} + + +ILuint CurSort = 0; +typedef struct COL_CUBE +{ + ILubyte Min[3]; + ILubyte Val[3]; + ILubyte Max[3]; +} COL_CUBE; + +int sort_func(void *e1, void *e2) +{ + return ((COL_CUBE*)e1)->Val[CurSort] - ((COL_CUBE*)e2)->Val[CurSort]; +} + + +ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName) +{ + ILimage Image, *CurImage = iCurImage; + ILubyte *NewData; + ILuint *PalInfo, NumColours, NumPix, MaxDist, DistEntry=0, i, j; + ILint Dist1, Dist2, Dist3; + ILboolean Same; + ILenum Origin; +// COL_CUBE *Cubes; + + if( iCurImage == NULL || (iCurImage->Format != IL_BYTE || iCurImage->Format != IL_UNSIGNED_BYTE) ) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + NewData = (ILubyte*)ialloc(iCurImage->Width * iCurImage->Height * iCurImage->Depth); + if (NewData == NULL) { + return IL_FALSE; + } + + iCurImage = &Image; + imemclear(&Image, sizeof(ILimage)); + // IL_PAL_RGB24, because we don't want to make parts transparent that shouldn't be. + if (!ilLoadPal(FileName) || !ilConvertPal(IL_PAL_RGB24)) { + ifree(NewData); + iCurImage = CurImage; + return IL_FALSE; + } + + NumColours = Image.Pal.PalSize / 3; // RGB24 is 3 bytes per entry. + PalInfo = (ILuint*)ialloc(NumColours * sizeof(ILuint)); + if (PalInfo == NULL) { + ifree(NewData); + iCurImage = CurImage; + return IL_FALSE; + } + + NumPix = CurImage->SizeOfData / ilGetBppFormat(CurImage->Format); + switch (CurImage->Format) + { + case IL_COLOUR_INDEX: + iCurImage = CurImage; + if (!ilConvertPal(IL_PAL_RGB24)) { + ifree(NewData); + ifree(PalInfo); + return IL_FALSE; + } + + NumPix = iCurImage->Pal.PalSize / ilGetBppPal(iCurImage->Pal.PalType); + for (i = 0; i < NumPix; i++) { + for (j = 0; j < Image.Pal.PalSize; j += 3) { + // No need to perform a sqrt. + Dist1 = (ILint)iCurImage->Pal.Palette[i] - (ILint)Image.Pal.Palette[j]; + Dist2 = (ILint)iCurImage->Pal.Palette[i+1] - (ILint)Image.Pal.Palette[j+1]; + Dist3 = (ILint)iCurImage->Pal.Palette[i+2] - (ILint)Image.Pal.Palette[j+2]; + PalInfo[j / 3] = Dist1 * Dist1 + Dist2 * Dist2 + Dist3 * Dist3; + } + MaxDist = UINT_MAX; + DistEntry = 0; + for (j = 0; j < NumColours; j++) { + if (PalInfo[j] < MaxDist) { + DistEntry = j; + MaxDist = PalInfo[j]; + } + } + iCurImage->Pal.Palette[i] = DistEntry; + } + + for (i = 0; i < iCurImage->SizeOfData; i++) { + NewData[i] = iCurImage->Pal.Palette[iCurImage->Data[i]]; + } + break; + case IL_RGB: + case IL_RGBA: + /*Cube = (COL_CUBE*)ialloc(NumColours * sizeof(COL_CUBE)); + // @TODO: Check if ialloc failed here! + for (i = 0; i < NumColours; i++) + memcpy(&Cubes[i].Val, Image.Pal.Palette[i * 3], 3); + for (j = 0; j < 3; j++) { + qsort(Cubes, NumColours, sizeof(COL_CUBE), sort_func); + Cubes[0].Min = 0; + Cubes[NumColours-1] = UCHAR_MAX; + NumColours--; + for (i = 1; i < NumColours; i++) { + Cubes[i].Min[CurSort] = Cubes[i-1].Val[CurSort] + 1; + Cubes[i-1].Max[CurSort] = Cubes[i].Val[CurSort] - 1; + } + CurSort++; + NumColours++; + }*/ + for (i = 0; i < CurImage->SizeOfData; i += CurImage->Bpp) { + Same = IL_TRUE; + if (i != 0) { + for (j = 0; j < CurImage->Bpp; j++) { + if (CurImage->Data[i-CurImage->Bpp+j] != CurImage->Data[i+j]) { + Same = IL_FALSE; + break; + } + } + } + if (Same) { + NewData[i / CurImage->Bpp] = DistEntry; + continue; + } + for (j = 0; j < Image.Pal.PalSize; j += 3) { + // No need to perform a sqrt. + Dist1 = (ILint)CurImage->Data[i] - (ILint)Image.Pal.Palette[j]; + Dist2 = (ILint)CurImage->Data[i+1] - (ILint)Image.Pal.Palette[j+1]; + Dist3 = (ILint)CurImage->Data[i+2] - (ILint)Image.Pal.Palette[j+2]; + PalInfo[j / 3] = Dist1 * Dist1 + Dist2 * Dist2 + Dist3 * Dist3; + } + MaxDist = UINT_MAX; + DistEntry = 0; + for (j = 0; j < NumColours; j++) { + if (PalInfo[j] < MaxDist) { + DistEntry = j; + MaxDist = PalInfo[j]; + } + } + NewData[i / CurImage->Bpp] = DistEntry; + } + + break; + + case IL_BGR: + case IL_BGRA: + for (i = 0; i < CurImage->SizeOfData; i += CurImage->Bpp) { + for (j = 0; j < NumColours; j++) { + // No need to perform a sqrt. + PalInfo[j] = ((ILint)CurImage->Data[i+2] - (ILint)Image.Pal.Palette[j * 3]) * + ((ILint)CurImage->Data[i+2] - (ILint)Image.Pal.Palette[j * 3]) + + ((ILint)CurImage->Data[i+1] - (ILint)Image.Pal.Palette[j * 3 + 1]) * + ((ILint)CurImage->Data[i+1] - (ILint)Image.Pal.Palette[j * 3 + 1]) + + ((ILint)CurImage->Data[i] - (ILint)Image.Pal.Palette[j * 3 + 2]) * + ((ILint)CurImage->Data[i] - (ILint)Image.Pal.Palette[j * 3 + 2]); + } + MaxDist = UINT_MAX; + DistEntry = 0; + for (j = 0; j < NumColours; j++) { + if (PalInfo[j] < MaxDist) { + DistEntry = j; + MaxDist = PalInfo[j]; + } + } + NewData[i / CurImage->Bpp] = DistEntry; + } + + break; + + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + for (i = 0; i < CurImage->SizeOfData; i += CurImage->Bpp ) { + for (j = 0; j < NumColours; j++) { + // No need to perform a sqrt. + PalInfo[j] = ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3]) * + ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3]) + + ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3 + 1]) * + ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3 + 1]) + + ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3 + 2]) * + ((ILuint)CurImage->Data[i] - (ILuint)Image.Pal.Palette[j * 3 + 2]); + } + MaxDist = UINT_MAX; + DistEntry = 0; + for (j = 0; j < NumColours; j++) { + if (PalInfo[j] < MaxDist) { + DistEntry = j; + MaxDist = PalInfo[j]; + } + } + NewData[i] = DistEntry; + } + + break; + + default: // Should be no other! + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + iCurImage = CurImage; + Origin = iCurImage->Origin; + if (!ilTexImage(iCurImage->Width, iCurImage->Height, iCurImage->Depth, 1, + IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NewData)) { + ifree(Image.Pal.Palette); + ifree(PalInfo); + ifree(NewData); + return IL_FALSE; + } + iCurImage->Origin = Origin; + + iCurImage->Pal.Palette = Image.Pal.Palette; + iCurImage->Pal.PalSize = Image.Pal.PalSize; + iCurImage->Pal.PalType = Image.Pal.PalType; + ifree(PalInfo); + ifree(NewData); + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pcd.c b/libs/DevIL-1.7.8/src-IL/src/il_pcd.c new file mode 100644 index 00000000..35890426 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pcd.c @@ -0,0 +1,207 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_pcd.c +// +// Description: Reads from a Kodak PhotoCD (.pcd) file. +// Note: The code here is sloppy - I had to convert it from Pascal, +// which I've never even attempted to read before...enjoy! =) +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_PCD +#include "il_manip.h" + + +ILboolean iLoadPcdInternal(void); + +//! Reads a .pcd file +ILboolean ilLoadPcd(ILconst_string FileName) +{ + ILHANDLE PcdFile; + ILboolean bPcd = IL_FALSE; + + PcdFile = iopenr(FileName); + if (PcdFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPcd; + } + + bPcd = ilLoadPcdF(PcdFile); + icloser(PcdFile); + + return bPcd; +} + + +//! Reads an already-opened .pcd file +ILboolean ilLoadPcdF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPcdInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .pcd file +ILboolean ilLoadPcdL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPcdInternal(); +} + + +void YCbCr2RGB(ILubyte Y, ILubyte Cb, ILubyte Cr, ILubyte *r, ILubyte *g, ILubyte *b) +{ + static const ILdouble c11 = 0.0054980*256; + static const ILdouble c12 = 0.0000000*256; + static const ILdouble c13 = 0.0051681*256; + static const ILdouble c21 = 0.0054980*256; + static const ILdouble c22 =-0.0015446*256; + static const ILdouble c23 =-0.0026325*256; + static const ILdouble c31 = 0.0054980*256; + static const ILdouble c32 = 0.0079533*256; + static const ILdouble c33 = 0.0000000*256; + ILint r1, g1, b1; + + r1 = (ILint)(c11*Y + c12*(Cb-156) + c13*(Cr-137)); + g1 = (ILint)(c21*Y + c22*(Cb-156) + c23*(Cr-137)); + b1 = (ILint)(c31*Y + c32*(Cb-156) + c33*(Cr-137)); + + if (r1 < 0) + *r = 0; + else if (r1 > 255) + *r = 255; + else + *r = r1; + + if (g1 < 0) + *g = 0; + else if (g1 > 255) + *g = 255; + else + *g = g1; + + if (b1 < 0) + *b = 0; + else if (b1 > 255) + *b = 255; + else + *b = b1; + + return; +} + + +ILboolean iLoadPcdInternal() +{ + ILubyte VertOrientation; + ILuint Width, Height, i, Total, x, CurPos = 0; + ILubyte *Y1=NULL, *Y2=NULL, *CbCr=NULL, r = 0, g = 0, b = 0; + ILuint PicNum; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iseek(72, IL_SEEK_CUR); + if (iread(&VertOrientation, 1, 1) != 1) + return IL_FALSE; + + iseek(-72, IL_SEEK_CUR); // Can't rewind + + PicNum = iGetInt(IL_PCD_PICNUM); + + switch (PicNum) + { + case 0: + iseek(0x02000, IL_SEEK_CUR); + Width = 192; + Height = 128; + break; + case 1: + iseek(0x0b800, IL_SEEK_CUR); + Width = 384; + Height = 256; + break; + case 2: + iseek(0x30000, IL_SEEK_CUR); + Width = 768; + Height = 512; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + if (itell() == IL_EOF) // Supposed to have data here. + return IL_FALSE; + + Y1 = (ILubyte*)ialloc(Width); + Y2 = (ILubyte*)ialloc(Width); + CbCr = (ILubyte*)ialloc(Width); + if (Y1 == NULL || Y2 == NULL || CbCr == NULL) { + ifree(Y1); + ifree(Y2); + ifree(CbCr); + return IL_FALSE; + } + + if (!ilTexImage(Width, Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + Total = Height >> 1; + for (i = 0; i < Total; i++) { + iread(Y1, 1, Width); + iread(Y2, 1, Width); + if (iread(CbCr, 1, Width) != Width) { // Only really need to check the last one. + ifree(Y1); + ifree(Y2); + ifree(CbCr); + return IL_FALSE; + } + + for (x = 0; x < Width; x++) { + YCbCr2RGB(Y1[x], CbCr[x / 2], CbCr[(Width / 2) + (x / 2)], &r, &g, &b); + iCurImage->Data[CurPos++] = r; + iCurImage->Data[CurPos++] = g; + iCurImage->Data[CurPos++] = b; + } + + for (x = 0; x < Width; x++) { + YCbCr2RGB(Y2[x], CbCr[x / 2], CbCr[(Width / 2) + (x / 2)], &r, &g, &b); + iCurImage->Data[CurPos++] = r; + iCurImage->Data[CurPos++] = g; + iCurImage->Data[CurPos++] = b; + } + } + + ifree(Y1); + ifree(Y2); + ifree(CbCr); + + // Not sure how it is...the documentation is hard to understand + if ((VertOrientation & 0x3F) != 8) + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + else + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return ilFixImage(); +} + + +#endif//IL_NO_PCD diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pcx.c b/libs/DevIL-1.7.8/src-IL/src/il_pcx.c new file mode 100644 index 00000000..6ab6ace7 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pcx.c @@ -0,0 +1,740 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_pcx.c +// +// Description: Reads and writes from/to a .pcx file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_PCX +#include "il_pcx.h" +#include "il_manip.h" + + +//! Checks if the file specified in FileName is a valid .pcx file. +ILboolean ilIsValidPcx(ILconst_string FileName) +{ + ILHANDLE PcxFile; + ILboolean bPcx = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("pcx"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPcx; + } + + PcxFile = iopenr(FileName); + if (PcxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPcx; + } + + bPcx = ilIsValidPcxF(PcxFile); + icloser(PcxFile); + + return bPcx; +} + + +//! Checks if the ILHANDLE contains a valid .pcx file at the current position. +ILboolean ilIsValidPcxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPcx(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .pcx lump. +ILboolean ilIsValidPcxL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPcx(); +} + + +// Internal function obtain the .pcx header from the current file. +ILboolean iGetPcxHead(PCXHEAD *Head) +{ + Head->Manufacturer = igetc(); + Head->Version = igetc(); + Head->Encoding = igetc(); + Head->Bpp = igetc(); + Head->Xmin = GetLittleUShort(); + Head->Ymin = GetLittleUShort(); + Head->Xmax = GetLittleUShort(); + Head->Ymax = GetLittleUShort(); + Head->HDpi = GetLittleUShort(); + Head->VDpi = GetLittleUShort(); + iread(Head->ColMap, 1, 48); + Head->Reserved = igetc(); + Head->NumPlanes = igetc(); + Head->Bps = GetLittleUShort(); + Head->PaletteInfo = GetLittleUShort(); + Head->HScreenSize = GetLittleUShort(); + Head->VScreenSize = GetLittleUShort(); + iread(Head->Filler, 1, 54); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPcx() +{ + PCXHEAD Head; + + if (!iGetPcxHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(PCXHEAD), IL_SEEK_CUR); + + return iCheckPcx(&Head); +} + + +// Internal function used to check if the HEADER is a valid .pcx header. +// Should we also do a check on Header->Bpp? +ILboolean iCheckPcx(PCXHEAD *Header) +{ + ILuint Test; + + // Got rid of the Reserved check, because I've seen some .pcx files with invalid values in it. + if (Header->Manufacturer != 10 || Header->Encoding != 1/* || Header->Reserved != 0*/) + return IL_FALSE; + + // Try to support all pcx versions, as they only differ in allowed formats... + // Let's hope it works. + if(Header->Version != 5 && Header->Version != 0 && Header->Version != 2 && + Header->VDpi != 3 && Header->VDpi != 4) + return IL_FALSE; + + // See if the padding size is correct + Test = Header->Xmax - Header->Xmin + 1; + if (Header->Bpp >= 8) { + if (Test & 1) { + if (Header->Bps != Test + 1) + return IL_FALSE; + } + else { + if (Header->Bps != Test) // No padding + return IL_FALSE; + } + } + + /* for (i = 0; i < 54; i++) { useless check + if (Header->Filler[i] != 0) + return IL_FALSE; + } */ + + return IL_TRUE; +} + + +//! Reads a .pcx file +ILboolean ilLoadPcx(ILconst_string FileName) +{ + ILHANDLE PcxFile; + ILboolean bPcx = IL_FALSE; + + PcxFile = iopenr(FileName); + if (PcxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPcx; + } + + bPcx = ilLoadPcxF(PcxFile); + icloser(PcxFile); + + return bPcx; +} + + +//! Reads an already-opened .pcx file +ILboolean ilLoadPcxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPcxInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .pcx +ILboolean ilLoadPcxL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPcxInternal(); +} + + +// Internal function used to load the .pcx. +ILboolean iLoadPcxInternal() +{ + PCXHEAD Header; + ILboolean bPcx = IL_FALSE; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return bPcx; + } + + if (!iGetPcxHead(&Header)) + return IL_FALSE; + if (!iCheckPcx(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + bPcx = iUncompressPcx(&Header); + + if (!bPcx) + return IL_FALSE; + return ilFixImage(); +} + + +// Internal function to uncompress the .pcx (all .pcx files are rle compressed) +ILboolean iUncompressPcx(PCXHEAD *Header) +{ + //changed decompression loop 2003-09-01 + //From the pcx spec: "There should always + //be a decoding break at the end of each scan line. + //But there will not be a decoding break at the end of + //each plane within each scan line." + //This is now handled correctly (hopefully ;) ) + + ILubyte ByteHead, Colour, *ScanLine /* For all planes */; + ILuint ScanLineSize; + ILuint c, i, x, y; + + if (Header->Bpp < 8) { + /*ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE;*/ + return iUncompressSmall(Header); + } + + if (!ilTexImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, Header->NumPlanes, 0, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + switch (iCurImage->Bpp) + { + case 1: + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalType = IL_PAL_RGB24; + iCurImage->Pal.PalSize = 256 * 3; // Need to find out for sure... + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + break; + //case 2: // No 16-bit images in the pcx format! + case 3: + iCurImage->Format = IL_RGB; + iCurImage->Pal.Palette = NULL; + iCurImage->Pal.PalSize = 0; + iCurImage->Pal.PalType = IL_PAL_NONE; + break; + case 4: + iCurImage->Format = IL_RGBA; + iCurImage->Pal.Palette = NULL; + iCurImage->Pal.PalSize = 0; + iCurImage->Pal.PalType = IL_PAL_NONE; + break; + + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + ScanLineSize = iCurImage->Bpp*Header->Bps; + ScanLine = (ILubyte*)ialloc(ScanLineSize); + if (ScanLine == NULL) { + return IL_FALSE; + } + + + //changed 2003-09-01 + //having the decoding code twice is error-prone, + //so I made iUnCache() smart enough to grasp + //if iPreCache() wasn't called and call it + //anyways. + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->SizeOfData / 4); + + for (y = 0; y < iCurImage->Height; y++) { + x = 0; + //read scanline + while (x < ScanLineSize) { + if (iread(&ByteHead, 1, 1) != 1) { + iUnCache(); + goto file_read_error; + } + if ((ByteHead & 0xC0) == 0xC0) { + ByteHead &= 0x3F; + if (iread(&Colour, 1, 1) != 1) { + iUnCache(); + goto file_read_error; + } + if (x + ByteHead > ScanLineSize) { + iUnCache(); + goto file_read_error; + } + for (i = 0; i < ByteHead; i++) { + ScanLine[x++] = Colour; + } + } + else { + ScanLine[x++] = ByteHead; + } + } + + //convert plane-separated scanline into index, rgb or rgba pixels. + //there might be a padding byte at the end of each scanline... + for (x = 0; x < iCurImage->Width; x++) { + for(c = 0; c < iCurImage->Bpp; c++) { + iCurImage->Data[y * iCurImage->Bps + x * iCurImage->Bpp + c] = + ScanLine[x + c * Header->Bps]; + } + } + } + + iUnCache(); + + // Read in the palette + if (Header->Version == 5 && iCurImage->Bpp == 1) { + x = itell(); + if (iread(&ByteHead, 1, 1) == 0) { // If true, assume that we have a luminance image. + ilGetError(); // Get rid of the IL_FILE_READ_ERROR. + iCurImage->Format = IL_LUMINANCE; + if (iCurImage->Pal.Palette) + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.PalSize = 0; + iCurImage->Pal.PalType = IL_PAL_NONE; + } + else { + if (ByteHead != 12) // Some Quake2 .pcx files don't have this byte for some reason. + iseek(-1, IL_SEEK_CUR); + if (iread(iCurImage->Pal.Palette, 1, iCurImage->Pal.PalSize) != iCurImage->Pal.PalSize) + goto file_read_error; + } + } + + ifree(ScanLine); + + return IL_TRUE; + +file_read_error: + ifree(ScanLine); + + //added 2003-09-01 + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; +} + + +ILboolean iUncompressSmall(PCXHEAD *Header) +{ + ILuint i = 0, j, k, c, d, x, y, Bps; + ILubyte HeadByte, Colour, Data = 0, *ScanLine; + + if (!ilTexImage(Header->Xmax - Header->Xmin + 1, Header->Ymax - Header->Ymin + 1, 1, 1, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + switch (Header->NumPlanes) + { + case 1: + iCurImage->Format = IL_LUMINANCE; + break; + case 4: + iCurImage->Format = IL_COLOUR_INDEX; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + if (Header->NumPlanes == 1 && Header->Bpp == 1) { + for (j = 0; j < iCurImage->Height; j++) { + i = 0; //number of written pixels + while (i < iCurImage->Width) { + if (iread(&HeadByte, 1, 1) != 1) + return IL_FALSE; + if (HeadByte >= 192) { + HeadByte -= 192; + if (iread(&Data, 1, 1) != 1) + return IL_FALSE; + + for (c = 0; c < HeadByte; c++) { + k = 128; + for (d = 0; d < 8 && i < iCurImage->Width; d++) { + iCurImage->Data[j * iCurImage->Width + i++] = ((Data & k) != 0 ? 255 : 0); + k >>= 1; + } + } + } + else { + k = 128; + for (c = 0; c < 8 && i < iCurImage->Width; c++) { + iCurImage->Data[j * iCurImage->Width + i++] = ((HeadByte & k) != 0 ? 255 : 0); + k >>= 1; + } + } + } + + //if(Data != 0) + //changed 2003-09-01: + //There has to be an even number of bytes per line in a pcx. + //One byte can hold up to 8 bits, so Width/8 bytes + //are needed to hold a 1 bit per pixel image line. + //If Width/8 is even no padding is needed, + //one pad byte has to be read otherwise. + //(let's hope the above is true ;-)) + if(!((iCurImage->Width >> 3) & 0x1)) + igetc(); // Skip pad byte + } + } + else if (Header->NumPlanes == 4 && Header->Bpp == 1){ // 4-bit images + //changed decoding 2003-09-10 (was buggy)...could need a speedup + + Bps = Header->Bps * Header->NumPlanes * 8; + iCurImage->Pal.Palette = (ILubyte*)ialloc(16 * 3); // Size of palette always (48 bytes). + ScanLine = (ILubyte*)ialloc(Bps); + if (iCurImage->Pal.Palette == NULL || ScanLine == NULL) { + ifree(ScanLine); + ifree(iCurImage->Pal.Palette); + return IL_FALSE; + } + memcpy(iCurImage->Pal.Palette, Header->ColMap, 16 * 3); + iCurImage->Pal.PalSize = 16 * 3; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + memset(iCurImage->Data, 0, iCurImage->SizeOfData); + + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->SizeOfData / 4); + for (y = 0; y < iCurImage->Height; y++) { + x = 0; + while (x < Bps) { + if (iread(&HeadByte, 1, 1) != 1) { + iUnCache(); + ifree(ScanLine); + return IL_FALSE; + } + if ((HeadByte & 0xC0) == 0xC0) { + HeadByte &= 0x3F; + if (iread(&Colour, 1, 1) != 1) { + iUnCache(); + ifree(ScanLine); + return IL_FALSE; + } + for (i = 0; i < HeadByte; i++) { + k = 128; + for (j = 0; j < 8 && x < Bps; j++) { + ScanLine[x++] = (Colour & k)?1:0; + k >>= 1; + } + } + } + else { + k = 128; + for (j = 0; j < 8 && x < Bps; j++) { + ScanLine[x++] = (HeadByte & k)?1:0; + k >>= 1; + } + } + } + + for (x = 0; x < iCurImage->Width; x++) { // 'Cleverly' ignores the pad bytes. ;) + for(c = 0; c < Header->NumPlanes; c++) + iCurImage->Data[y * iCurImage->Width + x] |= ScanLine[x + c*Header->Bps*8] << c; + } + } + iUnCache(); + ifree(ScanLine); + } + else { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + return IL_TRUE; +} + + +//! Writes a .pcx file +ILboolean ilSavePcx(const ILstring FileName) +{ + ILHANDLE PcxFile; + ILuint PcxSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + PcxFile = iopenw(FileName); + if (PcxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + PcxSize = ilSavePcxF(PcxFile); + iclosew(PcxFile); + + if (PcxSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a .pcx to an already-opened file +ILuint ilSavePcxF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSavePcxInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a .pcx to a memory "lump" +ILuint ilSavePcxL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSavePcxInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the .pcx. +ILboolean iSavePcxInternal() +{ + ILuint i, c, PalSize; + ILpal *TempPal; + ILimage *TempImage = iCurImage; + ILubyte *TempData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + switch (iCurImage->Format) + { + case IL_LUMINANCE: + TempImage = iConvertImage(iCurImage, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + break; + + case IL_BGR: + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + break; + + case IL_BGRA: + TempImage = iConvertImage(iCurImage, IL_RGBA, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + break; + + default: + if (iCurImage->Bpc > 1) { + TempImage = iConvertImage(iCurImage, iCurImage->Format, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } + } + + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + if (TempImage != iCurImage) { + ilCloseImage(TempImage); + } + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + + iputc(0xA); // Manufacturer - always 10 + iputc(0x5); // Version Number - always 5 + iputc(0x1); // Encoding - always 1 + iputc(0x8); // Bits per channel + SaveLittleUShort(0); // X Minimum + SaveLittleUShort(0); // Y Minimum + SaveLittleUShort((ILushort)(iCurImage->Width - 1)); + SaveLittleUShort((ILushort)(iCurImage->Height - 1)); + SaveLittleUShort(0); + SaveLittleUShort(0); + + // Useless palette info? + for (i = 0; i < 48; i++) { + iputc(0); + } + iputc(0x0); // Reserved - always 0 + + iputc(iCurImage->Bpp); // Number of planes - only 1 is supported right now + + SaveLittleUShort((ILushort)(iCurImage->Width & 1 ? iCurImage->Width + 1 : iCurImage->Width)); // Bps + SaveLittleUShort(0x1); // Palette type - ignored? + + // Mainly filler info + for (i = 0; i < 58; i++) { + iputc(0x0); + } + + // Output data + for (i = 0; i < TempImage->Height; i++) { + for (c = 0; c < TempImage->Bpp; c++) { + encLine(TempData + TempImage->Bps * i + c, TempImage->Width, (ILubyte)(TempImage->Bpp - 1)); + } + } + + // Automatically assuming we have a palette...dangerous! + // Also assuming 3 bpp palette + iputc(0xC); // Pad byte must have this value + + // If the current image has a palette, take care of it + if (TempImage->Format == IL_COLOUR_INDEX) { + // If the palette in .pcx format, write it directly + if (TempImage->Pal.PalType == IL_PAL_RGB24) { + iwrite(TempImage->Pal.Palette, 1, TempImage->Pal.PalSize); + } + else { + TempPal = iConvertPal(&TempImage->Pal, IL_PAL_RGB24); + if (TempPal == NULL) { + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + + iwrite(TempPal->Palette, 1, TempPal->PalSize); + ifree(TempPal->Palette); + ifree(TempPal); + } + } + + // If the palette is not all 256 colours, we have to pad it. + PalSize = 768 - iCurImage->Pal.PalSize; + for (i = 0; i < PalSize; i++) { + iputc(0x0); + } + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +// Routine used from ZSoft's pcx documentation +ILuint encput(ILubyte byt, ILubyte cnt) +{ + if (cnt) { + if ((cnt == 1) && (0xC0 != (0xC0 & byt))) { + if (IL_EOF == iputc(byt)) + return(0); /* disk write error (probably full) */ + return(1); + } + else { + if (IL_EOF == iputc((ILubyte)((ILuint)0xC0 | cnt))) + return (0); /* disk write error */ + if (IL_EOF == iputc(byt)) + return (0); /* disk write error */ + return (2); + } + } + + return (0); +} + +// This subroutine encodes one scanline and writes it to a file. +// It returns number of bytes written into outBuff, 0 if failed. +ILuint encLine(ILubyte *inBuff, ILint inLen, ILubyte Stride) +{ + ILubyte _this, last; + ILint srcIndex, i; + ILint total; + ILubyte runCount; // max single runlength is 63 + total = 0; + runCount = 1; + last = *(inBuff); + + // Find the pixel dimensions of the image by calculating + //[XSIZE = Xmax - Xmin + 1] and [YSIZE = Ymax - Ymin + 1]. + //Then calculate how many bytes are in a "run" + + for (srcIndex = 1; srcIndex < inLen; srcIndex++) { + inBuff += Stride; + _this = *(++inBuff); + if (_this == last) { // There is a "run" in the data, encode it + runCount++; + if (runCount == 63) { + if (! (i = encput(last, runCount))) + return (0); + total += i; + runCount = 0; + } + } + else { // No "run" - _this != last + if (runCount) { + if (! (i = encput(last, runCount))) + return(0); + total += i; + } + last = _this; + runCount = 1; + } + } // endloop + + if (runCount) { // finish up + if (! (i = encput(last, runCount))) + return (0); + if (inLen % 2) + iputc(0); + return (total + i); + } + else { + if (inLen % 2) + iputc(0); + } + + return (total); +} + +#endif//IL_NO_PCX diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pic.c b/libs/DevIL-1.7.8/src-IL/src/il_pic.c new file mode 100644 index 00000000..cc8f3958 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pic.c @@ -0,0 +1,426 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_pic.c +// +// Description: Softimage Pic (.pic) functions +// Lots of this code is taken from Paul Bourke's Softimage Pic code at +// http://local.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_PIC +#include "il_pic.h" +#include "il_manip.h" +#include + + +//! Checks if the file specified in FileName is a valid .pic file. +ILboolean ilIsValidPic(ILconst_string FileName) +{ + ILHANDLE PicFile; + ILboolean bPic = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("pic"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPic; + } + + PicFile = iopenr(FileName); + if (PicFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPic; + } + + bPic = ilIsValidPicF(PicFile); + icloser(PicFile); + + return bPic; +} + + +//! Checks if the ILHANDLE contains a valid .pic file at the current position. +ILboolean ilIsValidPicF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPic(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .pic lump. +ILboolean ilIsValidPicL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPic(); +} + + +// Internal function used to get the .pic header from the current file. +ILboolean iGetPicHead(PIC_HEAD *Header) +{ + Header->Magic = GetBigInt(); + Header->Version = GetBigFloat(); + iread(Header->Comment, 1, 80); + iread(Header->Id, 1, 4); + Header->Width = GetBigShort(); + Header->Height = GetBigShort(); + Header->Ratio = GetBigFloat(); + Header->Fields = GetBigShort(); + Header->Padding = GetBigShort(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPic() +{ + PIC_HEAD Head; + + if (!iGetPicHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(PIC_HEAD), IL_SEEK_CUR); // Go ahead and restore to previous state + + return iCheckPic(&Head); +} + + +// Internal function used to check if the header is a valid .pic header. +ILboolean iCheckPic(PIC_HEAD *Header) +{ + if (Header->Magic != 0x5380F634) + return IL_FALSE; + if (strncmp((const char*)Header->Id, "PICT", 4)) + return IL_FALSE; + if (Header->Width == 0) + return IL_FALSE; + if (Header->Height == 0) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a .pic file +ILboolean ilLoadPic(ILconst_string FileName) +{ + ILHANDLE PicFile; + ILboolean bPic = IL_FALSE; + + PicFile = iopenr(FileName); + if (PicFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPic; + } + + bPic = ilLoadPicF(PicFile); + icloser(PicFile); + + return bPic; +} + + +//! Reads an already-opened .pic file +ILboolean ilLoadPicF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPicInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .pic +ILboolean ilLoadPicL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPicInternal(); +} + + +// Internal function used to load the .pic +ILboolean iLoadPicInternal() +{ + ILuint Alpha = IL_FALSE; + ILubyte Chained; + CHANNEL *Channel = NULL, *Channels = NULL, *Prev; + PIC_HEAD Header; + ILboolean Read; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetPicHead(&Header)) + return IL_FALSE; + if (!iCheckPic(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Read channels + do { + if (Channel == NULL) { + Channel = Channels = (CHANNEL*)ialloc(sizeof(CHANNEL)); + if (Channels == NULL) + return IL_FALSE; + } + else { + Channels->Next = (CHANNEL*)ialloc(sizeof(CHANNEL)); + if (Channels->Next == NULL) { + // Clean up the list before erroring out. + while (Channel) { + Prev = Channel; + Channel = (CHANNEL*)Channel->Next; + ifree(Prev); + } + return IL_FALSE; + } + Channels = (CHANNEL*)Channels->Next; + } + Channels->Next = NULL; + + Chained = igetc(); + Channels->Size = igetc(); + Channels->Type = igetc(); + Channels->Chan = igetc(); + if (ieof()) { + Read = IL_FALSE; + goto finish; + } + + // See if we have an alpha channel in there + if (Channels->Chan & PIC_ALPHA_CHANNEL) + Alpha = IL_TRUE; + + } while (Chained); + + if (Alpha) { // Has an alpha channel + if (!ilTexImage(Header.Width, Header.Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) { + Read = IL_FALSE; + goto finish; // Have to destroy Channels first. + } + } + else { // No alpha channel + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) { + Read = IL_FALSE; + goto finish; // Have to destroy Channels first. + } + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + Read = readScanlines((ILuint*)iCurImage->Data, Header.Width, Header.Height, Channel, Alpha); + +finish: + // Destroy channels + while (Channel) { + Prev = Channel; + Channel = (CHANNEL*)Channel->Next; + ifree(Prev); + } + + if (Read == IL_FALSE) + return IL_FALSE; + + return ilFixImage(); +} + + +ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha) +{ + ILint i; + ILuint *scan; + + (void)alpha; + + for (i = height - 1; i >= 0; i--) { + scan = image + i * width; + + if (!readScanline((ILubyte *)scan, width, channel, alpha ? 4 : 3)) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + } + + return IL_TRUE; +} + + +ILuint readScanline(ILubyte *scan, ILint width, CHANNEL *channel, ILint bytes) +{ + ILint noCol; + ILint off[4]; + ILuint status=0; + + while (channel) { + noCol = 0; + if(channel->Chan & PIC_RED_CHANNEL) { + off[noCol] = 0; + noCol++; + } + if(channel->Chan & PIC_GREEN_CHANNEL) { + off[noCol] = 1; + noCol++; + } + if(channel->Chan & PIC_BLUE_CHANNEL) { + off[noCol] = 2; + noCol++; + } + if(channel->Chan & PIC_ALPHA_CHANNEL) { + off[noCol] = 3; + noCol++; + //@TODO: Find out if this is possible. + if (bytes == 3) // Alpha channel in a 24-bit image. Do not know what to do with this. + return 0; + } + + switch(channel->Type & 0x0F) + { + case PIC_UNCOMPRESSED: + status = channelReadRaw(scan, width, noCol, off, bytes); + break; + case PIC_PURE_RUN_LENGTH: + status = channelReadPure(scan, width, noCol, off, bytes); + break; + case PIC_MIXED_RUN_LENGTH: + status = channelReadMixed(scan, width, noCol, off, bytes); + break; + } + if (!status) + break; + + channel = (CHANNEL*)channel->Next; + } + return status; +} + + +ILboolean channelReadRaw(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes) +{ + ILint i, j; + + for (i = 0; i < width; i++) { + if (ieof()) + return IL_FALSE; + for (j = 0; j < noCol; j++) + if (iread(&scan[off[j]], 1, 1) != 1) + return IL_FALSE; + scan += bytes; + } + return IL_TRUE; +} + + +ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes) +{ + ILubyte col[4]; + ILint count; + int i, j, k; + + for (i = width; i > 0; ) { + count = igetc(); + if (count == IL_EOF) + return IL_FALSE; + if (count > width) + count = width; + i -= count; + + if (ieof()) + return IL_FALSE; + + for (j = 0; j < noCol; j++) + if (iread(&col[j], 1, 1) != 1) + return IL_FALSE; + + for (k = 0; k < count; k++, scan += bytes) { + for(j = 0; j < noCol; j++) + scan[off[j] + k] = col[j]; + } + } + return IL_TRUE; +} + + +ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes) +{ + ILint count; + int i, j, k; + ILubyte col[4]; + + for(i = 0; i < width; i += count) { + if (ieof()) + return IL_FALSE; + + count = igetc(); + if (count == IL_EOF) + return IL_FALSE; + + if (count >= 128) { // Repeated sequence + if (count == 128) { // Long run + count = GetBigUShort(); + if (ieof()) { + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + } + else + count -= 127; + + // We've run past... + if ((i + count) > width) { + //fprintf(stderr, "ERROR: FF_PIC_load(): Overrun scanline (Repeat) [%d + %d > %d] (NC=%d)\n", i, count, width, noCol); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + for (j = 0; j < noCol; j++) + if (iread(&col[j], 1, 1) != 1) { + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + + for (k = 0; k < count; k++, scan += bytes) { + for (j = 0; j < noCol; j++) + scan[off[j]] = col[j]; + } + } else { // Raw sequence + count++; + if ((i + count) > width) { + //fprintf(stderr, "ERROR: FF_PIC_load(): Overrun scanline (Raw) [%d + %d > %d] (NC=%d)\n", i, count, width, noCol); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + for (k = count; k > 0; k--, scan += bytes) { + for (j = 0; j < noCol; j++) + if (iread(&scan[off[j]], 1, 1) != 1) { + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + } + } + } + + return IL_TRUE; +} + + +#endif//IL_NO_PIC + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pix.c b/libs/DevIL-1.7.8/src-IL/src/il_pix.c new file mode 100644 index 00000000..1a30505f --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pix.c @@ -0,0 +1,159 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_pix.c +// +// Description: Reads from an Alias | Wavefront .pix file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_PIX +#include "il_manip.h" +#include "il_endian.h" + + +#ifdef _MSC_VER +#pragma pack(push, pix_struct, 1) +#endif +typedef struct PIXHEAD +{ + ILushort Width; + ILushort Height; + ILushort OffX; + ILushort OffY; + ILushort Bpp; +} IL_PACKSTRUCT PIXHEAD; +#ifdef _MSC_VER +#pragma pack(pop, pix_struct) +#endif + +ILboolean iCheckPix(PIXHEAD *Header); +ILboolean iLoadPixInternal(void); + + +// Internal function used to get the Pix header from the current file. +ILboolean iGetPixHead(PIXHEAD *Header) +{ + Header->Width = GetBigUShort(); + Header->Height = GetBigUShort(); + Header->OffX = GetBigUShort(); + Header->OffY = GetBigUShort(); + Header->Bpp = GetBigUShort(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPix() +{ + PIXHEAD Head; + + if (!iGetPixHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(PIXHEAD), IL_SEEK_CUR); + + return iCheckPix(&Head); +} + + +// Internal function used to check if the HEADER is a valid Pix header. +ILboolean iCheckPix(PIXHEAD *Header) +{ + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + if (Header->Bpp != 24) + return IL_FALSE; + //if (Header->OffY != Header->Height) + // return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a Pix file +ILboolean ilLoadPix(ILconst_string FileName) +{ + ILHANDLE PixFile; + ILboolean bPix = IL_FALSE; + + PixFile = iopenr(FileName); + if (PixFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPix; + } + + bPix = ilLoadPixF(PixFile); + icloser(PixFile); + + return bPix; +} + + +//! Reads an already-opened Pix file +ILboolean ilLoadPixF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPixInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Pix +ILboolean ilLoadPixL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPixInternal(); +} + + +// Internal function used to load the Pix. +ILboolean iLoadPixInternal() +{ + PIXHEAD Header; + ILuint i, j; + ILubyte ByteHead, Colour[3]; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetPixHead(&Header)) + return IL_FALSE; + if (!iCheckPix(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + for (i = 0; i < iCurImage->SizeOfData; ) { + ByteHead = igetc(); + if (iread(Colour, 1, 3) != 3) + return IL_FALSE; + for (j = 0; j < ByteHead; j++) { + iCurImage->Data[i++] = Colour[0]; + iCurImage->Data[i++] = Colour[1]; + iCurImage->Data[i++] = Colour[2]; + } + } + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return ilFixImage(); +} + +#endif//IL_NO_PIX diff --git a/libs/DevIL-1.7.8/src-IL/src/il_png.c b/libs/DevIL-1.7.8/src-IL/src/il_png.c new file mode 100644 index 00000000..d5b627e3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_png.c @@ -0,0 +1,729 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_png.c +// +// Description: Portable network graphics file (.png) functions +// +// 20040223 XIX : now may spit out pngs with a transparent index, this is mostly a hack +// but the proper way of doing it would be to change the pal stuff to think in argb rather than rgb +// which is something of a bigger job. +// +//----------------------------------------------------------------------------- + +// Most of the comments are left in this file from libpng's excellent example.c + +#include "il_internal.h" +#ifndef IL_NO_PNG +#include +#include "il_manip.h" +#include +#if PNG_LIBPNG_VER < 10200 + #warning DevIL was designed with libpng 1.2.0 or higher in mind. Consider upgrading at www.libpng.org. +#endif + +#if (defined(_WIN32) || defined(_WIN64)) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "libpng.lib") + #pragma comment(lib, "zlib.lib") + #else + #pragma comment(lib, "libpng-d.lib") + #pragma comment(lib, "zlib-d.lib") + #endif + #endif +#endif + + +ILboolean iIsValidPng(void); +ILboolean iLoadPngInternal(void); +ILboolean iSavePngInternal(void); + +ILint readpng_init(void); +ILboolean readpng_get_image(ILdouble display_exponent); +void readpng_cleanup(void); + +png_structp png_ptr = NULL; +png_infop info_ptr = NULL; +ILint png_color_type; + +#define GAMMA_CORRECTION 1.0 // Doesn't seem to be doing anything... + + +ILboolean ilIsValidPng(ILconst_string FileName) +{ + ILHANDLE PngFile; + ILboolean bPng = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("png"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPng; + } + + PngFile = iopenr(FileName); + if (PngFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPng; + } + + bPng = ilIsValidPngF(PngFile); + icloser(PngFile); + + return bPng; +} + + +ILboolean ilIsValidPngF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPng(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +ILboolean ilIsValidPngL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPng(); +} + + +ILboolean iIsValidPng() +{ + ILubyte Signature[8]; + ILint Read; + + Read = iread(Signature, 1, 8); + iseek(-Read, IL_SEEK_CUR); + + return png_check_sig(Signature, 8); +} + + +// Reads a file +ILboolean ilLoadPng(ILconst_string FileName) +{ + ILHANDLE PngFile; + ILboolean bPng = IL_FALSE; + + PngFile = iopenr(FileName); + if (PngFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPng; + } + + bPng = ilLoadPngF(PngFile); + icloser(PngFile); + + return bPng; +} + + +// Reads an already-opened file +ILboolean ilLoadPngF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPngInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +// Reads from a memory "lump" +ILboolean ilLoadPngL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPngInternal(); +} + + +ILboolean iLoadPngInternal() +{ + png_ptr = NULL; + info_ptr = NULL; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + if (!iIsValidPng()) { + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + if (readpng_init()) + return IL_FALSE; + if (!readpng_get_image(GAMMA_CORRECTION)) + return IL_FALSE; + + readpng_cleanup(); + + return ilFixImage(); +} + + +static void png_read(png_structp png_ptr, png_bytep data, png_size_t length) +{ + (void)png_ptr; + iread(data, 1, (ILuint)length); + return; +} + + +static void png_error_func(png_structp png_ptr, png_const_charp message) +{ + ilSetError(IL_LIB_PNG_ERROR); + + /* + changed 20040224 + From the libpng docs: + "Errors handled through png_error() are fatal, meaning that png_error() + should never return to its caller. Currently, this is handled via + setjmp() and longjmp()" + */ + //return; + longjmp(png_jmpbuf(png_ptr), 1); +} + +static void png_warn_func(png_structp png_ptr, png_const_charp message) +{ + return; +} + + +ILint readpng_init() +{ + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, png_error_func, png_warn_func); + if (!png_ptr) + return 4; /* out of memory */ + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 4; /* out of memory */ + } + + + /* we could create a second info struct here (end_info), but it's only + * useful if we want to keep pre- and post-IDAT chunk info separated + * (mainly for PNG-aware image editors and converters) */ + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 2; + } + + + png_set_read_fn(png_ptr, NULL, png_read); + png_set_error_fn(png_ptr, NULL, png_error_func, png_warn_func); + +// png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ + + png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ + + + /* alternatively, could make separate calls to png_get_image_width(), + * etc., but want bit_depth and png_color_type for later [don't care about + * compression_type and filter_type => NULLs] */ + + /* OK, that's all we need for now; return happy */ + + return 0; +} + + +/* display_exponent == LUT_exponent * CRT_exponent */ + +ILboolean readpng_get_image(ILdouble display_exponent) +{ + png_bytepp row_pointers = NULL; + png_uint_32 width, height; // Changed the type to fix AMD64 bit problems, thanks to Eric Werness + ILdouble screen_gamma = 1.0; + ILuint i, channels; + ILenum format; + png_colorp palette; + ILint num_palette, j, bit_depth; +#if _WIN32 || DJGPP + ILdouble image_gamma; +#endif + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return IL_FALSE; + } + + png_get_IHDR(png_ptr, info_ptr, (png_uint_32*)&width, (png_uint_32*)&height, + &bit_depth, &png_color_type, NULL, NULL, NULL); + + // Expand low-bit-depth grayscale images to 8 bits + if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { + png_set_gray_1_2_4_to_8(png_ptr); + } + + // Expand RGB images with transparency to full alpha channels + // so the data will be available as RGBA quartets. + // But don't expand paletted images, since we want alpha palettes! + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) && !(png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE))) + png_set_tRNS_to_alpha(png_ptr); + + //refresh information (added 20040224) + png_get_IHDR(png_ptr, info_ptr, (png_uint_32*)&width, (png_uint_32*)&height, + &bit_depth, &png_color_type, NULL, NULL, NULL); + + if (bit_depth < 8) { // Expanded earlier for grayscale, now take care of palette and rgb + bit_depth = 8; + png_set_packing(png_ptr); + } + + // Perform gamma correction. + // @TODO: Determine if we should call png_set_gamma if image_gamma is 1.0. +#if _WIN32 || DJGPP + screen_gamma = 2.2; + if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) + png_set_gamma(png_ptr, screen_gamma, image_gamma); +#else + screen_gamma = screen_gamma; +#endif + + //fix endianess +#ifdef __LITTLE_ENDIAN__ + if (bit_depth == 16) + png_set_swap(png_ptr); +#endif + + + png_read_update_info(png_ptr, info_ptr); + channels = (ILint)png_get_channels(png_ptr, info_ptr); + //added 20040224: update png_color_type so that it has the correct value + //in iLoadPngInternal (globals rule...) + png_color_type = png_get_color_type(png_ptr, info_ptr); + + //determine internal format + switch(png_color_type) + { + case PNG_COLOR_TYPE_PALETTE: + format = IL_COLOUR_INDEX; + break; + case PNG_COLOR_TYPE_GRAY: + format = IL_LUMINANCE; + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: + format = IL_LUMINANCE_ALPHA; + break; + case PNG_COLOR_TYPE_RGB: + format = IL_RGB; + break; + case PNG_COLOR_TYPE_RGB_ALPHA: + format = IL_RGBA; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return IL_FALSE; + } + + if (!ilTexImage(width, height, 1, (ILubyte)channels, format, ilGetTypeBpc((ILubyte)(bit_depth >> 3)), NULL)) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + //copy palette + if (format == IL_COLOUR_INDEX) { + int chans; + png_bytep trans = NULL; + int num_trans = -1; + if (!png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return IL_FALSE; + } + + chans = 3; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { + png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL); + iCurImage->Pal.PalType = IL_PAL_RGBA32; + chans = 4; + } + + iCurImage->Pal.PalSize = num_palette * chans; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + + for (j = 0; j < num_palette; ++j) { + iCurImage->Pal.Palette[chans*j + 0] = palette[j].red; + iCurImage->Pal.Palette[chans*j + 1] = palette[j].green; + iCurImage->Pal.Palette[chans*j + 2] = palette[j].blue; + if (trans!=NULL) { + if (jPal.Palette[chans*j + 3] = trans[j]; + else + iCurImage->Pal.Palette[chans*j + 3] = 255; + } + } + } + + //allocate row pointers + if ((row_pointers = (png_bytepp)ialloc(height * sizeof(png_bytep))) == NULL) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return IL_FALSE; + } + + + // Set the individual row_pointers to point at the correct offsets */ + for (i = 0; i < height; i++) + row_pointers[i] = iCurImage->Data + i * iCurImage->Bps; + + + // Now we can go ahead and just read the whole image + png_read_image(png_ptr, row_pointers); + + + /* and we're done! (png_read_end() can be omitted if no processing of + * post-IDAT text/time/etc. is desired) */ + //png_read_end(png_ptr, NULL); + ifree(row_pointers); + + return IL_TRUE; +} + + +void readpng_cleanup() +{ + if (png_ptr && info_ptr) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_ptr = NULL; + info_ptr = NULL; + } +} + + +//! Writes a Png file +ILboolean ilSavePng(const ILstring FileName) +{ + ILHANDLE PngFile; + ILuint PngSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + PngFile = iopenw(FileName); + if (PngFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + PngSize = ilSavePngF(PngFile); + iclosew(PngFile); + + if (PngSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Png to an already-opened file +ILuint ilSavePngF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSavePngInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Png to a memory "lump" +ILuint ilSavePngL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSavePngInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +void png_write(png_structp png_ptr, png_bytep data, png_size_t length) +{ + (void)png_ptr; + iwrite(data, 1, (ILuint)length); + return; +} + +void flush_data(png_structp png_ptr) +{ + return; +} + + +// Internal function used to save the Png. +ILboolean iSavePngInternal() +{ + png_structp png_ptr; + png_infop info_ptr; + png_text text[4]; + ILenum PngType; + ILuint BitDepth, i, j; + ILubyte **RowPtr = NULL; + ILimage *Temp = NULL; + ILpal *TempPal = NULL; + +//XIX alpha + ILubyte transpart[1]; + ILint trans; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also check that + * the library version is compatible with the one used at compile time, + * in case we are using dynamically linked libraries. REQUIRED. + */ + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, png_error_func, png_warn_func); + if (png_ptr == NULL) { + ilSetError(IL_LIB_PNG_ERROR); + return IL_FALSE; + } + + // Allocate/initialize the image information data. REQUIRED + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) { + ilSetError(IL_LIB_PNG_ERROR); + goto error_label; + } + + /*// Set error handling. REQUIRED if you aren't supplying your own + // error handling functions in the png_create_write_struct() call. + if (setjmp(png_jmpbuf(png_ptr))) { + // If we get here, we had a problem reading the file + png_destroy_write_struct(&png_ptr, &info_ptr); + ilSetError(IL_LIB_PNG_ERROR); + return IL_FALSE; + }*/ + +// png_init_io(png_ptr, PngFile); + png_set_write_fn(png_ptr, NULL, png_write, flush_data); + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + Temp = iCurImage; + BitDepth = 8; + break; + case IL_SHORT: + case IL_UNSIGNED_SHORT: + Temp = iCurImage; + BitDepth = 16; + break; + case IL_INT: + case IL_UNSIGNED_INT: + Temp = iConvertImage(iCurImage, iCurImage->Format, IL_UNSIGNED_SHORT); + if (Temp == NULL) { + png_destroy_write_struct(&png_ptr, &info_ptr); + return IL_FALSE; + } + BitDepth = 16; + break; + default: + ilSetError(IL_INTERNAL_ERROR); + goto error_label; + } + + switch (iCurImage->Format) + { + case IL_COLOUR_INDEX: + PngType = PNG_COLOR_TYPE_PALETTE; + break; + case IL_LUMINANCE: + PngType = PNG_COLOR_TYPE_GRAY; + break; + case IL_LUMINANCE_ALPHA: //added 20050328 + PngType = PNG_COLOR_TYPE_GRAY_ALPHA; + break; + case IL_RGB: + case IL_BGR: + PngType = PNG_COLOR_TYPE_RGB; + break; + case IL_RGBA: + case IL_BGRA: + PngType = PNG_COLOR_TYPE_RGB_ALPHA; + break; + default: + ilSetError(IL_INTERNAL_ERROR); + goto error_label; + } + + // Set the image information here. Width and height are up to 2^31, + // bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on + // the png_color_type selected. png_color_type is one of PNG_COLOR_TYPE_GRAY, + // PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, + // or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or + // PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST + // currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED + if (iGetInt(IL_PNG_INTERLACE) == IL_TRUE) { + png_set_IHDR(png_ptr, info_ptr, iCurImage->Width, iCurImage->Height, BitDepth, PngType, + PNG_INTERLACE_ADAM7, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + } + else { + png_set_IHDR(png_ptr, info_ptr, iCurImage->Width, iCurImage->Height, BitDepth, PngType, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + } + + if (iCurImage->Format == IL_COLOUR_INDEX) { + // set the palette if there is one. REQUIRED for indexed-color images. + TempPal = iConvertPal(&iCurImage->Pal, IL_PAL_RGB24); + png_set_PLTE(png_ptr, info_ptr, (png_colorp)TempPal->Palette, + ilGetInteger(IL_PALETTE_NUM_COLS)); + +//XIX alpha + trans=iGetInt(IL_PNG_ALPHA_INDEX); + if ( trans>=0) + { + transpart[0]=(ILubyte)trans; + png_set_tRNS(png_ptr, info_ptr, transpart, 1, 0); + } + } + + /* + // optional significant bit chunk + // if we are dealing with a grayscale image then + sig_bit.gray = true_bit_depth; + // otherwise, if we are dealing with a color image then + sig_bit.red = true_red_bit_depth; + sig_bit.green = true_green_bit_depth; + sig_bit.blue = true_blue_bit_depth; + // if the image has an alpha channel then + sig_bit.alpha = true_alpha_bit_depth; + png_set_sBIT(png_ptr, info_ptr, sig_bit);*/ + + + /* Optional gamma chunk is strongly suggested if you have any guess + * as to the correct gamma of the image. + */ + //png_set_gAMA(png_ptr, info_ptr, gamma); + + // Optionally write comments into the image. + imemclear(text, sizeof(png_text) * 4); + text[0].key = "Generated by"; + text[0].text = "Generated by the Developer's Image Library (DevIL)"; + text[0].compression = PNG_TEXT_COMPRESSION_NONE; + text[1].key = "Author"; + text[1].text = (char*)iGetString(IL_PNG_AUTHNAME_STRING); // Will not actually be modified! + text[1].compression = PNG_TEXT_COMPRESSION_NONE; + text[2].key = "Description"; + text[2].text = iGetString(IL_PNG_DESCRIPTION_STRING); + text[2].compression = PNG_TEXT_COMPRESSION_NONE; + text[3].key = "Title"; + text[3].text = iGetString(IL_PNG_TITLE_STRING); + text[3].compression = PNG_TEXT_COMPRESSION_NONE; + png_set_text(png_ptr, info_ptr, text, 3); + + // Write the file header information. REQUIRED. + png_write_info(png_ptr, info_ptr); + + // Free up our user-defined text. + if (text[1].text) + ifree(text[1].text); + if (text[2].text) + ifree(text[2].text); + if (text[3].text) + ifree(text[3].text); + + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + //png_set_shift(png_ptr, &sig_bit); + + /* pack pixels into bytes */ + //png_set_packing(png_ptr); + + // swap location of alpha bytes from ARGB to RGBA + //png_set_swap_alpha(png_ptr); + + // flip BGR pixels to RGB + if (iCurImage->Format == IL_BGR || iCurImage->Format == IL_BGRA) + png_set_bgr(png_ptr); + + // swap bytes of 16-bit files to most significant byte first + #ifdef __LITTLE_ENDIAN__ + png_set_swap(png_ptr); + #endif//__LITTLE_ENDIAN__ + + RowPtr = (ILubyte**)ialloc(iCurImage->Height * sizeof(ILubyte*)); + if (RowPtr == NULL) + goto error_label; + if (iCurImage->Origin == IL_ORIGIN_UPPER_LEFT) { + for (i = 0; i < iCurImage->Height; i++) { + RowPtr[i] = Temp->Data + i * Temp->Bps; + } + } + else { + j = iCurImage->Height - 1; + for (i = 0; i < iCurImage->Height; i++, j--) { + RowPtr[i] = Temp->Data + j * Temp->Bps; + } + } + + // Writes the image. + png_write_image(png_ptr, RowPtr); + + // It is REQUIRED to call this to finish writing the rest of the file + png_write_end(png_ptr, info_ptr); + + // clean up after the write, and ifree any memory allocated + png_destroy_write_struct(&png_ptr, &info_ptr); + + ifree(RowPtr); + + if (Temp != iCurImage) + ilCloseImage(Temp); + ilClosePal(TempPal); + + return IL_TRUE; + +error_label: + png_destroy_write_struct(&png_ptr, &info_ptr); + ifree(RowPtr); + if (Temp != iCurImage) + ilCloseImage(Temp); + ilClosePal(TempPal); + return IL_FALSE; +} + + +#endif//IL_NO_PNG diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pnm.c b/libs/DevIL-1.7.8/src-IL/src/il_pnm.c new file mode 100644 index 00000000..4c60f263 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pnm.c @@ -0,0 +1,698 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_pnm.c +// +// Description: Reads/writes to/from pbm/pgm/ppm formats (enough slashes? =) +// +//----------------------------------------------------------------------------- + + + +#include "il_internal.h" +#ifndef IL_NO_PNM +#include "il_pnm.h" +#include // for maximum values +#include +#include "il_manip.h" +#include "il_bits.h" + +// According to the ppm specs, it's 70, but PSP +// likes to output longer lines. +#define MAX_BUFFER 180 +static ILbyte LineBuffer[MAX_BUFFER]; +static ILbyte SmallBuff[MAX_BUFFER]; + +// Can't read direct bits from a lump yet +ILboolean IsLump = IL_FALSE; + + +//! Checks if the file specified in FileName is a valid .pnm file. +ILboolean ilIsValidPnm(ILconst_string FileName) +{ + ILHANDLE PnmFile; + ILboolean bPnm = IL_FALSE; + + if ( !iCheckExtension(FileName, IL_TEXT("pbm")) + && !iCheckExtension(FileName, IL_TEXT("pgm")) + && !iCheckExtension(FileName, IL_TEXT("ppm")) + && !iCheckExtension(FileName, IL_TEXT("pnm"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPnm; + } + + PnmFile = iopenr(FileName); + if (PnmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPnm; + } + + bPnm = ilIsValidPnmF(PnmFile); + icloser(PnmFile); + + return bPnm; +} + + +//! Checks if the ILHANDLE contains a valid .pnm file at the current position. +ILboolean ilIsValidPnmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPnm(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid .pnm lump. +ILboolean ilIsValidPnmL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPnm(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPnm() +{ + char Head[2]; + ILint Read; + + Read = iread(Head, 1, 2); + iseek(-Read, IL_SEEK_CUR); // Go ahead and restore to previous state + if (Read != 2) + return IL_FALSE; + + return iCheckPnm(Head); +} + + +// Internal function used to check if the HEADER is a valid .pnm header. +ILboolean iCheckPnm(char Header[2]) +{ + if (Header[0] != 'P') + return IL_FALSE; + switch (Header[1]) + { + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + return IL_TRUE; + } + + return IL_FALSE; +} + + +// Reads a file +ILboolean ilLoadPnm(ILconst_string FileName) +{ + ILHANDLE PnmFile; + ILboolean bPnm = IL_FALSE; + + PnmFile = iopenr(FileName); + if (PnmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPnm; + } + + bPnm = ilLoadPnmF(PnmFile); + icloser(PnmFile); + + return bPnm; +} + + +// Reads an already-opened file +ILboolean ilLoadPnmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPnmInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +// Reads from a memory "lump" +ILboolean ilLoadPnmL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPnmInternal(); +} + + +// Load either a pgm or a ppm +ILboolean iLoadPnmInternal() +{ + ILimage *PmImage = NULL; + PPMINFO Info; +// ILuint LineInc = 0, SmallInc = 0; + + Info.Type = 0; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Find out what type of pgm/ppm this is + if (iGetWord(IL_FALSE) == IL_FALSE) + return IL_FALSE; + + if (SmallBuff[0] != 'P') { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + switch( SmallBuff[1] ) { + case '1': + Info.Type = IL_PBM_ASCII; + break; + case '2': + Info.Type = IL_PGM_ASCII; + break; + case '3': + Info.Type = IL_PPM_ASCII; + break; + case '4': + Info.Type = IL_PBM_BINARY; + if (IsLump) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + break; + case '5': + Info.Type = IL_PGM_BINARY; + break; + case '6': + Info.Type = IL_PPM_BINARY; + break; + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Retrieve the width and height + if (iGetWord(IL_FALSE) == IL_FALSE) + return IL_FALSE; + Info.Width = atoi((const char*)SmallBuff); + if (Info.Width == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (iGetWord(IL_FALSE) == IL_FALSE) + return IL_FALSE; + Info.Height = atoi((const char*)SmallBuff); + if (Info.Height == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Retrieve the maximum colour component value + if (Info.Type != IL_PBM_ASCII && Info.Type != IL_PBM_BINARY) { + if (iGetWord(IL_TRUE) == IL_FALSE) + return IL_FALSE; + if ((Info.MaxColour = atoi((const char*)SmallBuff)) == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + } else { + Info.MaxColour = 1; + } + + if (Info.Type == IL_PBM_ASCII || Info.Type == IL_PBM_BINARY || + Info.Type == IL_PGM_ASCII || Info.Type == IL_PGM_BINARY) { + if (Info.Type == IL_PGM_ASCII) { + Info.Bpp = Info.MaxColour < 256 ? 1 : 2; + } else { + Info.Bpp = 1; + } + } else { + Info.Bpp = 3; + } + + switch (Info.Type) { + case IL_PBM_ASCII: + case IL_PGM_ASCII: + case IL_PPM_ASCII: + PmImage = ilReadAsciiPpm(&Info); + break; + case IL_PBM_BINARY: + PmImage = ilReadBitPbm(&Info); + break; + case IL_PGM_BINARY: + case IL_PPM_BINARY: + PmImage = ilReadBinaryPpm(&Info); + break; + default: + return IL_FALSE; + } + + if (PmImage == NULL) { + iCurImage->Format = ilGetFormatBpp(iCurImage->Bpp); + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + + // Is this conversion needed? Just 0's and 1's shows up as all black + if (Info.Type == IL_PBM_ASCII) { + PbmMaximize(PmImage); + } + + if (Info.MaxColour > 255) + PmImage->Type = IL_UNSIGNED_SHORT; + PmImage->Origin = IL_ORIGIN_UPPER_LEFT; + if (Info.Type == IL_PBM_ASCII || Info.Type == IL_PBM_BINARY || + Info.Type == IL_PGM_ASCII || Info.Type == IL_PGM_BINARY) + PmImage->Format = IL_LUMINANCE; + else + PmImage->Format = IL_RGB; + PmImage->Origin = IL_ORIGIN_UPPER_LEFT; + + if (PmImage == NULL) + return IL_FALSE; + return ilFixImage(); +} + + + +ILimage *ilReadAsciiPpm(PPMINFO *Info) +{ + ILint LineInc = 0, SmallInc = 0, DataInc = 0, Size; +// ILint BytesRead = 0; + + if (Info->MaxColour > 255) + Info->Bpp *= 2; + + Size = Info->Width * Info->Height * Info->Bpp; + + if (!ilTexImage(Info->Width, Info->Height, 1, (ILubyte)(Info->Bpp), 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + if (Info->MaxColour > 255) + iCurImage->Type = IL_UNSIGNED_SHORT; + + while (DataInc < Size) { // && !feof(File)) { + LineInc = 0; + + if (iFgets((char *)LineBuffer, MAX_BUFFER) == NULL) { + //ilSetError(IL_ILLEGAL_FILE_VALUE); + //return NULL; + //return iCurImage; + break; + } + if (LineBuffer[0] == '#') { // Comment + continue; + } + + while ((LineBuffer[LineInc] != NUL) && (LineBuffer[LineInc] != '\n')) { + + SmallInc = 0; + while (!isalnum(LineBuffer[LineInc])) { // Skip any whitespace + LineInc++; + } + while (isalnum(LineBuffer[LineInc])) { + SmallBuff[SmallInc] = LineBuffer[LineInc]; + SmallInc++; + LineInc++; + } + SmallBuff[SmallInc] = NUL; + iCurImage->Data[DataInc] = atoi((const char*)SmallBuff); // Convert from string to colour + + // PSP likes to put whitespace at the end of lines...figures. =/ + while (!isalnum(LineBuffer[LineInc]) && LineBuffer[LineInc] != NUL) { // Skip any whitespace + LineInc++; + } + + // We should set some kind of state flag that enables this + //Image->Data[DataInc] *= (ILubyte)(255 / Info->MaxColour); // Scales to 0-255 + if (Info->MaxColour > 255) + DataInc++; + DataInc++; + } + } + + // If we read less than what we should have... + if (DataInc < Size) { + //ilCloseImage(iCurImage); + //ilSetCurImage(NULL); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return NULL; + } + + return iCurImage; +} + + +ILimage *ilReadBinaryPpm(PPMINFO *Info) +{ + ILuint Size; + + Size = Info->Width * Info->Height * Info->Bpp; + + if (!ilTexImage(Info->Width, Info->Height, 1, (ILubyte)(Info->Bpp), 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + /* 4/3/2007 Dario Meloni + Here it seems we have eaten too much bytes and it is needed to fix + the starting point + works well on various images + + No more need of this workaround. fixed iGetWord + iseek(0,IL_SEEK_END); + ILuint size = itell(); + iseek(size-Size,IL_SEEK_SET); + */ + if (iread(iCurImage->Data, 1, Size ) != Size) { + ilCloseImage(iCurImage); + return NULL; + } + return iCurImage; +} + + +ILimage *ilReadBitPbm(PPMINFO *Info) +{ + ILuint m, j, x, CurrByte; + + if (!ilTexImage(Info->Width, Info->Height, 1, (ILubyte)(Info->Bpp), 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + x = 0; + for (j = 0; j < iCurImage->SizeOfData;) { + CurrByte = igetc(); + for (m = 128; m > 0 && x < Info->Width; m >>= 1, ++x, ++j) { + iCurImage->Data[j] = (CurrByte & m)?255:0; + } + if (x == Info->Width) + x = 0; + } + + return iCurImage; +} + + +ILboolean iGetWord(ILboolean final) +{ + ILint WordPos = 0; + ILint Current = 0; + ILboolean Started = IL_FALSE; + ILboolean Looping = IL_TRUE; + + if (ieof()) + return IL_FALSE; + + while (Looping) { + while ((Current = igetc()) != IL_EOF && Current != '\n' && Current != '#' && Current != ' ') { + if (WordPos >= MAX_BUFFER) // We have hit the maximum line length. + return IL_FALSE; + + if (!isalnum(Current)) { + if (Started) { + Looping = IL_FALSE; + break; + } + continue; + } + + if (Looping) + SmallBuff[WordPos++] = Current; + } + if (Current == IL_EOF) + return IL_FALSE; + SmallBuff[WordPos] = 0; // 08-17-2008 - was NULL, changed to avoid warning + if (final == IL_TRUE) + break; + + if (!Looping) + break; + + if (Current == '#') { // '#' is a comment...read until end of line + while ((Current = igetc()) != IL_EOF && Current != '\n'); + } + + // Get rid of any erroneous spaces + while ((Current = igetc()) != IL_EOF) { + if (Current != ' ') + break; + } + iseek(-1, IL_SEEK_CUR); + + if (WordPos > 0) + break; + } + + if (Current == -1 || WordPos == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + return IL_TRUE; +} + + +ILstring FName = NULL; + +//! Writes a Pnm file +ILboolean ilSavePnm(const ILstring FileName) +{ + ILHANDLE PnmFile; + ILuint PnmSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + PnmFile = iopenw(FileName); + if (PnmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + PnmSize = ilSavePnmF(PnmFile); + iclosew(PnmFile); + + if (PnmSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Pnm to an already-opened file +ILuint ilSavePnmF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSavePnmInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Pnm to a memory "lump" +ILuint ilSavePnmL(void *Lump, ILuint Size) +{ + ILuint Pos; + FName = NULL; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSavePnmInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Pnm. +ILboolean iSavePnmInternal() +{ + ILuint Bpp, MaxVal = UCHAR_MAX, i = 0, j, k; + ILenum Type = 0; + ILuint LinePos = 0; // Cannot exceed 70 for pnm's! + ILboolean Binary; + ILimage *TempImage; + ILubyte *TempData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iCheckExtension(FName, IL_TEXT("pbm"))) + Type = IL_PBM_ASCII; + else if (iCheckExtension(FName, IL_TEXT("pgm"))) + Type = IL_PGM_ASCII; + else if (iCheckExtension(FName, IL_TEXT("ppm"))) + Type = IL_PPM_ASCII; + else + Type = IL_PPM_ASCII; + + /*if (!Type) { + ilSetError(IL_INVALID_EXTENSION); + return IL_FALSE; + }*/ + + if (iGetHint(IL_COMPRESSION_HINT) == IL_USE_COMPRESSION) { + Type += 3; + Binary = IL_TRUE; + } + else { + Binary = IL_FALSE; + } + + if (iCurImage->Type == IL_UNSIGNED_BYTE) { + MaxVal = UCHAR_MAX; + } + else if (iCurImage->Type == IL_UNSIGNED_SHORT) { + MaxVal = USHRT_MAX; + } + else { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + if (MaxVal > UCHAR_MAX && Type >= IL_PBM_BINARY) { // binary cannot be higher than 255 + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + switch (Type) + { + case IL_PBM_ASCII: + Bpp = 1; + ilprintf("P1\n"); + TempImage = iConvertImage(iCurImage, IL_LUMINANCE, IL_UNSIGNED_BYTE); + break; + //case IL_PBM_BINARY: // Don't want to mess with saving bits just yet... + //Bpp = 1; + //ilprintf("P4\n"); + //break; + case IL_PBM_BINARY: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + case IL_PGM_ASCII: + Bpp = 1; + ilprintf("P2\n"); + TempImage = iConvertImage(iCurImage, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + break; + case IL_PGM_BINARY: + Bpp = 1; + ilprintf("P5\n"); + TempImage = iConvertImage(iCurImage, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + break; + case IL_PPM_ASCII: + Bpp = 3; + ilprintf("P3\n"); + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + break; + case IL_PPM_BINARY: + Bpp = 3; + ilprintf("P6\n"); + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + break; + default: + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + if (TempImage == NULL) + return IL_FALSE; + + if (Bpp != TempImage->Bpp) { + ilSetError(IL_INVALID_CONVERSION); + return IL_FALSE; + } + + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + ilCloseImage(TempImage); + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + ilprintf("%d %d\n", TempImage->Width, TempImage->Height); + if (Type != IL_PBM_BINARY && Type != IL_PBM_ASCII) // not needed for .pbm's (only 0 and 1) + ilprintf("%d\n", MaxVal); + + while (i < TempImage->SizeOfPlane) { + for (j = 0; j < Bpp; j++) { + if (Binary) { + if (Type == IL_PBM_BINARY) { + iputc((ILubyte)(TempData[i] > 127 ? 1 : 0)); + } + else { + iputc(TempData[i]); + } + } + else { + if (TempImage->Type == IL_UNSIGNED_BYTE) + k = TempData[i]; + else // IL_UNSIGNED_SHORT + k = *((ILushort*)TempData + i); + if (Type == IL_PBM_ASCII) { + LinePos += ilprintf("%d ", TempData[i] > 127 ? 1 : 0); + } + else { + LinePos += ilprintf("%d ", TempData[i]); + } + } + + if (TempImage->Type == IL_UNSIGNED_SHORT) + i++; + i++; + } + + if (LinePos > 65) { // Just a good number =] + ilprintf("\n"); + LinePos = 0; + } + } + + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) + ifree(TempData); + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +// Converts a .pbm to something viewable. +void PbmMaximize(ILimage *Image) +{ + ILuint i = 0; + for (i = 0; i < Image->SizeOfPlane; i++) + if (Image->Data[i] == 1) + Image->Data[i] = 0xFF; + return; +} + + +#endif//IL_NO_PNM diff --git a/libs/DevIL-1.7.8/src-IL/src/il_profiles.c b/libs/DevIL-1.7.8/src-IL/src/il_profiles.c new file mode 100644 index 00000000..317e1db2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_profiles.c @@ -0,0 +1,174 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 01/23/2001 <--Y2K Compliant! =] +// +// Filename: src-IL/src/il_profiles.c +// +// Description: Colour profile handler +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_LCMS + +#ifdef PACKAGE_NAME +#define IL_PACKAGE_NAME PACKAGE_NAME; +#undef PACKAGE_NAME +#endif + +#if (!defined(_WIN32) && !defined(_WIN64)) + #define NON_WINDOWS 1 + #ifdef LCMS_NODIRINCLUDE + #include + #else + #include + #endif + +#else + #if defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "lcms.lib") + #else + #pragma comment(lib, "lcms-d.lib") + #endif + #endif + #endif + + #include +#endif//_WIN32 + +#ifdef PACKAGE_NAME +#undef PACKAGE_NAME +#endif + +#ifdef IL_PACKAGE_NAME +#define PACKAGE_NAME IL_PACKAGE_NAME +#undef IL_PACKAGE_NAME +#endif + +#endif//IL_NO_LCMS + +ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile) +{ +#ifndef IL_NO_LCMS + cmsHPROFILE hInProfile, hOutProfile; + cmsHTRANSFORM hTransform; + ILubyte *Temp; + ILint Format=0; +#ifdef _UNICODE + char AnsiName[512]; +#endif//_UNICODE + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + switch (iCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + switch (iCurImage->Format) + { + case IL_LUMINANCE: + Format = TYPE_GRAY_8; + break; + case IL_RGB: + Format = TYPE_RGB_8; + break; + case IL_BGR: + Format = TYPE_BGR_8; + break; + case IL_RGBA: + Format = TYPE_RGBA_8; + break; + case IL_BGRA: + Format = TYPE_BGRA_8; + break; + default: + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + switch (iCurImage->Format) + { + case IL_LUMINANCE: + Format = TYPE_GRAY_16; + break; + case IL_RGB: + Format = TYPE_RGB_16; + break; + case IL_BGR: + Format = TYPE_BGR_16; + break; + case IL_RGBA: + Format = TYPE_RGBA_16; + break; + case IL_BGRA: + Format = TYPE_BGRA_16; + break; + default: + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + break; + + // These aren't supported right now. + case IL_INT: + case IL_UNSIGNED_INT: + case IL_FLOAT: + case IL_DOUBLE: + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + + if (InProfile == NULL) { + if (!iCurImage->Profile || !iCurImage->ProfileSize) { + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + hInProfile = iCurImage->Profile; + } + else { +#ifndef _UNICODE + hInProfile = cmsOpenProfileFromFile(InProfile, "r"); +#else + wcstombs(AnsiName, InProfile, 512); + hInProfile = cmsOpenProfileFromFile(AnsiName, "r"); +#endif//_UNICODE + } +#ifndef _UNICODE + hOutProfile = cmsOpenProfileFromFile(OutProfile, "r"); +#else + wcstombs(AnsiName, OutProfile, 512); + hOutProfile = cmsOpenProfileFromFile(AnsiName, "r"); +#endif//_UNICODE + + hTransform = cmsCreateTransform(hInProfile, Format, hOutProfile, Format, INTENT_PERCEPTUAL, 0); + + Temp = (ILubyte*)ialloc(iCurImage->SizeOfData); + if (Temp == NULL) { + return IL_FALSE; + } + + cmsDoTransform(hTransform, iCurImage->Data, Temp, iCurImage->SizeOfData / 3); + + ifree(iCurImage->Data); + iCurImage->Data = Temp; + + cmsDeleteTransform(hTransform); + if (InProfile != NULL) + cmsCloseProfile(hInProfile); + cmsCloseProfile(hOutProfile); + +#endif//IL_NO_LCMS + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_psd.c b/libs/DevIL-1.7.8/src-IL/src/il_psd.c new file mode 100644 index 00000000..257584c2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_psd.c @@ -0,0 +1,1086 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_psd.c +// +// Description: Reads and writes Photoshop (.psd) files. +// +//----------------------------------------------------------------------------- + + +// Information about the .psd format was taken from Adobe's PhotoShop SDK at +// http://partners.adobe.com/asn/developer/gapsdk/PhotoshopSDK.html +// Information about the Packbits compression scheme was found at +// http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf + +#include "il_internal.h" +#ifndef IL_NO_PSD +#include "il_psd.h" + +static float ubyte_to_float(ILubyte val) +{ + return ((float)val) / 255.0f; +} +static float ushort_to_float(ILushort val) +{ + return ((float)val) / 65535.0f; +} + +static ILubyte float_to_ubyte(float val) +{ + return (ILubyte)(val * 255.0f); +} +static ILushort float_to_ushort(float val) +{ + return (ILushort)(val * 65535.0f); +} + + +//! Checks if the file specified in FileName is a valid Psd file. +ILboolean ilIsValidPsd(ILconst_string FileName) +{ + ILHANDLE PsdFile; + ILboolean bPsd = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("psd")) && + !iCheckExtension(FileName, IL_TEXT("pdd"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPsd; + } + + PsdFile = iopenr(FileName); + if (PsdFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPsd; + } + + bPsd = ilIsValidPsdF(PsdFile); + icloser(PsdFile); + + return bPsd; +} + + +//! Checks if the ILHANDLE contains a valid Psd file at the current position. +ILboolean ilIsValidPsdF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPsd(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Psd lump. +ILboolean ilIsValidPsdL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPsd(); +} + + +// Internal function used to get the Psd header from the current file. +ILboolean iGetPsdHead(PSDHEAD *Header) +{ + iread(Header->Signature, 1, 4); + Header->Version = GetBigUShort(); + iread(Header->Reserved, 1, 6); + Header->Channels = GetBigUShort(); + Header->Height = GetBigUInt(); + Header->Width = GetBigUInt(); + Header->Depth = GetBigUShort(); + Header->Mode = GetBigUShort(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPsd() +{ + PSDHEAD Head; + + iGetPsdHead(&Head); + iseek(-(ILint)sizeof(PSDHEAD), IL_SEEK_CUR); + + return iCheckPsd(&Head); +} + + +// Internal function used to check if the HEADER is a valid Psd header. +ILboolean iCheckPsd(PSDHEAD *Header) +{ + ILuint i; + + if (strncmp((char*)Header->Signature, "8BPS", 4)) + return IL_FALSE; + if (Header->Version != 1) + return IL_FALSE; + for (i = 0; i < 6; i++) { + if (Header->Reserved[i] != 0) + return IL_FALSE; + } + if (Header->Channels < 1 || Header->Channels > 24) + return IL_FALSE; + if (Header->Height < 1 || Header->Width < 1) + return IL_FALSE; + if (Header->Depth != 1 && Header->Depth != 8 && Header->Depth != 16) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a Psd file +ILboolean ilLoadPsd(ILconst_string FileName) +{ + ILHANDLE PsdFile; + ILboolean bPsd = IL_FALSE; + + PsdFile = iopenr(FileName); + if (PsdFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPsd; + } + + bPsd = ilLoadPsdF(PsdFile); + icloser(PsdFile); + + return bPsd; +} + + +//! Reads an already-opened Psd file +ILboolean ilLoadPsdF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPsdInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Psd +ILboolean ilLoadPsdL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPsdInternal(); +} + + +// Internal function used to load the Psd. +ILboolean iLoadPsdInternal() +{ + PSDHEAD Header; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iGetPsdHead(&Header); + if (!iCheckPsd(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ReadPsd(&Header)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return ilFixImage(); +} + + +ILboolean ReadPsd(PSDHEAD *Head) +{ + switch (Head->Mode) + { + case 1: // Greyscale + return ReadGrey(Head); + case 2: // Indexed + return ReadIndexed(Head); + case 3: // RGB + return ReadRGB(Head); + case 4: // CMYK + return ReadCMYK(Head); + } + + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; +} + + +ILboolean ReadGrey(PSDHEAD *Head) +{ + ILuint ColorMode, ResourceSize, MiscInfo; + ILushort Compressed; + ILenum Type; + ILubyte *Resources = NULL; + + ColorMode = GetBigUInt(); // Skip over the 'color mode data section' + iseek(ColorMode, IL_SEEK_CUR); + + ResourceSize = GetBigUInt(); // Read the 'image resources section' + Resources = (ILubyte*)ialloc(ResourceSize); + if (Resources == NULL) { + return IL_FALSE; + } + if (iread(Resources, 1, ResourceSize) != ResourceSize) + goto cleanup_error; + + MiscInfo = GetBigUInt(); + iseek(MiscInfo, IL_SEEK_CUR); + + Compressed = GetBigUShort(); + + ChannelNum = Head->Channels; + Head->Channels = 1; // Temporary to read only one channel...some greyscale .psd files have 2. + if (Head->Channels != 1) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + switch (Head->Depth) + { + case 8: + Type = IL_UNSIGNED_BYTE; + break; + case 16: + Type = IL_UNSIGNED_SHORT; + break; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + if (!ilTexImage(Head->Width, Head->Height, 1, 1, IL_LUMINANCE, Type, NULL)) + goto cleanup_error; + if (!PsdGetData(Head, iCurImage->Data, (ILboolean)Compressed)) + goto cleanup_error; + if (!ParseResources(ResourceSize, Resources)) + goto cleanup_error; + ifree(Resources); + + return IL_TRUE; + +cleanup_error: + ifree(Resources); + return IL_FALSE; +} + + +ILboolean ReadIndexed(PSDHEAD *Head) +{ + ILuint ColorMode, ResourceSize, MiscInfo, i, j, NumEnt; + ILushort Compressed; + ILubyte *Palette = NULL, *Resources = NULL; + + ColorMode = GetBigUInt(); // Skip over the 'color mode data section' + if (ColorMode % 3 != 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + Palette = (ILubyte*)ialloc(ColorMode); + if (Palette == NULL) + return IL_FALSE; + if (iread(Palette, 1, ColorMode) != ColorMode) + goto cleanup_error; + + ResourceSize = GetBigUInt(); // Read the 'image resources section' + Resources = (ILubyte*)ialloc(ResourceSize); + if (Resources == NULL) { + return IL_FALSE; + } + if (iread(Resources, 1, ResourceSize) != ResourceSize) + goto cleanup_error; + + MiscInfo = GetBigUInt(); + if (ieof()) + goto cleanup_error; + iseek(MiscInfo, IL_SEEK_CUR); + + Compressed = GetBigUShort(); + if (ieof()) + goto cleanup_error; + + if (Head->Channels != 1 || Head->Depth != 8) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + goto cleanup_error; + } + ChannelNum = Head->Channels; + + if (!ilTexImage(Head->Width, Head->Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + goto cleanup_error; + + iCurImage->Pal.Palette = (ILubyte*)ialloc(ColorMode); + if (iCurImage->Pal.Palette == NULL) { + goto cleanup_error; + } + iCurImage->Pal.PalSize = ColorMode; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + NumEnt = iCurImage->Pal.PalSize / 3; + for (i = 0, j = 0; i < iCurImage->Pal.PalSize; i += 3, j++) { + iCurImage->Pal.Palette[i ] = Palette[j]; + iCurImage->Pal.Palette[i+1] = Palette[j+NumEnt]; + iCurImage->Pal.Palette[i+2] = Palette[j+NumEnt*2]; + } + ifree(Palette); + Palette = NULL; + + if (!PsdGetData(Head, iCurImage->Data, (ILboolean)Compressed)) + goto cleanup_error; + + ParseResources(ResourceSize, Resources); + ifree(Resources); + Resources = NULL; + + return IL_TRUE; + +cleanup_error: + ifree(Palette); + ifree(Resources); + + return IL_FALSE; +} + + +ILboolean ReadRGB(PSDHEAD *Head) +{ + ILuint ColorMode, ResourceSize, MiscInfo; + ILushort Compressed; + ILenum Format, Type; + ILubyte *Resources = NULL; + + ColorMode = GetBigUInt(); // Skip over the 'color mode data section' + iseek(ColorMode, IL_SEEK_CUR); + + ResourceSize = GetBigUInt(); // Read the 'image resources section' + Resources = (ILubyte*)ialloc(ResourceSize); + if (Resources == NULL) + return IL_FALSE; + if (iread(Resources, 1, ResourceSize) != ResourceSize) + goto cleanup_error; + + MiscInfo = GetBigUInt(); + iseek(MiscInfo, IL_SEEK_CUR); + + Compressed = GetBigUShort(); + + ChannelNum = Head->Channels; + if (Head->Channels == 3) + { + Format = IL_RGB; + } + else if (Head->Channels == 4) + { + Format = IL_RGBA; + } + else if (Head->Channels >= 5) + { + // Additional channels are accumulated as a single alpha channel, since + // if an image does not have a layer set as the "background", but also + // has a real alpha channel, there will be 5 channels (or more). + Format = IL_RGBA; + } + else + { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + switch (Head->Depth) + { + case 8: + Type = IL_UNSIGNED_BYTE; + break; + case 16: + Type = IL_UNSIGNED_SHORT; + break; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + if (!ilTexImage(Head->Width, Head->Height, 1, (Format==IL_RGB) ? 3 : 4, Format, Type, NULL)) + goto cleanup_error; + if (!PsdGetData(Head, iCurImage->Data, (ILboolean)Compressed)) + goto cleanup_error; + if (!ParseResources(ResourceSize, Resources)) + goto cleanup_error; + ifree(Resources); + + return IL_TRUE; + +cleanup_error: + ifree(Resources); + return IL_FALSE; +} + + +ILboolean ReadCMYK(PSDHEAD *Head) +{ + ILuint ColorMode, ResourceSize, MiscInfo, Size, i, j; + ILushort Compressed; + ILenum Format, Type; + ILubyte *Resources = NULL, *KChannel = NULL; + + ColorMode = GetBigUInt(); // Skip over the 'color mode data section' + iseek(ColorMode, IL_SEEK_CUR); + + ResourceSize = GetBigUInt(); // Read the 'image resources section' + Resources = (ILubyte*)ialloc(ResourceSize); + if (Resources == NULL) { + return IL_FALSE; + } + if (iread(Resources, 1, ResourceSize) != ResourceSize) + goto cleanup_error; + + MiscInfo = GetBigUInt(); + iseek(MiscInfo, IL_SEEK_CUR); + + Compressed = GetBigUShort(); + + switch (Head->Channels) + { + case 4: + Format = IL_RGB; + ChannelNum = 4; + Head->Channels = 3; + break; + case 5: + Format = IL_RGBA; + ChannelNum = 5; + Head->Channels = 4; + break; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + switch (Head->Depth) + { + case 8: + Type = IL_UNSIGNED_BYTE; + break; + case 16: + Type = IL_UNSIGNED_SHORT; + break; + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + if (!ilTexImage(Head->Width, Head->Height, 1, (ILubyte)Head->Channels, Format, Type, NULL)) + goto cleanup_error; + if (!PsdGetData(Head, iCurImage->Data, (ILboolean)Compressed)) + goto cleanup_error; + + Size = iCurImage->Bpc * iCurImage->Width * iCurImage->Height; + KChannel = (ILubyte*)ialloc(Size); + if (KChannel == NULL) + goto cleanup_error; + if (!GetSingleChannel(Head, KChannel, (ILboolean)Compressed)) + goto cleanup_error; + + if (Format == IL_RGB) { + for (i = 0, j = 0; i < iCurImage->SizeOfData; i += 3, j++) { + iCurImage->Data[i ] = (iCurImage->Data[i ] * KChannel[j]) >> 8; + iCurImage->Data[i+1] = (iCurImage->Data[i+1] * KChannel[j]) >> 8; + iCurImage->Data[i+2] = (iCurImage->Data[i+2] * KChannel[j]) >> 8; + } + } + else { // IL_RGBA + // The KChannel array really holds the alpha channel on this one. + for (i = 0, j = 0; i < iCurImage->SizeOfData; i += 4, j++) { + iCurImage->Data[i ] = (iCurImage->Data[i ] * iCurImage->Data[i+3]) >> 8; + iCurImage->Data[i+1] = (iCurImage->Data[i+1] * iCurImage->Data[i+3]) >> 8; + iCurImage->Data[i+2] = (iCurImage->Data[i+2] * iCurImage->Data[i+3]) >> 8; + iCurImage->Data[i+3] = KChannel[j]; // Swap 'K' with alpha channel. + } + } + + if (!ParseResources(ResourceSize, Resources)) + goto cleanup_error; + + ifree(Resources); + ifree(KChannel); + + return IL_TRUE; + +cleanup_error: + ifree(Resources); + ifree(KChannel); + return IL_FALSE; +} + + +ILuint *GetCompChanLen(PSDHEAD *Head) +{ + ILushort *RleTable; + ILuint *ChanLen, c, i, j; + + RleTable = (ILushort*)ialloc(Head->Height * ChannelNum * sizeof(ILushort)); + ChanLen = (ILuint*)ialloc(ChannelNum * sizeof(ILuint)); + if (RleTable == NULL || ChanLen == NULL) { + return NULL; + } + + if (iread(RleTable, sizeof(ILushort), Head->Height * ChannelNum) != Head->Height * ChannelNum) { + ifree(RleTable); + ifree(ChanLen); + return NULL; + } +#ifdef __LITTLE_ENDIAN__ + for (i = 0; i < Head->Height * ChannelNum; i++) { + iSwapUShort(&RleTable[i]); + } +#endif + + imemclear(ChanLen, ChannelNum * sizeof(ILuint)); + for (c = 0; c < ChannelNum; c++) { + j = c * Head->Height; + for (i = 0; i < Head->Height; i++) { + ChanLen[c] += RleTable[i + j]; + } + } + + ifree(RleTable); + + return ChanLen; +} + + + +static const ILuint READ_COMPRESSED_SUCCESS = 0; +static const ILuint READ_COMPRESSED_ERROR_FILE_CORRUPT = 1; +static const ILuint READ_COMPRESSED_ERROR_FILE_READ_ERROR = 2; + +static ILuint ReadCompressedChannel(const ILuint ChanLen, ILuint Size, ILubyte* Channel) +{ + ILuint i; + ILint Run; + ILboolean PreCache = IL_FALSE; + ILbyte HeadByte; + + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + PreCache = IL_TRUE; + + if (PreCache) + iPreCache(ChanLen); + for (i = 0; i < Size; ) { + HeadByte = igetc(); + + if (HeadByte >= 0) { // && HeadByte <= 127 + if (i + HeadByte > Size) + { + if (PreCache) + iUnCache(); + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + } + if (iread(Channel + i, HeadByte + 1, 1) != 1) + { + if (PreCache) + iUnCache(); + return READ_COMPRESSED_ERROR_FILE_READ_ERROR; + } + + i += HeadByte + 1; + } + if (HeadByte >= -127 && HeadByte <= -1) { + Run = igetc(); + if (Run == IL_EOF) + { + if (PreCache) + iUnCache(); + return READ_COMPRESSED_ERROR_FILE_READ_ERROR; + } + if (i + (-HeadByte + 1) > Size) + { + if (PreCache) + iUnCache(); + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + } + + memset(Channel + i, Run, -HeadByte + 1); + i += -HeadByte + 1; + } + if (HeadByte == -128) + { } // Noop + } + if (PreCache) + iUnCache(); + + return READ_COMPRESSED_SUCCESS; +} + + +ILboolean PsdGetData(PSDHEAD *Head, void *Buffer, ILboolean Compressed) +{ + ILuint c, x, y, i, Size, ReadResult, NumChan; + ILubyte *Channel = NULL; + ILushort *ShortPtr; + ILuint *ChanLen = NULL; + + // Added 01-07-2009: This is needed to correctly load greyscale and + // paletted images. + switch (Head->Mode) + { + case 1: + case 2: + NumChan = 1; + break; + default: + NumChan = 3; + } + + Channel = (ILubyte*)ialloc(Head->Width * Head->Height * iCurImage->Bpc); + if (Channel == NULL) { + return IL_FALSE; + } + ShortPtr = (ILushort*)Channel; + + // @TODO: Add support for this in, though I have yet to run across a .psd + // file that uses this. + if (Compressed && iCurImage->Type == IL_UNSIGNED_SHORT) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + if (!Compressed) { + if (iCurImage->Bpc == 1) { + for (c = 0; c < NumChan; c++) { + i = 0; + if (iread(Channel, Head->Width * Head->Height, 1) != 1) { + ifree(Channel); + return IL_FALSE; + } + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + iCurImage->Data[y + x + c] = Channel[i]; + } + } + } + // Accumulate any remaining channels into a single alpha channel + //@TODO: This needs to be changed for greyscale images. + for (; c < Head->Channels; c++) { + i = 0; + if (iread(Channel, Head->Width * Head->Height, 1) != 1) { + ifree(Channel); + return IL_FALSE; + } + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + float curVal = ubyte_to_float(iCurImage->Data[y + x + 3]); + float newVal = ubyte_to_float(Channel[i]); + iCurImage->Data[y + x + 3] = float_to_ubyte(curVal * newVal); + } + } + } + } + else { // iCurImage->Bpc == 2 + for (c = 0; c < NumChan; c++) { + i = 0; + if (iread(Channel, Head->Width * Head->Height * 2, 1) != 1) { + ifree(Channel); + return IL_FALSE; + } + iCurImage->Bps /= 2; + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + #ifndef WORDS_BIGENDIAN + iSwapUShort(ShortPtr+i); + #endif + ((ILushort*)iCurImage->Data)[y + x + c] = ShortPtr[i]; + } + } + iCurImage->Bps *= 2; + } + // Accumulate any remaining channels into a single alpha channel + //@TODO: This needs to be changed for greyscale images. + for (; c < Head->Channels; c++) { + i = 0; + if (iread(Channel, Head->Width * Head->Height * 2, 1) != 1) { + ifree(Channel); + return IL_FALSE; + } + iCurImage->Bps /= 2; + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + float curVal = ushort_to_float(((ILushort*)iCurImage->Data)[y + x + 3]); + float newVal = ushort_to_float(ShortPtr[i]); + ((ILushort*)iCurImage->Data)[y + x + 3] = float_to_ushort(curVal * newVal); + } + } + iCurImage->Bps *= 2; + } + } + } + else { + ChanLen = GetCompChanLen(Head); + + Size = Head->Width * Head->Height; + for (c = 0; c < NumChan; c++) { + ReadResult = ReadCompressedChannel(ChanLen[c], Size, Channel); + if (ReadResult == READ_COMPRESSED_ERROR_FILE_CORRUPT) + goto file_corrupt; + else if (ReadResult == READ_COMPRESSED_ERROR_FILE_READ_ERROR) + goto file_read_error; + + i = 0; + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + iCurImage->Data[y + x + c] = Channel[i]; + } + } + } + + // Initialize the alpha channel to solid + //@TODO: This needs to be changed for greyscale images. + if (Head->Channels >= 4) { + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp) { + iCurImage->Data[y + x + 3] = 255; + } + } + + for (; c < Head->Channels; c++) { + ReadResult = ReadCompressedChannel(ChanLen[c], Size, Channel); + if (ReadResult == READ_COMPRESSED_ERROR_FILE_CORRUPT) + goto file_corrupt; + else if (ReadResult == READ_COMPRESSED_ERROR_FILE_READ_ERROR) + goto file_read_error; + + i = 0; + for (y = 0; y < Head->Height * iCurImage->Bps; y += iCurImage->Bps) { + for (x = 0; x < iCurImage->Bps; x += iCurImage->Bpp, i++) { + float curVal = ubyte_to_float(iCurImage->Data[y + x + 3]); + float newVal = ubyte_to_float(Channel[i]); + iCurImage->Data[y + x + 3] = float_to_ubyte(curVal * newVal); + } + } + } + } + + ifree(ChanLen); + } + + ifree(Channel); + + return IL_TRUE; + +file_corrupt: + ifree(ChanLen); + ifree(Channel); + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + +file_read_error: + ifree(ChanLen); + ifree(Channel); + return IL_FALSE; +} + + +ILboolean ParseResources(ILuint ResourceSize, ILubyte *Resources) +{ + ILushort ID; + ILubyte NameLen; + ILuint Size; + + if (Resources == NULL) { + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + while (ResourceSize > 13) { // Absolutely has to be larger than this. + if (strncmp("8BIM", (const char*)Resources, 4)) { + //return IL_FALSE; + return IL_TRUE; // 05-30-2002: May not necessarily mean corrupt data... + } + Resources += 4; + + ID = *((ILushort*)Resources); + BigUShort(&ID); + Resources += 2; + + NameLen = *Resources++; + // NameLen + the byte it occupies must be padded to an even number, so NameLen must be odd. + NameLen = NameLen + (NameLen & 1 ? 0 : 1); + Resources += NameLen; + + // Get the resource data size. + Size = *((ILuint*)Resources); + BigUInt(&Size); + Resources += 4; + + ResourceSize -= (4 + 2 + 1 + NameLen + 4); + + switch (ID) + { + case 0x040F: // ICC Profile + if (Size > ResourceSize) { // Check to make sure we are not going past the end of Resources. + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + iCurImage->Profile = (ILubyte*)ialloc(Size); + if (iCurImage->Profile == NULL) { + return IL_FALSE; + } + memcpy(iCurImage->Profile, Resources, Size); + iCurImage->ProfileSize = Size; + break; + + default: + break; + } + + if (Size & 1) // Must be an even number. + Size++; + ResourceSize -= Size; + Resources += Size; + } + + return IL_TRUE; +} + + +ILboolean GetSingleChannel(PSDHEAD *Head, ILubyte *Buffer, ILboolean Compressed) +{ + ILuint i; + ILushort *ShortPtr; + ILbyte HeadByte; + ILint Run; + + ShortPtr = (ILushort*)Buffer; + + if (!Compressed) { + if (iCurImage->Bpc == 1) { + if (iread(Buffer, Head->Width * Head->Height, 1) != 1) + return IL_FALSE; + } + else { // iCurImage->Bpc == 2 + if (iread(Buffer, Head->Width * Head->Height * 2, 1) != 1) + return IL_FALSE; + } + } + else { + for (i = 0; i < Head->Width * Head->Height; ) { + HeadByte = igetc(); + + if (HeadByte >= 0) { // && HeadByte <= 127 + if (iread(Buffer + i, HeadByte + 1, 1) != 1) + return IL_FALSE; + i += HeadByte + 1; + } + if (HeadByte >= -127 && HeadByte <= -1) { + Run = igetc(); + if (Run == IL_EOF) + return IL_FALSE; + memset(Buffer + i, Run, -HeadByte + 1); + i += -HeadByte + 1; + } + if (HeadByte == -128) + { } // Noop + } + } + + return IL_TRUE; +} + + + +//! Writes a Psd file +ILboolean ilSavePsd(const ILstring FileName) +{ + ILHANDLE PsdFile; + ILuint PsdSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + PsdFile = iopenw(FileName); + if (PsdFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + PsdSize = ilSavePsdF(PsdFile); + iclosew(PsdFile); + + if (PsdSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Psd to an already-opened file +ILuint ilSavePsdF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSavePsdInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Psd to a memory "lump" +ILuint ilSavePsdL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSavePsdInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Psd. +ILboolean iSavePsdInternal() +{ + ILubyte *Signature = (ILubyte*)"8BPS"; + ILimage *TempImage; + ILpal *TempPal; + ILuint c, i; + ILubyte *TempData; + ILushort *ShortPtr; + ILenum Format, Type; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Format = iCurImage->Format; + Type = iCurImage->Type; + + // All of these comprise the actual signature. + iwrite(Signature, 1, 4); + SaveBigShort(1); + SaveBigInt(0); + SaveBigShort(0); + + SaveBigShort(iCurImage->Bpp); + SaveBigInt(iCurImage->Height); + SaveBigInt(iCurImage->Width); + if (iCurImage->Bpc > 2) + Type = IL_UNSIGNED_SHORT; + + if (iCurImage->Format == IL_BGR) + Format = IL_RGB; + else if (iCurImage->Format == IL_BGRA) + Format = IL_RGBA; + + if (Format != iCurImage->Format || Type != iCurImage->Type) { + TempImage = iConvertImage(iCurImage, Format, Type); + if (TempImage == NULL) + return IL_FALSE; + } + else { + TempImage = iCurImage; + } + SaveBigShort((ILushort)(TempImage->Bpc * 8)); + + // @TODO: Put the other formats here. + switch (TempImage->Format) + { + case IL_COLOUR_INDEX: + SaveBigShort(2); + break; + case IL_LUMINANCE: + SaveBigShort(1); + break; + case IL_RGB: + case IL_RGBA: + SaveBigShort(3); + break; + default: + ilSetError(IL_INTERNAL_ERROR); + return IL_FALSE; + } + + if (TempImage->Format == IL_COLOUR_INDEX) { + // @TODO: We're currently making a potentially fatal assumption that + // iConvertImage was not called if the format is IL_COLOUR_INDEX. + TempPal = iConvertPal(&TempImage->Pal, IL_PAL_RGB24); + if (TempPal == NULL) + return IL_FALSE; + SaveBigInt(768); + + // Have to save the palette in a planar format. + for (c = 0; c < 3; c++) { + for (i = c; i < TempPal->PalSize; i += 3) { + iputc(TempPal->Palette[i]); + } + } + + ifree(TempPal->Palette); + } + else { + SaveBigInt(0); // No colour mode data. + } + + SaveBigInt(0); // No image resources. + SaveBigInt(0); // No layer information. + SaveBigShort(0); // Psd data, no compression. + + // @TODO: Add RLE compression. + + if (TempImage->Origin == IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + ilCloseImage(TempImage); + return IL_FALSE; + } + } + else { + TempData = TempImage->Data; + } + + if (TempImage->Bpc == 1) { + for (c = 0; c < TempImage->Bpp; c++) { + for (i = c; i < TempImage->SizeOfPlane; i += TempImage->Bpp) { + iputc(TempData[i]); + } + } + } + else { // TempImage->Bpc == 2 + ShortPtr = (ILushort*)TempData; + TempImage->SizeOfPlane /= 2; + for (c = 0; c < TempImage->Bpp; c++) { + for (i = c; i < TempImage->SizeOfPlane; i += TempImage->Bpp) { + SaveBigUShort(ShortPtr[i]); + } + } + TempImage->SizeOfPlane *= 2; + } + + if (TempData != TempImage->Data) + ifree(TempData); + + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + + return IL_TRUE; +} + + +#endif//IL_NO_PSD diff --git a/libs/DevIL-1.7.8/src-IL/src/il_psp.c b/libs/DevIL-1.7.8/src-IL/src/il_psp.c new file mode 100644 index 00000000..b431a317 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_psp.c @@ -0,0 +1,712 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_psp.c +// +// Description: Reads a Paint Shop Pro file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_psp.h" +#ifndef IL_NO_PSP + + +ILubyte PSPSignature[32] = { + 0x50, 0x61, 0x69, 0x6E, 0x74, 0x20, 0x53, 0x68, 0x6F, 0x70, 0x20, 0x50, 0x72, 0x6F, 0x20, 0x49, + 0x6D, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6C, 0x65, 0x0A, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +ILubyte GenAttHead[4] = { + 0x7E, 0x42, 0x4B, 0x00 +}; + + +// Make these global, since they contain most of the image information. +GENATT_CHUNK AttChunk; +PSPHEAD Header; +ILuint NumChannels; +ILubyte **Channels = NULL; +ILubyte *Alpha = NULL; +ILpal Pal; + + + +//! Checks if the file specified in FileName is a valid Psp file. +ILboolean ilIsValidPsp(ILconst_string FileName) +{ + ILHANDLE PspFile; + ILboolean bPsp = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("psp"))) { + ilSetError(IL_INVALID_EXTENSION); + return bPsp; + } + + PspFile = iopenr(FileName); + if (PspFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPsp; + } + + bPsp = ilIsValidPspF(PspFile); + icloser(PspFile); + + return bPsp; +} + + +//! Checks if the ILHANDLE contains a valid Psp file at the current position. +ILboolean ilIsValidPspF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidPsp(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Psp lump. +ILboolean ilIsValidPspL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidPsp(); +} + + +// Internal function used to get the Psp header from the current file. +ILboolean iGetPspHead() +{ + if (iread(Header.FileSig, 1, 32) != 32) + return IL_FALSE; + Header.MajorVersion = GetLittleUShort(); + Header.MinorVersion = GetLittleUShort(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidPsp() +{ + if (!iGetPspHead()) + return IL_FALSE; + iseek(-(ILint)sizeof(PSPHEAD), IL_SEEK_CUR); + + return iCheckPsp(); +} + + +// Internal function used to check if the HEADER is a valid Psp header. +ILboolean iCheckPsp() +{ + if (stricmp(Header.FileSig, "Paint Shop Pro Image File\n\x1a")) + return IL_FALSE; + if (Header.MajorVersion < 3 || Header.MajorVersion > 5) + return IL_FALSE; + if (Header.MinorVersion != 0) + return IL_FALSE; + + + return IL_TRUE; +} + + +//! Reads a PSP file +ILboolean ilLoadPsp(ILconst_string FileName) +{ + ILHANDLE PSPFile; + ILboolean bPsp = IL_FALSE; + + PSPFile = iopenr(FileName); + if (PSPFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPsp; + } + + bPsp = ilLoadPspF(PSPFile); + icloser(PSPFile); + + return bPsp; +} + + +//! Reads an already-opened PSP file +ILboolean ilLoadPspF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPspInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a PSP +ILboolean ilLoadPspL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPspInternal(); +} + + +// Internal function used to load the PSP. +ILboolean iLoadPspInternal() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Channels = NULL; + Alpha = NULL; + Pal.Palette = NULL; + + if (!iGetPspHead()) + return IL_FALSE; + if (!iCheckPsp()) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ReadGenAttributes()) + return IL_FALSE; + if (!ParseChunks()) + return IL_FALSE; + if (!AssembleImage()) + return IL_FALSE; + + Cleanup(); + return ilFixImage(); +} + + +ILboolean ReadGenAttributes() +{ + BLOCKHEAD AttHead; + ILint Padding; + ILuint ChunkLen; + + if (iread(&AttHead, sizeof(AttHead), 1) != 1) + return IL_FALSE; + UShort(&AttHead.BlockID); + UInt(&AttHead.BlockLen); + + if (AttHead.HeadID[0] != 0x7E || AttHead.HeadID[1] != 0x42 || + AttHead.HeadID[2] != 0x4B || AttHead.HeadID[3] != 0x00) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + if (AttHead.BlockID != PSP_IMAGE_BLOCK) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + ChunkLen = GetLittleUInt(); + if (Header.MajorVersion != 3) + ChunkLen -= 4; + if (iread(&AttChunk, IL_MIN(sizeof(AttChunk), ChunkLen), 1) != 1) + return IL_FALSE; + + // Can have new entries in newer versions of the spec (4.0). + Padding = (ChunkLen) - sizeof(AttChunk); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + + // @TODO: Anything but 24 not supported yet... + if (AttChunk.BitDepth != 24 && AttChunk.BitDepth != 8) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // @TODO; Add support for compression... + if (AttChunk.Compression != PSP_COMP_NONE && AttChunk.Compression != PSP_COMP_RLE) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // @TODO: Check more things in the general attributes chunk here. + + return IL_TRUE; +} + + +ILboolean ParseChunks() +{ + BLOCKHEAD Block; + ILuint Pos; + + do { + if (iread(&Block, 1, sizeof(Block)) != sizeof(Block)) { + ilGetError(); // Get rid of the erroneous IL_FILE_READ_ERROR. + return IL_TRUE; + } + if (Header.MajorVersion == 3) + Block.BlockLen = GetLittleUInt(); + else + UInt(&Block.BlockLen); + + if (Block.HeadID[0] != 0x7E || Block.HeadID[1] != 0x42 || + Block.HeadID[2] != 0x4B || Block.HeadID[3] != 0x00) { + return IL_TRUE; + } + UShort(&Block.BlockID); + UInt(&Block.BlockLen); + + Pos = itell(); + + switch (Block.BlockID) + { + case PSP_LAYER_START_BLOCK: + if (!ReadLayerBlock(Block.BlockLen)) + return IL_FALSE; + break; + + case PSP_ALPHA_BANK_BLOCK: + if (!ReadAlphaBlock(Block.BlockLen)) + return IL_FALSE; + break; + + case PSP_COLOR_BLOCK: + if (!ReadPalette(Block.BlockLen)) + return IL_FALSE; + break; + + // Gets done in the next iseek, so this is now commented out. + //default: + //iseek(Block.BlockLen, IL_SEEK_CUR); + } + + // Skip to next block just in case we didn't read the entire block. + iseek(Pos + Block.BlockLen, IL_SEEK_SET); + + // @TODO: Do stuff here. + + } while (1); + + return IL_TRUE; +} + + +ILboolean ReadLayerBlock(ILuint BlockLen) +{ + BLOCKHEAD Block; + LAYERINFO_CHUNK LayerInfo; + LAYERBITMAP_CHUNK Bitmap; + ILuint ChunkSize, Padding, i, j; + ILushort NumChars; + + BlockLen; + + // Layer sub-block header + if (iread(&Block, 1, sizeof(Block)) != sizeof(Block)) + return IL_FALSE; + if (Header.MajorVersion == 3) + Block.BlockLen = GetLittleUInt(); + else + UInt(&Block.BlockLen); + + if (Block.HeadID[0] != 0x7E || Block.HeadID[1] != 0x42 || + Block.HeadID[2] != 0x4B || Block.HeadID[3] != 0x00) { + return IL_FALSE; + } + if (Block.BlockID != PSP_LAYER_BLOCK) + return IL_FALSE; + + + if (Header.MajorVersion == 3) { + iseek(256, IL_SEEK_CUR); // We don't care about the name of the layer. + iread(&LayerInfo, sizeof(LayerInfo), 1); + if (iread(&Bitmap, sizeof(Bitmap), 1) != 1) + return IL_FALSE; + } + else { // Header.MajorVersion >= 4 + ChunkSize = GetLittleUInt(); + NumChars = GetLittleUShort(); + iseek(NumChars, IL_SEEK_CUR); // We don't care about the layer's name. + + ChunkSize -= (2 + 4 + NumChars); + + if (iread(&LayerInfo, IL_MIN(sizeof(LayerInfo), ChunkSize), 1) != 1) + return IL_FALSE; + + // Can have new entries in newer versions of the spec (5.0). + Padding = (ChunkSize) - sizeof(LayerInfo); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + + ChunkSize = GetLittleUInt(); + if (iread(&Bitmap, sizeof(Bitmap), 1) != 1) + return IL_FALSE; + Padding = (ChunkSize - 4) - sizeof(Bitmap); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + } + + + Channels = (ILubyte**)ialloc(sizeof(ILubyte*) * Bitmap.NumChannels); + if (Channels == NULL) { + return IL_FALSE; + } + + NumChannels = Bitmap.NumChannels; + + for (i = 0; i < NumChannels; i++) { + Channels[i] = GetChannel(); + if (Channels[i] == NULL) { + for (j = 0; j < i; j++) + ifree(Channels[j]); + return IL_FALSE; + } + } + + return IL_TRUE; +} + + +ILboolean ReadAlphaBlock(ILuint BlockLen) +{ + BLOCKHEAD Block; + ALPHAINFO_CHUNK AlphaInfo; + ALPHA_CHUNK AlphaChunk; + ILushort NumAlpha, StringSize; + ILuint ChunkSize, Padding; + + if (Header.MajorVersion == 3) { + NumAlpha = GetLittleUShort(); + } + else { + ChunkSize = GetLittleUInt(); + NumAlpha = GetLittleUShort(); + Padding = (ChunkSize - 4 - 2); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + } + + // Alpha channel header + if (iread(&Block, 1, sizeof(Block)) != sizeof(Block)) + return IL_FALSE; + if (Header.MajorVersion == 3) + Block.BlockLen = GetLittleUInt(); + else + UInt(&Block.BlockLen); + + if (Block.HeadID[0] != 0x7E || Block.HeadID[1] != 0x42 || + Block.HeadID[2] != 0x4B || Block.HeadID[3] != 0x00) { + return IL_FALSE; + } + if (Block.BlockID != PSP_ALPHA_CHANNEL_BLOCK) + return IL_FALSE; + + + if (Header.MajorVersion >= 4) { + ChunkSize = GetLittleUInt(); + StringSize = GetLittleUShort(); + iseek(StringSize, IL_SEEK_CUR); + if (iread(&AlphaInfo, sizeof(AlphaInfo), 1) != 1) + return IL_FALSE; + Padding = (ChunkSize - 4 - 2 - StringSize - sizeof(AlphaInfo)); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + + ChunkSize = GetLittleUInt(); + if (iread(&AlphaChunk, sizeof(AlphaChunk), 1) != 1) + return IL_FALSE; + Padding = (ChunkSize - 4 - sizeof(AlphaChunk)); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + } + else { + iseek(256, IL_SEEK_CUR); + iread(&AlphaInfo, sizeof(AlphaInfo), 1); + if (iread(&AlphaChunk, sizeof(AlphaChunk), 1) != 1) + return IL_FALSE; + } + + + /*Alpha = (ILubyte*)ialloc(AlphaInfo.AlphaRect.x2 * AlphaInfo.AlphaRect.y2); + if (Alpha == NULL) { + return IL_FALSE; + }*/ + + + Alpha = GetChannel(); + if (Alpha == NULL) + return IL_FALSE; + + return IL_TRUE; +} + + +ILubyte *GetChannel() +{ + BLOCKHEAD Block; + CHANNEL_CHUNK Channel; + ILubyte *CompData, *Data; + ILuint ChunkSize, Padding; + + if (iread(&Block, 1, sizeof(Block)) != sizeof(Block)) + return NULL; + if (Header.MajorVersion == 3) + Block.BlockLen = GetLittleUInt(); + else + UInt(&Block.BlockLen); + + if (Block.HeadID[0] != 0x7E || Block.HeadID[1] != 0x42 || + Block.HeadID[2] != 0x4B || Block.HeadID[3] != 0x00) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return NULL; + } + if (Block.BlockID != PSP_CHANNEL_BLOCK) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return NULL; + } + + + if (Header.MajorVersion >= 4) { + ChunkSize = GetLittleUInt(); + if (iread(&Channel, sizeof(Channel), 1) != 1) + return NULL; + + Padding = (ChunkSize - 4) - sizeof(Channel); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + } + else { + if (iread(&Channel, sizeof(Channel), 1) != 1) + return NULL; + } + + + CompData = (ILubyte*)ialloc(Channel.CompLen); + Data = (ILubyte*)ialloc(AttChunk.Width * AttChunk.Height); + if (CompData == NULL || Data == NULL) { + ifree(Data); + ifree(CompData); + return NULL; + } + + if (iread(CompData, 1, Channel.CompLen) != Channel.CompLen) { + ifree(CompData); + ifree(Data); + return NULL; + } + + switch (AttChunk.Compression) + { + case PSP_COMP_NONE: + ifree(Data); + return CompData; + break; + + case PSP_COMP_RLE: + if (!UncompRLE(CompData, Data, Channel.CompLen)) { + ifree(CompData); + ifree(Data); + return IL_FALSE; + } + break; + + default: + ifree(CompData); + ifree(Data); + ilSetError(IL_INVALID_FILE_HEADER); + return NULL; + } + + ifree(CompData); + + return Data; +} + + +ILboolean UncompRLE(ILubyte *CompData, ILubyte *Data, ILuint CompLen) +{ + ILubyte Run, Colour; + ILint i, /*x, y,*/ Count/*, Total = 0*/; + + /*for (y = 0; y < AttChunk.Height; y++) { + for (x = 0, Count = 0; x < AttChunk.Width; ) { + Run = *CompData++; + if (Run > 128) { + Run -= 128; + Colour = *CompData++; + memset(Data, Colour, Run); + Data += Run; + Count += 2; + } + else { + memcpy(Data, CompData, Run); + CompData += Run; + Data += Run; + Count += Run; + } + x += Run; + } + + Total += Count; + + if (Count % 4) { // Has to be on a 4-byte boundary. + CompData += (4 - (Count % 4)) % 4; + Total += (4 - (Count % 4)) % 4; + } + + if (Total >= CompLen) + return IL_FALSE; + }*/ + + for (i = 0, Count = 0; i < (ILint)CompLen; ) { + Run = *CompData++; + i++; + if (Run > 128) { + Run -= 128; + Colour = *CompData++; + i++; + memset(Data, Colour, Run); + } + else { + memcpy(Data, CompData, Run); + CompData += Run; + i += Run; + } + Data += Run; + Count += Run; + } + + return IL_TRUE; +} + + +ILboolean ReadPalette(ILuint BlockLen) +{ + ILuint ChunkSize, PalCount, Padding; + + if (Header.MajorVersion >= 4) { + ChunkSize = GetLittleUInt(); + PalCount = GetLittleUInt(); + Padding = (ChunkSize - 4 - 4); + if (Padding > 0) + iseek(Padding, IL_SEEK_CUR); + } + else { + PalCount = GetLittleUInt(); + } + + Pal.PalSize = PalCount * 4; + Pal.PalType = IL_PAL_BGRA32; + Pal.Palette = (ILubyte*)ialloc(Pal.PalSize); + if (Pal.Palette == NULL) + return IL_FALSE; + + if (iread(Pal.Palette, Pal.PalSize, 1) != 1) { + ifree(Pal.Palette); + return IL_FALSE; + } + + return IL_TRUE; +} + + +ILboolean AssembleImage() +{ + ILuint Size, i, j; + + Size = AttChunk.Width * AttChunk.Height; + + if (NumChannels == 1) { + ilTexImage(AttChunk.Width, AttChunk.Height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL); + for (i = 0; i < Size; i++) { + iCurImage->Data[i] = Channels[0][i]; + } + + if (Pal.Palette) { + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalSize = Pal.PalSize; + iCurImage->Pal.PalType = Pal.PalType; + iCurImage->Pal.Palette = Pal.Palette; + } + } + else { + if (Alpha) { + ilTexImage(AttChunk.Width, AttChunk.Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + for (i = 0, j = 0; i < Size; i++, j += 4) { + iCurImage->Data[j ] = Channels[0][i]; + iCurImage->Data[j+1] = Channels[1][i]; + iCurImage->Data[j+2] = Channels[2][i]; + iCurImage->Data[j+3] = Alpha[i]; + } + } + + else if (NumChannels == 4) { + + ilTexImage(AttChunk.Width, AttChunk.Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + + for (i = 0, j = 0; i < Size; i++, j += 4) { + + iCurImage->Data[j ] = Channels[0][i]; + + iCurImage->Data[j+1] = Channels[1][i]; + + iCurImage->Data[j+2] = Channels[2][i]; + + iCurImage->Data[j+3] = Channels[3][i]; + + } + + } + else if (NumChannels == 3) { + ilTexImage(AttChunk.Width, AttChunk.Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL); + for (i = 0, j = 0; i < Size; i++, j += 3) { + iCurImage->Data[j ] = Channels[0][i]; + iCurImage->Data[j+1] = Channels[1][i]; + iCurImage->Data[j+2] = Channels[2][i]; + } + } + else + return IL_FALSE; + } + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return IL_TRUE; +} + + +ILboolean Cleanup() +{ + ILuint i; + + if (Channels) { + for (i = 0; i < NumChannels; i++) { + ifree(Channels[i]); + } + ifree(Channels); + } + + if (Alpha) { + ifree(Alpha); + } + + Channels = NULL; + Alpha = NULL; + Pal.Palette = NULL; + + return IL_TRUE; +} + + + +#endif//IL_NO_PSP diff --git a/libs/DevIL-1.7.8/src-IL/src/il_pxr.c b/libs/DevIL-1.7.8/src-IL/src/il_pxr.c new file mode 100644 index 00000000..8e635f0a --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_pxr.c @@ -0,0 +1,120 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/26/2002 <--Y2K Compliant! =] +// +// Filename: src-IL/src/il_pxr.c +// +// Description: Reads from a Pxrar (.pxr) file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_PXR +#include "il_manip.h" +#include "il_endian.h" + + +#ifdef _MSC_VER +#pragma pack(push, pxr_struct, 1) +#endif +typedef struct PIXHEAD +{ + ILushort Signature; + ILubyte Reserved1[413]; + ILushort Height; + ILushort Width; + ILubyte Reserved2[4]; + ILubyte BppInfo; + ILubyte Reserved3[598]; +} IL_PACKSTRUCT PIXHEAD; +#ifdef _MSC_VER +#pragma pack(pop, pxr_struct) +#endif + +ILboolean iLoadPxrInternal(void); + + +//! Reads a Pxr file +ILboolean ilLoadPxr(ILconst_string FileName) +{ + ILHANDLE PxrFile; + ILboolean bPxr = IL_FALSE; + + PxrFile = iopenr(FileName); + if (PxrFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bPxr; + } + + bPxr = ilLoadPxrF(PxrFile); + icloser(PxrFile); + + return bPxr; +} + + +//! Reads an already-opened Pxr file +ILboolean ilLoadPxrF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadPxrInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Pxr +ILboolean ilLoadPxrL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadPxrInternal(); +} + + +// Internal function used to load the Pxr. +ILboolean iLoadPxrInternal() +{ + ILushort Width, Height; + ILubyte Bpp; + + Width = sizeof(PIXHEAD); + + iseek(416, IL_SEEK_SET); + Height = GetLittleUShort(); + Width = GetLittleUShort(); + iseek(424, IL_SEEK_SET); + Bpp = (ILubyte)igetc(); + + switch (Bpp) + { + case 0x08: + ilTexImage(Width, Height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL); + break; + case 0x0E: + ilTexImage(Width, Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL); + break; + case 0x0F: + ilTexImage(Width, Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL); + break; + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + iseek(1024, IL_SEEK_SET); + iread(iCurImage->Data, 1, iCurImage->SizeOfData); + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + return IL_TRUE; +} + + +#endif//IL_NO_PXR diff --git a/libs/DevIL-1.7.8/src-IL/src/il_quantizer.c b/libs/DevIL-1.7.8/src-IL/src/il_quantizer.c new file mode 100644 index 00000000..0e005728 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_quantizer.c @@ -0,0 +1,643 @@ +//----------------------------------------------------------------------- +// Color Quantization Demo +// +// Author: Roman Podobedov +// Email: romka@ut.ee +// Romka Graphics: www.ut.ee/~romka +// +// Also in this file implemented Wu's Color Quantizer algorithm (v. 2) +// For details see Graphics Gems vol. II, pp. 126-133 +// +// Wu's Color Quantizer Algorithm: +// Author: Xiaolin Wu +// Dept. of Computer Science +// Univ. of Western Ontario +// London, Ontario N6A 5B7 +// wu@csd.uwo.ca +// http://www.csd.uwo.ca/faculty/wu/ +//----------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// by Denton Woods +// Last modified: 01/04/2009 +// +// Filename: src-IL/src/il_quantizer.c +// +// Description: Heavily modified by Denton Woods. +// +// 20040223 XIX : Modified so it works better with color requests < 256 +// pallete always has memory space for 256 entries +// used so we can quant down to 255 colors then add a transparent color in there. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" + +#define MAXCOLOR 256 +#define RED 2 +#define GREEN 1 +#define BLUE 0 + +typedef struct Box +{ + ILint r0; // min value, exclusive + ILint r1; // max value, inclusive + ILint g0; + ILint g1; + ILint b0; + ILint b1; + ILint vol; +} Box; + +/* Histogram is in elements 1..HISTSIZE along each axis, + * element 0 is for base or marginal value + * NB: these must start out 0! + */ + +ILfloat gm2[33][33][33]; +ILint wt[33][33][33], mr[33][33][33], mg[33][33][33], mb[33][33][33]; +ILuint size; //image size +ILint K; //colour look-up table size +ILushort *Qadd; + + +ILint WindW, WindH, WindD; +ILint i; +ILubyte *buffer; +static ILint Width, Height, Depth, Comp; +/*ILint TotalColors; +ILint a, b; +ILubyte *buf1, *buf2;*/ + +ILuint n2(ILint s) +{ + ILint i; + ILint res; + + res = 1; + for (i = 0; i < s; i++) { + res = res*2; + } + + return res; +} + + +// Build 3-D color histogram of counts, r/g/b, c^2 +ILboolean Hist3d(ILubyte *Ir, ILubyte *Ig, ILubyte *Ib, ILint *vwt, ILint *vmr, ILint *vmg, ILint *vmb, ILfloat *m2) +{ + ILint ind, r, g, b; + ILint inr, ing, inb, table[2560]; + ILuint i; + + for (i = 0; i < 256; i++) + { + table[i] = i * i; + } + Qadd = (ILushort*)ialloc(sizeof(ILushort) * size); + if (Qadd == NULL) + { + return IL_FALSE; + } + + imemclear(Qadd, sizeof(ILushort) * size); + + for (i = 0; i < size; i++) + { + r = Ir[i]; g = Ig[i]; b = Ib[i]; + inr = (r>>3) + 1; + ing = (g>>3) + 1; + inb = (b>>3) + 1; + Qadd[i] = ind = (inr<<10)+(inr<<6)+inr+(ing<<5)+ing+inb; + //[inr][ing][inb] + vwt[ind]++; + vmr[ind] += r; + vmg[ind] += g; + vmb[ind] += b; + m2[ind] += (ILfloat)(table[r]+table[g]+table[b]); + } + return IL_TRUE; +} + +/* At conclusion of the histogram step, we can interpret + * wt[r][g][b] = sum over voxel of P(c) + * mr[r][g][b] = sum over voxel of r*P(c) , similarly for mg, mb + * m2[r][g][b] = sum over voxel of c^2*P(c) + * Actually each of these should be divided by 'size' to give the usual + * interpretation of P() as ranging from 0 to 1, but we needn't do that here. + */ + +/* We now convert histogram into moments so that we can rapidly calculate + * the sums of the above quantities over any desired Box. + */ + + +// Compute cumulative moments +void M3d(ILint *vwt, ILint *vmr, ILint *vmg, ILint *vmb, ILfloat *m2) +{ + ILushort ind1, ind2; + ILubyte i, r, g, b; + ILint line, line_r, line_g, line_b, area[33], area_r[33], area_g[33], area_b[33]; + ILfloat line2, area2[33]; + + for (r = 1; r <= 32; r++) { + for (i = 0; i <= 32; i++) { + area2[i] = 0.0f; + area[i]=area_r[i]=area_g[i]=area_b[i]=0; + } + for (g = 1; g <= 32; g++) { + line2 = 0.0f; + line = line_r = line_g = line_b = 0; + for (b = 1; b <= 32; b++) { + ind1 = (r<<10) + (r<<6) + r + (g<<5) + g + b; // [r][g][b] + line += vwt[ind1]; + line_r += vmr[ind1]; + line_g += vmg[ind1]; + line_b += vmb[ind1]; + line2 += m2[ind1]; + area[b] += line; + area_r[b] += line_r; + area_g[b] += line_g; + area_b[b] += line_b; + area2[b] += line2; + ind2 = ind1 - 1089; // [r-1][g][b] + vwt[ind1] = vwt[ind2] + area[b]; + vmr[ind1] = vmr[ind2] + area_r[b]; + vmg[ind1] = vmg[ind2] + area_g[b]; + vmb[ind1] = vmb[ind2] + area_b[b]; + m2[ind1] = m2[ind2] + area2[b]; + } + } + } + + return; +} + + +// Compute sum over a Box of any given statistic +ILint Vol(Box *cube, ILint mmt[33][33][33]) +{ + return( mmt[cube->r1][cube->g1][cube->b1] + -mmt[cube->r1][cube->g1][cube->b0] + -mmt[cube->r1][cube->g0][cube->b1] + +mmt[cube->r1][cube->g0][cube->b0] + -mmt[cube->r0][cube->g1][cube->b1] + +mmt[cube->r0][cube->g1][cube->b0] + +mmt[cube->r0][cube->g0][cube->b1] + -mmt[cube->r0][cube->g0][cube->b0] ); +} + +/* The next two routines allow a slightly more efficient calculation + * of Vol() for a proposed subBox of a given Box. The sum of Top() + * and Bottom() is the Vol() of a subBox split in the given direction + * and with the specified new upper bound. + */ + +// Compute part of Vol(cube, mmt) that doesn't depend on r1, g1, or b1 +// (depending on dir) +ILint Bottom(Box *cube, ILubyte dir, ILint mmt[33][33][33]) +{ + switch(dir) + { + case RED: + return( -mmt[cube->r0][cube->g1][cube->b1] + +mmt[cube->r0][cube->g1][cube->b0] + +mmt[cube->r0][cube->g0][cube->b1] + -mmt[cube->r0][cube->g0][cube->b0] ); + break; + case GREEN: + return( -mmt[cube->r1][cube->g0][cube->b1] + +mmt[cube->r1][cube->g0][cube->b0] + +mmt[cube->r0][cube->g0][cube->b1] + -mmt[cube->r0][cube->g0][cube->b0] ); + break; + case BLUE: + return( -mmt[cube->r1][cube->g1][cube->b0] + +mmt[cube->r1][cube->g0][cube->b0] + +mmt[cube->r0][cube->g1][cube->b0] + -mmt[cube->r0][cube->g0][cube->b0] ); + break; + } + return 0; +} + + +// Compute remainder of Vol(cube, mmt), substituting pos for +// r1, g1, or b1 (depending on dir) +ILint Top(Box *cube, ILubyte dir, ILint pos, ILint mmt[33][33][33]) +{ + switch (dir) + { + case RED: + return( mmt[pos][cube->g1][cube->b1] + -mmt[pos][cube->g1][cube->b0] + -mmt[pos][cube->g0][cube->b1] + +mmt[pos][cube->g0][cube->b0] ); + break; + case GREEN: + return( mmt[cube->r1][pos][cube->b1] + -mmt[cube->r1][pos][cube->b0] + -mmt[cube->r0][pos][cube->b1] + +mmt[cube->r0][pos][cube->b0] ); + break; + case BLUE: + return( mmt[cube->r1][cube->g1][pos] + -mmt[cube->r1][cube->g0][pos] + -mmt[cube->r0][cube->g1][pos] + +mmt[cube->r0][cube->g0][pos] ); + break; + } + + return 0; +} + + +// Compute the weighted variance of a Box +// NB: as with the raw statistics, this is really the variance * size +ILfloat Var(Box *cube) +{ + ILfloat dr, dg, db, xx; + + dr = (ILfloat)Vol(cube, mr); + dg = (ILfloat)Vol(cube, mg); + db = (ILfloat)Vol(cube, mb); + xx = gm2[cube->r1][cube->g1][cube->b1] + -gm2[cube->r1][cube->g1][cube->b0] + -gm2[cube->r1][cube->g0][cube->b1] + +gm2[cube->r1][cube->g0][cube->b0] + -gm2[cube->r0][cube->g1][cube->b1] + +gm2[cube->r0][cube->g1][cube->b0] + +gm2[cube->r0][cube->g0][cube->b1] + -gm2[cube->r0][cube->g0][cube->b0]; + + return xx - (dr*dr+dg*dg+db*db) / (ILfloat)Vol(cube, wt); +} + +/* We want to minimize the sum of the variances of two subBoxes. + * The sum(c^2) terms can be ignored since their sum over both subBoxes + * is the same (the sum for the whole Box) no matter where we split. + * The remaining terms have a minus sign in the variance formula, + * so we drop the minus sign and MAXIMIZE the sum of the two terms. + */ + +ILfloat Maximize(Box *cube, ILubyte dir, ILint first, ILint last, ILint *cut, + ILint whole_r, ILint whole_g, ILint whole_b, ILint whole_w) +{ + ILint half_r, half_g, half_b, half_w; + ILint base_r, base_g, base_b, base_w; + ILint i; + ILfloat temp, max; + + base_r = Bottom(cube, dir, mr); + base_g = Bottom(cube, dir, mg); + base_b = Bottom(cube, dir, mb); + base_w = Bottom(cube, dir, wt); + max = 0.0; + *cut = -1; + + for (i = first; i < last; ++i) { + half_r = base_r + Top(cube, dir, i, mr); + half_g = base_g + Top(cube, dir, i, mg); + half_b = base_b + Top(cube, dir, i, mb); + half_w = base_w + Top(cube, dir, i, wt); + // Now half_x is sum over lower half of Box, if split at i + if (half_w == 0) { // subBox could be empty of pixels! + continue; // never split into an empty Box + } + else { + temp = ((ILfloat)half_r*half_r + (ILfloat)half_g * half_g + + (ILfloat)half_b*half_b) / half_w; + } + + half_r = whole_r - half_r; + half_g = whole_g - half_g; + half_b = whole_b - half_b; + half_w = whole_w - half_w; + if (half_w == 0) { // subBox could be empty of pixels! + continue; // never split into an empty Box + } + else { + temp += ((ILfloat)half_r*half_r + (ILfloat)half_g * half_g + + (ILfloat)half_b*half_b) / half_w; + } + + if (temp > max) { + max = temp; + *cut = i; + } + } + + return max; +} + + +ILint Cut(Box *set1, Box *set2) +{ + ILubyte dir; + ILint cutr, cutg, cutb; + ILfloat maxr, maxg, maxb; + ILint whole_r, whole_g, whole_b, whole_w; + + whole_r = Vol(set1, mr); + whole_g = Vol(set1, mg); + whole_b = Vol(set1, mb); + whole_w = Vol(set1, wt); + + maxr = Maximize(set1, RED, set1->r0+1, set1->r1, &cutr, whole_r, whole_g, whole_b, whole_w); + maxg = Maximize(set1, GREEN, set1->g0+1, set1->g1, &cutg, whole_r, whole_g, whole_b, whole_w); + maxb = Maximize(set1, BLUE, set1->b0+1, set1->b1, &cutb, whole_r, whole_g, whole_b, whole_w); + + if ((maxr >= maxg) && (maxr >= maxb)) { + dir = RED; + if (cutr < 0) + return 0; // can't split the Box + } + else if ((maxg >= maxr) && (maxg >= maxb)) + dir = GREEN; + else + dir = BLUE; + + set2->r1 = set1->r1; + set2->g1 = set1->g1; + set2->b1 = set1->b1; + + switch (dir) + { + case RED: + set2->r0 = set1->r1 = cutr; + set2->g0 = set1->g0; + set2->b0 = set1->b0; + break; + case GREEN: + set2->g0 = set1->g1 = cutg; + set2->r0 = set1->r0; + set2->b0 = set1->b0; + break; + case BLUE: + set2->b0 = set1->b1 = cutb; + set2->r0 = set1->r0; + set2->g0 = set1->g0; + break; + } + + set1->vol = (set1->r1-set1->r0) * (set1->g1-set1->g0) * (set1->b1-set1->b0); + set2->vol = (set2->r1-set2->r0) * (set2->g1-set2->g0) * (set2->b1-set2->b0); + + return 1; +} + + +void Mark(struct Box *cube, int label, unsigned char *tag) +{ + ILint r, g, b; + + for (r = cube->r0 + 1; r <= cube->r1; r++) { + for (g = cube->g0 + 1; g <= cube->g1; g++) { + for (b = cube->b0 + 1; b <= cube->b1; b++) { + tag[(r<<10) + (r<<6) + r + (g<<5) + g + b] = label; + } + } + } + return; +} + + +ILimage *iQuantizeImage(ILimage *Image, ILuint NumCols) +{ + Box cube[MAXCOLOR]; + ILubyte *tag = NULL; + ILubyte lut_r[MAXCOLOR], lut_g[MAXCOLOR], lut_b[MAXCOLOR]; + ILint next; + ILint weight; + ILuint k; + ILfloat vv[MAXCOLOR], temp; + //ILint color_num; + ILubyte *NewData = NULL, *Palette = NULL; + ILimage *TempImage = NULL, *NewImage = NULL; + ILubyte *Ir = NULL, *Ig = NULL, *Ib = NULL; + + ILint num_alloced_colors; // number of colors we allocated space for in palette, as NumCols but will not be less than 256 + + num_alloced_colors=NumCols; + if(num_alloced_colors<256) { num_alloced_colors=256; } + + + NewImage = iCurImage; + iCurImage = Image; + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + iCurImage = NewImage; + + + + if (TempImage == NULL) + return NULL; + + buffer = Image->Data; + WindW = Width = Image->Width; + WindH = Height = Image->Height; + WindD = Depth = Image->Depth; + Comp = Image->Bpp; + Qadd = NULL; + + //color_num = ImagePrecalculate(Image); + + NewData = (ILubyte*)ialloc(Image->Width * Image->Height * Image->Depth); + Palette = (ILubyte*)ialloc(3 * num_alloced_colors); + if (!NewData || !Palette) { + ifree(NewData); + ifree(Palette); + return NULL; + } + + Ir = (ILubyte*)ialloc(Width * Height * Depth); + Ig = (ILubyte*)ialloc(Width * Height * Depth); + Ib = (ILubyte*)ialloc(Width * Height * Depth); + if (!Ir || !Ig || !Ib) { + ifree(Ir); + ifree(Ig); + ifree(Ib); + ifree(NewData); + ifree(Palette); + return NULL; + } + + size = Width * Height * Depth; + + #ifdef ALTIVEC_GCC + register ILuint v_size = size>>4; + register ILuint pos = 0; + v_size = v_size /3; + register vector unsigned char d0,d1,d2; + register vector unsigned char red[3],blu[3],green[3]; + + register union{ + vector unsigned char vec; + vector unsigned int load; + } mask_1, mask_2, mask_3; + + mask_1.load = (vector unsigned int){0xFF0000FF,0x0000FF00,0x00FF0000,0xFF0000FF}; + mask_2.load = (vector unsigned int){0x00FF0000,0xFF0000FF,0x0000FF00,0x00FF0000}; + mask_2.load = (vector unsigned int){0x0000FF00,0x00FF0000,0xFF0000FF,0x0000FF00}; + + while( v_size >= 0 ) { + d0 = vec_ld(pos,TempImage->Data); + d1 = vec_ld(pos+16,TempImage->Data); + d2 = vec_ld(pos+32,TempImage->Data); + + red[0] = vec_and(d0,mask_1.vec); + green[0] = vec_and(d0,mask_2.vec); + blu[0] = vec_and(d0,mask_3.vec); + + red[1] = vec_and(d1,mask_3.vec); + green[1] = vec_and(d1,mask_1.vec); + blu[1] = vec_and(d1,mask_2.vec); + + red[2] = vec_and(d2,mask_2.vec); + green[2] = vec_and(d2,mask_3.vec); + blu[2] = vec_and(d2,mask_1.vec); + + vec_st(red[0],pos,Ir); + vec_st(red[1],pos+16,Ir); + vec_st(red[2],pos+32,Ir); + + vec_st(blu[0],pos,Ib); + vec_st(blu[1],pos+16,Ib); + vec_st(blu[2],pos+32,Ib); + + vec_st(green[0],pos,Ig); + vec_st(green[1],pos+16,Ig); + vec_st(green[2],pos+32,Ig); + + pos += 48; + } + size -= pos; + #endif + + for (k = 0; k < size; k++) { + Ir[k] = TempImage->Data[k * 3]; + Ig[k] = TempImage->Data[k * 3 + 1]; + Ib[k] = TempImage->Data[k * 3 + 2]; + } + + #ifdef ALTIVEC_GCC + size = Width * Height * Depth; + #endif + + // Set new colors number + K = NumCols; + + if (K <= 256) { + // Begin Wu's color quantization algorithm + + // May have "leftovers" from a previous run. + + imemclear(gm2, 33 * 33 * 33 * sizeof(ILfloat)); + imemclear(wt, 33 * 33 * 33 * sizeof(ILint)); + imemclear(mr, 33 * 33 * 33 * sizeof(ILint)); + imemclear(mg, 33 * 33 * 33 * sizeof(ILint)); + imemclear(mb, 33 * 33 * 33 * sizeof(ILint)); + + if (!Hist3d(Ir, Ig, Ib, (ILint*)wt, (ILint*)mr, (ILint*)mg, (ILint*)mb, (ILfloat*)gm2)) + goto error_label; + + M3d((ILint*)wt, (ILint*)mr, (ILint*)mg, (ILint*)mb, (ILfloat*)gm2); + + cube[0].r0 = cube[0].g0 = cube[0].b0 = 0; + cube[0].r1 = cube[0].g1 = cube[0].b1 = 32; + next = 0; + for (i = 1; i < K; ++i) { + if (Cut(&cube[next], &cube[i])) { // volume test ensures we won't try to cut one-cell Box */ + vv[next] = (cube[next].vol>1) ? Var(&cube[next]) : 0.0f; + vv[i] = (cube[i].vol>1) ? Var(&cube[i]) : 0.0f; + } + else { + vv[next] = 0.0; // don't try to split this Box again + i--; // didn't create Box i + } + next = 0; + temp = vv[0]; + for (k = 1; (ILint)k <= i; ++k) { + if (vv[k] > temp) { + temp = vv[k]; next = k; + } + } + + if (temp <= 0.0) { + K = i+1; + // Only got K Boxes + break; + } + } + + tag = (ILubyte*)ialloc(33 * 33 * 33 * sizeof(ILubyte)); + if (tag == NULL) + goto error_label; + for (k = 0; (ILint)k < K; k++) { + Mark(&cube[k], k, tag); + weight = Vol(&cube[k], wt); + if (weight) { + lut_r[k] = (ILubyte)(Vol(&cube[k], mr) / weight); + lut_g[k] = (ILubyte)(Vol(&cube[k], mg) / weight); + lut_b[k] = (ILubyte)(Vol(&cube[k], mb) / weight); + } + else { + // Bogus Box + lut_r[k] = lut_g[k] = lut_b[k] = 0; + } + } + + for (i = 0; i < (ILint)size; i++) { + NewData[i] = tag[Qadd[i]]; + } + ifree(tag); + ifree(Qadd); + + for (k = 0; k < NumCols; k++) { + Palette[k * 3] = lut_b[k]; + Palette[k * 3 + 1] = lut_g[k]; + Palette[k * 3 + 2] = lut_r[k]; + } + } + else { // If colors more than 256 + // Begin Octree quantization + //Quant_Octree(Image->Width, Image->Height, Image->Bpp, buffer2, NewData, Palette, K); + ilSetError(IL_INTERNAL_ERROR); // Can't get much more specific than this. + goto error_label; + } + + ifree(Ig); + ifree(Ib); + ifree(Ir); + ilCloseImage(TempImage); + + NewImage = (ILimage*)icalloc(sizeof(ILimage), 1); + if (NewImage == NULL) { + return NULL; + } + ilCopyImageAttr(NewImage, Image); + NewImage->Bpp = 1; + NewImage->Bps = Image->Width; + NewImage->SizeOfPlane = NewImage->Bps * Image->Height; + NewImage->SizeOfData = NewImage->SizeOfPlane; + NewImage->Format = IL_COLOUR_INDEX; + NewImage->Type = IL_UNSIGNED_BYTE; + + NewImage->Pal.Palette = Palette; + NewImage->Pal.PalSize = 256 * 3; + NewImage->Pal.PalType = IL_PAL_BGR24; + NewImage->Data = NewData; + + return NewImage; + +error_label: + ifree(NewData); + ifree(Palette); + ifree(Ig); + ifree(Ib); + ifree(Ir); + ifree(tag); + ifree(Qadd); + return NULL; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_raw.c b/libs/DevIL-1.7.8/src-IL/src/il_raw.c new file mode 100644 index 00000000..659b8a72 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_raw.c @@ -0,0 +1,188 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_raw.c +// +// Description: "Raw" file functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_RAW + + +ILboolean iLoadRawInternal(void); +ILboolean iSaveRawInternal(void); + + +//! Reads a raw file +ILboolean ilLoadRaw(ILconst_string FileName) +{ + ILHANDLE RawFile; + ILboolean bRaw = IL_FALSE; + + // No need to check for raw + /*if (!iCheckExtension(FileName, "raw")) { + ilSetError(IL_INVALID_EXTENSION); + return bRaw; + }*/ + + RawFile = iopenr(FileName); + if (RawFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bRaw; + } + + bRaw = ilLoadRawF(RawFile); + icloser(RawFile); + + return bRaw; +} + + +//! Reads an already-opened raw file +ILboolean ilLoadRawF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadRawInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a raw memory "lump" +ILboolean ilLoadRawL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadRawInternal(); +} + + +// Internal function to load a raw image +ILboolean iLoadRawInternal() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + + iCurImage->Width = GetLittleUInt(); + + iCurImage->Height = GetLittleUInt(); + + iCurImage->Depth = GetLittleUInt(); + + iCurImage->Bpp = (ILubyte)igetc(); + + if (iread(&iCurImage->Bpc, 1, 1) != 1) + return IL_FALSE; + + if (!ilTexImage(iCurImage->Width, iCurImage->Height, iCurImage->Depth, iCurImage->Bpp, 0, ilGetTypeBpc(iCurImage->Bpc), NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + // Tries to read the correct amount of data + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) < iCurImage->SizeOfData) + return IL_FALSE; + + if (ilIsEnabled(IL_ORIGIN_SET)) { + iCurImage->Origin = ilGetInteger(IL_ORIGIN_MODE); + } + else { + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + } + + if (iCurImage->Bpp == 1) + iCurImage->Format = IL_LUMINANCE; + else if (iCurImage->Bpp == 3) + iCurImage->Format = IL_RGB; + else // 4 + iCurImage->Format = IL_RGBA; + + return ilFixImage(); +} + + +//! Writes a Raw file +ILboolean ilSaveRaw(const ILstring FileName) +{ + ILHANDLE RawFile; + ILuint RawSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + RawFile = iopenw(FileName); + if (RawFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + RawSize = ilSaveRawF(RawFile); + iclosew(RawFile); + + if (RawSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes Raw to an already-opened file +ILuint ilSaveRawF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveRawInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes Raw to a memory "lump" +ILuint ilSaveRawL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveRawInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to load the raw data. +ILboolean iSaveRawInternal() +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + SaveLittleUInt(iCurImage->Width); + SaveLittleUInt(iCurImage->Height); + SaveLittleUInt(iCurImage->Depth); + iputc(iCurImage->Bpp); + iputc(iCurImage->Bpc); + iwrite(iCurImage->Data, 1, iCurImage->SizeOfData); + + return IL_TRUE; +} + + +#endif//IL_NO_RAW diff --git a/libs/DevIL-1.7.8/src-IL/src/il_rawdata.c b/libs/DevIL-1.7.8/src-IL/src/il_rawdata.c new file mode 100644 index 00000000..1bda0bd7 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_rawdata.c @@ -0,0 +1,121 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/rawdata.c +// +// Description: "Raw" file functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +//#ifndef IL_NO_DATA +#include "il_manip.h" + + +ILboolean iLoadDataInternal(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp); + + +//! Reads a raw data file +ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp) +{ + ILHANDLE RawFile; + ILboolean bRaw = IL_FALSE; + + // No need to check for raw data + /*if (!iCheckExtension(FileName, "raw")) { + ilSetError(IL_INVALID_EXTENSION); + return bRaw; + }*/ + + RawFile = iopenr(FileName); + if (RawFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bRaw; + } + + bRaw = ilLoadDataF(RawFile, Width, Height, Depth, Bpp); + icloser(RawFile); + + return bRaw; +} + + +//! Reads an already-opened raw data file +ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadDataInternal(Width, Height, Depth, Bpp); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a raw data memory "lump" +ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp) +{ + iSetInputLump(Lump, Size); + return iLoadDataInternal(Width, Height, Depth, Bpp); +} + + +// Internal function to load a raw data image +ILboolean iLoadDataInternal(ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp) +{ + if (iCurImage == NULL || ((Bpp != 1) && (Bpp != 3) && (Bpp != 4))) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!ilTexImage(Width, Height, Depth, Bpp, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + // Tries to read the correct amount of data + if (iread(iCurImage->Data, Width * Height * Depth * Bpp, 1) != 1) + return IL_FALSE; + + if (iCurImage->Bpp == 1) + iCurImage->Format = IL_LUMINANCE; + else if (iCurImage->Bpp == 3) + iCurImage->Format = IL_RGB; + else // 4 + iCurImage->Format = IL_RGBA; + + return ilFixImage(); +} + + +//! Save the current image to FileName as raw data +ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName) +{ + ILHANDLE DataFile; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + DataFile = iopenr(FileName); + if (DataFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + iwrite(iCurImage->Data, 1, iCurImage->SizeOfData); + icloser(DataFile); + + return IL_TRUE; +} + + +//#endif//IL_NO_DATA diff --git a/libs/DevIL-1.7.8/src-IL/src/il_register.c b/libs/DevIL-1.7.8/src-IL/src/il_register.c new file mode 100644 index 00000000..fb095844 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_register.c @@ -0,0 +1,434 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/07/2008 +// +// Filename: src-IL/src/il_register.c +// +// Description: Allows the caller to specify user-defined callback functions +// to open files DevIL does not support, to parse files +// differently, or anything else a person can think up. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_register.h" +#include + + +// Linked lists of registered formats +iFormatL *LoadProcs = NULL; +iFormatS *SaveProcs = NULL; + + +ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load) { + iFormatL *TempNode, *NewNode; + + TempNode = LoadProcs; + if (TempNode != NULL) { + while (TempNode->Next != NULL) { + TempNode = TempNode->Next; + if (!iStrCmp(TempNode->Ext, Ext)) { // already registered + return IL_TRUE; + } + } + } + + NewNode = (iFormatL*)ialloc(sizeof(iFormatL)); + if (NewNode == NULL) { + return IL_FALSE; + } + + if (LoadProcs == NULL) { + LoadProcs = NewNode; + } + else { + TempNode->Next = NewNode; + } + + NewNode->Ext = ilStrDup(Ext); + NewNode->Load = Load; + NewNode->Next = NULL; + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save) +{ + iFormatS *TempNode, *NewNode; + + TempNode = SaveProcs; + if (TempNode != NULL) { + while (TempNode->Next != NULL) { + TempNode = TempNode->Next; + if (!iStrCmp(TempNode->Ext, Ext)) { // already registered + return IL_TRUE; + } + } + } + + NewNode = (iFormatS*)ialloc(sizeof(iFormatL)); + if (NewNode == NULL) { + return IL_FALSE; + } + + if (SaveProcs == NULL) { + SaveProcs = NewNode; + } + else { + TempNode->Next = NewNode; + } + + NewNode->Ext = ilStrDup(Ext); + NewNode->Save = Save; + NewNode->Next = NULL; + + return IL_TRUE; +} + + +//! Unregisters a load extension - doesn't have to be called. +ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext) +{ + iFormatL *TempNode = LoadProcs, *PrevNode = NULL; + + while (TempNode != NULL) { + if (!iStrCmp(Ext, TempNode->Ext)) { + if (PrevNode == NULL) { // first node in the list + LoadProcs = TempNode->Next; + ifree((void*)TempNode->Ext); + ifree(TempNode); + } + else { + PrevNode->Next = TempNode->Next; + ifree((void*)TempNode->Ext); + ifree(TempNode); + } + + return IL_TRUE; + } + + PrevNode = TempNode; + TempNode = TempNode->Next; + } + + return IL_FALSE; +} + + +//! Unregisters a save extension - doesn't have to be called. +ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext) +{ + iFormatS *TempNode = SaveProcs, *PrevNode = NULL; + + while (TempNode != NULL) { + if (!iStrCmp(Ext, TempNode->Ext)) { + if (PrevNode == NULL) { // first node in the list + SaveProcs = TempNode->Next; + ifree((void*)TempNode->Ext); + ifree(TempNode); + } + else { + PrevNode->Next = TempNode->Next; + ifree((void*)TempNode->Ext); + ifree(TempNode); + } + + return IL_TRUE; + } + + PrevNode = TempNode; + TempNode = TempNode->Next; + } + + return IL_FALSE; +} + + +// Automatically removes all registered formats. +void ilRemoveRegistered() +{ + iFormatL *TempNodeL = LoadProcs; + iFormatS *TempNodeS = SaveProcs; + + while (LoadProcs != NULL) { + TempNodeL = LoadProcs->Next; + ifree((void*)LoadProcs->Ext); + ifree(LoadProcs); + LoadProcs = TempNodeL; + } + + while (SaveProcs != NULL) { + TempNodeS = SaveProcs->Next; + ifree((void*)SaveProcs->Ext); + ifree(SaveProcs); + SaveProcs = TempNodeS; + } + + return; +} + + +ILboolean iRegisterLoad(ILconst_string FileName) +{ + iFormatL *TempNode = LoadProcs; + ILstring Ext = iGetExtension(FileName); + ILenum Error; + + if (!Ext) + return IL_FALSE; + + while (TempNode != NULL) { + if (!iStrCmp(Ext, TempNode->Ext)) { + Error = TempNode->Load(FileName); + if (Error == IL_NO_ERROR || Error == 0) { // 0 and IL_NO_ERROR are both valid. + return IL_TRUE; + } + else { + ilSetError(Error); + return IL_FALSE; + } + } + TempNode = TempNode->Next; + } + + return IL_FALSE; +} + + +ILboolean iRegisterSave(ILconst_string FileName) +{ + iFormatS *TempNode = SaveProcs; + ILstring Ext = iGetExtension(FileName); + ILenum Error; + + if (!Ext) + return IL_FALSE; + + while (TempNode != NULL) { + if (!iStrCmp(Ext, TempNode->Ext)) { + Error = TempNode->Save(FileName); + if (Error == IL_NO_ERROR || Error == 0) { // 0 and IL_NO_ERROR are both valid. + return IL_TRUE; + } + else { + ilSetError(Error); + return IL_FALSE; + } + } + TempNode = TempNode->Next; + } + + return IL_FALSE; +} + + +// +// "Reporting" functions +// + +void ILAPIENTRY ilRegisterOrigin(ILenum Origin) +{ + switch (Origin) + { + case IL_ORIGIN_LOWER_LEFT: + case IL_ORIGIN_UPPER_LEFT: + iCurImage->Origin = Origin; + break; + default: + ilSetError(IL_INVALID_ENUM); + } + return; +} + + +void ILAPIENTRY ilRegisterFormat(ILenum Format) +{ + switch (Format) + { + case IL_COLOUR_INDEX: + case IL_RGB: + case IL_RGBA: + case IL_BGR: + case IL_BGRA: + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + iCurImage->Format = Format; + break; + default: + ilSetError(IL_INVALID_ENUM); + } + return; +} + + +ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num) +{ + ILimage *Next, *Prev; + + ilBindImage(ilGetCurName()); // Make sure the current image is actually bound. + ilCloseImage(iCurImage->Faces); // Close any current mipmaps. + + iCurImage->Faces = NULL; + if (Num == 0) // Just gets rid of all the mipmaps. + return IL_TRUE; + + iCurImage->Faces = ilNewImage(1, 1, 1, 1, 1); + if (iCurImage->Faces == NULL) + return IL_FALSE; + Next = iCurImage->Faces; + Num--; + + while (Num) { + Next->Faces = ilNewImage(1, 1, 1, 1, 1); + if (Next->Faces == NULL) { + // Clean up before we error out. + Prev = iCurImage->Faces; + while (Prev) { + Next = Prev->Faces; + ilCloseImage(Prev); + Prev = Next; + } + return IL_FALSE; + } + Next = Next->Faces; + Num--; + } + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num) +{ + ILimage *Next, *Prev; + + ilBindImage(ilGetCurName()); // Make sure the current image is actually bound. + ilCloseImage(iCurImage->Mipmaps); // Close any current mipmaps. + + iCurImage->Mipmaps = NULL; + if (Num == 0) // Just gets rid of all the mipmaps. + return IL_TRUE; + + iCurImage->Mipmaps = ilNewImage(1, 1, 1, 1, 1); + if (iCurImage->Mipmaps == NULL) + return IL_FALSE; + Next = iCurImage->Mipmaps; + Num--; + + while (Num) { + Next->Next = ilNewImage(1, 1, 1, 1, 1); + if (Next->Next == NULL) { + // Clean up before we error out. + Prev = iCurImage->Mipmaps; + while (Prev) { + Next = Prev->Next; + ilCloseImage(Prev); + Prev = Next; + } + return IL_FALSE; + } + Next = Next->Next; + Num--; + } + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num) +{ + ILimage *Next, *Prev; + + ilBindImage(ilGetCurName()); // Make sure the current image is actually bound. + ilCloseImage(iCurImage->Next); // Close any current "next" images. + + iCurImage->Next = NULL; + if (Num == 0) // Just gets rid of all the "next" images. + return IL_TRUE; + + iCurImage->Next = ilNewImage(1, 1, 1, 1, 1); + if (iCurImage->Next == NULL) + return IL_FALSE; + Next = iCurImage->Next; + Num--; + + while (Num) { + Next->Next = ilNewImage(1, 1, 1, 1, 1); + if (Next->Next == NULL) { + // Clean up before we error out. + Prev = iCurImage->Next; + while (Prev) { + Next = Prev->Next; + ilCloseImage(Prev); + Prev = Next; + } + return IL_FALSE; + } + Next = Next->Next; + Num--; + } + + return IL_TRUE; +} + + +void ILAPIENTRY ilRegisterType(ILenum Type) +{ + switch (Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + case IL_SHORT: + case IL_UNSIGNED_SHORT: + case IL_INT: + case IL_UNSIGNED_INT: + case IL_FLOAT: + case IL_DOUBLE: + iCurImage->Type = Type; + break; + default: + ilSetError(IL_INVALID_ENUM); + } + + return; +} + + +void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type) +{ + if (!iCurImage->Pal.Palette || !iCurImage->Pal.PalSize || iCurImage->Pal.PalType != IL_PAL_NONE) { + ifree(iCurImage->Pal.Palette); + } + + iCurImage->Pal.PalSize = Size; + iCurImage->Pal.PalType = Type; + iCurImage->Pal.Palette = (ILubyte*)ialloc(Size); + if (iCurImage->Pal.Palette == NULL) + return; + + if (Pal != NULL) { + memcpy(iCurImage->Pal.Palette, Pal, Size); + } + else { + ilSetError(IL_INVALID_PARAM); + } + + return; +} + + +ILboolean ILAPIENTRY ilSetDuration(ILuint Duration) +{ + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iCurImage->Duration = Duration; + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_rle.c b/libs/DevIL-1.7.8/src-IL/src/il_rle.c new file mode 100644 index 00000000..5644f8e3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_rle.c @@ -0,0 +1,153 @@ +//----------------------------------------------------------------------------- +// Description: Functions for run-length encoding +//----------------------------------------------------------------------------- + +// RLE code from TrueVision's TGA sample code available as Tgautils.zip at +// ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/PC.Version + +#define IL_RLE_C + +#include "il_internal.h" +#include "il_rle.h" + +ILboolean ilRleCompressLine(ILubyte *p, ILuint n, ILubyte bpp, + ILubyte *q, ILuint *DestWidth, ILenum CompressMode) { + + ILint DiffCount; // pixel count until two identical + ILint SameCount; // number of identical adjacent pixels + ILint RLEBufSize = 0; // count of number of bytes encoded + ILint MaxRun; + const ILint bmp_pad_to_even = 1 - ((ILint)q - *DestWidth) % 2; + + switch( CompressMode ) { + case IL_TGACOMP: + MaxRun = TGA_MAX_RUN; + break; + case IL_SGICOMP: + MaxRun = SGI_MAX_RUN; + break; + case IL_BMPCOMP: + MaxRun = BMP_MAX_RUN; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + + while( n > 0 ) { + // Analyze pixels + DiffCount = CountDiffPixels(p, bpp, (ILint)n > MaxRun ? MaxRun : n); + SameCount = CountSamePixels(p, bpp, (ILint)n > MaxRun ? MaxRun : n); + + if( CompressMode == IL_BMPCOMP ) { + ILint remaining_data = n - DiffCount - SameCount; + if( remaining_data < 3 ) { // check if the run has gone near the end + // no absolute run can be done + // complete the line adding 0x01 + pixel, for each pixel + while( remaining_data > 0 ) { + *q++ = 0x01; + *q++ = *p++; + remaining_data--; + } + DiffCount = 0; + SameCount = 0; + n = 0; + } + } + + if( DiffCount > 0 ) { // create a raw packet (bmp absolute run) + switch(CompressMode) { + case IL_TGACOMP: + *q++ = (ILbyte)(DiffCount - 1); + break; + case IL_BMPCOMP: + *q++ = 0x00; RLEBufSize++; + *q++ = (ILbyte)DiffCount; + break; + case IL_SGICOMP: + *q++ = (ILbyte)(DiffCount | 0x80); + break; + } + n -= DiffCount; + RLEBufSize += (DiffCount * bpp) + 1; + + while( DiffCount > 0 ) { + switch(bpp) { + case 4: *q++ = *p++; + case 3: *q++ = *p++; + case 2: *q++ = *p++; + case 1: *q++ = *p++; + } + DiffCount--; + } + + if( CompressMode == IL_BMPCOMP ) { + if( (size_t)q % 2 == bmp_pad_to_even ) { + *q++ = 0x00; // insert padding + } + } + } + + if( SameCount > 1 ) { // create a RLE packet + switch(CompressMode) { + case IL_TGACOMP: + *q++ = (ILbyte)((SameCount - 1) | 0x80); + break; + case IL_SGICOMP: + case IL_BMPCOMP: + *q++ = (ILbyte)(SameCount); + break; + } + n -= SameCount; + RLEBufSize += bpp + 1; + p += (SameCount - 1) * bpp; + *q++ = *p++; + switch(bpp) { + case 4: *q++ = *p++; + case 3: *q++ = *p++; + case 2: *q++ = *p++; + case 1: *q++ = *p++; + } + } + } + + // write line termination code + switch(CompressMode) { + case IL_SGICOMP: + ++RLEBufSize; + *q++ = 0; + break; + case IL_BMPCOMP: + *q++ = 0x00; RLEBufSize++; + *q++ = 0x00; RLEBufSize++; + break; + } + *DestWidth = RLEBufSize; + + return IL_TRUE; +} + + +// Compresses an entire image using run-length encoding +ILuint ilRleCompress(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, + ILubyte *Dest, ILenum CompressMode, ILuint *ScanTable) { + ILuint DestW = 0, i, j, LineLen, Bps = Width * Bpp, SizeOfPlane = Width * Height * Bpp; + + if( ScanTable ) + imemclear(ScanTable,Depth*Height*sizeof(ILuint)); + for( j = 0; j < Depth; j++ ) { + for( i = 0; i < Height; i++ ) { + if( ScanTable ) + *ScanTable++ = DestW; + ilRleCompressLine(Data + j * SizeOfPlane + i * Bps, Width, Bpp, Dest + DestW, &LineLen, CompressMode); + DestW += LineLen; + } + } + + if( CompressMode == IL_BMPCOMP ) { // add end of image + *(Data+DestW) = 0x00; DestW++; + *(Data+DestW) = 0x01; DestW++; + } + + return DestW; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_rot.c b/libs/DevIL-1.7.8/src-IL/src/il_rot.c new file mode 100644 index 00000000..38cf3067 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_rot.c @@ -0,0 +1,289 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/15/2009 +// +// Filename: src-IL/src/il_rot.c +// +// Description: Reads from a Homeworld 2 - Relic Texture (.rot) file. +// +//----------------------------------------------------------------------------- + +// @TODO: +// Note: I am not certain about which is DXT3 and which is DXT5. According to +// http://forums.relicnews.com/showthread.php?t=20512, DXT3 is 1030, and DXT5 +// is 1029. However, neither way seems to work quite right for the alpha. + +#include "il_internal.h" +#ifndef IL_NO_ROT +#include "il_dds.h" + +ILboolean iLoadRotInternal(void); + +#define ROT_RGBA32 1024 +#define ROT_DXT1 1028 +#define ROT_DXT3 1029 +#define ROT_DXT5 1030 + + +//! Reads a ROT file +ILboolean ilLoadRot(ILconst_string FileName) +{ + ILHANDLE RotFile; + ILboolean bRot = IL_FALSE; + + RotFile = iopenr(FileName); + if (RotFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bRot; + } + + bRot = ilLoadRotF(RotFile); + icloser(RotFile); + + return bRot; +} + + +//! Reads an already-opened ROT file +ILboolean ilLoadRotF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadRotInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a ROT +ILboolean ilLoadRotL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadRotInternal(); +} + + +// Internal function used to load the ROT. +ILboolean iLoadRotInternal(void) +{ + ILubyte Form[4], FormName[4]; + ILuint FormLen, Width, Height, Format, Channels, CompSize; + ILuint MipSize, MipLevel, MipWidth, MipHeight; + ILenum FormatIL; + ILimage *Image; + ILboolean BaseCreated = IL_FALSE; + ILubyte *CompData = NULL; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // The first entry in the file must be 'FORM', 0x20 in a big endian integer and then 'HEAD'. + iread(Form, 1, 4); + FormLen = GetBigUInt(); + iread(FormName, 1, 4); + if (strncmp(Form, "FORM", 4) || FormLen != 0x14 || strncmp(FormName, "HEAD", 4)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Next follows the width, height and format in the header. + Width = GetLittleUInt(); + Height = GetLittleUInt(); + Format = GetLittleUInt(); + + //@TODO: More formats. + switch (Format) + { + case ROT_RGBA32: // 32-bit RGBA format + Channels = 4; + FormatIL = IL_RGBA; + break; + + case ROT_DXT1: // DXT1 (no alpha) + Channels = 4; + FormatIL = IL_RGBA; + break; + + case ROT_DXT3: // DXT3 + case ROT_DXT5: // DXT5 + Channels = 4; + FormatIL = IL_RGBA; + // Allocates the maximum needed (the first width/height given in the file). + CompSize = ((Width + 3) / 4) * ((Height + 3) / 4) * 16; + CompData = ialloc(CompSize); + if (CompData == NULL) + return IL_FALSE; + break; + + default: + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (Width == 0 || Height == 0) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + //@TODO: Find out what this is. + GetLittleUInt(); // Skip this for the moment. This appears to be the number of channels. + + // Next comes 'FORM', a length and 'MIPS'. + iread(Form, 1, 4); + FormLen = GetBigUInt(); + iread(FormName, 1, 4); + //@TODO: Not sure if the FormLen has to be anything specific here. + if (strncmp(Form, "FORM", 4) || strncmp(FormName, "MIPS", 4)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + //@TODO: Can these mipmap levels be in any order? Some things may be easier if the answer is no. + Image = iCurImage; + do { + // Then we have 'FORM' again. + iread(Form, 1, 4); + // This is the size of the mipmap data. + MipSize = GetBigUInt(); + iread(FormName, 1, 4); + if (strncmp(Form, "FORM", 4)) { + if (!BaseCreated) { // Our file is malformed. + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + // We have reached the end of the mipmap data. + break; + } + if (strncmp(FormName, "MLVL", 4)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Next is the mipmap attributes (level number, width, height and length) + MipLevel = GetLittleUInt(); + MipWidth = GetLittleUInt(); + MipHeight = GetLittleUInt(); + MipSize = GetLittleUInt(); // This is the same as the previous size listed -20 (for attributes). + + // Lower level mipmaps cannot be larger than the main image. + if (MipWidth > Width || MipHeight > Height || MipSize > CompSize) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Just create our images here. + if (!BaseCreated) { + if (!ilTexImage(MipWidth, MipHeight, 1, Channels, FormatIL, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + BaseCreated = IL_TRUE; + } + else { + Image->Mipmaps = ilNewImageFull(MipWidth, MipHeight, 1, Channels, FormatIL, IL_UNSIGNED_BYTE, NULL); + Image = Image->Mipmaps; + } + + switch (Format) + { + case ROT_RGBA32: // 32-bit RGBA format + if (iread(Image->Data, Image->SizeOfData, 1) != 1) + return IL_FALSE; + break; + + case ROT_DXT1: + // Allocates the size of the compressed data. + CompSize = ((MipWidth + 3) / 4) * ((MipHeight + 3) / 4) * 8; + if (CompSize != MipSize) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + CompData = ialloc(CompSize); + if (CompData == NULL) + return IL_FALSE; + + // Read in the DXT1 data... + if (iread(CompData, CompSize, 1) != 1) + return IL_FALSE; + // ...and decompress it. + if (!DecompressDXT1(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = CompSize; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT1; + CompData = NULL; + } + break; + + case ROT_DXT3: + // Allocates the size of the compressed data. + CompSize = ((MipWidth + 3) / 4) * ((MipHeight + 3) / 4) * 16; + if (CompSize != MipSize) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + CompData = ialloc(CompSize); + if (CompData == NULL) + return IL_FALSE; + + // Read in the DXT3 data... + if (iread(CompData, MipSize, 1) != 1) + return IL_FALSE; + // ...and decompress it. + if (!DecompressDXT3(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = CompSize; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT3; + CompData = NULL; + } + break; + + case ROT_DXT5: + // Allocates the size of the compressed data. + CompSize = ((MipWidth + 3) / 4) * ((MipHeight + 3) / 4) * 16; + if (CompSize != MipSize) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + CompData = ialloc(CompSize); + if (CompData == NULL) + return IL_FALSE; + + // Read in the DXT5 data... + if (iread(CompData, MipSize, 1) != 1) + return IL_FALSE; + // ...and decompress it. + if (!DecompressDXT5(Image, CompData)) { + ifree(CompData); + return IL_FALSE; + } + // Keeps a copy + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = CompSize; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT5; + CompData = NULL; + } + break; + } + ifree(CompData); // Free it if it was not saved. + } while (!ieof()); //@TODO: Is there any other condition that should end this? + + return ilFixImage(); +} + +#endif//IL_NO_ROT + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_sgi.c b/libs/DevIL-1.7.8/src-IL/src/il_sgi.c new file mode 100644 index 00000000..45dc40bb --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_sgi.c @@ -0,0 +1,763 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_sgi.c +// +// Description: Reads and writes Silicon Graphics Inc. (.sgi) files. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_SGI +#include "il_sgi.h" +#include "il_manip.h" +#include + +static char *FName = NULL; + +/*----------------------------------------------------------------------------*/ + +/*! Checks if the file specified in FileName is a valid .sgi file. */ +ILboolean ilIsValidSgi(ILconst_string FileName) +{ + ILHANDLE SgiFile; + ILboolean bSgi = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("sgi"))) { + ilSetError(IL_INVALID_EXTENSION); + return bSgi; + } + + FName = (char*)FileName; + + SgiFile = iopenr(FileName); + if (SgiFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bSgi; + } + + bSgi = ilIsValidSgiF(SgiFile); + icloser(SgiFile); + + return bSgi; +} + +/*----------------------------------------------------------------------------*/ + +/*! Checks if the ILHANDLE contains a valid .sgi file at the current position.*/ +ILboolean ilIsValidSgiF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidSgi(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + +/*----------------------------------------------------------------------------*/ + +//! Checks if Lump is a valid .sgi lump. +ILboolean ilIsValidSgiL(const void *Lump, ILuint Size) +{ + FName = NULL; + iSetInputLump(Lump, Size); + return iIsValidSgi(); +} + +/*----------------------------------------------------------------------------*/ + +// Internal function used to get the .sgi header from the current file. +ILboolean iGetSgiHead(iSgiHeader *Header) +{ + Header->MagicNum = GetBigUShort(); + Header->Storage = (ILbyte)igetc(); + Header->Bpc = (ILbyte)igetc(); + Header->Dim = GetBigUShort(); + Header->XSize = GetBigUShort(); + Header->YSize = GetBigUShort(); + Header->ZSize = GetBigUShort(); + Header->PixMin = GetBigInt(); + Header->PixMax = GetBigInt(); + Header->Dummy1 = GetBigInt(); + iread(Header->Name, 1, 80); + Header->ColMap = GetBigInt(); + iread(Header->Dummy, 1, 404); + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +/* Internal function to get the header and check it. */ +ILboolean iIsValidSgi() +{ + iSgiHeader Head; + + if (!iGetSgiHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(iSgiHeader), IL_SEEK_CUR); // Go ahead and restore to previous state + + return iCheckSgi(&Head); +} + +/*----------------------------------------------------------------------------*/ + +/* Internal function used to check if the HEADER is a valid .sgi header. */ +ILboolean iCheckSgi(iSgiHeader *Header) +{ + if (Header->MagicNum != SGI_MAGICNUM) + return IL_FALSE; + if (Header->Storage != SGI_RLE && Header->Storage != SGI_VERBATIM) + return IL_FALSE; + if (Header->Bpc == 0 || Header->Dim == 0) + return IL_FALSE; + if (Header->XSize == 0 || Header->YSize == 0 || Header->ZSize == 0) + return IL_FALSE; + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +/*! Reads a SGI file */ +ILboolean ilLoadSgi(ILconst_string FileName) +{ + ILHANDLE SgiFile; + ILboolean bSgi = IL_FALSE; + + SgiFile = iopenr(FileName); + if (SgiFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bSgi; + } + + bSgi = ilLoadSgiF(SgiFile); + icloser(SgiFile); + + return bSgi; +} + +/*----------------------------------------------------------------------------*/ + +/*! Reads an already-opened SGI file */ +ILboolean ilLoadSgiF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadSgiInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + +/*----------------------------------------------------------------------------*/ + +/*! Reads from a memory "lump" that contains a SGI image */ +ILboolean ilLoadSgiL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadSgiInternal(); +} + +/*----------------------------------------------------------------------------*/ + +/* Internal function used to load the SGI image */ +ILboolean iLoadSgiInternal() +{ + iSgiHeader Header; + ILboolean bSgi; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetSgiHead(&Header)) + return IL_FALSE; + if (!iCheckSgi(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Bugfix for #1060946. + // The ZSize should never really be 2 by the specifications. Some + // application is outputting these, and it looks like the ZSize + // should really be 1. + if (Header.ZSize == 2) + Header.ZSize = 1; + + if (Header.Storage == SGI_RLE) { // RLE + bSgi = iReadRleSgi(&Header); + } + else { // Non-RLE //(Header.Storage == SGI_VERBATIM) + bSgi = iReadNonRleSgi(&Header); + } + + if (!bSgi) + return IL_FALSE; + return ilFixImage(); +} + +/*----------------------------------------------------------------------------*/ + +ILboolean iReadRleSgi(iSgiHeader *Head) +{ + #ifdef __LITTLE_ENDIAN__ + ILuint ixTable; + #endif + ILuint ChanInt = 0; + ILuint ixPlane, ixHeight,ixPixel, RleOff, RleLen; + ILuint *OffTable=NULL, *LenTable=NULL, TableSize, Cur; + ILubyte **TempData=NULL; + + if (!iNewSgi(Head)) + return IL_FALSE; + + TableSize = Head->YSize * Head->ZSize; + OffTable = (ILuint*)ialloc(TableSize * sizeof(ILuint)); + LenTable = (ILuint*)ialloc(TableSize * sizeof(ILuint)); + if (OffTable == NULL || LenTable == NULL) + goto cleanup_error; + if (iread(OffTable, TableSize * sizeof(ILuint), 1) != 1) + goto cleanup_error; + if (iread(LenTable, TableSize * sizeof(ILuint), 1) != 1) + goto cleanup_error; + +#ifdef __LITTLE_ENDIAN__ + // Fix the offset/len table (it's big endian format) + for (ixTable = 0; ixTable < TableSize; ixTable++) { + iSwapUInt(OffTable + ixTable); + iSwapUInt(LenTable + ixTable); + } +#endif //__LITTLE_ENDIAN__ + + // We have to create a temporary buffer for the image, because SGI + // images are plane-separated. + TempData = (ILubyte**)ialloc(Head->ZSize * sizeof(ILubyte*)); + if (TempData == NULL) + goto cleanup_error; + imemclear(TempData, Head->ZSize * sizeof(ILubyte*)); // Just in case ialloc fails then cleanup_error. + for (ixPlane = 0; ixPlane < Head->ZSize; ixPlane++) { + TempData[ixPlane] = (ILubyte*)ialloc(Head->XSize * Head->YSize * Head->Bpc); + if (TempData[ixPlane] == NULL) + goto cleanup_error; + } + + // Read the Planes into the temporary memory + for (ixPlane = 0; ixPlane < Head->ZSize; ixPlane++) { + for (ixHeight = 0, Cur = 0; ixHeight < Head->YSize; + ixHeight++, Cur += Head->XSize * Head->Bpc) { + + RleOff = OffTable[ixHeight + ixPlane * Head->YSize]; + RleLen = LenTable[ixHeight + ixPlane * Head->YSize]; + + // Seeks to the offset table position + iseek(RleOff, IL_SEEK_SET); + if (iGetScanLine((TempData[ixPlane]) + (ixHeight * Head->XSize * Head->Bpc), + Head, RleLen) != Head->XSize * Head->Bpc) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + goto cleanup_error; + } + } + } + + // DW: Removed on 05/25/2002. + /*// Check if an alphaplane exists and invert it + if (Head->ZSize == 4) { + for (ixPixel=0; (ILint)ixPixelXSize * Head->YSize; ixPixel++) { + TempData[3][ixPixel] = TempData[3][ixPixel] ^ 255; + } + }*/ + + // Assemble the image from its planes + for (ixPixel = 0; ixPixel < iCurImage->SizeOfData; + ixPixel += Head->ZSize * Head->Bpc, ChanInt += Head->Bpc) { + for (ixPlane = 0; (ILint)ixPlane < Head->ZSize * Head->Bpc; ixPlane += Head->Bpc) { + iCurImage->Data[ixPixel + ixPlane] = TempData[ixPlane][ChanInt]; + if (Head->Bpc == 2) + iCurImage->Data[ixPixel + ixPlane + 1] = TempData[ixPlane][ChanInt + 1]; + } + } + + #ifdef __LITTLE_ENDIAN__ + if (Head->Bpc == 2) + sgiSwitchData(iCurImage->Data, iCurImage->SizeOfData); + #endif + + ifree(OffTable); + ifree(LenTable); + + for (ixPlane = 0; ixPlane < Head->ZSize; ixPlane++) { + ifree(TempData[ixPlane]); + } + ifree(TempData); + + return IL_TRUE; + +cleanup_error: + ifree(OffTable); + ifree(LenTable); + if (TempData) { + for (ixPlane = 0; ixPlane < Head->ZSize; ixPlane++) { + ifree(TempData[ixPlane]); + } + ifree(TempData); + } + + return IL_FALSE; +} + +/*----------------------------------------------------------------------------*/ + +ILint iGetScanLine(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length) +{ + ILushort Pixel, Count; // For current pixel + ILuint BppRead = 0, CurPos = 0, Bps = Head->XSize * Head->Bpc; + + while (BppRead < Length && CurPos < Bps) + { + Pixel = 0; + if (iread(&Pixel, Head->Bpc, 1) != 1) + return -1; + +#ifndef __LITTLE_ENDIAN__ + iSwapUShort(&Pixel); +#endif + + if (!(Count = (Pixel & 0x7f))) // If 0, line ends + return CurPos; + if (Pixel & 0x80) { // If top bit set, then it is a "run" + if (iread(ScanLine, Head->Bpc, Count) != Count) + return -1; + BppRead += Head->Bpc * Count + Head->Bpc; + ScanLine += Head->Bpc * Count; + CurPos += Head->Bpc * Count; + } + else { + if (iread(&Pixel, Head->Bpc, 1) != 1) + return -1; +#ifndef __LITTLE_ENDIAN__ + iSwapUShort(&Pixel); +#endif + if (Head->Bpc == 1) { + while (Count--) { + *ScanLine = (ILubyte)Pixel; + ScanLine++; + CurPos++; + } + } + else { + while (Count--) { + *(ILushort*)ScanLine = Pixel; + ScanLine += 2; + CurPos += 2; + } + } + BppRead += Head->Bpc + Head->Bpc; + } + } + + return CurPos; +} + + +/*----------------------------------------------------------------------------*/ + +// Much easier to read - just assemble from planes, no decompression +ILboolean iReadNonRleSgi(iSgiHeader *Head) +{ + ILuint i, c; + // ILint ChanInt = 0; Unused + ILint ChanSize; + ILboolean Cache = IL_FALSE; + + if (!iNewSgi(Head)) { + return IL_FALSE; + } + + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) { + Cache = IL_TRUE; + ChanSize = Head->XSize * Head->YSize * Head->Bpc; + iPreCache(ChanSize); + } + + for (c = 0; c < iCurImage->Bpp; c++) { + for (i = c; i < iCurImage->SizeOfData; i += iCurImage->Bpp) { + if (iread(iCurImage->Data + i, 1, 1) != 1) { + if (Cache) + iUnCache(); + return IL_FALSE; + } + } + } + + if (Cache) + iUnCache(); + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +void sgiSwitchData(ILubyte *Data, ILuint SizeOfData) +{ + ILubyte Temp; + ILuint i; + #ifdef ALTIVEC_GCC + i = 0; + union { + vector unsigned char vec; + vector unsigned int load; + }inversion_vector; + + inversion_vector.load = (vector unsigned int)\ + {0x01000302,0x05040706,0x09080B0A,0x0D0C0F0E}; + while( i <= SizeOfData-16 ) { + vector unsigned char data = vec_ld(i,Data); + vec_perm(data,data,inversion_vector.vec); + vec_st(data,i,Data); + i+=16; + } + SizeOfData -= i; + #endif + for (i = 0; i < SizeOfData; i += 2) { + Temp = Data[i]; + Data[i] = Data[i+1]; + Data[i+1] = Temp; + } + return; +} + +/*----------------------------------------------------------------------------*/ + +// Just an internal convenience function for reading SGI files +ILboolean iNewSgi(iSgiHeader *Head) +{ + if (!ilTexImage(Head->XSize, Head->YSize, Head->Bpc, (ILubyte)Head->ZSize, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + switch (Head->ZSize) + { + case 1: + iCurImage->Format = IL_LUMINANCE; + break; + /*case 2: + iCurImage->Format = IL_LUMINANCE_ALPHA; + break;*/ + case 3: + iCurImage->Format = IL_RGB; + break; + case 4: + iCurImage->Format = IL_RGBA; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + switch (Head->Bpc) + { + case 1: + if (Head->PixMin < 0) + iCurImage->Type = IL_BYTE; + else + iCurImage->Type = IL_UNSIGNED_BYTE; + break; + case 2: + if (Head->PixMin < 0) + iCurImage->Type = IL_SHORT; + else + iCurImage->Type = IL_UNSIGNED_SHORT; + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +//! Writes a SGI file +ILboolean ilSaveSgi(const ILstring FileName) +{ + ILHANDLE SgiFile; + ILuint SgiSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + SgiFile = iopenw(FileName); + if (SgiFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + SgiSize = ilSaveSgiF(SgiFile); + iclosew(SgiFile); + + if (SgiSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Sgi to an already-opened file +ILuint ilSaveSgiF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveSgiInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Sgi to a memory "lump" +ILuint ilSaveSgiL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveSgiInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +ILenum DetermineSgiType(ILenum Type) +{ + if (Type > IL_UNSIGNED_SHORT) { + if (iCurImage->Type == IL_INT) + return IL_SHORT; + return IL_UNSIGNED_SHORT; + } + return Type; +} + +/*----------------------------------------------------------------------------*/ + +// Rle does NOT work yet. + +// Internal function used to save the Sgi. +ILboolean iSaveSgiInternal() +{ + ILuint i, c; + ILboolean Compress; + ILimage *Temp = iCurImage; + ILubyte *TempData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iCurImage->Format != IL_LUMINANCE + //while the sgi spec doesn't directly forbid rgb files with 2 + //channels, they are quite uncommon and most apps don't support + //them. so convert lum_a images to rgba before writing. + //&& iCurImage->Format != IL_LUMINANCE_ALPHA + && iCurImage->Format != IL_RGB + && iCurImage->Format != IL_RGBA) { + if (iCurImage->Format == IL_BGRA || iCurImage->Format == IL_LUMINANCE_ALPHA) + Temp = iConvertImage(iCurImage, IL_RGBA, DetermineSgiType(iCurImage->Type)); + else + Temp = iConvertImage(iCurImage, IL_RGB, DetermineSgiType(iCurImage->Type)); + } + else if (iCurImage->Type > IL_UNSIGNED_SHORT) { + Temp = iConvertImage(iCurImage, iCurImage->Format, DetermineSgiType(iCurImage->Type)); + } + + //compression of images with 2 bytes per channel doesn't work yet + Compress = iGetInt(IL_SGI_RLE) && Temp->Bpc == 1; + + if (Temp == NULL) + return IL_FALSE; + + SaveBigUShort(SGI_MAGICNUM); // 'Magic' number + if (Compress) + iputc(1); + else + iputc(0); + + if (Temp->Type == IL_UNSIGNED_BYTE) + iputc(1); + else if (Temp->Type == IL_UNSIGNED_SHORT) + iputc(2); + // Need to error here if not one of the two... + + if (Temp->Format == IL_LUMINANCE || Temp->Format == IL_COLOUR_INDEX) + SaveBigUShort(2); + else + SaveBigUShort(3); + + SaveBigUShort((ILushort)Temp->Width); + SaveBigUShort((ILushort)Temp->Height); + SaveBigUShort((ILushort)Temp->Bpp); + + switch (Temp->Type) + { + case IL_BYTE: + SaveBigInt(SCHAR_MIN); // Minimum pixel value + SaveBigInt(SCHAR_MAX); // Maximum pixel value + break; + case IL_UNSIGNED_BYTE: + SaveBigInt(0); // Minimum pixel value + SaveBigInt(UCHAR_MAX); // Maximum pixel value + break; + case IL_SHORT: + SaveBigInt(SHRT_MIN); // Minimum pixel value + SaveBigInt(SHRT_MAX); // Maximum pixel value + break; + case IL_UNSIGNED_SHORT: + SaveBigInt(0); // Minimum pixel value + SaveBigInt(USHRT_MAX); // Maximum pixel value + break; + } + + SaveBigInt(0); // Dummy value + + if (FName) { + c = ilCharStrLen(FName); + c = c < 79 ? 79 : c; + iwrite(FName, 1, c); + c = 80 - c; + for (i = 0; i < c; i++) { + iputc(0); + } + } + else { + for (i = 0; i < 80; i++) { + iputc(0); + } + } + + SaveBigUInt(0); // Colormap + + // Padding + for (i = 0; i < 101; i++) { + SaveLittleInt(0); + } + + + if (iCurImage->Origin == IL_ORIGIN_UPPER_LEFT) { + TempData = iGetFlipped(Temp); + if (TempData == NULL) { + if (Temp!= iCurImage) + ilCloseImage(Temp); + return IL_FALSE; + } + } + else { + TempData = Temp->Data; + } + + + if (!Compress) { + for (c = 0; c < Temp->Bpp; c++) { + for (i = c; i < Temp->SizeOfData; i += Temp->Bpp) { + iputc(TempData[i]); // Have to save each colour plane separately. + } + } + } + else { + iSaveRleSgi(TempData, Temp->Width, Temp->Height, Temp->Bpp, Temp->Bps); + } + + + if (TempData != Temp->Data) + ifree(TempData); + if (Temp != iCurImage) + ilCloseImage(Temp); + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +ILboolean iSaveRleSgi(ILubyte *Data, ILuint w, ILuint h, ILuint numChannels, + ILuint bps) +{ + //works only for sgi files with only 1 bpc + + ILuint c, i, y, j; + ILubyte *ScanLine = NULL, *CompLine = NULL; + ILuint *StartTable = NULL, *LenTable = NULL; + ILuint TableOff, DataOff = 0; + + ScanLine = (ILubyte*)ialloc(w); + CompLine = (ILubyte*)ialloc(w * 2 + 1); // Absolute worst case. + StartTable = (ILuint*)ialloc(h * numChannels * sizeof(ILuint)); + LenTable = (ILuint*)icalloc(h * numChannels, sizeof(ILuint)); + if (!ScanLine || !CompLine || !StartTable || !LenTable) { + ifree(ScanLine); + ifree(CompLine); + ifree(StartTable); + ifree(LenTable); + return IL_FALSE; + } + + // These just contain dummy values at this point. + TableOff = itellw(); + iwrite(StartTable, sizeof(ILuint), h * numChannels); + iwrite(LenTable, sizeof(ILuint), h * numChannels); + + DataOff = itellw(); + for (c = 0; c < numChannels; c++) { + for (y = 0; y < h; y++) { + i = y * bps + c; + for (j = 0; j < w; j++, i += numChannels) { + ScanLine[j] = Data[i]; + } + + ilRleCompressLine(ScanLine, w, 1, CompLine, LenTable + h * c + y, IL_SGICOMP); + iwrite(CompLine, 1, *(LenTable + h * c + y)); + } + } + + iseekw(TableOff, IL_SEEK_SET); + + j = h * numChannels; + for (y = 0; y < j; y++) { + StartTable[y] = DataOff; + DataOff += LenTable[y]; +#ifdef __LITTLE_ENDIAN__ + iSwapUInt(&StartTable[y]); + iSwapUInt(&LenTable[y]); +#endif + } + + iwrite(StartTable, sizeof(ILuint), h * numChannels); + iwrite(LenTable, sizeof(ILuint), h * numChannels); + + ifree(ScanLine); + ifree(CompLine); + ifree(StartTable); + ifree(LenTable); + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +#endif//IL_NO_SGI diff --git a/libs/DevIL-1.7.8/src-IL/src/il_size.c b/libs/DevIL-1.7.8/src-IL/src/il_size.c new file mode 100644 index 00000000..52553173 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_size.c @@ -0,0 +1,185 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/30/2009 +// +// Filename: src-IL/src/il_size.c +// +// Description: Determines the size of output files for lump writing. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" + + +ILuint iTargaSize(void); + + +ILuint CurPos; // Fake "file" pointer. +ILuint MaxPos; + + +//! Fake seek function +ILint ILAPIENTRY iSizeSeek(ILint Offset, ILuint Mode) +{ + switch (Mode) + { + case IL_SEEK_SET: + CurPos = Offset; + if (CurPos > MaxPos) + MaxPos = CurPos; + break; + + case IL_SEEK_CUR: + CurPos = CurPos + Offset; + break; + + case IL_SEEK_END: + CurPos = MaxPos + Offset; // Offset should be negative in this case. + break; + + default: + ilSetError(IL_INTERNAL_ERROR); // Should never happen! + return -1; // Error code + } + + if (CurPos > MaxPos) + MaxPos = CurPos; + + return 0; // Code for success +} + +ILuint ILAPIENTRY iSizeTell(void) +{ + return CurPos; +} + +ILint ILAPIENTRY iSizePutc(ILubyte Char) +{ + CurPos++; + if (CurPos > MaxPos) + MaxPos = CurPos; + return Char; +} + +ILint ILAPIENTRY iSizeWrite(const void *Buffer, ILuint Size, ILuint Number) +{ + CurPos += Size * Number; + if (CurPos > MaxPos) + MaxPos = CurPos; + return Number; +} + + +//@TODO: Do computations for uncompressed formats without going through the +// whole writing process. + +//! Returns the size of the memory buffer needed to save the current image into this Type. +// A return value of 0 is an error. +ILuint ilDetermineSize(ILenum Type) +{ + MaxPos = CurPos = 0; + iSetOutputFake(); // Sets iputc, iwrite, etc. to functions above. + + switch (Type) + { + #ifndef IL_NO_BMP + case IL_BMP: + ilSaveBmpL(NULL, 0); + break; + #endif//IL_NO_BMP + + #ifndef IL_NO_DDS + case IL_DDS: + ilSaveDdsL(NULL, 0); + break; + #endif//IL_NO_DDS + + #ifndef IL_NO_EXR + case IL_EXR: + ilSaveExrL(NULL, 0); + break; + #endif//IL_NO_EXR + + #ifndef IL_NO_HDR + case IL_HDR: + ilSaveHdrL(NULL, 0); + break; + #endif//IL_NO_HDR + + #ifndef IL_NO_JP2 + case IL_JP2: + ilSaveJp2L(NULL, 0); + break; + #endif//IL_NO_JP2 + + #ifndef IL_NO_JPG + case IL_JPG: + ilSaveJpegL(NULL, 0); + break; + #endif//IL_NO_JPG + + #ifndef IL_NO_PCX + case IL_PCX: + ilSavePcxL(NULL, 0); + break; + #endif//IL_NO_PCX + + #ifndef IL_NO_PNG + case IL_PNG: + ilSavePngL(NULL, 0); + break; + #endif//IL_NO_PNG + + #ifndef IL_NO_PNM + case IL_PNM: + ilSavePnmL(NULL, 0); + break; + #endif//IL_NO_PNM + + #ifndef IL_NO_PSD + case IL_PSD: + ilSavePsdL(NULL, 0); + break; + #endif//IL_NO_PSD + + #ifndef IL_NO_RAW + case IL_RAW: + ilSaveRawL(NULL, 0); + break; + #endif//IL_NO_RAW + + #ifndef IL_NO_SGI + case IL_SGI: + ilSaveSgiL(NULL, 0); + break; + #endif//IL_NO_SGI + + #ifndef IL_NO_TGA + case IL_TGA: + //ilSaveTargaL(NULL, 0); + return iTargaSize(); + break; + #endif//IL_NO_TGA + + #ifndef IL_NO_TIF + case IL_TIF: + ilSaveTiffL(NULL, 0); + break; + #endif//IL_NO_TIF + + #ifndef IL_NO_WBMP + case IL_WBMP: + ilSaveWbmpL(NULL, 0); + break; + #endif//IL_NO_WBMP + + default: + // 0 is an error for this. + ilSetError(IL_INVALID_ENUM); + return 0; + } + + return MaxPos; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_squish.cpp b/libs/DevIL-1.7.8/src-IL/src/il_squish.cpp new file mode 100644 index 00000000..e30c0a8e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_squish.cpp @@ -0,0 +1,90 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/15/2009 +// +// Filename: src-IL/src/il_squish.cpp +// +// Description: Implements access to the Squish library. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +/*#include "il_dds.h" +#include "il_manip.h" +#include */ + + +#ifdef IL_USE_DXTC_SQUISH +#include + +#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "squish.lib") + #else + #pragma comment(lib, "squish-d.lib") + #endif + #endif +#endif + + +//! Compresses data to a DXT format using libsquish. +// The data must be in unsigned byte RGBA format. The alpha channel will be ignored if DxtType is IL_DXT1. +// DxtSize is used to return the size in bytes of the DXTC data returned. +ILAPI ILubyte* ILAPIENTRY ilSquishCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) +{ + ILuint Size; //@TODO: Support larger than 32-bit data? + ILint Flags; + ILubyte *DxtcData; + + if (Data == NULL) { // We cannot operate on a null pointer. + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + // The nVidia Texture Tools library does not support volume textures yet. + if (Depth != 1) { + ilSetError(IL_INVALID_PARAM); + return NULL; + } + + switch (DxtFormat) + { + case IL_DXT1: // Should these two be + case IL_DXT1A: // any different? + Flags = squish::kDxt1; + break; + case IL_DXT3: + Flags = squish::kDxt3; + break; + case IL_DXT5: + Flags = squish::kDxt5; + break; + default: // Does not support DXT2 or DXT4. + ilSetError(IL_INVALID_PARAM); + break; + } + + Size = squish::GetStorageRequirements(Width, Height, Flags); + DxtcData = (ILubyte*)ialloc(Size); + if (DxtcData == NULL) + return NULL; + + squish::CompressImage(Data, Width, Height, DxtcData, Flags); + + *DxtSize = Size; + return DxtcData; +} + +#else +// Let's have this so that the function is always created and exported, even if it does nothing. +ILAPI ILubyte* ILAPIENTRY ilSquishCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) +{ + //@TODO: Do we need to set an error message? + return NULL; +} + +#endif//IL_NO_DXTC_SQUISH diff --git a/libs/DevIL-1.7.8/src-IL/src/il_stack.c b/libs/DevIL-1.7.8/src-IL/src/il_stack.c new file mode 100644 index 00000000..3d36c81e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_stack.c @@ -0,0 +1,669 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/17/2008 +// +// Filename: src-IL/src/il_stack.c +// +// Description: The main image stack +// +//----------------------------------------------------------------------------- + +// Credit goes to John Villar (johnny@reliaschev.com) for making the suggestion +// of not letting the user use ILimage structs but instead binding images +// like OpenGL. + +#include "il_internal.h" +#include "il_stack.h" + +//! Creates Num images and puts their index in Images - similar to glGenTextures(). +void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images) +{ + ILsizei Index = 0; + iFree *TempFree = FreeNames; + + if (Num < 1 || Images == NULL) { + ilSetError(IL_INVALID_VALUE); + return; + } + + // No images have been generated yet, so create the image stack. + if (ImageStack == NULL) + if (!iEnlargeStack()) + return; + + do { + if (FreeNames != NULL) { // If any have been deleted, then reuse their image names. + TempFree = (iFree*)FreeNames->Next; + Images[Index] = FreeNames->Name; + ImageStack[FreeNames->Name] = ilNewImage(1, 1, 1, 1, 1); + ifree(FreeNames); + FreeNames = TempFree; + } else { + if (LastUsed >= StackSize) + if (!iEnlargeStack()) + return; + Images[Index] = LastUsed; + // Must be all 1's instead of 0's, because some functions would divide by 0. + ImageStack[LastUsed] = ilNewImage(1, 1, 1, 1, 1); + LastUsed++; + } + } while (++Index < Num); + + return; +} + +ILuint ILAPIENTRY ilGenImage() +{ + ILuint i; + ilGenImages(1,&i); + return i; +} + +//! Makes Image the current active image - similar to glBindTexture(). +void ILAPIENTRY ilBindImage(ILuint Image) +{ + if (ImageStack == NULL || StackSize == 0) { + if (!iEnlargeStack()) { + return; + } + } + + // If the user requests a high image name. + while (Image >= StackSize) { + if (!iEnlargeStack()) { + return; + } + } + + if (ImageStack[Image] == NULL) { + ImageStack[Image] = ilNewImage(1, 1, 1, 1, 1); + if (Image >= LastUsed) // >= ? + LastUsed = Image + 1; + } + + iCurImage = ImageStack[Image]; + CurName = Image; + + ParentImage = IL_TRUE; + + return; +} + + +//! Deletes Num images from the image stack - similar to glDeleteTextures(). +void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images) +{ + iFree *Temp = FreeNames; + ILuint Index = 0; + + if (Num < 1) { + //ilSetError(IL_INVALID_VALUE); + return; + } + if (StackSize == 0) + return; + + do { + if (Images[Index] > 0 && Images[Index] < LastUsed) { // <= ? + /*if (FreeNames != NULL) { // Terribly inefficient + Temp = FreeNames; + do { + if (Temp->Name == Images[Index]) { + continue; // Sufficient? + } + } while ((Temp = Temp->Next)); + }*/ + + // Already has been deleted or was never used. + if (ImageStack[Images[Index]] == NULL) + continue; + + // Find out if current image - if so, set to default image zero. + if (Images[Index] == CurName || Images[Index] == 0) { + iCurImage = ImageStack[0]; + CurName = 0; + } + + // Should *NOT* be NULL here! + ilCloseImage(ImageStack[Images[Index]]); + ImageStack[Images[Index]] = NULL; + + // Add to head of list - works for empty and non-empty lists + Temp = (iFree*)ialloc(sizeof(iFree)); + if (!Temp) { + return; + } + Temp->Name = Images[Index]; + Temp->Next = FreeNames; + FreeNames = Temp; + } + /*else { // Shouldn't set an error...just continue onward. + ilSetError(IL_ILLEGAL_OPERATION); + }*/ + } while (++Index < (ILuint)Num); +} + + +void ILAPIENTRY ilDeleteImage(const ILuint Num) { + ilDeleteImages(1,&Num); +} + +//! Checks if Image is a valid ilGenImages-generated image (like glIsTexture()). +ILboolean ILAPIENTRY ilIsImage(ILuint Image) +{ + //iFree *Temp = FreeNames; + + if (ImageStack == NULL) + return IL_FALSE; + if (Image >= LastUsed || Image == 0) + return IL_FALSE; + + /*do { + if (Temp->Name == Image) + return IL_FALSE; + } while ((Temp = Temp->Next));*/ + + if (ImageStack[Image] == NULL) // Easier check. + return IL_FALSE; + + return IL_TRUE; +} + + +//! Closes Image and frees all memory associated with it. +ILAPI void ILAPIENTRY ilCloseImage(ILimage *Image) +{ + if (Image == NULL) + return; + + if (Image->Data != NULL) { + ifree(Image->Data); + Image->Data = NULL; + } + + if (Image->Pal.Palette != NULL && Image->Pal.PalSize > 0 && Image->Pal.PalType != IL_PAL_NONE) { + ifree(Image->Pal.Palette); + Image->Pal.Palette = NULL; + } + + if (Image->Next != NULL) { + ilCloseImage(Image->Next); + Image->Next = NULL; + } + + if (Image->Faces != NULL) { + ilCloseImage(Image->Faces); + Image->Mipmaps = NULL; + } + + if (Image->Mipmaps != NULL) { + ilCloseImage(Image->Mipmaps); + Image->Mipmaps = NULL; + } + + if (Image->Layers != NULL) { + ilCloseImage(Image->Layers); + Image->Layers = NULL; + } + + if (Image->AnimList != NULL && Image->AnimSize != 0) { + ifree(Image->AnimList); + Image->AnimList = NULL; + } + + if (Image->Profile != NULL && Image->ProfileSize != 0) { + ifree(Image->Profile); + Image->Profile = NULL; + Image->ProfileSize = 0; + } + + if (Image->DxtcData != NULL && Image->DxtcFormat != IL_DXT_NO_COMP) { + ifree(Image->DxtcData); + Image->DxtcData = NULL; + Image->DxtcFormat = IL_DXT_NO_COMP; + Image->DxtcSize = 0; + } + + ifree(Image); + Image = NULL; + + return; +} + + +ILAPI ILboolean ILAPIENTRY ilIsValidPal(ILpal *Palette) +{ + if (Palette == NULL) + return IL_FALSE; + if (Palette->PalSize == 0 || Palette->Palette == NULL) + return IL_FALSE; + switch (Palette->PalType) + { + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + case IL_PAL_BGR24: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + return IL_TRUE; + } + return IL_FALSE; +} + + +//! Closes Palette and frees all memory associated with it. +ILAPI void ILAPIENTRY ilClosePal(ILpal *Palette) +{ + if (Palette == NULL) + return; + if (!ilIsValidPal(Palette)) + return; + ifree(Palette->Palette); + ifree(Palette); + return; +} + + +ILimage *iGetBaseImage() +{ + return ImageStack[ilGetCurName()]; +} + + +//! Sets the current mipmap level +ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number) +{ + ILuint Current; + ILimage *iTempImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Number == 0) { + return IL_TRUE; + } + + iTempImage = iCurImage; + iCurImage = iCurImage->Mipmaps; + if (iCurImage == NULL) { + iCurImage = iTempImage; + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + for (Current = 1; Current < Number; Current++) { + iCurImage = iCurImage->Mipmaps; + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + iCurImage = iTempImage; + return IL_FALSE; + } + } + + ParentImage = IL_FALSE; + + return IL_TRUE; +} + + +//! Used for setting the current image if it is an animation. +ILboolean ILAPIENTRY ilActiveImage(ILuint Number) +{ + ILuint Current; + ILimage *iTempImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Number == 0) { + return IL_TRUE; + } + + iTempImage = iCurImage; + iCurImage = iCurImage->Next; + if (iCurImage == NULL) { + iCurImage = iTempImage; + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Number--; // Skip 0 (parent image) + for (Current = 0; Current < Number; Current++) { + iCurImage = iCurImage->Next; + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + iCurImage = iTempImage; + return IL_FALSE; + } + } + + ParentImage = IL_FALSE; + + return IL_TRUE; +} + + +//! Used for setting the current face if it is a cubemap. +ILboolean ILAPIENTRY ilActiveFace(ILuint Number) +{ + ILuint Current; + ILimage *iTempImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Number == 0) { + return IL_TRUE; + } + + iTempImage = iCurImage; + iCurImage = iCurImage->Faces; + if (iCurImage == NULL) { + iCurImage = iTempImage; + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //Number--; // Skip 0 (parent image) + for (Current = 1; Current < Number; Current++) { + iCurImage = iCurImage->Faces; + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + iCurImage = iTempImage; + return IL_FALSE; + } + } + + ParentImage = IL_FALSE; + + return IL_TRUE; +} + + + +//! Used for setting the current layer if layers exist. +ILboolean ILAPIENTRY ilActiveLayer(ILuint Number) +{ + ILuint Current; + ILimage *iTempImage; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Number == 0) { + return IL_TRUE; + } + + iTempImage = iCurImage; + iCurImage = iCurImage->Layers; + if (iCurImage == NULL) { + iCurImage = iTempImage; + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //Number--; // Skip 0 (parent image) + for (Current = 1; Current < Number; Current++) { + iCurImage = iCurImage->Layers; + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + iCurImage = iTempImage; + return IL_FALSE; + } + } + + ParentImage = IL_FALSE; + + return IL_TRUE; +} + + +ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num) +{ + ILimage *SubImage; + ILuint Count ; // Create one before we go in the loop. + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return 0; + } + if (Num == 0) { + return 0; + } + + switch (Type) + { + case IL_SUB_NEXT: + if (iCurImage->Next) + ilCloseImage(iCurImage->Next); + iCurImage->Next = ilNewImage(1, 1, 1, 1, 1); + SubImage = iCurImage->Next; + break; + + case IL_SUB_MIPMAP: + if (iCurImage->Mipmaps) + ilCloseImage(iCurImage->Mipmaps); + iCurImage->Mipmaps = ilNewImage(1, 1, 1, 1, 1); + SubImage = iCurImage->Mipmaps; + break; + + case IL_SUB_LAYER: + if (iCurImage->Layers) + ilCloseImage(iCurImage->Layers); + iCurImage->Layers = ilNewImage(1, 1, 1, 1, 1); + SubImage = iCurImage->Layers; + break; + + default: + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; + } + + if (SubImage == NULL) { + return 0; + } + + for (Count = 1; Count < Num; Count++) { + SubImage->Next = ilNewImage(1, 1, 1, 1, 1); + SubImage = SubImage->Next; + if (SubImage == NULL) + return Count; + } + + return Count; +} + + +// Returns the current index. +ILAPI ILuint ILAPIENTRY ilGetCurName() +{ + if (iCurImage == NULL || ImageStack == NULL || StackSize == 0) + return 0; + return CurName; +} + + +// Returns the current image. +ILAPI ILimage* ILAPIENTRY ilGetCurImage() +{ + return iCurImage; +} + + +// To be only used when the original image is going to be set back almost immediately. +ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image) +{ + iCurImage = Image; + return; +} + + +// Completely replaces the current image and the version in the image stack. +ILAPI void ILAPIENTRY ilReplaceCurImage(ILimage *Image) +{ + if (iCurImage) { + ilActiveImage(0); + ilCloseImage(iCurImage); + } + ImageStack[ilGetCurName()] = Image; + iCurImage = Image; + ParentImage = IL_TRUE; + return; +} + + +// Like realloc but sets new memory to 0. +void* ILAPIENTRY ilRecalloc(void *Ptr, ILuint OldSize, ILuint NewSize) +{ + void *Temp = ialloc(NewSize); + ILuint CopySize = (OldSize < NewSize) ? OldSize : NewSize; + + if (Temp != NULL) { + if (Ptr != NULL) { + memcpy(Temp, Ptr, CopySize); + ifree(Ptr); + } + + Ptr = Temp; + + if (OldSize < NewSize) + imemclear((ILubyte*)Temp + OldSize, NewSize - OldSize); + } + + return Temp; +} + + +// Internal function to enlarge the image stack by I_STACK_INCREMENT members. +ILboolean iEnlargeStack() +{ + // 02-05-2001: Moved from ilGenImages(). + // Puts the cleanup function on the exit handler once. + if (!OnExit) { + #ifdef _MEM_DEBUG + AddToAtexit(); // So iFreeMem doesn't get called after unfreed information. + #endif//_MEM_DEBUG +#if (!defined(_WIN32_WCE)) && (!defined(IL_STATIC_LIB)) + atexit((void*)ilShutDown); +#endif + OnExit = IL_TRUE; + } + + if (!(ImageStack = (ILimage**)ilRecalloc(ImageStack, StackSize * sizeof(ILimage*), (StackSize + I_STACK_INCREMENT) * sizeof(ILimage*)))) { + return IL_FALSE; + } + StackSize += I_STACK_INCREMENT; + return IL_TRUE; +} + + +static ILboolean IsInit = IL_FALSE; + +// ONLY call at startup. +void ILAPIENTRY ilInit() +{ + // if it is already initialized skip initialization + if (IsInit == IL_TRUE ) + return; + + //ilSetMemory(NULL, NULL); Now useless 3/4/2006 (due to modification in il_alloc.c) + ilSetError(IL_NO_ERROR); + ilDefaultStates(); // Set states to their defaults. + // Sets default file-reading callbacks. + ilResetRead(); + ilResetWrite(); +#if (!defined(_WIN32_WCE)) && (!defined(IL_STATIC_LIB)) + atexit((void*)ilRemoveRegistered); +#endif + //_WIN32_WCE + //ilShutDown(); + iSetImage0(); // Beware! Clears all existing textures! + iBindImageTemp(); // Go ahead and create the temporary image. + IsInit = IL_TRUE; + return; +} + + +// Frees any extra memory in the stack. +// - Called on exit +void ILAPIENTRY ilShutDown() +{ + // if it is not initialized do not shutdown + iFree* TempFree = (iFree*)FreeNames; + ILuint i; + + if (!IsInit) + return; + + if (!IsInit) { // Prevent from being called when not initialized. + ilSetError(IL_ILLEGAL_OPERATION); + return; + } + + while (TempFree != NULL) { + FreeNames = (iFree*)TempFree->Next; + ifree(TempFree); + TempFree = FreeNames; + } + + //for (i = 0; i < LastUsed; i++) { + for (i = 0; i < StackSize; i++) { + if (ImageStack[i] != NULL) + ilCloseImage(ImageStack[i]); + } + + if (ImageStack) + ifree(ImageStack); + ImageStack = NULL; + LastUsed = 0; + StackSize = 0; + IsInit = IL_FALSE; + return; +} + + +// Initializes the image stack's first entry (default image) -- ONLY CALL ONCE! +void iSetImage0() +{ + if (ImageStack == NULL) + if (!iEnlargeStack()) + return; + + LastUsed = 1; + CurName = 0; + ParentImage = IL_TRUE; + if (!ImageStack[0]) + ImageStack[0] = ilNewImage(1, 1, 1, 1, 1); + iCurImage = ImageStack[0]; + ilDefaultImage(); + + return; +} + + +ILAPI void ILAPIENTRY iBindImageTemp() +{ + if (ImageStack == NULL || StackSize <= 1) + if (!iEnlargeStack()) + return; + + if (LastUsed < 2) + LastUsed = 2; + CurName = 1; + ParentImage = IL_TRUE; + if (!ImageStack[1]) + ImageStack[1] = ilNewImage(1, 1, 1, 1, 1); + iCurImage = ImageStack[1]; + + return; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_states.c b/libs/DevIL-1.7.8/src-IL/src/il_states.c new file mode 100644 index 00000000..96291887 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_states.c @@ -0,0 +1,1192 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_states.c +// +// Description: State machine +// +// +// 20040223 XIX : now has a ilPngAlphaIndex member, so we can spit out png files with a transparent index, set to -1 for none +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#include "il_states.h" +//#include +#include + +ILconst_string _ilVendor = IL_TEXT("Abysmal Software"); +ILconst_string _ilVersion = IL_TEXT("Developer's Image Library (DevIL) 1.7.8"); + + +char* _ilLoadExt = "" IL_BLP_EXT IL_BMP_EXT IL_CUT_EXT IL_DCX_EXT IL_DDS_EXT + IL_DCM_EXT IL_DPX_EXT IL_EXR_EXT IL_FITS_EXT IL_FTX_EXT + IL_GIF_EXT IL_HDR_EXT IL_ICNS_EXT IL_ICO_EXT IL_IFF_EXT + IL_IWI_EXT IL_JPG_EXT IL_JP2_EXT IL_LIF_EXT IL_MDL_EXT + IL_MNG_EXT IL_MP3_EXT IL_PCD_EXT IL_PCX_EXT IL_PIC_EXT + IL_PIX_EXT IL_PNG_EXT IL_PNM_EXT IL_PSD_EXT IL_PSP_EXT + IL_PXR_EXT IL_RAW_EXT IL_ROT_EXT IL_SGI_EXT IL_SUN_EXT + IL_TEX_EXT IL_TGA_EXT IL_TIF_EXT IL_TPL_EXT IL_UTX_EXT + IL_VTF_EXT IL_WAL_EXT IL_WDP_EXT IL_XPM_EXT; + +char* _ilSaveExt = "" IL_BMP_EXT IL_CHEAD_EXT IL_DDS_EXT IL_EXR_EXT + IL_HDR_EXT IL_JP2_EXT IL_JPG_EXT IL_PCX_EXT + IL_PNG_EXT IL_PNM_EXT IL_PSD_EXT IL_RAW_EXT + IL_SGI_EXT IL_TGA_EXT IL_TIF_EXT IL_VTF_EXT + IL_WBMP_EXT; + + +//! Set all states to their defaults. +void ilDefaultStates() +{ + ilStates[ilCurrentPos].ilOriginSet = IL_FALSE; + ilStates[ilCurrentPos].ilOriginMode = IL_ORIGIN_LOWER_LEFT; + ilStates[ilCurrentPos].ilFormatSet = IL_FALSE; + ilStates[ilCurrentPos].ilFormatMode = IL_BGRA; + ilStates[ilCurrentPos].ilTypeSet = IL_FALSE; + ilStates[ilCurrentPos].ilTypeMode = IL_UNSIGNED_BYTE; + ilStates[ilCurrentPos].ilOverWriteFiles = IL_FALSE; + ilStates[ilCurrentPos].ilAutoConvPal = IL_FALSE; + ilStates[ilCurrentPos].ilDefaultOnFail = IL_FALSE; + ilStates[ilCurrentPos].ilUseKeyColour = IL_FALSE; + ilStates[ilCurrentPos].ilBlitBlend = IL_TRUE; + ilStates[ilCurrentPos].ilCompression = IL_COMPRESS_ZLIB; + ilStates[ilCurrentPos].ilInterlace = IL_FALSE; + + ilStates[ilCurrentPos].ilTgaCreateStamp = IL_FALSE; + ilStates[ilCurrentPos].ilJpgQuality = 99; + ilStates[ilCurrentPos].ilPngInterlace = IL_FALSE; + ilStates[ilCurrentPos].ilTgaRle = IL_FALSE; + ilStates[ilCurrentPos].ilBmpRle = IL_FALSE; + ilStates[ilCurrentPos].ilSgiRle = IL_FALSE; + ilStates[ilCurrentPos].ilJpgFormat = IL_JFIF; + ilStates[ilCurrentPos].ilJpgProgressive = IL_FALSE; + ilStates[ilCurrentPos].ilDxtcFormat = IL_DXT1; + ilStates[ilCurrentPos].ilPcdPicNum = 2; + ilStates[ilCurrentPos].ilPngAlphaIndex = -1; + ilStates[ilCurrentPos].ilVtfCompression = IL_DXT_NO_COMP; + + ilStates[ilCurrentPos].ilTgaId = NULL; + ilStates[ilCurrentPos].ilTgaAuthName = NULL; + ilStates[ilCurrentPos].ilTgaAuthComment = NULL; + ilStates[ilCurrentPos].ilPngAuthName = NULL; + ilStates[ilCurrentPos].ilPngTitle = NULL; + ilStates[ilCurrentPos].ilPngDescription = NULL; + + //2003-09-01: added tiff strings + ilStates[ilCurrentPos].ilTifDescription = NULL; + ilStates[ilCurrentPos].ilTifHostComputer = NULL; + ilStates[ilCurrentPos].ilTifDocumentName = NULL; + ilStates[ilCurrentPos].ilTifAuthName = NULL; + ilStates[ilCurrentPos].ilCHeader = NULL; + + ilStates[ilCurrentPos].ilQuantMode = IL_WU_QUANT; + ilStates[ilCurrentPos].ilNeuSample = 15; + ilStates[ilCurrentPos].ilQuantMaxIndexs = 256; + + ilStates[ilCurrentPos].ilKeepDxtcData = IL_FALSE; + ilStates[ilCurrentPos].ilUseNVidiaDXT = IL_FALSE; + ilStates[ilCurrentPos].ilUseSquishDXT = IL_FALSE; + + + + + ilHints.MemVsSpeedHint = IL_FASTEST; + ilHints.CompressHint = IL_USE_COMPRESSION; + + while (ilGetError() != IL_NO_ERROR); + + return; +} + + +//! Returns a constant string detailing aspects about this library. +ILconst_string ILAPIENTRY ilGetString(ILenum StringName) +{ + switch (StringName) + { + case IL_VENDOR: + return (ILconst_string)_ilVendor; + case IL_VERSION_NUM: //changed 2003-08-30: IL_VERSION changes //switch define ;-) + return (ILconst_string)_ilVersion; + case IL_LOAD_EXT: + return (ILconst_string)_ilLoadExt; + case IL_SAVE_EXT: + return (ILconst_string)_ilSaveExt; + case IL_TGA_ID_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTgaId; + case IL_TGA_AUTHNAME_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTgaAuthName; + case IL_TGA_AUTHCOMMENT_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTgaAuthComment; + case IL_PNG_AUTHNAME_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilPngAuthName; + case IL_PNG_TITLE_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilPngTitle; + case IL_PNG_DESCRIPTION_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilPngDescription; + //2003-08-31: added tif strings + case IL_TIF_DESCRIPTION_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTifDescription; + case IL_TIF_HOSTCOMPUTER_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTifHostComputer; + case IL_TIF_DOCUMENTNAME_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTifDocumentName; + case IL_TIF_AUTHNAME_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilTifAuthName; + case IL_CHEAD_HEADER_STRING: + return (ILconst_string)ilStates[ilCurrentPos].ilCHeader; + default: + ilSetError(IL_INVALID_ENUM); + break; + } + return NULL; +} + + +// Clips a string to a certain length and returns a new string. +char *iClipString(char *String, ILuint MaxLen) +{ + char *Clipped; + ILuint Length; + + if (String == NULL) + return NULL; + + Length = ilCharStrLen(String); //ilStrLen(String); + + Clipped = (char*)ialloc((MaxLen + 1) * sizeof(char) /*sizeof(ILchar)*/); // Terminating NULL makes it +1. + if (Clipped == NULL) { + return NULL; + } + + memcpy(Clipped, String, MaxLen * sizeof(char) /*sizeof(ILchar)*/); + Clipped[Length] = 0; + + return Clipped; +} + + +// Returns format-specific strings, truncated to MaxLen (not counting the terminating NULL). +char *iGetString(ILenum StringName) +{ + switch (StringName) + { + case IL_TGA_ID_STRING: + return iClipString(ilStates[ilCurrentPos].ilTgaId, 254); + case IL_TGA_AUTHNAME_STRING: + return iClipString(ilStates[ilCurrentPos].ilTgaAuthName, 40); + case IL_TGA_AUTHCOMMENT_STRING: + return iClipString(ilStates[ilCurrentPos].ilTgaAuthComment, 80); + case IL_PNG_AUTHNAME_STRING: + return iClipString(ilStates[ilCurrentPos].ilPngAuthName, 255); + case IL_PNG_TITLE_STRING: + return iClipString(ilStates[ilCurrentPos].ilPngTitle, 255); + case IL_PNG_DESCRIPTION_STRING: + return iClipString(ilStates[ilCurrentPos].ilPngDescription, 255); + + //changed 2003-08-31...here was a serious copy and paste bug ;-) + case IL_TIF_DESCRIPTION_STRING: + return iClipString(ilStates[ilCurrentPos].ilTifDescription, 255); + case IL_TIF_HOSTCOMPUTER_STRING: + return iClipString(ilStates[ilCurrentPos].ilTifHostComputer, 255); + case IL_TIF_DOCUMENTNAME_STRING: + return iClipString(ilStates[ilCurrentPos].ilTifDocumentName, 255); + case IL_TIF_AUTHNAME_STRING: + return iClipString(ilStates[ilCurrentPos].ilTifAuthName, 255); + case IL_CHEAD_HEADER_STRING: + return iClipString(ilStates[ilCurrentPos].ilCHeader, 32); + default: + ilSetError(IL_INVALID_ENUM); + } + return NULL; +} + + +//! Enables a mode +ILboolean ILAPIENTRY ilEnable(ILenum Mode) +{ + return ilAble(Mode, IL_TRUE); +} + + +//! Disables a mode +ILboolean ILAPIENTRY ilDisable(ILenum Mode) +{ + return ilAble(Mode, IL_FALSE); +} + + +// Internal function that sets the Mode equal to Flag +ILboolean ilAble(ILenum Mode, ILboolean Flag) +{ + switch (Mode) + { + case IL_ORIGIN_SET: + ilStates[ilCurrentPos].ilOriginSet = Flag; + break; + case IL_FORMAT_SET: + ilStates[ilCurrentPos].ilFormatSet = Flag; + break; + case IL_TYPE_SET: + ilStates[ilCurrentPos].ilTypeSet = Flag; + break; + case IL_FILE_OVERWRITE: + ilStates[ilCurrentPos].ilOverWriteFiles = Flag; + break; + case IL_CONV_PAL: + ilStates[ilCurrentPos].ilAutoConvPal = Flag; + break; + case IL_DEFAULT_ON_FAIL: + ilStates[ilCurrentPos].ilDefaultOnFail = Flag; + break; + case IL_USE_KEY_COLOUR: + ilStates[ilCurrentPos].ilUseKeyColour = Flag; + break; + case IL_BLIT_BLEND: + ilStates[ilCurrentPos].ilBlitBlend = Flag; + break; + case IL_SAVE_INTERLACED: + ilStates[ilCurrentPos].ilInterlace = Flag; + break; + case IL_JPG_PROGRESSIVE: + ilStates[ilCurrentPos].ilJpgProgressive = Flag; + break; + case IL_NVIDIA_COMPRESS: + ilStates[ilCurrentPos].ilUseNVidiaDXT = Flag; + break; + case IL_SQUISH_COMPRESS: + ilStates[ilCurrentPos].ilUseSquishDXT = Flag; + break; + + default: + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; + } + + return IL_TRUE; +} + + +//! Checks whether the mode is enabled. +ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode) +{ + switch (Mode) + { + case IL_ORIGIN_SET: + return ilStates[ilCurrentPos].ilOriginSet; + case IL_FORMAT_SET: + return ilStates[ilCurrentPos].ilFormatSet; + case IL_TYPE_SET: + return ilStates[ilCurrentPos].ilTypeSet; + case IL_FILE_OVERWRITE: + return ilStates[ilCurrentPos].ilOverWriteFiles; + case IL_CONV_PAL: + return ilStates[ilCurrentPos].ilAutoConvPal; + case IL_DEFAULT_ON_FAIL: + return ilStates[ilCurrentPos].ilDefaultOnFail; + case IL_USE_KEY_COLOUR: + return ilStates[ilCurrentPos].ilUseKeyColour; + case IL_BLIT_BLEND: + return ilStates[ilCurrentPos].ilBlitBlend; + case IL_SAVE_INTERLACED: + return ilStates[ilCurrentPos].ilInterlace; + case IL_JPG_PROGRESSIVE: + return ilStates[ilCurrentPos].ilJpgProgressive; + case IL_NVIDIA_COMPRESS: + return ilStates[ilCurrentPos].ilUseNVidiaDXT; + case IL_SQUISH_COMPRESS: + return ilStates[ilCurrentPos].ilUseSquishDXT; + + default: + ilSetError(IL_INVALID_ENUM); + } + + return IL_FALSE; +} + + +//! Checks whether the mode is disabled. +ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode) +{ + return !ilIsEnabled(Mode); +} + + +//! Sets Param equal to the current value of the Mode +void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param) +{ + if (Param == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + + *Param = ilGetInteger(Mode); + + return; +} + + +//! Returns the current value of the Mode +ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode) +{ + ILboolean Temp; + Temp = IL_FALSE; + ilGetBooleanv(Mode, &Temp); + return Temp; +} + + +ILimage *iGetBaseImage(void); + +//! Internal function to figure out where we are in an image chain. +//@TODO: This may get much more complex with mipmaps under faces, etc. +ILuint iGetActiveNum(ILenum Type) +{ + ILimage *BaseImage; + ILuint Num = 0; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return 0; + } + + BaseImage = iGetBaseImage(); + if (BaseImage == iCurImage) + return 0; + + switch (Type) + { + case IL_ACTIVE_IMAGE: + BaseImage = BaseImage->Next; + do { + if (BaseImage == NULL) + return 0; + Num++; + if (BaseImage == iCurImage) + return Num; + } while ((BaseImage = BaseImage->Next)); + break; + case IL_ACTIVE_MIPMAP: + BaseImage = BaseImage->Mipmaps; + do { + if (BaseImage == NULL) + return 0; + Num++; + if (BaseImage == iCurImage) + return Num; + } while ((BaseImage = BaseImage->Mipmaps)); + break; + case IL_ACTIVE_LAYER: + BaseImage = BaseImage->Layers; + do { + if (BaseImage == NULL) + return 0; + Num++; + if (BaseImage == iCurImage) + return Num; + } while ((BaseImage = BaseImage->Layers)); + break; + case IL_ACTIVE_FACE: + BaseImage = BaseImage->Faces; + do { + if (BaseImage == NULL) + return 0; + Num++; + if (BaseImage == iCurImage) + return Num; + } while ((BaseImage = BaseImage->Faces)); + break; + } + + //@TODO: Any error needed here? + + return 0; +} + + +//! Sets Param equal to the current value of the Mode +void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param) +{ + if (Param == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + + *Param = 0; + + switch (Mode) { + // Integer values + case IL_COMPRESS_MODE: + *Param = ilStates[ilCurrentPos].ilCompression; + break; + case IL_CUR_IMAGE: + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + break; + } + *Param = ilGetCurName(); + break; + case IL_FORMAT_MODE: + *Param = ilStates[ilCurrentPos].ilFormatMode; + break; + case IL_INTERLACE_MODE: + *Param = ilStates[ilCurrentPos].ilInterlace; + break; + case IL_KEEP_DXTC_DATA: + *Param = ilStates[ilCurrentPos].ilKeepDxtcData; + break; + case IL_ORIGIN_MODE: + *Param = ilStates[ilCurrentPos].ilOriginMode; + break; + case IL_MAX_QUANT_INDICES: + *Param = ilStates[ilCurrentPos].ilQuantMaxIndexs; + break; + case IL_NEU_QUANT_SAMPLE: + *Param = ilStates[ilCurrentPos].ilNeuSample; + break; + case IL_QUANTIZATION_MODE: + *Param = ilStates[ilCurrentPos].ilQuantMode; + break; + case IL_TYPE_MODE: + *Param = ilStates[ilCurrentPos].ilTypeMode; + break; + case IL_VERSION_NUM: + *Param = IL_VERSION; + break; + + // Image specific values + case IL_ACTIVE_IMAGE: + case IL_ACTIVE_MIPMAP: + case IL_ACTIVE_LAYER: + *Param = iGetActiveNum(Mode); + break; + + // Format-specific values + case IL_BMP_RLE: + *Param = ilStates[ilCurrentPos].ilBmpRle; + break; + case IL_DXTC_FORMAT: + *Param = ilStates[ilCurrentPos].ilDxtcFormat; + break; + case IL_JPG_QUALITY: + *Param = ilStates[ilCurrentPos].ilJpgQuality; + break; + case IL_JPG_SAVE_FORMAT: + *Param = ilStates[ilCurrentPos].ilJpgFormat; + break; + case IL_PCD_PICNUM: + *Param = ilStates[ilCurrentPos].ilPcdPicNum; + break; + case IL_PNG_ALPHA_INDEX: + *Param = ilStates[ilCurrentPos].ilPngAlphaIndex; + break; + case IL_PNG_INTERLACE: + *Param = ilStates[ilCurrentPos].ilPngInterlace; + break; + case IL_SGI_RLE: + *Param = ilStates[ilCurrentPos].ilSgiRle; + break; + case IL_TGA_CREATE_STAMP: + *Param = ilStates[ilCurrentPos].ilTgaCreateStamp; + break; + case IL_TGA_RLE: + *Param = ilStates[ilCurrentPos].ilTgaRle; + break; + case IL_VTF_COMP: + *Param = ilStates[ilCurrentPos].ilVtfCompression; + break; + + // Boolean values + case IL_CONV_PAL: + *Param = ilStates[ilCurrentPos].ilAutoConvPal; + break; + case IL_DEFAULT_ON_FAIL: + *Param = ilStates[ilCurrentPos].ilDefaultOnFail; + break; + case IL_FILE_MODE: + *Param = ilStates[ilCurrentPos].ilOverWriteFiles; + break; + case IL_FORMAT_SET: + *Param = ilStates[ilCurrentPos].ilFormatSet; + break; + case IL_ORIGIN_SET: + *Param = ilStates[ilCurrentPos].ilOriginSet; + break; + case IL_TYPE_SET: + *Param = ilStates[ilCurrentPos].ilTypeSet; + break; + case IL_USE_KEY_COLOUR: + *Param = ilStates[ilCurrentPos].ilUseKeyColour; + break; + case IL_BLIT_BLEND: + *Param = ilStates[ilCurrentPos].ilBlitBlend; + break; + case IL_JPG_PROGRESSIVE: + *Param = ilStates[ilCurrentPos].ilJpgProgressive; + break; + case IL_NVIDIA_COMPRESS: + *Param = ilStates[ilCurrentPos].ilUseNVidiaDXT; + break; + case IL_SQUISH_COMPRESS: + *Param = ilStates[ilCurrentPos].ilUseSquishDXT; + break; + + default: + iGetIntegervImage(iCurImage, Mode, Param); + } + + return; +} + +//@TODO rename to ilGetImageIntegerv for 1.6.9 and make it public +//! Sets Param equal to the current value of the Mode +void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param) +{ + ILimage *SubImage; + if (Image == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return; + } + if (Param == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + *Param = 0; + + switch (Mode) + { + case IL_DXTC_DATA_FORMAT: + if (Image->DxtcData == NULL || Image->DxtcSize == 0) { + *Param = IL_DXT_NO_COMP; + break; + } + *Param = Image->DxtcFormat; + break; + //// + case IL_IMAGE_BITS_PER_PIXEL: + //changed 20040610 to channel count (Bpp) times Bytes per channel + *Param = (Image->Bpp << 3)*Image->Bpc; + break; + case IL_IMAGE_BYTES_PER_PIXEL: + //changed 20040610 to channel count (Bpp) times Bytes per channel + *Param = Image->Bpp*Image->Bpc; + break; + case IL_IMAGE_BPC: + *Param = Image->Bpc; + break; + case IL_IMAGE_CHANNELS: + *Param = Image->Bpp; + break; + case IL_IMAGE_CUBEFLAGS: + *Param = Image->CubeFlags; + break; + case IL_IMAGE_DEPTH: + *Param = Image->Depth; + break; + case IL_IMAGE_DURATION: + *Param = Image->Duration; + break; + case IL_IMAGE_FORMAT: + *Param = Image->Format; + break; + case IL_IMAGE_HEIGHT: + *Param = Image->Height; + break; + case IL_IMAGE_SIZE_OF_DATA: + *Param = Image->SizeOfData; + + break; + case IL_IMAGE_OFFX: + *Param = Image->OffX; + break; + case IL_IMAGE_OFFY: + *Param = Image->OffY; + break; + case IL_IMAGE_ORIGIN: + *Param = Image->Origin; + break; + case IL_IMAGE_PLANESIZE: + *Param = Image->SizeOfPlane; + break; + case IL_IMAGE_TYPE: + *Param = Image->Type; + break; + case IL_IMAGE_WIDTH: + *Param = Image->Width; + break; + case IL_NUM_FACES: + for (SubImage = Image->Faces; SubImage; SubImage = SubImage->Faces) + (*Param)++; + break; + case IL_NUM_IMAGES: + for (SubImage = Image->Next; SubImage; SubImage = SubImage->Next) + (*Param)++; + break; + case IL_NUM_LAYERS: + for (SubImage = Image->Layers; SubImage; SubImage = SubImage->Layers) + (*Param)++; + break; + case IL_NUM_MIPMAPS: + for (SubImage = Image->Mipmaps; SubImage; SubImage = SubImage->Mipmaps) + (*Param)++; + break; + + case IL_PALETTE_TYPE: + *Param = Image->Pal.PalType; + break; + case IL_PALETTE_BPP: + *Param = ilGetBppPal(Image->Pal.PalType); + break; + case IL_PALETTE_NUM_COLS: + if (!Image->Pal.Palette || !Image->Pal.PalSize || Image->Pal.PalType == IL_PAL_NONE) + *Param = 0; + else + *Param = Image->Pal.PalSize / ilGetBppPal(Image->Pal.PalType); + break; + case IL_PALETTE_BASE_TYPE: + switch (Image->Pal.PalType) + { + case IL_PAL_RGB24: + *Param = IL_RGB; + case IL_PAL_RGB32: + *Param = IL_RGBA; // Not sure + case IL_PAL_RGBA32: + *Param = IL_RGBA; + case IL_PAL_BGR24: + *Param = IL_BGR; + case IL_PAL_BGR32: + *Param = IL_BGRA; // Not sure + case IL_PAL_BGRA32: + *Param = IL_BGRA; + } + break; + default: + ilSetError(IL_INVALID_ENUM); + } +} + + + +//! Returns the current value of the Mode +ILint ILAPIENTRY ilGetInteger(ILenum Mode) +{ + ILint Temp; + Temp = 0; + ilGetIntegerv(Mode, &Temp); + return Temp; +} + + +//! Sets the default origin to be used. +ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode) +{ + switch (Mode) + { + case IL_ORIGIN_LOWER_LEFT: + case IL_ORIGIN_UPPER_LEFT: + ilStates[ilCurrentPos].ilOriginMode = Mode; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + return IL_TRUE; +} + + +//! Sets the default format to be used. +ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode) +{ + switch (Mode) + { + //case IL_COLOUR_INDEX: + case IL_RGB: + case IL_RGBA: + case IL_BGR: + case IL_BGRA: + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + ilStates[ilCurrentPos].ilFormatMode = Mode; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + return IL_TRUE; +} + + +//! Sets the default type to be used. +ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode) +{ + switch (Mode) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + case IL_SHORT: + case IL_UNSIGNED_SHORT: + case IL_INT: + case IL_UNSIGNED_INT: + case IL_FLOAT: + case IL_DOUBLE: + ilStates[ilCurrentPos].ilTypeMode = Mode; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode) +{ + switch (Mode) + { + case IL_COMPRESS_NONE: + case IL_COMPRESS_RLE: + //case IL_COMPRESS_LZO: + case IL_COMPRESS_ZLIB: + ilStates[ilCurrentPos].ilCompression = Mode; + break; + default: + ilSetError(IL_INVALID_PARAM); + return IL_FALSE; + } + return IL_TRUE; +} + + +//! Pushes the states indicated by Bits onto the state stack +void ILAPIENTRY ilPushAttrib(ILuint Bits) +{ + // Should we check here to see if ilCurrentPos is negative? + + if (ilCurrentPos >= IL_ATTRIB_STACK_MAX - 1) { + ilCurrentPos = IL_ATTRIB_STACK_MAX - 1; + ilSetError(IL_STACK_OVERFLOW); + return; + } + + ilCurrentPos++; + + // memcpy(&ilStates[ilCurrentPos], &ilStates[ilCurrentPos - 1], sizeof(IL_STATES)); + + ilDefaultStates(); + + if (Bits & IL_ORIGIN_BIT) { + ilStates[ilCurrentPos].ilOriginMode = ilStates[ilCurrentPos-1].ilOriginMode; + ilStates[ilCurrentPos].ilOriginSet = ilStates[ilCurrentPos-1].ilOriginSet; + } + if (Bits & IL_FORMAT_BIT) { + ilStates[ilCurrentPos].ilFormatMode = ilStates[ilCurrentPos-1].ilFormatMode; + ilStates[ilCurrentPos].ilFormatSet = ilStates[ilCurrentPos-1].ilFormatSet; + } + if (Bits & IL_TYPE_BIT) { + ilStates[ilCurrentPos].ilTypeMode = ilStates[ilCurrentPos-1].ilTypeMode; + ilStates[ilCurrentPos].ilTypeSet = ilStates[ilCurrentPos-1].ilTypeSet; + } + if (Bits & IL_FILE_BIT) { + ilStates[ilCurrentPos].ilOverWriteFiles = ilStates[ilCurrentPos-1].ilOverWriteFiles; + } + if (Bits & IL_PAL_BIT) { + ilStates[ilCurrentPos].ilAutoConvPal = ilStates[ilCurrentPos-1].ilAutoConvPal; + } + if (Bits & IL_LOADFAIL_BIT) { + ilStates[ilCurrentPos].ilDefaultOnFail = ilStates[ilCurrentPos-1].ilDefaultOnFail; + } + if (Bits & IL_COMPRESS_BIT) { + ilStates[ilCurrentPos].ilCompression = ilStates[ilCurrentPos-1].ilCompression; + } + if (Bits & IL_FORMAT_SPECIFIC_BIT) { + ilStates[ilCurrentPos].ilTgaCreateStamp = ilStates[ilCurrentPos-1].ilTgaCreateStamp; + ilStates[ilCurrentPos].ilJpgQuality = ilStates[ilCurrentPos-1].ilJpgQuality; + ilStates[ilCurrentPos].ilPngInterlace = ilStates[ilCurrentPos-1].ilPngInterlace; + ilStates[ilCurrentPos].ilTgaRle = ilStates[ilCurrentPos-1].ilTgaRle; + ilStates[ilCurrentPos].ilBmpRle = ilStates[ilCurrentPos-1].ilBmpRle; + ilStates[ilCurrentPos].ilSgiRle = ilStates[ilCurrentPos-1].ilSgiRle; + ilStates[ilCurrentPos].ilJpgFormat = ilStates[ilCurrentPos-1].ilJpgFormat; + ilStates[ilCurrentPos].ilDxtcFormat = ilStates[ilCurrentPos-1].ilDxtcFormat; + ilStates[ilCurrentPos].ilPcdPicNum = ilStates[ilCurrentPos-1].ilPcdPicNum; + + ilStates[ilCurrentPos].ilPngAlphaIndex = ilStates[ilCurrentPos-1].ilPngAlphaIndex; + + // Strings + if (ilStates[ilCurrentPos].ilTgaId) + ifree(ilStates[ilCurrentPos].ilTgaId); + if (ilStates[ilCurrentPos].ilTgaAuthName) + ifree(ilStates[ilCurrentPos].ilTgaAuthName); + if (ilStates[ilCurrentPos].ilTgaAuthComment) + ifree(ilStates[ilCurrentPos].ilTgaAuthComment); + if (ilStates[ilCurrentPos].ilPngAuthName) + ifree(ilStates[ilCurrentPos].ilPngAuthName); + if (ilStates[ilCurrentPos].ilPngTitle) + ifree(ilStates[ilCurrentPos].ilPngTitle); + if (ilStates[ilCurrentPos].ilPngDescription) + ifree(ilStates[ilCurrentPos].ilPngDescription); + + //2003-09-01: added tif strings + if (ilStates[ilCurrentPos].ilTifDescription) + ifree(ilStates[ilCurrentPos].ilTifDescription); + if (ilStates[ilCurrentPos].ilTifHostComputer) + ifree(ilStates[ilCurrentPos].ilTifHostComputer); + if (ilStates[ilCurrentPos].ilTifDocumentName) + ifree(ilStates[ilCurrentPos].ilTifDocumentName); + if (ilStates[ilCurrentPos].ilTifAuthName) + ifree(ilStates[ilCurrentPos].ilTifAuthName); + + if (ilStates[ilCurrentPos].ilCHeader) + ifree(ilStates[ilCurrentPos].ilCHeader); + + ilStates[ilCurrentPos].ilTgaId = strdup(ilStates[ilCurrentPos-1].ilTgaId); + ilStates[ilCurrentPos].ilTgaAuthName = strdup(ilStates[ilCurrentPos-1].ilTgaAuthName); + ilStates[ilCurrentPos].ilTgaAuthComment = strdup(ilStates[ilCurrentPos-1].ilTgaAuthComment); + ilStates[ilCurrentPos].ilPngAuthName = strdup(ilStates[ilCurrentPos-1].ilPngAuthName); + ilStates[ilCurrentPos].ilPngTitle = strdup(ilStates[ilCurrentPos-1].ilPngTitle); + ilStates[ilCurrentPos].ilPngDescription = strdup(ilStates[ilCurrentPos-1].ilPngDescription); + + //2003-09-01: added tif strings + ilStates[ilCurrentPos].ilTifDescription = strdup(ilStates[ilCurrentPos-1].ilTifDescription); + ilStates[ilCurrentPos].ilTifHostComputer = strdup(ilStates[ilCurrentPos-1].ilTifHostComputer); + ilStates[ilCurrentPos].ilTifDocumentName = strdup(ilStates[ilCurrentPos-1].ilTifDocumentName); + ilStates[ilCurrentPos].ilTifAuthName = strdup(ilStates[ilCurrentPos-1].ilTifAuthName); + + ilStates[ilCurrentPos].ilCHeader = strdup(ilStates[ilCurrentPos-1].ilCHeader); + } + + return; +} + + +// @TODO: Find out how this affects strings!!! + +//! Pops the last entry off the state stack into the current states +void ILAPIENTRY ilPopAttrib() +{ + if (ilCurrentPos <= 0) { + ilCurrentPos = 0; + ilSetError(IL_STACK_UNDERFLOW); + return; + } + + // Should we check here to see if ilCurrentPos is too large? + ilCurrentPos--; + + return; +} + + +//! Specifies implementation-dependent performance hints +void ILAPIENTRY ilHint(ILenum Target, ILenum Mode) +{ + switch (Target) + { + case IL_MEM_SPEED_HINT: + switch (Mode) + { + case IL_FASTEST: + ilHints.MemVsSpeedHint = Mode; + break; + case IL_LESS_MEM: + ilHints.MemVsSpeedHint = Mode; + break; + case IL_DONT_CARE: + ilHints.MemVsSpeedHint = IL_FASTEST; + break; + default: + ilSetError(IL_INVALID_ENUM); + return; + } + break; + + case IL_COMPRESSION_HINT: + switch (Mode) + { + case IL_USE_COMPRESSION: + ilHints.CompressHint = Mode; + break; + case IL_NO_COMPRESSION: + ilHints.CompressHint = Mode; + break; + case IL_DONT_CARE: + ilHints.CompressHint = IL_NO_COMPRESSION; + break; + default: + ilSetError(IL_INVALID_ENUM); + return; + } + break; + + + default: + ilSetError(IL_INVALID_ENUM); + return; + } + + return; +} + + +ILenum iGetHint(ILenum Target) +{ + switch (Target) + { + case IL_MEM_SPEED_HINT: + return ilHints.MemVsSpeedHint; + case IL_COMPRESSION_HINT: + return ilHints.CompressHint; + default: + ilSetError(IL_INTERNAL_ERROR); + return 0; + } +} + + +void ILAPIENTRY ilSetString(ILenum Mode, const char *String) +{ + if (String == NULL) { + ilSetError(IL_INVALID_PARAM); + return; + } + + switch (Mode) + { + case IL_TGA_ID_STRING: + if (ilStates[ilCurrentPos].ilTgaId) + ifree(ilStates[ilCurrentPos].ilTgaId); + ilStates[ilCurrentPos].ilTgaId = strdup(String); + break; + case IL_TGA_AUTHNAME_STRING: + if (ilStates[ilCurrentPos].ilTgaAuthName) + ifree(ilStates[ilCurrentPos].ilTgaAuthName); + ilStates[ilCurrentPos].ilTgaAuthName = strdup(String); + break; + case IL_TGA_AUTHCOMMENT_STRING: + if (ilStates[ilCurrentPos].ilTgaAuthComment) + ifree(ilStates[ilCurrentPos].ilTgaAuthComment); + ilStates[ilCurrentPos].ilTgaAuthComment = strdup(String); + break; + case IL_PNG_AUTHNAME_STRING: + if (ilStates[ilCurrentPos].ilPngAuthName) + ifree(ilStates[ilCurrentPos].ilPngAuthName); + ilStates[ilCurrentPos].ilPngAuthName = strdup(String); + break; + case IL_PNG_TITLE_STRING: + if (ilStates[ilCurrentPos].ilPngTitle) + ifree(ilStates[ilCurrentPos].ilPngTitle); + ilStates[ilCurrentPos].ilPngTitle = strdup(String); + break; + case IL_PNG_DESCRIPTION_STRING: + if (ilStates[ilCurrentPos].ilPngDescription) + ifree(ilStates[ilCurrentPos].ilPngDescription); + ilStates[ilCurrentPos].ilPngDescription = strdup(String); + break; + + //2003-09-01: added tif strings + case IL_TIF_DESCRIPTION_STRING: + if (ilStates[ilCurrentPos].ilTifDescription) + ifree(ilStates[ilCurrentPos].ilTifDescription); + ilStates[ilCurrentPos].ilTifDescription = strdup(String); + break; + case IL_TIF_HOSTCOMPUTER_STRING: + if (ilStates[ilCurrentPos].ilTifHostComputer) + ifree(ilStates[ilCurrentPos].ilTifHostComputer); + ilStates[ilCurrentPos].ilTifHostComputer = strdup(String); + break; + case IL_TIF_DOCUMENTNAME_STRING: + if (ilStates[ilCurrentPos].ilTifDocumentName) + ifree(ilStates[ilCurrentPos].ilTifDocumentName); + ilStates[ilCurrentPos].ilTifDocumentName = strdup(String); + break; + case IL_TIF_AUTHNAME_STRING: + if (ilStates[ilCurrentPos].ilTifAuthName) + ifree(ilStates[ilCurrentPos].ilTifAuthName); + ilStates[ilCurrentPos].ilTifAuthName = strdup(String); + break; + + case IL_CHEAD_HEADER_STRING: + if (ilStates[ilCurrentPos].ilCHeader) + ifree(ilStates[ilCurrentPos].ilCHeader); + ilStates[ilCurrentPos].ilCHeader = strdup(String); + break; + + default: + ilSetError(IL_INVALID_ENUM); + } + + return; +} + + +void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param) +{ + switch (Mode) + { + // Integer values + case IL_FORMAT_MODE: + ilFormatFunc(Param); + return; + case IL_KEEP_DXTC_DATA: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilKeepDxtcData = Param; + return; + } + break; + case IL_MAX_QUANT_INDICES: + if (Param >= 2 && Param <= 256) { + ilStates[ilCurrentPos].ilQuantMaxIndexs = Param; + return; + } + break; + case IL_NEU_QUANT_SAMPLE: + if (Param >= 1 && Param <= 30) { + ilStates[ilCurrentPos].ilNeuSample = Param; + return; + } + break; + case IL_ORIGIN_MODE: + ilOriginFunc(Param); + return; + case IL_QUANTIZATION_MODE: + if (Param == IL_WU_QUANT || Param == IL_NEU_QUANT) { + ilStates[ilCurrentPos].ilQuantMode = Param; + return; + } + break; + case IL_TYPE_MODE: + ilTypeFunc(Param); + return; + + // Image specific values + case IL_IMAGE_DURATION: + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + break; + } + iCurImage->Duration = Param; + return; + case IL_IMAGE_OFFX: + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + break; + } + iCurImage->OffX = Param; + return; + case IL_IMAGE_OFFY: + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + break; + } + iCurImage->OffY = Param; + return; + case IL_IMAGE_CUBEFLAGS: + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + break; + } + iCurImage->CubeFlags = Param; + break; + + // Format specific values + case IL_BMP_RLE: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilBmpRle = Param; + return; + } + break; + case IL_DXTC_FORMAT: + if (Param >= IL_DXT1 || Param <= IL_DXT5 || Param == IL_DXT1A) { + ilStates[ilCurrentPos].ilDxtcFormat = Param; + return; + } + break; + case IL_JPG_SAVE_FORMAT: + if (Param == IL_JFIF || Param == IL_EXIF) { + ilStates[ilCurrentPos].ilJpgFormat = Param; + return; + } + break; + case IL_JPG_QUALITY: + if (Param >= 0 && Param <= 99) { + ilStates[ilCurrentPos].ilJpgQuality = Param; + return; + } + break; + case IL_PNG_INTERLACE: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilPngInterlace = Param; + return; + } + break; + case IL_PCD_PICNUM: + if (Param >= 0 || Param <= 2) { + ilStates[ilCurrentPos].ilPcdPicNum = Param; + return; + } + break; + case IL_PNG_ALPHA_INDEX: + if (Param >= -1 || Param <= 255) { + ilStates[ilCurrentPos].ilPngAlphaIndex=Param; + return; + } + break; + case IL_SGI_RLE: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilSgiRle = Param; + return; + } + break; + case IL_TGA_CREATE_STAMP: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilTgaCreateStamp = Param; + return; + } + break; + case IL_TGA_RLE: + if (Param == IL_FALSE || Param == IL_TRUE) { + ilStates[ilCurrentPos].ilTgaRle = Param; + return; + } + break; + case IL_VTF_COMP: + if (Param == IL_DXT1 || Param == IL_DXT5 || Param == IL_DXT3 || Param == IL_DXT1A || Param == IL_DXT_NO_COMP) { + ilStates[ilCurrentPos].ilVtfCompression = Param; + return; + } + break; + + default: + ilSetError(IL_INVALID_ENUM); + return; + } + + ilSetError(IL_INVALID_PARAM); // Parameter not in valid bounds. + return; +} + + + +ILint iGetInt(ILenum Mode) +{ + //like ilGetInteger(), but sets another error on failure + + //call ilGetIntegerv() for more robust code + ILenum err; + ILint r = -1; + + ilGetIntegerv(Mode, &r); + + //check if an error occured, set another error + err = ilGetError(); + if (r == -1 && err == IL_INVALID_ENUM) + ilSetError(IL_INTERNAL_ERROR); + else + ilSetError(err); //restore error + + return r; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_sun.c b/libs/DevIL-1.7.8/src-IL/src/il_sun.c new file mode 100644 index 00000000..62009034 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_sun.c @@ -0,0 +1,398 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/06/2009 +// +// Filename: src-IL/src/il_sun.c +// +// Description: Reads from a Sun RAS file. Specifications available from +// http://www.fileformat.info/format/sunraster/egff.htm. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_SUN +#include "il_bits.h" + +ILboolean iLoadSunInternal(void); +ILboolean iIsValidSun(void); +ILuint iSunGetRle(ILubyte *Data, ILuint Length); + +typedef struct SUNHEAD +{ + ILuint MagicNumber; // Magic (identification) number + ILuint Width; // Width of image in pixels + ILuint Height; // Height of image in pixels + ILuint Depth; // Number of bits per pixel + ILuint Length; // Size of image data in bytes + ILuint Type; // Type of raster file + ILuint ColorMapType; // Type of color map + ILuint ColorMapLength; // Size of the color map in bytes +} SUNHEAD; + +// Data storage types +#define IL_SUN_OLD 0x00 +#define IL_SUN_STANDARD 0x01 +#define IL_SUN_BYTE_ENC 0x02 +#define IL_SUN_RGB 0x03 +#define IL_SUN_TIFF 0x04 +#define IL_SUN_IFF 0x05 +#define IL_SUN_EXPER 0xFFFF // Experimental, not supported. + +// Colormap types +#define IL_SUN_NO_MAP 0x00 +#define IL_SUN_RGB_MAP 0x01 +#define IL_SUN_RAW_MAP 0x02 + + +//! Checks if the file specified in FileName is a valid Sun file. +ILboolean ilIsValidSun(ILconst_string FileName) +{ + ILHANDLE SunFile; + ILboolean bSun = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("sun")) && !iCheckExtension(FileName, IL_TEXT("ras")) && + !iCheckExtension(FileName, IL_TEXT("im1")) && !iCheckExtension(FileName, IL_TEXT("im8")) && + !iCheckExtension(FileName, IL_TEXT("im24")) && !iCheckExtension(FileName, IL_TEXT("im32")) && + !iCheckExtension(FileName, IL_TEXT("rs"))) { // Lots of names possible... + ilSetError(IL_INVALID_EXTENSION); + return bSun; + } + + SunFile = iopenr(FileName); + if (SunFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bSun; + } + + bSun = ilIsValidSunF(SunFile); + icloser(SunFile); + + return bSun; +} + + +//! Checks if the ILHANDLE contains a valid Sun file at the current position. +ILboolean ilIsValidSunF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidSun(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Sun lump. +ILboolean ilIsValidSunL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidSun(); +} + + +// Internal function used to get the Sun header from the current file. +ILboolean iGetSunHead(SUNHEAD *Header) +{ + Header->MagicNumber = GetBigUInt(); + Header->Width = GetBigUInt(); + Header->Height = GetBigUInt(); + Header->Depth = GetBigUInt(); + Header->Length = GetBigUInt(); + Header->Type = GetBigUInt(); + Header->ColorMapType = GetBigUInt(); + Header->ColorMapLength = GetBigUInt(); + + return IL_TRUE; +} + + +// Internal function used to check if the HEADER is a valid SUN header. +ILboolean iCheckSun(SUNHEAD *Header) +{ + if (Header->MagicNumber != 0x59A66A95) // Magic number is always 0x59A66A95. + return IL_FALSE; + if (Header->Width == 0 || Header->Height == 0) // 0 dimensions are meaningless. + return IL_FALSE; + // These are the only valid depths that I know of. + if (Header->Depth != 1 && Header->Depth != 8 && Header->Depth != 24 && Header->Depth != 32) + return IL_FALSE; + if (Header->Type > IL_SUN_RGB) //@TODO: Support further types. + return IL_FALSE; + if (Header->ColorMapType > IL_SUN_RGB_MAP) //@TODO: Find out more about raw map. + return IL_FALSE; + // Color map cannot be 0 if there is a map indicated. + if (Header->ColorMapType > IL_SUN_NO_MAP && Header->ColorMapLength == 0) + return IL_FALSE; + //@TODO: These wouldn't make sense. Are they valid somehow? Find out... + if ((Header->Depth == 1 || Header->Depth == 32) && Header->Type == IL_SUN_BYTE_ENC) + return IL_FALSE; + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidSun() +{ + SUNHEAD Head; + + if (!iGetSunHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(SUNHEAD), IL_SEEK_CUR); + + return iCheckSun(&Head); +} + + +// Reads a Sun file +ILboolean ilLoadSun(ILconst_string FileName) +{ + ILHANDLE SunFile; + ILboolean bSun = IL_FALSE; + + SunFile = iopenr(FileName); + if (SunFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bSun; + } + + iSetInputFile(SunFile); + + bSun = ilLoadSunF(SunFile); + + icloser(SunFile); + + return bSun; +} + + +//! Reads an already-opened Sun file +ILboolean ilLoadSunF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadSunInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Sun +ILboolean ilLoadSunL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadSunInternal(); +} + + +ILboolean iLoadSunInternal(void) +{ + SUNHEAD Header; + BITFILE *File; + ILuint i, j, Padding, Offset, BytesRead; + ILubyte PaddingData[16]; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //@TODO: Right now, iGetSunHead cannot fail. + if (!iGetSunHead(&Header) || !iCheckSun(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + switch (Header.Depth) + { + case 1: //@TODO: Find a file to test this on. + File = bfile(iGetFile()); + if (File == NULL) + return IL_FALSE; + + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + if (Header.ColorMapLength != 0) { + // Data should be an index into the color map, but the color map should only be RGB (6 bytes, 2 entries). + if (Header.ColorMapLength != 6) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + } + iCurImage->Pal.Palette = (ILubyte*)ialloc(6); // Just need 2 entries in the color map. + if (Header.ColorMapLength == 0) { // Create the color map + iCurImage->Pal.Palette[0] = 0x00; // Entry for black + iCurImage->Pal.Palette[1] = 0x00; + iCurImage->Pal.Palette[2] = 0x00; + iCurImage->Pal.Palette[3] = 0xFF; // Entry for white + iCurImage->Pal.Palette[4] = 0xFF; + iCurImage->Pal.Palette[5] = 0xFF; + } + else { + iread(iCurImage->Pal.Palette, 1, 6); // Read in the color map. + } + iCurImage->Pal.PalSize = 6; + iCurImage->Pal.PalType = IL_PAL_RGB24; + + Padding = (16 - (iCurImage->Width % 16)) % 16; // Has to be aligned on a 16-bit boundary. The rest is padding. + + // Reads the bits + for (i = 0; i < iCurImage->Height; i++) { + bread(&iCurImage->Data[iCurImage->Width * i], 1, iCurImage->Width, File); + //bseek(File, BitPadding, IL_SEEK_CUR); //@TODO: This function does not work correctly. + bread(PaddingData, 1, Padding, File); // Skip padding bits. + } + break; + + + case 8: + if (Header.ColorMapType == IL_SUN_NO_MAP) { // Greyscale image + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + else { // Colour-mapped image + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Pal.Palette = (ILubyte*)ialloc(Header.ColorMapLength); // Allocate color map. + if (iCurImage->Pal.Palette == NULL) + return IL_FALSE; + if (iread(iCurImage->Pal.Palette, 1, Header.ColorMapLength) != Header.ColorMapLength) { // Read color map. + ilSetError(IL_FILE_READ_ERROR); + return IL_FALSE; + } + + iCurImage->Pal.PalSize = Header.ColorMapLength; + iCurImage->Pal.PalType = IL_PAL_RGB24; + } + + if (Header.Type != IL_SUN_BYTE_ENC) { // Regular uncompressed image data + Padding = (2 - (iCurImage->Bps % 2)) % 2; // Must be padded on a 16-bit boundary (2 bytes) + for (i = 0; i < Header.Height; i++) { + iread(iCurImage->Data + i * Header.Width, 1, iCurImage->Bps); + if (Padding) // Only possible for padding to be 0 or 1. + igetc(); + } + } + else { // RLE image data + for (i = 0; i < iCurImage->Height; i++) { + BytesRead = iSunGetRle(iCurImage->Data + iCurImage->Bps * i, iCurImage->Bps); + if (BytesRead % 2) // Each scanline must be aligned on a 2-byte boundary. + igetc(); // Skip padding + } + } + break; + + case 24: + if (Header.ColorMapLength > 0) // Ignore any possible colormaps. + iseek(Header.ColorMapLength, IL_SEEK_CUR); + + if (Header.Type == IL_SUN_RGB) { + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + else { + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + + if (Header.Type != IL_SUN_BYTE_ENC) { // Regular uncompressed image data + Padding = (2 - (iCurImage->Bps % 2)) % 2; // Must be padded on a 16-bit boundary (2 bytes) + for (i = 0; i < Header.Height; i++) { + iread(iCurImage->Data + i * Header.Width * 3, 1, iCurImage->Bps); + if (Padding) // Only possible for padding to be 0 or 1. + igetc(); + } + } + else { // RLE image data + for (i = 0; i < iCurImage->Height; i++) { + BytesRead = iSunGetRle(iCurImage->Data + iCurImage->Bps * i, iCurImage->Bps); + if (BytesRead % 2) // Each scanline must be aligned on a 2-byte boundary. + igetc(); // Skip padding + } + } + + break; + + case 32: + if (Header.ColorMapLength > 0) // Ignore any possible colormaps. + iseek(Header.ColorMapLength, IL_SEEK_CUR); + + if (Header.Type == IL_SUN_RGB) { + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + else { + if (!ilTexImage(Header.Width, Header.Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + + // There is no padding at the end of each scanline. + Offset = 0; + for (i = 0; i < Header.Height; i++) { + for (j = 0; j < Header.Width; j++) { + igetc(); // There is a pad byte before each pixel. + iCurImage->Data[Offset] = igetc(); + iCurImage->Data[Offset+1] = igetc(); + iCurImage->Data[Offset+2] = igetc(); + } + } + break; + + + default: // Should have already been checked with iGetSunHead. + return IL_FALSE; + } + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + return ilFixImage(); +} + + +ILuint iSunGetRle(ILubyte *Data, ILuint Length) +{ + ILuint i = 0, j; + ILubyte Flag, Value; + ILuint Count; + + for (i = 0; i < Length; ) { + Flag = igetc(); + if (Flag == 0x80) { // Run follows (or 1 byte of 0x80) + Count = igetc(); + if (Count == 0) { // 1 pixel of value (0x80) + *Data = 0x80; + Data++; + i++; + } + else { // Here we have a run. + Value = igetc(); + Count++; // Should really be Count+1 + for (j = 0; j < Count && i + j < Length; j++, Data++) { + *Data = Value; + } + i += Count; + } + } + else { // 1 byte of this value (cannot be 0x80) + *Data = Flag; + Data++; + i++; + } + } + + return i; +} + + +#endif//IL_NO_SUN + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_targa.c b/libs/DevIL-1.7.8/src-IL/src/il_targa.c new file mode 100644 index 00000000..87909c63 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_targa.c @@ -0,0 +1,955 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_targa.c +// +// Description: Reads from and writes to a Targa (.tga) file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_TGA +#include "il_targa.h" +//#include // for ilMakeString() +#include +#include "il_manip.h" +#include "il_bits.h" + +#ifdef DJGPP +#include +#endif + + +//! Checks if the file specified in FileName is a valid Targa file. +ILboolean ilIsValidTga(ILconst_string FileName) +{ + ILHANDLE TargaFile; + ILboolean bTarga = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("tga")) && + !iCheckExtension(FileName, IL_TEXT("vda")) && + !iCheckExtension(FileName, IL_TEXT("icb")) && + !iCheckExtension(FileName, IL_TEXT("vst"))) { + ilSetError(IL_INVALID_EXTENSION); + return bTarga; + } + + TargaFile = iopenr(FileName); + if (TargaFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTarga; + } + + bTarga = ilIsValidTgaF(TargaFile); + icloser(TargaFile); + + return bTarga; +} + + +//! Checks if the ILHANDLE contains a valid Targa file at the current position. +ILboolean ilIsValidTgaF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidTarga(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid Targa lump. +ILboolean ilIsValidTgaL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidTarga(); +} + + +// Internal function used to get the Targa header from the current file. +ILboolean iGetTgaHead(TARGAHEAD *Header) +{ + Header->IDLen = (ILubyte)igetc(); + Header->ColMapPresent = (ILubyte)igetc(); + Header->ImageType = (ILubyte)igetc(); + Header->FirstEntry = GetLittleShort(); + Header->ColMapLen = GetLittleShort(); + Header->ColMapEntSize = (ILubyte)igetc(); + + Header->OriginX = GetLittleShort(); + Header->OriginY = GetLittleShort(); + Header->Width = GetLittleUShort(); + Header->Height = GetLittleUShort(); + Header->Bpp = (ILubyte)igetc(); + Header->ImageDesc = (ILubyte)igetc(); + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidTarga() +{ + TARGAHEAD Head; + + if (!iGetTgaHead(&Head)) + return IL_FALSE; + iseek(-(ILint)sizeof(TARGAHEAD), IL_SEEK_CUR); + + return iCheckTarga(&Head); +} + + +// Internal function used to check if the HEADER is a valid Targa header. +ILboolean iCheckTarga(TARGAHEAD *Header) +{ + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + if (Header->Bpp != 8 && Header->Bpp != 15 && Header->Bpp != 16 + && Header->Bpp != 24 && Header->Bpp != 32) + return IL_FALSE; + if (Header->ImageDesc & BIT_4) // Supposed to be set to 0 + return IL_FALSE; + + // check type (added 20040218) + if (Header->ImageType != TGA_NO_DATA + && Header->ImageType != TGA_COLMAP_UNCOMP + && Header->ImageType != TGA_UNMAP_UNCOMP + && Header->ImageType != TGA_BW_UNCOMP + && Header->ImageType != TGA_COLMAP_COMP + && Header->ImageType != TGA_UNMAP_COMP + && Header->ImageType != TGA_BW_COMP) + return IL_FALSE; + + // Doesn't work well with the bitshift so change it. + if (Header->Bpp == 15) + Header->Bpp = 16; + + return IL_TRUE; +} + + +//! Reads a Targa file +ILboolean ilLoadTarga(ILconst_string FileName) +{ + ILHANDLE TargaFile; + ILboolean bTarga = IL_FALSE; + + TargaFile = iopenr(FileName); + if (TargaFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTarga; + } + + bTarga = ilLoadTargaF(TargaFile); + icloser(TargaFile); + + return bTarga; +} + + +//! Reads an already-opened Targa file +ILboolean ilLoadTargaF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadTargaInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a Targa +ILboolean ilLoadTargaL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadTargaInternal(); +} + + +// Internal function used to load the Targa. +ILboolean iLoadTargaInternal() +{ + TARGAHEAD Header; + ILboolean bTarga; + ILenum iOrigin; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!iGetTgaHead(&Header)) + return IL_FALSE; + if (!iCheckTarga(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + switch (Header.ImageType) + { + case TGA_NO_DATA: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + case TGA_COLMAP_UNCOMP: + case TGA_COLMAP_COMP: + bTarga = iReadColMapTga(&Header); + break; + case TGA_UNMAP_UNCOMP: + case TGA_UNMAP_COMP: + bTarga = iReadUnmapTga(&Header); + break; + case TGA_BW_UNCOMP: + case TGA_BW_COMP: + bTarga = iReadBwTga(&Header); + break; + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + // @JASON Extra Code to manipulate the image depending on + // the Image Descriptor's origin bits. + iOrigin = Header.ImageDesc & IMAGEDESC_ORIGIN_MASK; + + switch (iOrigin) + { + case IMAGEDESC_TOPLEFT: + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + break; + + case IMAGEDESC_TOPRIGHT: + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + iMirror(); + break; + + case IMAGEDESC_BOTLEFT: + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + break; + + case IMAGEDESC_BOTRIGHT: + iCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + iMirror(); + break; + } + + return ilFixImage(); +} + + +ILboolean iReadColMapTga(TARGAHEAD *Header) +{ + char ID[255]; + ILuint i; + ILushort Pixel; + + if (iread(ID, 1, Header->IDLen) != Header->IDLen) + return IL_FALSE; + + if (!ilTexImage(Header->Width, Header->Height, 1, (ILubyte)(Header->Bpp >> 3), 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize) + ifree(iCurImage->Pal.Palette); + + iCurImage->Format = IL_COLOUR_INDEX; + iCurImage->Pal.PalSize = Header->ColMapLen * (Header->ColMapEntSize >> 3); + + switch (Header->ColMapEntSize) + { + case 16: + iCurImage->Pal.PalType = IL_PAL_BGRA32; + iCurImage->Pal.PalSize = Header->ColMapLen * 4; + break; + case 24: + iCurImage->Pal.PalType = IL_PAL_BGR24; + break; + case 32: + iCurImage->Pal.PalType = IL_PAL_BGRA32; + break; + default: + // Should *never* reach here + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + iCurImage->Pal.Palette = (ILubyte*)ialloc(iCurImage->Pal.PalSize); + if (iCurImage->Pal.Palette == NULL) { + return IL_FALSE; + } + + // Do we need to do something with FirstEntry? Like maybe: + // iread(Image->Pal + Targa->FirstEntry, 1, Image->Pal.PalSize); ?? + if (Header->ColMapEntSize != 16) + { + if (iread(iCurImage->Pal.Palette, 1, iCurImage->Pal.PalSize) != iCurImage->Pal.PalSize) + return IL_FALSE; + } + else { + // 16 bit palette, so we have to break it up. + for (i = 0; i < iCurImage->Pal.PalSize; i += 4) + { + Pixel = GetBigUShort(); + if (ieof()) + return IL_FALSE; + iCurImage->Pal.Palette[3] = (Pixel & 0x8000) >> 12; + iCurImage->Pal.Palette[0] = (Pixel & 0xFC00) >> 7; + iCurImage->Pal.Palette[1] = (Pixel & 0x03E0) >> 2; + iCurImage->Pal.Palette[2] = (Pixel & 0x001F) << 3; + } + } + + if (Header->ImageType == TGA_COLMAP_COMP) + { + if (!iUncompressTgaData(iCurImage)) + { + return IL_FALSE; + } + } + else + { + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) + { + return IL_FALSE; + } + } + + return IL_TRUE; +} + + +ILboolean iReadUnmapTga(TARGAHEAD *Header) +{ + ILubyte Bpp; + char ID[255]; + + if (iread(ID, 1, Header->IDLen) != Header->IDLen) + return IL_FALSE; + + /*if (Header->Bpp == 16) + Bpp = 3; + else*/ + Bpp = (ILubyte)(Header->Bpp >> 3); + + if (!ilTexImage(Header->Width, Header->Height, 1, Bpp, 0, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + + switch (iCurImage->Bpp) + { + case 1: + iCurImage->Format = IL_COLOUR_INDEX; // wtf? How is this possible? + break; + case 2: // 16-bit is not supported directly! + //iCurImage->Format = IL_RGB5_A1; + /*iCurImage->Format = IL_RGBA; + iCurImage->Type = IL_UNSIGNED_SHORT_5_5_5_1_EXT;*/ + //iCurImage->Type = IL_UNSIGNED_SHORT_5_6_5_REV; + + // Remove? + //ilCloseImage(iCurImage); + //ilSetError(IL_FORMAT_NOT_SUPPORTED); + //return IL_FALSE; + + /*iCurImage->Bpp = 4; + iCurImage->Format = IL_BGRA; + iCurImage->Type = IL_UNSIGNED_SHORT_1_5_5_5_REV;*/ + + iCurImage->Format = IL_BGR; + + break; + case 3: + iCurImage->Format = IL_BGR; + break; + case 4: + iCurImage->Format = IL_BGRA; + break; + default: + ilSetError(IL_INVALID_VALUE); + return IL_FALSE; + } + + + // @TODO: Determine this: + // We assume that no palette is present, but it's possible... + // Should we mess with it or not? + + + if (Header->ImageType == TGA_UNMAP_COMP) { + if (!iUncompressTgaData(iCurImage)) { + return IL_FALSE; + } + } + else { + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) { + return IL_FALSE; + } + } + + // Go ahead and expand it to 24-bit. + if (Header->Bpp == 16) { + if (!i16BitTarga(iCurImage)) + return IL_FALSE; + return IL_TRUE; + } + + return IL_TRUE; +} + + +ILboolean iReadBwTga(TARGAHEAD *Header) +{ + char ID[255]; + + if (iread(ID, 1, Header->IDLen) != Header->IDLen) + return IL_FALSE; + + // We assume that no palette is present, but it's possible... + // Should we mess with it or not? + + if (!ilTexImage(Header->Width, Header->Height, 1, (ILubyte)(Header->Bpp >> 3), IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + + if (Header->ImageType == TGA_BW_COMP) { + if (!iUncompressTgaData(iCurImage)) { + return IL_FALSE; + } + } + else { + if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) { + return IL_FALSE; + } + } + + return IL_TRUE; +} + + +ILboolean iUncompressTgaData(ILimage *Image) +{ + ILuint BytesRead = 0, Size, RunLen, i, ToRead; + ILubyte Header, Color[4]; + ILint c; + + Size = Image->Width * Image->Height * Image->Depth * Image->Bpp; + + if (iGetHint(IL_MEM_SPEED_HINT) == IL_FASTEST) + iPreCache(iCurImage->SizeOfData / 2); + + while (BytesRead < Size) { + Header = (ILubyte)igetc(); + if (Header & BIT_7) { + ClearBits(Header, BIT_7); + if (iread(Color, 1, Image->Bpp) != Image->Bpp) { + iUnCache(); + return IL_FALSE; + } + RunLen = (Header+1) * Image->Bpp; + for (i = 0; i < RunLen; i += Image->Bpp) { + // Read the color in, but we check to make sure that we do not go past the end of the image. + for (c = 0; c < Image->Bpp && BytesRead+i+c < Size; c++) { + Image->Data[BytesRead+i+c] = Color[c]; + } + } + BytesRead += RunLen; + } + else { + RunLen = (Header+1) * Image->Bpp; + // We have to check that we do not go past the end of the image data. + if (BytesRead + RunLen > Size) + ToRead = Size - BytesRead; + else + ToRead = RunLen; + if (iread(Image->Data + BytesRead, 1, ToRead) != ToRead) { + iUnCache(); //@TODO: Error needed here? + return IL_FALSE; + } + BytesRead += RunLen; + + if (BytesRead + RunLen > Size) + iseek(RunLen - ToRead, IL_SEEK_CUR); + } + } + + iUnCache(); + + return IL_TRUE; +} + + +// Pretty damn unoptimized +ILboolean i16BitTarga(ILimage *Image) +{ + ILushort *Temp1; + ILubyte *Data, *Temp2; + ILuint x, PixSize = Image->Width * Image->Height; + + Data = (ILubyte*)ialloc(Image->Width * Image->Height * 3); + Temp1 = (ILushort*)Image->Data; + Temp2 = Data; + + if (Data == NULL) + return IL_FALSE; + + for (x = 0; x < PixSize; x++) { + *Temp2++ = (*Temp1 & 0x001F) << 3; // Blue + *Temp2++ = (*Temp1 & 0x03E0) >> 2; // Green + *Temp2++ = (*Temp1 & 0x7C00) >> 7; // Red + + Temp1++; + + + /*s = *Temp; + s = SwapShort(s); + a = !!(s & BIT_15); + + s = s << 1; + + //if (a) { + SetBits(s, BIT_0); + //} + + //SetBits(s, BIT_15); + + *Temp++ = s;*/ + } + + if (!ilTexImage(Image->Width, Image->Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, Data)) { + ifree(Data); + return IL_FALSE; + } + + ifree(Data); + + return IL_TRUE; +} + + +//! Writes a Targa file +ILboolean ilSaveTarga(const ILstring FileName) +{ + ILHANDLE TargaFile; + ILuint TargaSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + TargaFile = iopenw(FileName); + if (TargaFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + TargaSize = ilSaveTargaF(TargaFile); + iclosew(TargaFile); + + if (TargaSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Targa to an already-opened file +ILuint ilSaveTargaF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveTargaInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Targa to a memory "lump" +ILuint ilSaveTargaL(void *Lump, ILuint Size) +{ + ILuint Pos = itellw(); + iSetOutputLump(Lump, Size); + if (iSaveTargaInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Targa. +ILboolean iSaveTargaInternal() +{ + const char *ID = iGetString(IL_TGA_ID_STRING); + const char *AuthName = iGetString(IL_TGA_AUTHNAME_STRING); + const char *AuthComment = iGetString(IL_TGA_AUTHCOMMENT_STRING); + ILubyte IDLen = 0, UsePal, Type, PalEntSize; + ILshort ColMapStart = 0, PalSize; + ILubyte Temp; + ILenum Format; + ILboolean Compress; + ILuint RleLen; + ILubyte *Rle; + ILpal *TempPal = NULL; + ILimage *TempImage = NULL; + ILuint ExtOffset, i; + char *Footer = "TRUEVISION-XFILE.\0"; + char *idString = "Developer's Image Library (DevIL)"; + ILuint Day, Month, Year, Hour, Minute, Second; + char *TempData; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iGetInt(IL_TGA_RLE) == IL_TRUE) + Compress = IL_TRUE; + else + Compress = IL_FALSE; + + if (ID) + IDLen = (ILubyte)ilCharStrLen(ID); + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize && iCurImage->Pal.PalType != IL_PAL_NONE) + UsePal = IL_TRUE; + else + UsePal = IL_FALSE; + + iwrite(&IDLen, sizeof(ILubyte), 1); + iwrite(&UsePal, sizeof(ILubyte), 1); + + Format = iCurImage->Format; + switch (Format) { + case IL_COLOUR_INDEX: + if (Compress) + Type = 9; + else + Type = 1; + break; + case IL_BGR: + case IL_BGRA: + if (Compress) + Type = 10; + else + Type = 2; + break; + case IL_RGB: + case IL_RGBA: + ilSwapColours(); + if (Compress) + Type = 10; + else + Type = 2; + break; + case IL_LUMINANCE: + if (Compress) + Type = 11; + else + Type = 3; + break; + default: + // Should convert the types here... + ilSetError(IL_INVALID_VALUE); + ifree(ID); + ifree(AuthName); + ifree(AuthComment); + return IL_FALSE; + } + + iwrite(&Type, sizeof(ILubyte), 1); + SaveLittleShort(ColMapStart); + + switch (iCurImage->Pal.PalType) + { + case IL_PAL_NONE: + PalSize = 0; + PalEntSize = 0; + break; + case IL_PAL_BGR24: + PalSize = (ILshort)(iCurImage->Pal.PalSize / 3); + PalEntSize = 24; + TempPal = &iCurImage->Pal; + break; + + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + TempPal = iConvertPal(&iCurImage->Pal, IL_PAL_BGR24); + if (TempPal == NULL) + return IL_FALSE; + PalSize = (ILshort)(TempPal->PalSize / 3); + PalEntSize = 24; + break; + default: + ilSetError(IL_INVALID_VALUE); + ifree(ID); + ifree(AuthName); + ifree(AuthComment); + PalSize = 0; + PalEntSize = 0; + return IL_FALSE; + } + SaveLittleShort(PalSize); + iwrite(&PalEntSize, sizeof(ILubyte), 1); + + if (iCurImage->Bpc > 1) { + TempImage = iConvertImage(iCurImage, iCurImage->Format, IL_UNSIGNED_BYTE); + if (TempImage == NULL) { + ifree(ID); + ifree(AuthName); + ifree(AuthComment); + return IL_FALSE; + } + } + else { + TempImage = iCurImage; + } + + if (TempImage->Origin != IL_ORIGIN_LOWER_LEFT) + TempData = (char*)iGetFlipped(TempImage); + else + TempData = (char*)TempImage->Data; + + // Write out the origin stuff. + Temp = 0; + iwrite(&Temp, sizeof(ILshort), 1); + iwrite(&Temp, sizeof(ILshort), 1); + + Temp = iCurImage->Bpp << 3; // Changes to bits per pixel + SaveLittleUShort((ILushort)iCurImage->Width); + SaveLittleUShort((ILushort)iCurImage->Height); + iwrite(&Temp, sizeof(ILubyte), 1); + + // Still don't know what exactly this is for... + Temp = 0; + iwrite(&Temp, sizeof(ILubyte), 1); + iwrite(ID, sizeof(char), IDLen); + ifree(ID); + //iwrite(ID, sizeof(ILbyte), IDLen - sizeof(ILuint)); + //iwrite(&iCurImage->Depth, sizeof(ILuint), 1); + + // Write out the colormap + if (UsePal) + iwrite(TempPal->Palette, sizeof(ILubyte), TempPal->PalSize); + // else do nothing + + if (!Compress) + iwrite(TempData, sizeof(ILubyte), TempImage->SizeOfData); + else { + Rle = (ILubyte*)ialloc(TempImage->SizeOfData + TempImage->SizeOfData / 2 + 1); // max + if (Rle == NULL) { + ifree(AuthName); + ifree(AuthComment); + return IL_FALSE; + } + RleLen = ilRleCompress((unsigned char*)TempData, TempImage->Width, TempImage->Height, + TempImage->Depth, TempImage->Bpp, Rle, IL_TGACOMP, NULL); + + iwrite(Rle, 1, RleLen); + ifree(Rle); + } + + // Write the extension area. + ExtOffset = itellw(); + SaveLittleUShort(495); // Number of bytes in the extension area (TGA 2.0 spec) + iwrite(AuthName, 1, ilCharStrLen(AuthName)); + ipad(41 - ilCharStrLen(AuthName)); + iwrite(AuthComment, 1, ilCharStrLen(AuthComment)); + ipad(324 - ilCharStrLen(AuthComment)); + ifree(AuthName); + ifree(AuthComment); + + // Write time/date + iGetDateTime(&Month, &Day, &Year, &Hour, &Minute, &Second); + SaveLittleUShort((ILushort)Month); + SaveLittleUShort((ILushort)Day); + SaveLittleUShort((ILushort)Year); + SaveLittleUShort((ILushort)Hour); + SaveLittleUShort((ILushort)Minute); + SaveLittleUShort((ILushort)Second); + + for (i = 0; i < 6; i++) { // Time created + SaveLittleUShort(0); + } + for (i = 0; i < 41; i++) { // Job name/ID + iputc(0); + } + for (i = 0; i < 3; i++) { // Job time + SaveLittleUShort(0); + } + + iwrite(idString, 1, ilCharStrLen(idString)); // Software ID + for (i = 0; i < 41 - ilCharStrLen(idString); i++) { + iputc(0); + } + SaveLittleUShort(IL_VERSION); // Software version + iputc(' '); // Release letter (not beta anymore, so use a space) + + SaveLittleUInt(0); // Key colour + SaveLittleUInt(0); // Pixel aspect ratio + SaveLittleUInt(0); // Gamma correction offset + SaveLittleUInt(0); // Colour correction offset + SaveLittleUInt(0); // Postage stamp offset + SaveLittleUInt(0); // Scan line offset + iputc(3); // Attributes type + + // Write the footer. + SaveLittleUInt(ExtOffset); // No extension area + SaveLittleUInt(0); // No developer directory + iwrite(Footer, 1, ilCharStrLen(Footer)); + + if (TempImage->Origin != IL_ORIGIN_LOWER_LEFT) { + ifree(TempData); + } + if (Format == IL_RGB || Format == IL_RGBA) { + ilSwapColours(); + } + + if (TempPal != &iCurImage->Pal && TempPal != NULL) { + ifree(TempPal->Palette); + ifree(TempPal); + } + + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +// Only to be called by ilDetermineSize. Returns the buffer size needed to save the +// current image as a Targa file. +ILuint iTargaSize(void) +{ + ILuint Size, Bpp; + ILubyte IDLen = 0; + const char *ID = iGetString(IL_TGA_ID_STRING); + const char *AuthName = iGetString(IL_TGA_AUTHNAME_STRING); + const char *AuthComment = iGetString(IL_TGA_AUTHCOMMENT_STRING); + + //@TODO: Support color indexed images. + if (iGetInt(IL_TGA_RLE) == IL_TRUE || iCurImage->Format == IL_COLOUR_INDEX) { + // Use the slower method, since we are using compression. We do a "fake" write. + ilSaveTargaL(NULL, 0); + } + + if (ID) + IDLen = (ILubyte)ilCharStrLen(ID); + + Size = 18 + IDLen; // Header + ID + + // Bpp may not be iCurImage->Bpp. + switch (iCurImage->Format) + { + case IL_BGR: + case IL_RGB: + Bpp = 3; + break; + case IL_BGRA: + case IL_RGBA: + Bpp = 4; + break; + case IL_LUMINANCE: + Bpp = 1; + break; + default: //@TODO: Do not know what to do with the others yet. + return 0; + } + + Size += iCurImage->Width * iCurImage->Height * Bpp; + Size += 532; // Size of the extension area + + return Size; +} + + +/*// Makes a neat string to go into the id field of the .tga +void iMakeString(char *Str) +{ + char *PSG = "Generated by Developer's Image Library: "; + char TimeStr[255]; + + time_t Time; + struct tm *CurTime; + + time(&Time); +#ifdef _WIN32 + _tzset(); +#endif + CurTime = localtime(&Time); + + strftime(TimeStr, 255 - ilCharStrLen(PSG), "%#c (%z)", CurTime); + //strftime(TimeStr, 255 - ilCharStrLen(PSG), "%C (%Z)", CurTime); + sprintf(Str, "%s%s", PSG, TimeStr); + + return; +}*/ + + +//changed name to iGetDateTime on 20031221 to fix bug 830196 +void iGetDateTime(ILuint *Month, ILuint *Day, ILuint *Yr, ILuint *Hr, ILuint *Min, ILuint *Sec) +{ +#ifdef DJGPP + struct date day; + struct time curtime; + + gettime(&curtime); + getdate(&day); + + *Month = day.da_mon; + *Day = day.da_day; + *Yr = day.da_year; + + *Hr = curtime.ti_hour; + *Min = curtime.ti_min; + *Sec = curtime.ti_sec; + + return; +#else + +#ifdef _WIN32 + SYSTEMTIME Time; + + GetSystemTime(&Time); + + *Month = Time.wMonth; + *Day = Time.wDay; + *Yr = Time.wYear; + + *Hr = Time.wHour; + *Min = Time.wMinute; + *Sec = Time.wSecond; + + return; +#else + + *Month = 0; + *Day = 0; + *Yr = 0; + + *Hr = 0; + *Min = 0; + *Sec = 0; + + return; +#endif +#endif +} + + +#endif//IL_NO_TGA diff --git a/libs/DevIL-1.7.8/src-IL/src/il_texture.c b/libs/DevIL-1.7.8/src-IL/src/il_texture.c new file mode 100644 index 00000000..ec00d7aa --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_texture.c @@ -0,0 +1,66 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/16/2009 +// +// Filename: src-IL/src/il_texture.c +// +// Description: Reads from a Medieval II: Total War (by Creative Assembly) +// Texture (.texture) file. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_TEXTURE + + +//! Reads a TEXTURE file +ILboolean ilLoadTexture(ILconst_string FileName) +{ + ILHANDLE TextureFile; + ILboolean bTexture = IL_FALSE; + + TextureFile = iopenr(FileName); + if (TextureFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTexture; + } + + bTexture = ilLoadTextureF(TextureFile); + icloser(TextureFile); + + return bTexture; +} + + +//! Reads an already-opened TEXTURE file +ILboolean ilLoadTextureF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + // From http://forums.totalwar.org/vb/showthread.php?t=70886, all that needs to be done + // is to strip out the first 48 bytes, and then it is DDS data. + iseek(48, IL_SEEK_CUR); + bRet = ilLoadDdsF(File); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a TEXTURE +ILboolean ilLoadTextureL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + // From http://forums.totalwar.org/vb/showthread.php?t=70886, all that needs to be done + // is to strip out the first 48 bytes, and then it is DDS data. + iseek(48, IL_SEEK_CUR); + return ilLoadDdsL(Lump, Size); +} + +#endif//IL_NO_TEXTURE + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_tiff.c b/libs/DevIL-1.7.8/src-IL/src/il_tiff.c new file mode 100644 index 00000000..d2e83af7 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_tiff.c @@ -0,0 +1,1112 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_tiff.c +// +// Description: Tiff (.tif) functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_TIF + +#include "tiffio.h" + +#include +#include "il_manip.h" + +#define MAGIC_HEADER1 0x4949 +#define MAGIC_HEADER2 0x4D4D + + +#if (defined(_WIN32) || defined(_WIN64)) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "libtiff.lib") + #else + #pragma comment(lib, "libtiff-d.lib") + #endif + #endif +#endif + + +/*----------------------------------------------------------------------------*/ + +// No need for a separate header +static ILboolean iLoadTiffInternal(void); +static char* iMakeString(void); +static TIFF* iTIFFOpen(char *Mode); +static ILboolean iSaveTiffInternal(/*ILconst_string Filename*/); + +/*----------------------------------------------------------------------------*/ + +ILboolean ilisValidTiffExtension(ILconst_string FileName) +{ + if (!iCheckExtension((ILstring)FileName, IL_TEXT("tif")) && + !iCheckExtension((ILstring)FileName, IL_TEXT("tiff"))) + return IL_FALSE; + else + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +//! Checks if the file specified in FileName is a valid tiff file. +ILboolean ilIsValidTiff(ILconst_string FileName) +{ + ILHANDLE TiffFile; + ILboolean bTiff = IL_FALSE; + + if (!ilisValidTiffExtension((ILstring) FileName)) { + ilSetError(IL_INVALID_EXTENSION); + return bTiff; + } + + TiffFile = iopenr((ILstring)FileName); + if (TiffFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTiff; + } + + bTiff = ilIsValidTiffF(TiffFile); + icloser(TiffFile); + + return bTiff; +} + +/*----------------------------------------------------------------------------*/ + +ILboolean ilisValidTiffFunc() +{ + ILushort Header1, Header2; + + Header1 = GetLittleUShort(); + + if (Header1 != MAGIC_HEADER1 && Header1 != MAGIC_HEADER2) + return IL_FALSE; + + if (Header1 == MAGIC_HEADER1) + Header2 = GetLittleUShort(); + else + Header2 = GetBigUShort(); + + if (Header2 != 42) + return IL_FALSE; + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ + +//! Checks if the ILHANDLE contains a valid tiff file at the current position. +ILboolean ilIsValidTiffF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = ilisValidTiffFunc(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + +/*----------------------------------------------------------------------------*/ + +//! Checks if Lump is a valid Tiff lump. +ILboolean ilIsValidTiffL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return ilisValidTiffFunc(); +} + +/*----------------------------------------------------------------------------*/ + +//! Reads a Tiff file +ILboolean ilLoadTiff(ILconst_string FileName) +{ + ILHANDLE TiffFile; + ILboolean bTiff = IL_FALSE; + + TiffFile = iopenr(FileName); + if (TiffFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + } + else { + bTiff = ilLoadTiffF(TiffFile); + icloser(TiffFile); + } + + return bTiff; +} + +/*----------------------------------------------------------------------------*/ + +//! Reads an already-opened Tiff file +ILboolean ilLoadTiffF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadTiffInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + +/*----------------------------------------------------------------------------*/ + +//! Reads from a memory "lump" that contains a Tiff +ILboolean ilLoadTiffL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadTiffInternal(); +} + +/*----------------------------------------------------------------------------*/ + +void warningHandler(const char* mod, const char* fmt, va_list ap) +{ + mod; fmt; ap; + //char buff[1024]; + //vsnprintf(buff, 1024, fmt, ap); +} + +void errorHandler(const char* mod, const char* fmt, va_list ap) +{ + mod; fmt; ap; + //char buff[1024]; + //vsnprintf(buff, 1024, fmt, ap); +} + +//// + +/* +ILboolean iLoadTiffInternal (TIFF* tif, ILimage* Image) +{ + //// + + uint16 photometric, planarconfig, orientation; + uint16 samplesperpixel, bitspersample, *sampleinfo, extrasamples; + uint32 w, h, d, linesize, tilewidth, tilelength; + ILushort si; + + //// + + TIFFSetDirectory(tif, directory); + //// + + // Process fields + + TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); + TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); + + TIFFGetFieldDefaulted(tif, TIFFTAG_IMAGEDEPTH, &d); //TODO: d is ignored... + TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); + TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); + TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, &sampleinfo); + TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &orientation); + + linesize = TIFFScanlineSize(tif); + + TIFFGetFieldDefaulted(tif, TIFFTAG_PHOTOMETRIC, &photometric); + TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig); + + tilewidth = w; tilelength = h; + TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tilewidth); + TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tilelength); + + //// + + if (extrasamples != 0) { + return IL_FALSE; + } + + //// + + if (!Image) { + int type = IL_UNSIGNED_BYTE; + if (bitspersample == 16) type = IL_UNSIGNED_SHORT; + if(!ilTexImage(w, h, 1, 1, IL_LUMINANCE, type, NULL)) { + TIFFClose(tif); + return IL_FALSE; + } + iCurImage->NumNext = 0; + Image = iCurImage; + } + else { + Image->Next = ilNewImage(w, h, 1, 1, 1); + if(Image->Next == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + Image = Image->Next; + iCurImage->NumNext++; + } +} +*/ + +//// + + +// Internal function used to load the Tiff. +ILboolean iLoadTiffInternal() +{ + TIFF *tif; + uint16 photometric, planarconfig, orientation; + uint16 samplesperpixel, bitspersample, *sampleinfo, extrasamples; + uint32 w, h, d, linesize, tilewidth, tilelength; + ILubyte *pImageData; + ILuint i, ProfileLen, DirCount = 0; + void *Buffer; + ILimage *Image, *TempImage; + ILushort si; + ILfloat x_position, x_resolution, y_position, y_resolution; + //TIFFRGBAImage img; + //char emsg[1024]; + + // to avoid high order bits garbage when used as shorts + w = h = d = linesize = tilewidth = tilelength = 0; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + TIFFSetWarningHandler (NULL); + TIFFSetErrorHandler (NULL); + + //for debugging only + //TIFFSetWarningHandler(warningHandler); + //TIFFSetErrorHandler(errorHandler); + + tif = iTIFFOpen("r"); + if (tif == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + do { + DirCount++; + } while (TIFFReadDirectory(tif)); + + /* + if (!ilTexImage(1, 1, 1, 1, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) { + TIFFClose(tif); + return IL_FALSE; + } + Image = iCurImage; + for (i = 1; i < DirCount; i++) { + Image->Next = ilNewImage(1, 1, 1, 1, 1); + if (Image->Next == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + Image = Image->Next; + } + iCurImage->NumNext = DirCount - 1; + */ + Image = NULL; + for (i = 0; i < DirCount; i++) { + TIFFSetDirectory(tif, (tdir_t)i); + TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); + TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); + + TIFFGetFieldDefaulted(tif, TIFFTAG_IMAGEDEPTH, &d); //TODO: d is ignored... + TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel); + TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitspersample); + TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, &sampleinfo); + TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &orientation); + + linesize = TIFFScanlineSize(tif); + + //added 2003-08-31 + //1 bpp tiffs are not neccessarily greyscale, they can + //have a palette (photometric == 3)...get this information + TIFFGetFieldDefaulted(tif, TIFFTAG_PHOTOMETRIC, &photometric); + TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig); + + //special-case code for frequent data cases that may be read more + //efficiently than with the TIFFReadRGBAImage() interface. + + //added 2004-05-12 + //Get tile sizes and use TIFFReadRGBAImage() for tiled images for now + tilewidth = w; tilelength = h; + TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tilewidth); + TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tilelength); + + + if (extrasamples == 0 + && samplesperpixel == 1 //luminance or palette + && (bitspersample == 8 || bitspersample == 1 || bitspersample == 16) + && (photometric == PHOTOMETRIC_MINISWHITE + || photometric == PHOTOMETRIC_MINISBLACK + || photometric == PHOTOMETRIC_PALETTE) + && (orientation == ORIENTATION_TOPLEFT || orientation == ORIENTATION_BOTLEFT) + && tilewidth == w && tilelength == h + ) { + ILubyte* strip; + tsize_t stripsize; + ILuint y; + uint32 rowsperstrip, j, linesread; + + //TODO: 1 bit/pixel images should not be stored as 8 bits... + //(-> add new format) + if (!Image) { + int type = IL_UNSIGNED_BYTE; + if (bitspersample == 16) type = IL_UNSIGNED_SHORT; + if (!ilTexImage(w, h, 1, 1, IL_LUMINANCE, type, NULL)) { + TIFFClose(tif); + return IL_FALSE; + } + Image = iCurImage; + } + else { + Image->Next = ilNewImage(w, h, 1, 1, 1); + if (Image->Next == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + Image = Image->Next; + } + + if (photometric == PHOTOMETRIC_PALETTE) { //read palette + uint16 *red, *green, *blue; + //ILboolean is16bitpalette = IL_FALSE; + ILubyte *entry; + uint32 count = 1 << bitspersample, j; + + TIFFGetField(tif, TIFFTAG_COLORMAP, &red, &green, &blue); + + Image->Format = IL_COLOUR_INDEX; + Image->Pal.PalSize = (count)*3; + Image->Pal.PalType = IL_PAL_RGB24; + Image->Pal.Palette = (ILubyte*)ialloc(Image->Pal.PalSize); + entry = Image->Pal.Palette; + for (j = 0; j < count; ++j) { + entry[0] = (ILubyte)(red[j] >> 8); + entry[1] = (ILubyte)(green[j] >> 8); + entry[2] = (ILubyte)(blue[j] >> 8); + + entry += 3; + } + } + + TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); + stripsize = TIFFStripSize(tif); + + strip = (ILubyte*)ialloc(stripsize); + + if (bitspersample == 8 || bitspersample == 16) { + ILubyte *dat = Image->Data; + for (y = 0; y < h; y += rowsperstrip) { + //the last strip may contain less data if the image + //height is not evenly divisible by rowsperstrip + if (y + rowsperstrip > h) { + stripsize = linesize*(h - y); + linesread = h - y; + } + else + linesread = rowsperstrip; + + if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), strip, stripsize) == -1) { + ilSetError(IL_LIB_TIFF_ERROR); + ifree(strip); + TIFFClose(tif); + return IL_FALSE; + } + + if (photometric == PHOTOMETRIC_MINISWHITE) { //invert channel + uint32 k, t2; + for (j = 0; j < linesread; ++j) { + t2 = j*linesize; + //this works for 16bit images as well: the two bytes + //making up a pixel can be inverted independently + for (k = 0; k < Image->Bps; ++k) + dat[k] = ~strip[t2 + k]; + dat += w; + } + } + else + for(j = 0; j < linesread; ++j) + memcpy(&Image->Data[(y + j)*Image->Bps], &strip[j*linesize], Image->Bps); + } + } + else if (bitspersample == 1) { + //TODO: add a native format to devil, so we don't have to + //unpack the values here + ILubyte mask, curr, *dat = Image->Data; + uint32 k, sx, t2; + for (y = 0; y < h; y += rowsperstrip) { + //the last strip may contain less data if the image + //height is not evenly divisible by rowsperstrip + if (y + rowsperstrip > h) { + stripsize = linesize*(h - y); + linesread = h - y; + } + else + linesread = rowsperstrip; + + if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), strip, stripsize) == -1) { + ilSetError(IL_LIB_TIFF_ERROR); + ifree(strip); + TIFFClose(tif); + return IL_FALSE; + } + + for (j = 0; j < linesread; ++j) { + k = 0; + sx = 0; + t2 = j*linesize; + while (k < w) { + curr = strip[t2 + sx]; + if (photometric == PHOTOMETRIC_MINISWHITE) + curr = ~curr; + for (mask = 0x80; mask != 0 && k < w; mask >>= 1){ + if((curr & mask) != 0) + dat[k] = 255; + else + dat[k] = 0; + ++k; + } + ++sx; + } + dat += w; + } + } + } + + ifree(strip); + + if(orientation == ORIENTATION_TOPLEFT) + Image->Origin = IL_ORIGIN_UPPER_LEFT; + else if(orientation == ORIENTATION_BOTLEFT) + Image->Origin = IL_ORIGIN_LOWER_LEFT; + } + //for 16bit rgb images: + else if (extrasamples == 0 + && samplesperpixel == 3 + && (bitspersample == 8 || bitspersample == 16) + && photometric == PHOTOMETRIC_RGB + && planarconfig == 1 + && (orientation == ORIENTATION_TOPLEFT || orientation == ORIENTATION_BOTLEFT) + && tilewidth == w && tilelength == h + ) { + ILubyte *strip, *dat; + tsize_t stripsize; + ILuint y; + uint32 rowsperstrip, j, linesread; + + if (!Image) { + int type = IL_UNSIGNED_BYTE; + if (bitspersample == 16) type = IL_UNSIGNED_SHORT; + if(!ilTexImage(w, h, 1, 3, IL_RGB, type, NULL)) { + TIFFClose(tif); + return IL_FALSE; + } + Image = iCurImage; + } + else { + Image->Next = ilNewImage(w, h, 1, 1, 1); + if(Image->Next == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + Image = Image->Next; + } + + TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip); + stripsize = TIFFStripSize(tif); + + strip = (ILubyte*)ialloc(stripsize); + + dat = Image->Data; + for (y = 0; y < h; y += rowsperstrip) { + //the last strip may contain less data if the image + //height is not evenly divisible by rowsperstrip + if (y + rowsperstrip > h) { + stripsize = linesize*(h - y); + linesread = h - y; + } + else + linesread = rowsperstrip; + + if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, y, 0), strip, stripsize) == -1) { + ilSetError(IL_LIB_TIFF_ERROR); + ifree(strip); + TIFFClose(tif); + return IL_FALSE; + } + + for(j = 0; j < linesread; ++j) + memcpy(&Image->Data[(y + j)*Image->Bps], &strip[j*linesize], Image->Bps); + } + + ifree(strip); + + if(orientation == ORIENTATION_TOPLEFT) + Image->Origin = IL_ORIGIN_UPPER_LEFT; + else if(orientation == ORIENTATION_BOTLEFT) + Image->Origin = IL_ORIGIN_LOWER_LEFT; + }/* + else if (extrasamples == 0 && samplesperpixel == 3 //rgb + && (bitspersample == 8 || bitspersample == 1 || bitspersample == 16) + && photometric == PHOTOMETRIC_RGB + && (planarconfig == PLANARCONFIG_CONTIG || planarcon + && (orientation == ORIENTATION_TOPLEFT || orientation == ORIENTATION_BOTLEFT) + ) { + } + */ + else { + //not direclty supported format + if(!Image) { + if(!ilTexImage(w, h, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) { + TIFFClose(tif); + return IL_FALSE; + } + Image = iCurImage; + } + else { + Image->Next = ilNewImage(w, h, 1, 4, 1); + if(Image->Next == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + Image = Image->Next; + } + + if (samplesperpixel == 4) { + TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, &sampleinfo); + if (!sampleinfo || sampleinfo[0] == EXTRASAMPLE_UNSPECIFIED) { + si = EXTRASAMPLE_ASSOCALPHA; + TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, 1, &si); + } + } + /* + if (!ilResizeImage(Image, Image->Width, Image->Height, 1, 4, 1)) { + TIFFClose(tif); + return IL_FALSE; + } + */ + Image->Format = IL_RGBA; + Image->Type = IL_UNSIGNED_BYTE; + + // Siigron: added u_long cast to shut up compiler warning + //2003-08-31: changed flag from 1 (exit on error) to 0 (keep decoding) + //this lets me view text.tif, but can give crashes with unsupported + //tiffs... + //2003-09-04: keep flag 1 for official version for now + if (!TIFFReadRGBAImage(tif, Image->Width, Image->Height, (uint32*)Image->Data, 0)) { + TIFFClose(tif); + ilSetError(IL_LIB_TIFF_ERROR); + return IL_FALSE; + } + Image->Origin = IL_ORIGIN_LOWER_LEFT; // eiu...dunno if this is right + +#ifdef __BIG_ENDIAN__ //TIFFReadRGBAImage reads abgr on big endian, convert to rgba + EndianSwapData(Image); +#endif + + /* + The following switch() should not be needed, + because we take care of the special cases that needed + these conversions. But since not all special cases + are handled right now, keep it :) + */ + //TODO: put switch into the loop?? + TempImage = iCurImage; + iCurImage = Image; //ilConvertImage() converts iCurImage + switch (samplesperpixel) + { + case 1: + //added 2003-08-31 to keep palettized tiffs colored + if(photometric != 3) + ilConvertImage(IL_LUMINANCE, IL_UNSIGNED_BYTE); + else //strip alpha as tiff supports no alpha palettes + ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); + break; + + case 3: + //TODO: why the ifdef?? +#ifdef __LITTLE_ENDIAN__ + ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE); +#endif + break; + + case 4: + pImageData = Image->Data; + //removed on 2003-08-26...why was this here? libtiff should and does + //take care of these things??? + /* + //invert alpha +#ifdef __LITTLE_ENDIAN__ + pImageData += 3; +#endif + for (i = Image->Width * Image->Height; i > 0; i--) { + *pImageData ^= 255; + pImageData += 4; + } + */ + break; + } + iCurImage = TempImage; + + } //else not directly supported format + + if (TIFFGetField(tif, TIFFTAG_ICCPROFILE, &ProfileLen, &Buffer)) { + if (Image->Profile && Image->ProfileSize) + ifree(Image->Profile); + Image->Profile = (ILubyte*)ialloc(ProfileLen); + if (Image->Profile == NULL) { + TIFFClose(tif); + return IL_FALSE; + } + + memcpy(Image->Profile, Buffer, ProfileLen); + Image->ProfileSize = ProfileLen; + + //removed on 2003-08-24 as explained in bug 579574 on sourceforge + //_TIFFfree(Buffer); + } + + // dangelo: read offset from tiff tags. + //If nothing is stored in these tags, then this must be an "uncropped" TIFF + //file, in which case, the "full size" width/height is the same as the + //"cropped" width and height + // + // the full size is currently not supported by DevIL + //if (TIFFGetField(tif, TIFFTAG_PIXAR_IMAGEFULLWIDTH, &(c->full_width)) == + // 0) + // (c->full_width = c->cropped_width); + //if (TIFFGetField(tif, TIFFTAG_PIXAR_IMAGEFULLLENGTH, &(c->full_height)) == + // 0) + // (c->full_height = c->cropped_height); + + if (TIFFGetField(tif, TIFFTAG_XPOSITION, &x_position) == 0) + x_position = 0; + if (TIFFGetField(tif, TIFFTAG_XRESOLUTION, &x_resolution) == 0) + x_resolution = 0; + if (TIFFGetField(tif, TIFFTAG_YPOSITION, &y_position) == 0) + y_position = 0; + if (TIFFGetField(tif, TIFFTAG_YRESOLUTION, &y_resolution) == 0) + y_resolution = 0; + + //offset in pixels of "cropped" image from top left corner of + //full image (rounded to nearest integer) + Image->OffX = (uint32) ((x_position * x_resolution) + 0.49); + Image->OffY = (uint32) ((y_position * y_resolution) + 0.49); + + + /* + Image = Image->Next; + if (Image == NULL) // Should never happen except when we reach the end, but check anyway. + break; + */ + } //for tiff directories + + TIFFClose(tif); + + return ilFixImage(); +} + +/*----------------------------------------------------------------------------*/ + +///////////////////////////////////////////////////////////////////////////////////////// +// Extension to load tiff files from memory +// Marco Fabbricatore (fabbrica@ai-lab.fh-furtwangen.de) +///////////////////////////////////////////////////////////////////////////////////////// + +static tsize_t +_tiffFileReadProc(thandle_t fd, tdata_t pData, tsize_t tSize) +{ + fd; + return iread(pData, 1, tSize); +} + +/*----------------------------------------------------------------------------*/ + +// We have trouble sometimes reading when writing a file. Specifically, the only time +// I have seen libtiff call this is at the beginning of writing a tiff, before +// anything is ever even written! Also, we have to return 0, no matter what tSize +// is. If we return tSize like would be expected, then TIFFClientOpen fails. +static tsize_t +_tiffFileReadProcW(thandle_t fd, tdata_t pData, tsize_t tSize) +{ + fd; + return 0; +} + +/*----------------------------------------------------------------------------*/ + +static tsize_t +_tiffFileWriteProc(thandle_t fd, tdata_t pData, tsize_t tSize) +{ + fd; + return iwrite(pData, 1, tSize); +} + +/*----------------------------------------------------------------------------*/ + +static toff_t +_tiffFileSeekProc(thandle_t fd, toff_t tOff, int whence) +{ + fd; + /* we use this as a special code, so avoid accepting it */ + if (tOff == 0xFFFFFFFF) + return 0xFFFFFFFF; + + iseek(tOff, whence); + return itell(); + //return tOff; +} + +/*----------------------------------------------------------------------------*/ + +static toff_t +_tiffFileSeekProcW(thandle_t fd, toff_t tOff, int whence) +{ + /* we use this as a special code, so avoid accepting it */ + if (tOff == 0xFFFFFFFF) + return 0xFFFFFFFF; + + iseekw(tOff, whence); + return itellw(); + //return tOff; +} + +/*----------------------------------------------------------------------------*/ + +static int +_tiffFileCloseProc(thandle_t fd) +{ + fd; + return (0); +} + +/*----------------------------------------------------------------------------*/ + +static toff_t +_tiffFileSizeProc(thandle_t fd) +{ + ILint Offset, Size; + Offset = itell(); + iseek(0, IL_SEEK_END); + Size = itell(); + iseek(Offset, IL_SEEK_SET); + + fd; + + return Size; +} + +/*----------------------------------------------------------------------------*/ + +static toff_t +_tiffFileSizeProcW(thandle_t fd) +{ + ILint Offset, Size; + Offset = itellw(); + iseekw(0, IL_SEEK_END); + Size = itellw(); + iseekw(Offset, IL_SEEK_SET); + + return Size; +} + +/*----------------------------------------------------------------------------*/ + +#ifdef __BORLANDC__ +#pragma argsused +#endif +static int +_tiffDummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize) +{ + fd; pbase; psize; + return 0; +} + +/*----------------------------------------------------------------------------*/ + +#ifdef __BORLANDC__ +#pragma argsused +#endif +static void +_tiffDummyUnmapProc(thandle_t fd, tdata_t base, toff_t size) +{ + fd; base; size; + return; +} + +/*----------------------------------------------------------------------------*/ + +TIFF *iTIFFOpen(char *Mode) +{ + TIFF *tif; + + if (Mode[0] == 'w') + tif = TIFFClientOpen("TIFFMemFile", Mode, + NULL, + _tiffFileReadProcW, _tiffFileWriteProc, + _tiffFileSeekProcW, _tiffFileCloseProc, + _tiffFileSizeProcW, _tiffDummyMapProc, + _tiffDummyUnmapProc); + else + tif = TIFFClientOpen("TIFFMemFile", Mode, + NULL, + _tiffFileReadProc, _tiffFileWriteProc, + _tiffFileSeekProc, _tiffFileCloseProc, + _tiffFileSizeProc, _tiffDummyMapProc, + _tiffDummyUnmapProc); + + return tif; +} + +/*----------------------------------------------------------------------------*/ + + +//! Writes a Tiff file +ILboolean ilSaveTiff(const ILstring FileName) +{ + ILHANDLE TiffFile; + ILuint TiffSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + TiffFile = iopenw(FileName); + if (TiffFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + TiffSize = ilSaveTiffF(TiffFile); + iclosew(TiffFile); + + if (TiffSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a Tiff to an already-opened file +ILuint ilSaveTiffF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveTiffInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a Tiff to a memory "lump" +ILuint ilSaveTiffL(void *Lump, ILuint Size) +{ + ILuint Pos = itellw(); + iSetOutputLump(Lump, Size); + if (iSaveTiffInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// @TODO: Accept palettes! + +// Internal function used to save the Tiff. +ILboolean iSaveTiffInternal(/*ILconst_string Filename*/) +{ + ILenum Format; + ILenum Compression; + ILuint ixLine; + TIFF *File; + char Description[512]; + ILimage *TempImage; + const char *str; + ILboolean SwapColors; + ILubyte *OldData; + + if(iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + +#if 1 + TIFFSetWarningHandler (NULL); + TIFFSetErrorHandler (NULL); +#else + //for debugging only + TIFFSetWarningHandler(warningHandler); + TIFFSetErrorHandler(errorHandler); +#endif + if (iGetHint(IL_COMPRESSION_HINT) == IL_USE_COMPRESSION) + Compression = COMPRESSION_LZW; + else + Compression = COMPRESSION_NONE; + + if (iCurImage->Format == IL_COLOUR_INDEX) { + if (ilGetBppPal(iCurImage->Pal.PalType) == 4) // Preserve the alpha. + TempImage = iConvertImage(iCurImage, IL_RGBA, IL_UNSIGNED_BYTE); + else + TempImage = iConvertImage(iCurImage, IL_RGB, IL_UNSIGNED_BYTE); + + if (TempImage == NULL) { + return IL_FALSE; + } + } + else { + TempImage = iCurImage; + } + + /*#ifndef _UNICODE + File = TIFFOpen(Filename, "w"); + #else + File = TIFFOpenW(Filename, "w"); + #endif*/ + + // Control writing functions ourself. + File = iTIFFOpen("w"); + if (File == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + sprintf(Description, "Tiff generated by %s", ilGetString(IL_VERSION_NUM)); + + TIFFSetField(File, TIFFTAG_IMAGEWIDTH, TempImage->Width); + TIFFSetField(File, TIFFTAG_IMAGELENGTH, TempImage->Height); + TIFFSetField(File, TIFFTAG_COMPRESSION, Compression); + TIFFSetField(File, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); + TIFFSetField(File, TIFFTAG_BITSPERSAMPLE, TempImage->Bpc << 3); + TIFFSetField(File, TIFFTAG_SAMPLESPERPIXEL, TempImage->Bpp); + if (TempImage->Bpp == 4) //TODO: LUMINANCE, LUMINANCE_ALPHA + TIFFSetField(File, TIFFTAG_MATTEING, 1); + TIFFSetField(File, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + TIFFSetField(File, TIFFTAG_ROWSPERSTRIP, 1); + TIFFSetField(File, TIFFTAG_SOFTWARE, ilGetString(IL_VERSION_NUM)); + /*TIFFSetField(File, TIFFTAG_DOCUMENTNAME, + iGetString(IL_TIF_DOCUMENTNAME_STRING) ? + iGetString(IL_TIF_DOCUMENTNAME_STRING) : FileName); +*/ + str = iGetString(IL_TIF_DOCUMENTNAME_STRING); + if (str) { + TIFFSetField(File, TIFFTAG_DOCUMENTNAME, str); + ifree(str); + } + + + str = iGetString(IL_TIF_AUTHNAME_STRING); + if (iGetString(IL_TIF_AUTHNAME_STRING)) { + TIFFSetField(File, TIFFTAG_ARTIST, str); + ifree(str); + } + + str = iGetString(IL_TIF_HOSTCOMPUTER_STRING); + if (str) { + TIFFSetField(File, TIFFTAG_HOSTCOMPUTER, str); + ifree(str); + } + + str = iGetString(IL_TIF_HOSTCOMPUTER_STRING); + if (str) { + TIFFSetField(File, TIFFTAG_IMAGEDESCRIPTION, str); + ifree(str); + } + + // Set the date and time string. + TIFFSetField(File, TIFFTAG_DATETIME, iMakeString()); + + // 24/4/2003 + // Orientation flag is not always supported (Photoshop, ...), orient the image data + // and set it always to normal view + TIFFSetField(File, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) { + ILubyte* Data = iGetFlipped(TempImage); + OldData = TempImage->Data; + TempImage->Data = Data; + } + else + OldData = TempImage->Data; + + /* + TIFFSetField(File, TIFFTAG_ORIENTATION, + TempImage->Origin == IL_ORIGIN_UPPER_LEFT ? ORIENTATION_TOPLEFT : ORIENTATION_BOTLEFT); + */ + + Format = TempImage->Format; + SwapColors = (Format == IL_BGR || Format == IL_BGRA); + if (SwapColors) + ilSwapColours(); + + for (ixLine = 0; ixLine < TempImage->Height; ++ixLine) { + if (TIFFWriteScanline(File, TempImage->Data + ixLine * TempImage->Bps, ixLine, 0) < 0) { + TIFFClose(File); + ilSetError(IL_LIB_TIFF_ERROR); + if (SwapColors) + ilSwapColours(); + if (TempImage->Data != OldData) { + ifree( TempImage->Data ); + TempImage->Data = OldData; + } + if (TempImage != iCurImage) + ilCloseImage(TempImage); + return IL_FALSE; + } + } + + if (SwapColors) + ilSwapColours(); + + if (TempImage->Data != OldData) { + ifree(TempImage->Data); + TempImage->Data = OldData; + } + + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + TIFFClose(File); + + return IL_TRUE; +} + +/*----------------------------------------------------------------------------*/ +// Makes a neat date string for the date field. +// From http://www.awaresystems.be/imaging/tiff/tifftags/datetime.html : +// The format is: "YYYY:MM:DD HH:MM:SS", with hours like those on +// a 24-hour clock, and one space character between the date and the +// time. The length of the string, including the terminating NUL, is +// 20 bytes.) +char *iMakeString() +{ + static char TimeStr[20]; + time_t Time; + struct tm *CurTime; + + imemclear(TimeStr, 20); + + time(&Time); +#ifdef _WIN32 + _tzset(); +#endif + CurTime = localtime(&Time); + + strftime(TimeStr, 20, "%Y:%m:%d %H:%M:%S", CurTime); + + return TimeStr; +} + +/*----------------------------------------------------------------------------*/ + +#endif//IL_NO_TIF diff --git a/libs/DevIL-1.7.8/src-IL/src/il_tpl.c b/libs/DevIL-1.7.8/src-IL/src/il_tpl.c new file mode 100644 index 00000000..8806016e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_tpl.c @@ -0,0 +1,782 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_tpl.c +// +// Description: Reads from a Gamecube Texture Palette (.tpl). +// Specifications were found at +// http://pabut.homeip.net:8000/yagcd/chap14.html. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_TPL +#include "il_dds.h" + + +typedef struct TPLHEAD +{ + ILuint Magic; + ILuint nTextures; + ILuint HeaderSize; +} TPLHEAD; + +// Data formats +#define TPL_I4 0 +#define TPL_I8 1 +#define TPL_IA4 2 +#define TPL_IA8 3 +#define TPL_RGB565 4 +#define TPL_RGB5A3 5 +#define TPL_RGBA8 6 +#define TPL_CI4 8 +#define TPL_CI8 9 +#define TPL_CI14X2 10 +#define TPL_CMP 14 + +// Wrapping +#define TPL_CLAMP 0 +#define TPL_REPEAT 1 +#define TPL_MIRROR 2 + +// Palette entries +#define TPL_PAL_IA8 0 +#define TPL_PAL_RGB565 1 +#define TPL_PAL_RGB5A3 2 + + +ILboolean iIsValidTpl(void); +ILboolean iCheckTpl(TPLHEAD *Header); +ILboolean iLoadTplInternal(void); +ILboolean TplGetIndexImage(ILimage *Image, ILuint TexOff, ILuint DataFormat); + + +//! Checks if the file specified in FileName is a valid TPL file. +ILboolean ilIsValidTpl(ILconst_string FileName) +{ + ILHANDLE TplFile; + ILboolean bTpl = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("tpl"))) { + ilSetError(IL_INVALID_EXTENSION); + return bTpl; + } + + TplFile = iopenr(FileName); + if (TplFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTpl; + } + + bTpl = ilIsValidTplF(TplFile); + icloser(TplFile); + + return bTpl; +} + + +//! Checks if the ILHANDLE contains a valid TPL file at the current position. +ILboolean ilIsValidTplF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidTpl(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid TPL lump. +ILboolean ilIsValidTplL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidTpl(); +} + + +// Internal function used to get the TPL header from the current file. +ILboolean iGetTplHead(TPLHEAD *Header) +{ + Header->Magic = GetBigUInt(); + Header->nTextures = GetBigUInt(); + Header->HeaderSize = GetBigUInt(); + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidTpl(void) +{ + TPLHEAD Header; + + if (!iGetTplHead(&Header)) + return IL_FALSE; + iseek(-12, IL_SEEK_CUR); + + return iCheckTpl(&Header); +} + + +// Internal function used to check if the HEADER is a valid TPL header. +ILboolean iCheckTpl(TPLHEAD *Header) +{ + // The file signature is 0x0020AF30. + if (Header->Magic != 0x0020AF30) + return IL_FALSE; + // Only valid header size is 0x0C. + if (Header->HeaderSize != 0x0C) + return IL_FALSE; + // We have to have at least 1 texture. + if (Header->nTextures == 0) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a TPL file +ILboolean ilLoadTpl(ILconst_string FileName) +{ + ILHANDLE TplFile; + ILboolean bTpl = IL_FALSE; + + TplFile = iopenr(FileName); + if (TplFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bTpl; + } + + bTpl = ilLoadTplF(TplFile); + icloser(TplFile); + + return bTpl; +} + + +//! Reads an already-opened TPL file +ILboolean ilLoadTplF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadTplInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a TPL +ILboolean ilLoadTplL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadTplInternal(); +} + + +// Internal function used to load the TPL. +ILboolean iLoadTplInternal(void) +{ + TPLHEAD Header; + ILimage *Image/*, *BaseImage*/; + ILuint Pos, TexOff, PalOff, DataFormat, Bpp, DataOff, WrapS, WrapT; + ILuint x, y, xBlock, yBlock, i, j, k, n; + ILenum Format; + ILushort Width, Height, ShortPixel; + ILubyte BytePixel, CompData[8]; + Color8888 colours[4], *col; + ILushort color_0, color_1; + ILuint bitmask, Select; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + Image = iCurImage; // Top-level image + + if (!iGetTplHead(&Header)) + return IL_FALSE; + if (!iCheckTpl(&Header)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + // Points to the beginning of the texture header directory. + Pos = itell(); + + for (n = 0; n < Header.nTextures; n++) { + // Go back to the texture header directory for texture number n+1. + iseek(Pos + n * 8, IL_SEEK_SET); + TexOff = GetBigUInt(); + PalOff = GetBigUInt(); + // Go to the texture header. + if (iseek(TexOff, IL_SEEK_SET)) + return IL_FALSE; + + Height = GetBigUShort(); + Width = GetBigUShort(); + // It looks like files actually have n-1 images, with the nth one having 0 height and width. + if (Width == 0 || Height == 0) { + // If this is our first image, however, we error out. + if (Image == iCurImage) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + // Break out of our for loop and run ilFixImage on the images. + break; + } + + DataFormat = GetBigUInt(); + TexOff = GetBigUInt(); + WrapS = GetBigUInt(); + WrapT = GetBigUInt(); + if (WrapS == TPL_REPEAT || WrapS == TPL_MIRROR) { + // By the specs, repeated and mirrored textures must have dimensions of power of 2. + if ((Width != ilNextPower2(Width)) || (Height != ilNextPower2(Height))) { + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + } + + // Go to the actual texture data. + if (iseek(TexOff, IL_SEEK_SET)) + return IL_FALSE; + + switch (DataFormat) + { + case TPL_I4: + case TPL_I8: + Format = IL_LUMINANCE; + Bpp = 1; + break; + case TPL_IA4: + case TPL_IA8: + Format = IL_LUMINANCE_ALPHA; + Bpp = 1; + break; + case TPL_RGB565: + Format = IL_RGB; + Bpp = 3; + break; + case TPL_RGB5A3: + Format = IL_RGBA; + Bpp = 4; + break; + case TPL_RGBA8: + Format = IL_RGBA; + Bpp = 4; + break; + case TPL_CI4: + case TPL_CI8: + Format = IL_COLOR_INDEX; + Bpp = 1; + break; + case TPL_CI14X2: + Format = IL_RGBA; + Bpp = 3; + break; + case TPL_CMP: + Format = IL_RGBA; + Bpp = 4; + break; + + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + if (Image == iCurImage) { // This is our first image. + if (!ilTexImage(Width, Height, 1, Bpp, Format, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + } + else { + Image->Next = ilNewImageFull(Width, Height, 1, Bpp, Format, IL_UNSIGNED_BYTE, NULL); + if (Image->Next == NULL) + return IL_FALSE; + Image = Image->Next; + } + Image->Origin = IL_ORIGIN_UPPER_LEFT; // Origins are always fixed here. + + switch (DataFormat) + { + case TPL_I4: + // 8x8 tiles of 4-bit intensity values + for (y = 0; y < Image->Height; y += 8) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 8; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 8; xBlock += 2) { + BytePixel = igetc(); + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff] = (BytePixel & 0xF0) | (BytePixel & 0xF0) >> 4; + DataOff++; + // We have to do this check again, so we do not go past the last pixel in the image (ex. 1 pixel wide image). + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff+1] = (BytePixel & 0x0F) << 4 | (BytePixel & 0x0F); + DataOff++; + } + } + } + } + break; + + case TPL_I8: + // 8x4 tiles of 8-bit intensity values + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 8; xBlock++) { + if ((x + xBlock) >= Image->Width) { + igetc(); // Skip the pad byte. + continue; + } + Image->Data[DataOff] = igetc(); // Luminance value + DataOff++; + } + } + } + } + break; + + case TPL_IA4: + // 8x4 tiles of 4-bit intensity and 4-bit alpha values + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 8; xBlock += 2) { + BytePixel = igetc(); + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff] = (BytePixel & 0xF0) | (BytePixel & 0xF0) >> 4; + Image->Data[DataOff+1] = (BytePixel & 0x0F) << 4 | (BytePixel & 0x0F); + DataOff += 2; + } + } + } + } + break; + + case TPL_IA8: + // 4x4 tiles of 8-bit intensity and 8-bit alpha values + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4; xBlock += 2) { + if ((x + xBlock) >= Image->Width) { + iseek(2, IL_SEEK_CUR); // Skip the pad bytes. + continue; + } + Image->Data[DataOff] = igetc(); + Image->Data[DataOff+1] = igetc(); + DataOff += 2; + } + } + } + } + break; + + case TPL_RGB565: + // 4x4 tiles of RGB565 data + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4; xBlock++) { + ShortPixel = GetBigUShort(); + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff] = ((ShortPixel & 0xF800) >> 8) | ((ShortPixel & 0xE000) >> 13); // Red + Image->Data[DataOff+1] = ((ShortPixel & 0x7E0) >> 3) | ((ShortPixel & 0x600) >> 9); // Green + Image->Data[DataOff+2] = ((ShortPixel & 0x1f) << 3) | ((ShortPixel & 0x1C) >> 2); // Blue + DataOff += 3; + } + } + } + } + break; + + case TPL_RGB5A3: + // 4x4 tiles of either RGB5 or RGB4A3 depending on the MSB. 0x80 + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4; xBlock++) { + ShortPixel = GetBigUShort(); + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + + if (ShortPixel & 0x8000) { // Check MSB. + // We have RGB5. + Image->Data[DataOff] = ((ShortPixel & 0x7C00) >> 7) | ((ShortPixel & 0x7000) >> 12); // Red + Image->Data[DataOff+1] = ((ShortPixel & 0x3E0) >> 2) | ((ShortPixel & 0x380) >> 7); // Green + Image->Data[DataOff+2] = ((ShortPixel & 0x1F) << 3) | ((ShortPixel & 0x1C) >> 2); // Blue + Image->Data[DataOff+3] = 0xFF; // I am just assuming that it is opaque. + } + else { + // We have RGB4A3. + Image->Data[DataOff] = ((ShortPixel & 0x7800) >> 7) | ((ShortPixel & 0x7800) >> 11); // Red + Image->Data[DataOff+1] = ((ShortPixel & 0x0780) >> 3) | ((ShortPixel & 0x0780) >> 7); // Green + Image->Data[DataOff+2] = ((ShortPixel & 0x0078) << 1) | ((ShortPixel & 0x0078) >> 3); // Blue + Image->Data[DataOff+3] = ((ShortPixel & 0x07) << 5) | ((ShortPixel & 0x07) << 2) | (ShortPixel >> 1); // Alpha + } + DataOff += 3; + } + } + } + } + break; + + case TPL_RGBA8: + // 4x4 tiles of RGBA data + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + for (yBlock = 0; yBlock < 4; yBlock++) { + // Skip pad bytes at the bottom of the tile if any. + if ((y + yBlock) >= Image->Height) { + iseek(16, IL_SEEK_CUR); // Entire row of pad bytes skipped + continue; + } + + // First it has the AR data. + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4; xBlock++) { + if ((x + xBlock) >= Image->Width) { + iseek(2, IL_SEEK_CUR); // Skip pad bytes. + continue; + } + Image->Data[DataOff+3] = igetc(); // Alpha + Image->Data[DataOff] = igetc(); // Red + DataOff += 3; + } + + // Then it has the GB data. + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4 && x + xBlock < Image->Width; xBlock++) { + if ((x + xBlock) >= Image->Width) { + iseek(2, IL_SEEK_CUR); // Skip pad bytes. + continue; + } + Image->Data[DataOff+1] = igetc(); // Green + Image->Data[DataOff+2] = igetc(); // Blue + DataOff += 3; + } + } + } + } + break; + + case TPL_CI4: + case TPL_CI8: + case TPL_CI14X2: + // Seek to the palette header. + if (iseek(PalOff, IL_SEEK_SET)) + return IL_FALSE; + if (!TplGetIndexImage(Image, TexOff, DataFormat)) + return IL_FALSE; + break; + + case TPL_CMP: + // S3TC 2x2 blocks of 4x4 tiles. I am assuming that this is DXT1, since it is not specified in the specs. + // Most of this ended up being copied from il_dds.c, from the DecompressDXT1 function. + //@TODO: Make this/that code a bit more modular. + for (y = 0; y < Image->Height; y += 8) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 8 && (y + yBlock) < Image->Height; yBlock += 4) { + for (xBlock = 0; xBlock < 8 && (x + xBlock) < Image->Width; xBlock += 4) { + if (iread(CompData, 1, 8) != 8) + return IL_FALSE; //@TODO: Need to do any cleanup here? + color_0 = *((ILushort*)CompData); + UShort(&color_0); + color_1 = *((ILushort*)(CompData + 2)); + UShort(&color_1); + DxtcReadColor(color_0, colours); + DxtcReadColor(color_1, colours + 1); + bitmask = ((ILuint*)CompData)[1]; + UInt(&bitmask); + + if (color_0 > color_1) { + // Four-color block: derive the other two colors. + // 00 = color_0, 01 = color_1, 10 = color_2, 11 = color_3 + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (2 * colours[0].b + colours[1].b + 1) / 3; + colours[2].g = (2 * colours[0].g + colours[1].g + 1) / 3; + colours[2].r = (2 * colours[0].r + colours[1].r + 1) / 3; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + colours[3].a = 0xFF; + } + else { + // Three-color block: derive the other color. + // 00 = color_0, 01 = color_1, 10 = color_2, + // 11 = transparent. + // These 2-bit codes correspond to the 2-bit fields + // stored in the 64-bit block. + colours[2].b = (colours[0].b + colours[1].b) / 2; + colours[2].g = (colours[0].g + colours[1].g) / 2; + colours[2].r = (colours[0].r + colours[1].r) / 2; + //colours[2].a = 0xFF; + + colours[3].b = (colours[0].b + 2 * colours[1].b + 1) / 3; + colours[3].g = (colours[0].g + 2 * colours[1].g + 1) / 3; + colours[3].r = (colours[0].r + 2 * colours[1].r + 1) / 3; + colours[3].a = 0x00; + } + + for (j = 0, k = 0; j < 4; j++) { + for (i = 0; i < 4; i++, k++) { + Select = (bitmask & (0x03 << k*2)) >> k*2; + col = &colours[Select]; + + if (((x + xBlock + i) < Image->Width) && ((y + yBlock + j) < Image->Height)) { + DataOff = (y + yBlock + j) * Image->Bps + (x + xBlock + i) * Image->Bpp; + Image->Data[DataOff + 0] = col->r; + Image->Data[DataOff + 1] = col->g; + Image->Data[DataOff + 2] = col->b; + Image->Data[DataOff + 3] = col->a; + } + } + } + } + } + } + } + break; + } + } + + return ilFixImage(); +} + + +ILboolean TplGetIndexImage(ILimage *Image, ILuint TexOff, ILuint DataFormat) +{ + ILushort NumPal, ShortPixel; + ILubyte LumVal, BytePixel; + ILuint PalFormat, PalOff, PalBpp, DataOff; + ILuint x, y, xBlock, yBlock, i; + + NumPal = GetBigUShort(); + iseek(2, IL_SEEK_CUR); // Do we need to do anything with the 'unpacked' entry? I see nothing in the specs about it. + PalFormat = GetBigUInt(); + + // Now we have to find out where the actual palette data is stored. + //@TODO: Do we need to set any errors here? + PalOff = GetBigUInt(); + if (iseek(PalOff, IL_SEEK_SET)) + return IL_FALSE; + + switch (PalFormat) + { + case TPL_PAL_IA8: + Image->Pal.Palette = (ILubyte*)ialloc(NumPal * 4); + if (Image->Pal.Palette == NULL) + return IL_FALSE; + Image->Pal.PalType = IL_PAL_RGBA32; //@TODO: Use this format natively. + Image->Pal.PalSize = NumPal * 4; + PalBpp = 4; + + for (i = 0; i < NumPal; i++) { + LumVal = igetc(); + //@TODO: Do proper conversion of luminance, or support this format natively. + Image->Pal.Palette[i * 4] = LumVal; // Assign the luminance value. + Image->Pal.Palette[i * 4 + 1] = LumVal; + Image->Pal.Palette[i * 4 + 2] = LumVal; + Image->Pal.Palette[i * 4 + 3] = igetc(); // Get alpha value. + } + break; + + case TPL_PAL_RGB565: + Image->Pal.Palette = (ILubyte*)ialloc(NumPal * 3); + if (Image->Pal.Palette == NULL) + return IL_FALSE; + Image->Pal.PalType = IL_PAL_RGB24; + Image->Pal.PalSize = NumPal * 3; + PalBpp = 3; + + for (i = 0; i < NumPal; i++) { + ShortPixel = GetBigUShort(); + // This is mostly the same code as in the TPL_RGB565 case. + Image->Pal.Palette[i*3] = ((ShortPixel & 0xF800) >> 8) | ((ShortPixel & 0xE000) >> 13); // Red + Image->Pal.Palette[i*3+1] = ((ShortPixel & 0x7E0) >> 3) | ((ShortPixel & 0x600) >> 9); // Green + Image->Pal.Palette[i*3+2] = ((ShortPixel & 0x1f) << 3) | ((ShortPixel & 0x1C) >> 2); // Blue + } + break; + + case TPL_PAL_RGB5A3: + Image->Pal.Palette = (ILubyte*)ialloc(NumPal * 4); + if (Image->Pal.Palette == NULL) + return IL_FALSE; + Image->Pal.PalType = IL_PAL_RGBA32; + Image->Pal.PalSize = NumPal * 4; + PalBpp = 4; + + for (i = 0; i < NumPal; i++) { + ShortPixel = GetBigUShort(); + // This is mostly the same code as in the TPL_RGB565 case. + if (ShortPixel & 0x8000) { // Check MSB. + // We have RGB5. + Image->Pal.Palette[i*4] = ((ShortPixel & 0x7C00) >> 7) | ((ShortPixel & 0x7000) >> 12); // Red + Image->Pal.Palette[i*4+1] = ((ShortPixel & 0x3E0) >> 2) | ((ShortPixel & 0x380) >> 7); // Green + Image->Pal.Palette[i*4+2] = ((ShortPixel & 0x1F) << 3) | ((ShortPixel & 0x1C) >> 2); // Blue + Image->Pal.Palette[i*4+3] = 0xFF; // I am just assuming that it is opaque. + } + else { + // We have RGB4A3. + Image->Pal.Palette[i*4] = ((ShortPixel & 0x7800) >> 7) | ((ShortPixel & 0x7800) >> 11); // Red + Image->Pal.Palette[i*4+1] = ((ShortPixel & 0x0780) >> 3) | ((ShortPixel & 0x0780) >> 7); // Green + Image->Pal.Palette[i*4+2] = ((ShortPixel & 0x0078) << 1) | ((ShortPixel & 0x0078) >> 3); // Blue + Image->Pal.Palette[i*4+3] = ((ShortPixel & 0x07) << 5) | ((ShortPixel & 0x07) << 2) | (ShortPixel >> 1); // Alpha + } + } + break; + + default: + ilSetError(IL_ILLEGAL_FILE_VALUE); + return IL_FALSE; + } + + // Go back to the texture data. + if (iseek(TexOff, IL_SEEK_SET)) + return IL_FALSE; + + switch (DataFormat) + { + case TPL_CI4: + // 8x8 tiles of 4-bit color indices + // This is the exact same code as the TPL_I4 case. + for (y = 0; y < Image->Height; y += 8) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 8; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 8; xBlock += 2) { + BytePixel = igetc(); + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff] = (BytePixel & 0xF0) | (BytePixel & 0xF0) >> 4; + DataOff++; + // We have to do this check again, so we do not go past the last pixel in the image (ex. 1 pixel wide image). + if ((x + xBlock) >= Image->Width) + continue; // Already read the pad byte. + Image->Data[DataOff+1] = (BytePixel & 0x0F) << 4 | (BytePixel & 0x0F); + DataOff++; + } + } + } + } + break; + + case TPL_CI8: + // 8x4 tiles of 8-bit intensity values + // This is the exact same code as the TPL_I8 case. + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 8) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 8; xBlock++) { + if ((x + xBlock) >= Image->Width) { + igetc(); // Skip the pad byte. + continue; + } + Image->Data[DataOff] = igetc(); // Color index + DataOff++; + } + } + } + } + break; + + + //@TODO: Convert to more formats than just RGBA. + case TPL_CI14X2: + // 4x4 tiles of 14-bit indices into a palette. Not supported at all in DevIL, since + // it has a huge palette (> 256 colors). Convert to RGBA. + for (y = 0; y < Image->Height; y += 4) { + for (x = 0; x < Image->Width; x += 4) { + for (yBlock = 0; yBlock < 4; yBlock++) { + if ((y + yBlock) >= Image->Height) { + iseek(8, IL_SEEK_CUR); // Entire row of pad bytes skipped. + continue; + } + DataOff = Image->Bps * (y + yBlock) + Image->Bpp * x; + for (xBlock = 0; xBlock < 4; xBlock++) { + if ((x + xBlock) >= Image->Width) { + GetBigUShort(); // Skip the pad short. + continue; + } + ShortPixel = GetBigUShort(); + ShortPixel >>= 2; // Lower 2 bits are padding bits. + Image->Data[DataOff] = Image->Pal.Palette[ShortPixel * PalBpp]; + Image->Data[DataOff+1] = Image->Pal.Palette[ShortPixel * PalBpp + 1]; + Image->Data[DataOff+2] = Image->Pal.Palette[ShortPixel * PalBpp + 2]; + if (PalFormat == TPL_PAL_RGB565) + Image->Data[DataOff+3] = 0xFF; + else + Image->Data[DataOff+3] = Image->Pal.Palette[ShortPixel * PalBpp + 3]; + DataOff++; + } + } + } + } + // Get rid of the palette, since we no longer need it. + ifree(Image->Pal.Palette); + Image->Pal.PalType = IL_PAL_NONE; + Image->Pal.PalSize = 0; + break; + + } + + return IL_TRUE; +} +#endif//IL_NO_TPL diff --git a/libs/DevIL-1.7.8/src-IL/src/il_utility.c b/libs/DevIL-1.7.8/src-IL/src/il_utility.c new file mode 100644 index 00000000..e2e6ca7a --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_utility.c @@ -0,0 +1,171 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/04/2009 +// +// Filename: src-IL/src/il_utility.c +// +// Description: Utility functions +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" + + +// Returns the bpp of any Format +ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format) +{ + switch (Format) + { + case IL_COLOUR_INDEX: + case IL_LUMINANCE: + case IL_ALPHA: + return 1; + case IL_LUMINANCE_ALPHA: + return 2; + case IL_RGB: + case IL_BGR: + return 3; + case IL_RGBA: + case IL_BGRA: + return 4; + } + return 0; +} + + +// Returns the format of any bpp +ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp) +{ + switch (Bpp) + { + case 1: + return IL_LUMINANCE; + case 2: + return IL_LUMINANCE_ALPHA; + case 3: + return IL_RGB; + case 4: + return IL_RGBA; + } + return 0; +} + + +// Returns the bpc of any Type +ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type) +{ + switch (Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + return 1; + case IL_SHORT: + case IL_UNSIGNED_SHORT: + case IL_HALF: + return 2; + case IL_INT: + case IL_UNSIGNED_INT: + case IL_FLOAT: + return 4; + case IL_DOUBLE: + return 8; + } + return 0; +} + + +// Returns the type matching a bpc +ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc) +{ + switch (Bpc) + { + case 1: + return IL_UNSIGNED_BYTE; + case 2: + return IL_UNSIGNED_SHORT; + case 4: + return IL_UNSIGNED_INT; + case 8: + return IL_DOUBLE; + } + return 0; +} + + +// Returns the bpp of any palette type (PalType) +ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType) +{ + switch (PalType) + { + case IL_PAL_RGB24: + case IL_PAL_BGR24: + return 3; + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + return 4; + } + return 0; +} + +// Returns the base format of a palette type (PalType) +ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType) +{ + switch (PalType) + { + case IL_PAL_RGB24: + return IL_RGB; + case IL_PAL_RGB32: + return IL_RGBA; // Not sure + case IL_PAL_RGBA32: + return IL_RGBA; + case IL_PAL_BGR24: + return IL_BGR; + case IL_PAL_BGR32: + return IL_BGRA; // Not sure + case IL_PAL_BGRA32: + return IL_BGRA; + } + + return 0; +} + + +// Returns the next power of 2 if Num isn't 2^n or returns Num if Num is 2^n +ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint n) +{ + ILuint power = 1; + while( power < n ) { + power <<= 1; + } + return power; +} + +ILAPI void ILAPIENTRY iMemSwap(ILubyte *s1, ILubyte *s2, const ILuint size) +{ + const ILuint block_size = 4096; + const ILuint blocks = size/block_size; + ILuint i; + + ILubyte *block = (ILubyte*)ialloc(block_size); + if(block == NULL) return; + for( i = 0; i < blocks; i++ ) { + memcpy(block,s1,block_size); + memcpy(s1,s2,block_size); + memcpy(s2,block,block_size); + s2 += block_size; + s1 += block_size; + } + i = size - i*block_size; + if( i > 0 ) { + memcpy(block,s1,i); + memcpy(s1,s2,i); + memcpy(s2,block,i); + } + ifree(block); + return; +} diff --git a/libs/DevIL-1.7.8/src-IL/src/il_utx.cpp b/libs/DevIL-1.7.8/src-IL/src/il_utx.cpp new file mode 100644 index 00000000..98c69415 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_utx.cpp @@ -0,0 +1,545 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_utx.cpp +// +// Description: Reads from an Unreal and Unreal Tournament Texture (.utx) file. +// Specifications can be found at +// http://wiki.beyondunreal.com/Legacy:Package_File_Format. +// +//----------------------------------------------------------------------------- + +#include "il_internal.h" +#ifndef IL_NO_UTX +#include "il_utx.h" + + +//! Reads a UTX file +ILboolean ilLoadUtx(ILconst_string FileName) +{ + ILHANDLE UtxFile; + ILboolean bUtx = IL_FALSE; + + UtxFile = iopenr(FileName); + if (UtxFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bUtx; + } + + bUtx = ilLoadUtxF(UtxFile); + icloser(UtxFile); + + return bUtx; +} + + +//! Reads an already-opened UTX file +ILboolean ilLoadUtxF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + try { + bRet = iLoadUtxInternal(); + } + catch (bad_alloc &e) { + e; + ilSetError(IL_OUT_OF_MEMORY); + return IL_FALSE; + } + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a UTX +ILboolean ilLoadUtxL(const void *Lump, ILuint Size) +{ + try { + iSetInputLump(Lump, Size); + } + catch (bad_alloc &e) { + e; + ilSetError(IL_OUT_OF_MEMORY); + return IL_FALSE; + } + return iLoadUtxInternal(); +} + + +ILboolean GetUtxHead(UTXHEADER &Header) +{ + Header.Signature = GetLittleUInt(); + Header.Version = GetLittleUShort(); + Header.LicenseMode = GetLittleUShort(); + Header.Flags = GetLittleUInt(); + Header.NameCount = GetLittleUInt(); + Header.NameOffset = GetLittleUInt(); + Header.ExportCount = GetLittleUInt(); + Header.ExportOffset = GetLittleUInt(); + Header.ImportCount = GetLittleUInt(); + Header.ImportOffset = GetLittleUInt(); + + return IL_TRUE; +} + + +ILboolean CheckUtxHead(UTXHEADER &Header) +{ + // This signature signifies a UTX file. + if (Header.Signature != 0x9E2A83C1) + return IL_FALSE; + // Unreal uses 61-63, and Unreal Tournament uses 67-69. + if ((Header.Version < 61 || Header.Version > 69)) + return IL_FALSE; + return IL_TRUE; +} + + +// Gets a name variable from the file. Keep in mind that the return value must be freed. +string GetUtxName(UTXHEADER &Header) +{ +#define NAME_MAX_LEN 256 //@TODO: Figure out if these can possibly be longer. + char Name[NAME_MAX_LEN]; + ILubyte Length = 0; + + // New style (Unreal Tournament) name. This has a byte at the beginning telling + // how long the string is (plus terminating 0), followed by the terminating 0. + if (Header.Version >= 64) { + Length = igetc(); + if (iread(Name, Length, 1) != 1) + return ""; + if (Name[Length-1] != 0) + return ""; + return string(Name); + } + + // Old style (Unreal) name. This string length is unknown, but it is terminated + // by a 0. + do { + Name[Length++] = igetc(); + } while (!ieof() && Name[Length-1] != 0 && Length < NAME_MAX_LEN); + + // Never reached the terminating 0. + if (Length == NAME_MAX_LEN && Name[Length-1] != 0) + return ""; + + return string(Name); +#undef NAME_MAX_LEN +} + + +bool GetUtxNameTable(vector &NameEntries, UTXHEADER &Header) +{ + ILuint NumRead; + + // Go to the name table. + iseek(Header.NameOffset, IL_SEEK_SET); + + NameEntries.resize(Header.NameCount); + + // Read in the name table. + for (NumRead = 0; NumRead < Header.NameCount; NumRead++) { + NameEntries[NumRead].Name = GetUtxName(Header); + if (NameEntries[NumRead].Name == "") + break; + NameEntries[NumRead].Flags = GetLittleUInt(); + } + + // Did not read all of the entries (most likely GetUtxName failed). + if (NumRead < Header.NameCount) { + ilSetError(IL_INVALID_FILE_HEADER); + return false; + } + + return true; +} + + +// This following code is from http://wiki.beyondunreal.com/Legacy:Package_File_Format/Data_Details. +/// Reads a compact integer from the FileReader. +/// Bytes read differs, so do not make assumptions about +/// physical data being read from the stream. (If you have +/// to, get the difference of FileReader.BaseStream.Position +/// before and after this is executed.) +/// An "uncompacted" signed integer. +/// FileReader is a System.IO.BinaryReader mapped +/// to a file. Also, there may be better ways to implement +/// this, but this is fast, and it works. +ILint UtxReadCompactInteger() +{ + int output = 0; + ILboolean sign = IL_FALSE; + int i; + ILubyte x; + for(i = 0; i < 5; i++) + { + x = igetc(); + // First byte + if(i == 0) + { + // Bit: X0000000 + if((x & 0x80) > 0) + sign = IL_TRUE; + // Bits: 00XXXXXX + output |= (x & 0x3F); + // Bit: 0X000000 + if((x & 0x40) == 0) + break; + } + // Last byte + else if(i == 4) + { + // Bits: 000XXXXX -- the 0 bits are ignored + // (hits the 32 bit boundary) + output |= (x & 0x1F) << (6 + (3 * 7)); + } + // Middle bytes + else + { + // Bits: 0XXXXXXX + output |= (x & 0x7F) << (6 + ((i - 1) * 7)); + // Bit: X0000000 + if((x & 0x80) == 0) + break; + } + } + // multiply by negative one here, since the first 6+ bits could be 0 + if (sign) + output *= -1; + return output; +} + + +void ChangeObjectReference(ILint *ObjRef, ILboolean *IsImported) +{ + if (*ObjRef < 0) { + *IsImported = IL_TRUE; + *ObjRef = -*ObjRef - 1; + } + else if (*ObjRef > 0) { + *IsImported = IL_FALSE; + *ObjRef = *ObjRef - 1; // This is an object reference, so we have to do this conversion. + } + else { + *ObjRef = -1; // "NULL" pointer + } + + return; +} + + +bool GetUtxExportTable(vector &ExportTable, UTXHEADER &Header) +{ + ILuint i; + + // Go to the name table. + iseek(Header.ExportOffset, IL_SEEK_SET); + + // Create ExportCount elements in our array. + ExportTable.resize(Header.ExportCount); + + for (i = 0; i < Header.ExportCount; i++) { + ExportTable[i].Class = UtxReadCompactInteger(); + ExportTable[i].Super = UtxReadCompactInteger(); + ExportTable[i].Group = GetLittleUInt(); + ExportTable[i].ObjectName = UtxReadCompactInteger(); + ExportTable[i].ObjectFlags = GetLittleUInt(); + ExportTable[i].SerialSize = UtxReadCompactInteger(); + ExportTable[i].SerialOffset = UtxReadCompactInteger(); + + ChangeObjectReference(&ExportTable[i].Class, &ExportTable[i].ClassImported); + ChangeObjectReference(&ExportTable[i].Super, &ExportTable[i].SuperImported); + ChangeObjectReference(&ExportTable[i].Group, &ExportTable[i].GroupImported); + } + + return true; +} + + +bool GetUtxImportTable(vector &ImportTable, UTXHEADER &Header) +{ + ILuint i; + + // Go to the name table. + iseek(Header.ImportOffset, IL_SEEK_SET); + + // Allocate the name table. + ImportTable.resize(Header.ImportCount); + + for (i = 0; i < Header.ImportCount; i++) { + ImportTable[i].ClassPackage = UtxReadCompactInteger(); + ImportTable[i].ClassName = UtxReadCompactInteger(); + ImportTable[i].Package = GetLittleUInt(); + ImportTable[i].ObjectName = UtxReadCompactInteger(); + + ChangeObjectReference(&ImportTable[i].Package, &ImportTable[i].PackageImported); + } + + return true; +} + + +/*void UtxDestroyPalettes(UTXPALETTE *Palettes, ILuint NumPal) +{ + ILuint i; + for (i = 0; i < NumPal; i++) { + //ifree(Palettes[i].Name); + ifree(Palettes[i].Pal); + } + ifree(Palettes); +}*/ + + +ILenum UtxFormatToDevIL(ILuint Format) +{ + switch (Format) + { + case UTX_P8: + return IL_COLOR_INDEX; + case UTX_DXT1: + return IL_RGBA; + } + return IL_BGRA; // Should never reach here. +} + + +ILuint UtxFormatToBpp(ILuint Format) +{ + switch (Format) + { + case UTX_P8: + return 1; + case UTX_DXT1: + return 4; + } + return 4; // Should never reach here. +} + + +// Internal function used to load the UTX. +ILboolean iLoadUtxInternal(void) +{ + UTXHEADER Header; + vector NameEntries; + vector ExportTable; + vector ImportTable; + vector Palettes; + ILimage *Image; + ILuint NumPal = 0, i, j = 0; + ILint Name; + ILubyte Type; + ILint Val; + ILint Size; + ILint Width, Height, PalEntry; + ILboolean BaseCreated = IL_FALSE, HasPal; + ILint Format; + ILubyte *CompData = NULL; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (!GetUtxHead(Header)) + return IL_FALSE; + if (!CheckUtxHead(Header)) + return IL_FALSE; + + // We grab the name table. + if (!GetUtxNameTable(NameEntries, Header)) + return IL_FALSE; + // Then we get the export table. + if (!GetUtxExportTable(ExportTable, Header)) + return IL_FALSE; + // Then the last table is the import table. + if (!GetUtxImportTable(ImportTable, Header)) + return IL_FALSE; + + // Find the number of palettes in the export table. + for (i = 0; i < Header.ExportCount; i++) { + if (NameEntries[ImportTable[ExportTable[i].Class].ObjectName].Name == "Palette") + NumPal++; + } + Palettes.resize(NumPal); + + // Read in all of the palettes. + NumPal = 0; + for (i = 0; i < Header.ExportCount; i++) { + if (NameEntries[ImportTable[ExportTable[i].Class].ObjectName].Name == "Palette") { + Palettes[NumPal].Name = i; + iseek(ExportTable[NumPal].SerialOffset, IL_SEEK_SET); + Name = igetc(); // Skip the 2. @TODO: Can there be more in front of the palettes? + Palettes[NumPal].Count = UtxReadCompactInteger(); + Palettes[NumPal].Pal = new ILubyte[Palettes[NumPal].Count * 4]; + if (iread(Palettes[NumPal].Pal, Palettes[NumPal].Count * 4, 1) != 1) + return IL_FALSE; + NumPal++; + } + } + + for (i = 0; i < Header.ExportCount; i++) { + // Find textures in the file. + if (NameEntries[ImportTable[ExportTable[i].Class].ObjectName].Name == "Texture") { + iseek(ExportTable[i].SerialOffset, IL_SEEK_SET); + Width = -1; Height = -1; PalEntry = NumPal; HasPal = IL_FALSE; Format = -1; + + do { + // Always starts with a comptact integer that gives us an entry into the name table. + Name = UtxReadCompactInteger(); + if (NameEntries[Name].Name == "None") + break; + Type = igetc(); + Size = (Type & 0x70) >> 4; + + if (Type == 0xA2) + igetc(); // Byte is 1 here... + + switch (Type & 0x0F) + { + case 1: // Get a single byte. + Val = igetc(); + break; + + case 2: // Get unsigned integer. + Val = GetLittleUInt(); + break; + + case 3: // Boolean value is in the info byte. + igetc(); + break; + + case 4: // Skip flaots for right now. + GetLittleFloat(); + break; + + case 5: + case 6: // Get a compact integer - an object reference. + Val = UtxReadCompactInteger(); + Val--; + break; + + case 10: + Val = igetc(); + switch (Size) + { + case 0: + iseek(1, IL_SEEK_CUR); + break; + case 1: + iseek(2, IL_SEEK_CUR); + break; + case 2: + iseek(4, IL_SEEK_CUR); + break; + case 3: + iseek(12, IL_SEEK_CUR); + break; + } + break; + + default: // Uhm... + break; + } + + //@TODO: What should we do if Name >= Header.NameCount? + if ((ILuint)Name < Header.NameCount) { // Don't want to go past the end of our array. + if (NameEntries[Name].Name == "Palette") { + // If it has references to more than one palette, just use the first one. + if (HasPal == IL_FALSE) { + // We go through the palette list here to match names. + for (PalEntry = 0; (ILuint)PalEntry < NumPal; PalEntry++) { + if (Val == Palettes[PalEntry].Name) { + HasPal = IL_TRUE; + break; + } + } + } + } + if (NameEntries[Name].Name == "Format") // Not required for P8 images but can be present. + if (Format == -1) + Format = Val; + if (NameEntries[Name].Name == "USize") // Width of the image + if (Width == -1) + Width = Val; + if (NameEntries[Name].Name == "VSize") // Height of the image + if (Height == -1) + Height = Val; + } + } while (!ieof()); + + // If the format property is not present, it is a paletted (P8) image. + if (Format == -1) + Format = UTX_P8; + // Just checks for everything being proper. If the format is P8, we check to make sure that a palette was found. + if (Width == -1 || Height == -1 || (PalEntry == NumPal && Format != UTX_DXT1) || (Format != UTX_P8 && Format != UTX_DXT1)) + return IL_FALSE; + if (BaseCreated == IL_FALSE) { + BaseCreated = IL_TRUE; + ilTexImage(Width, Height, 1, UtxFormatToBpp(Format), UtxFormatToDevIL(Format), IL_UNSIGNED_BYTE, NULL); + Image = iCurImage; + } + else { + Image->Next = ilNewImageFull(Width, Height, 1, UtxFormatToBpp(Format), UtxFormatToDevIL(Format), IL_UNSIGNED_BYTE, NULL); + if (Image->Next == NULL) + return IL_FALSE; + Image = Image->Next; + } + + // Skip the mipmap count, width offset and mipmap size entries. + //@TODO: Implement mipmaps. + iseek(5, IL_SEEK_CUR); + UtxReadCompactInteger(); + + switch (Format) + { + case UTX_P8: + Image->Pal.PalSize = Palettes[PalEntry].Count * 4; + Image->Pal.Palette = (ILubyte*)ialloc(Image->Pal.PalSize); + if (Image->Pal.Palette == NULL) + return IL_FALSE; + memcpy(Image->Pal.Palette, Palettes[PalEntry].Pal, Image->Pal.PalSize); + Image->Pal.PalType = IL_PAL_RGBA32; + + if (iread(Image->Data, Image->SizeOfData, 1) != 1) + return IL_FALSE; + break; + + case UTX_DXT1: + Image->DxtcSize = IL_MAX(Image->Width * Image->Height / 2, 8); + CompData = (ILubyte*)ialloc(Image->DxtcSize); + if (CompData == NULL) + return IL_FALSE; + + if (iread(CompData, Image->DxtcSize, 1) != 1) { + ifree(CompData); + return IL_FALSE; + } + // Keep a copy of the DXTC data if the user wants it. + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT1; + CompData = NULL; + } + if (DecompressDXT1(Image, CompData) == IL_FALSE) { + ifree(CompData); + return IL_FALSE; + } + ifree(CompData); + break; + } + Image->Origin = IL_ORIGIN_UPPER_LEFT; + } + } + + return ilFixImage(); +} + +#endif//IL_NO_UTX + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_vtf.c b/libs/DevIL-1.7.8/src-IL/src/il_vtf.c new file mode 100644 index 00000000..c49a614b --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_vtf.c @@ -0,0 +1,953 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_vtf.c +// +// Description: Reads from and writes to a Valve Texture Format (.vtf) file. +// These are used in Valve's Source games. VTF specs available +// from http://developer.valvesoftware.com/wiki/VTF. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_VTF +#include "il_vtf.h" +#include "il_dds.h" + + +//@TODO: Get rid of these globals. +//static VTFHEAD Head; + + +//! Checks if the file specified in FileName is a valid VTF file. +ILboolean ilIsValidVtf(ILconst_string FileName) +{ + ILHANDLE VtfFile; + ILboolean bVtf = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("vtf"))) { + ilSetError(IL_INVALID_EXTENSION); + return bVtf; + } + + VtfFile = iopenr(FileName); + if (VtfFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bVtf; + } + + bVtf = ilIsValidVtfF(VtfFile); + icloser(VtfFile); + + return bVtf; +} + + +//! Checks if the ILHANDLE contains a valid VTF file at the current position. +ILboolean ilIsValidVtfF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidVtf(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid VTF lump. +ILboolean ilIsValidVtfL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidVtf(); +} + + +// Internal function used to get the VTF header from the current file. +ILboolean iGetVtfHead(VTFHEAD *Header) +{ + iread(Header->Signature, 1, 4); + Header->Version[0] = GetLittleUInt(); + Header->Version[1] = GetLittleUInt(); + Header->HeaderSize = GetLittleUInt(); + Header->Width = GetLittleUShort(); + Header->Height = GetLittleUShort(); + Header->Flags = GetLittleUInt(); + Header->Frames = GetLittleUShort(); + Header->FirstFrame = GetLittleUShort(); + iseek(4, IL_SEEK_CUR); // Padding + Header->Reflectivity[0] = GetLittleFloat(); + Header->Reflectivity[1] = GetLittleFloat(); + Header->Reflectivity[2] = GetLittleFloat(); + iseek(4, IL_SEEK_CUR); // Padding + Header->BumpmapScale = GetLittleFloat(); + Header->HighResImageFormat = GetLittleUInt(); + Header->MipmapCount = (ILubyte)igetc(); + Header->LowResImageFormat = GetLittleInt(); + Header->LowResImageWidth = (ILubyte)igetc(); + Header->LowResImageHeight = (ILubyte)igetc(); +//@TODO: This is a hack for the moment. + if (Header->HeaderSize == 64) { + Header->Depth = igetc(); + if (Header->Depth == 0) + Header->Depth = 1; + } + else { + Header->Depth = GetLittleUShort(); + iseek(Header->HeaderSize - sizeof(VTFHEAD), IL_SEEK_CUR); + } + + return IL_TRUE; +} + + +// Internal function to get the header and check it. +ILboolean iIsValidVtf(void) +{ + VTFHEAD Header; + + if (!iGetVtfHead(&Header)) + return IL_FALSE; + iseek(-(ILint)sizeof(VTFHEAD), IL_SEEK_CUR); + + return iCheckVtf(&Header); +} + + +//@TODO: Add more checks. +// Should we check for Frames, MipmapCount and Depth != 0? + +// Internal function used to check if the HEADER is a valid VTF header. +ILboolean iCheckVtf(VTFHEAD *Header) +{ + // The file signature is "VTF\0". + if ((Header->Signature[0] != 'V') || (Header->Signature[1] != 'T') || (Header->Signature[2] != 'F') + || (Header->Signature[3] != 0)) + return IL_FALSE; + // Are there other versions available yet? + if (Header->Version[0] != 7) + return IL_FALSE; + // We have 7.0 through 7.4 as of 12/27/2008. + if (Header->Version[1] > 4) + return IL_FALSE; + // May change in future version of the specifications. + // 80 is through version 7.2, and 96/104 are through 7.4. + // This must be 16-byte aligned, but something is outputting headers with 104. + if ((Header->HeaderSize != 80) && (Header->HeaderSize != 96) && (Header->HeaderSize != 104) + && (Header->HeaderSize != 64)) + return IL_FALSE; + + // 0 is an invalid dimension + if (Header->Width == 0 || Header->Height == 0) + return IL_FALSE; + // Width and Height must be powers of 2. + if ((ilNextPower2(Header->Width) != Header->Width) || (ilNextPower2(Header->Height) != Header->Height)) + return IL_FALSE; + // It looks like width and height of zero are valid - i.e. no low res image. + if (Header->LowResImageWidth != 0 && Header->LowResImageHeight != 0) { + if ((ilNextPower2(Header->LowResImageWidth) != Header->LowResImageWidth) + || (ilNextPower2(Header->LowResImageHeight) != Header->LowResImageHeight)) + return IL_FALSE; + } + // In addition, the LowResImage has to have dimensions no greater than 16. + if ((Header->LowResImageWidth > 16) || (Header->LowResImageHeight > 16)) + //|| (Header->LowResImageWidth == 0) || (Header->LowResImageHeight == 0)) + // It looks like width and height of zero are valid. + return IL_FALSE; + // And the LowResImage has to have dimensions less than or equal to the main image. + if ((Header->LowResImageWidth > Header->Width) || (Header->LowResImageHeight > Header->Height)) + return IL_FALSE; + // The LowResImage must be in DXT1 format, or if it does not exist, it is denoted by all bits set. + if (Header->LowResImageFormat != IMAGE_FORMAT_DXT1 && Header->LowResImageFormat != 0xFFFFFFFF) + return IL_FALSE; + + return IL_TRUE; +} + + +//! Reads a VTF file +ILboolean ilLoadVtf(ILconst_string FileName) +{ + ILHANDLE VtfFile; + ILboolean bVtf = IL_FALSE; + + VtfFile = iopenr(FileName); + if (VtfFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bVtf; + } + + bVtf = ilLoadVtfF(VtfFile); + icloser(VtfFile); + + return bVtf; +} + + +//! Reads an already-opened VTF file +ILboolean ilLoadVtfF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadVtfInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a VTF +ILboolean ilLoadVtfL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadVtfInternal(); +} + + +// Internal function used to load the VTF. +ILboolean iLoadVtfInternal(void) +{ + ILboolean bVtf = IL_TRUE; + ILimage *Image, *BaseImage; + ILenum Format, Type; + ILint Frame, Face, Mipmap; + ILuint SizeOfData, Channels, k; + ILubyte *CompData = NULL, SwapVal, *Data16Bit, *Temp, NumFaces; + VTFHEAD Head; + ILuint CurName; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + CurName = ilGetCurName(); + + if (!iGetVtfHead(&Head)) + return IL_FALSE; + if (!iCheckVtf(&Head)) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (Head.Flags & TEXTUREFLAGS_ENVMAP) { + // If we have a spherical map in addition to the 6 sides of the cubemap, FirstFrame's bits + // are all set. The only place I found out about this was VTFLib. + NumFaces = Head.FirstFrame == 0xFFFF ? 6 : 7; + } + else + NumFaces = 1; // This is not an environmental map. + + // Skip the low resolution image. This is just a thumbnail. + // The block size is 8, and the compression ratio is 6:1. + SizeOfData = IL_MAX(Head.LowResImageWidth * Head.LowResImageHeight / 2, 8); + if (Head.LowResImageWidth == 0 && Head.LowResImageHeight == 0) + SizeOfData = 0; // No low resolution image present. + iseek(SizeOfData, IL_SEEK_CUR); + + //@TODO: Make this a helper function that set channels, bpc and format. + switch (Head.HighResImageFormat) + { + case IMAGE_FORMAT_DXT1: //@TODO: Should we make DXT1 channels = 3? + case IMAGE_FORMAT_DXT1_ONEBITALPHA: + case IMAGE_FORMAT_DXT3: + case IMAGE_FORMAT_DXT5: + Channels = 4; + Format = IL_RGBA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGR888: + case IMAGE_FORMAT_BGR888_BLUESCREEN: + Channels = 3; + Format = IL_BGR; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGRA8888: + Channels = 4; + Format = IL_BGRA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGRX8888: + Channels = 3; + Format = IL_BGR; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_RGB888: + case IMAGE_FORMAT_RGB888_BLUESCREEN: + Channels = 3; + Format = IL_RGB; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_RGBA8888: + Channels = 4; + Format = IL_RGBA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_RGBA16161616: // 16-bit shorts + Channels = 4; + Format = IL_RGBA; + Type = IL_UNSIGNED_SHORT; + break; + case IMAGE_FORMAT_RGBA16161616F: // 16-bit floats + Channels = 4; + Format = IL_RGBA; + Type = IL_FLOAT; + break; + case IMAGE_FORMAT_I8: // 8-bit luminance data + Channels = 1; + Format = IL_LUMINANCE; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_IA88: // 8-bit luminance and alpha data + Channels = 2; + Format = IL_LUMINANCE_ALPHA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_A8: // 8-bit alpha data + Channels = 1; + Format = IL_ALPHA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_ARGB8888: + Channels = 4; + Format = IL_BGRA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_ABGR8888: + Channels = 4; + Format = IL_RGBA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_RGB565: + Channels = 3; + Format = IL_RGB; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGR565: + Channels = 3; + Format = IL_BGR; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGRA5551: + Channels = 4; + Format = IL_BGRA; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGRX5551: // Unused alpha channel + Channels = 3; + Format = IL_BGR; + Type = IL_UNSIGNED_BYTE; + break; + case IMAGE_FORMAT_BGRA4444: + Channels = 4; + Format = IL_BGRA; + Type = IL_UNSIGNED_BYTE; + break; + + default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + + if (!ilTexImage(Head.Width, Head.Height, Head.Depth, Channels, Format, Type, NULL)) + return IL_FALSE; + // The origin should be in the upper left. + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + // Create any mipmaps. + VtfInitFacesMipmaps(iCurImage, NumFaces, &Head); + + // Create our animation chain + BaseImage = Image = iCurImage; // Top-level image + for (Frame = 1; Frame < Head.Frames; Frame++) { + Image->Next = ilNewImageFull(Head.Width, Head.Height, Head.Depth, Channels, Format, Type, NULL); + if (Image->Next == NULL) + return IL_FALSE; + Image = Image->Next; + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + + // Create our faces and mipmaps for each frame. + VtfInitFacesMipmaps(Image, NumFaces, &Head); + } + + // We want to put the smallest mipmap at the end, but it is first in the file, so we count backwards. + for (Mipmap = Head.MipmapCount - 1; Mipmap >= 0; Mipmap--) { + // Frames are in the normal order. + for (Frame = 0; Frame < Head.Frames; Frame++) { + // @TODO: Cubemap faces are always in the same order? + for (Face = 0; Face < NumFaces; Face++) { + //@TODO: Would probably be quicker to do the linked list traversal manually here. + ilBindImage(CurName); + ilActiveImage(Frame); + ilActiveFace(Face); + ilActiveMipmap(Mipmap); + Image = iCurImage; + + switch (Head.HighResImageFormat) + { + // DXT1 compression + case IMAGE_FORMAT_DXT1: + case IMAGE_FORMAT_DXT1_ONEBITALPHA: + // The block size is 8. + SizeOfData = IL_MAX(Image->Width * Image->Height * Image->Depth / 2, 8); + CompData = ialloc(SizeOfData); // Gives a 6:1 compression ratio (or 8:1 for DXT1 with alpha) + if (CompData == NULL) + return IL_FALSE; + iread(CompData, 1, SizeOfData); + // Keep a copy of the DXTC data if the user wants it. + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = SizeOfData; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT5; + CompData = NULL; + } + bVtf = DecompressDXT1(Image, CompData); + break; + + // DXT3 compression + case IMAGE_FORMAT_DXT3: + // The block size is 16. + SizeOfData = IL_MAX(Image->Width * Image->Height * Image->Depth, 16); + CompData = ialloc(SizeOfData); // Gives a 4:1 compression ratio + if (CompData == NULL) + return IL_FALSE; + iread(CompData, 1, SizeOfData); + // Keep a copy of the DXTC data if the user wants it. + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = SizeOfData; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT3; + CompData = NULL; + } + bVtf = DecompressDXT3(Image, CompData); + break; + + // DXT5 compression + case IMAGE_FORMAT_DXT5: + // The block size is 16. + SizeOfData = IL_MAX(Image->Width * Image->Height * Image->Depth, 16); + CompData = ialloc(SizeOfData); // Gives a 4:1 compression ratio + if (CompData == NULL) + return IL_FALSE; + iread(CompData, 1, SizeOfData); + // Keep a copy of the DXTC data if the user wants it. + if (ilGetInteger(IL_KEEP_DXTC_DATA) == IL_TRUE) { + Image->DxtcSize = SizeOfData; + Image->DxtcData = CompData; + Image->DxtcFormat = IL_DXT5; + CompData = NULL; + } + bVtf = DecompressDXT5(Image, CompData); + break; + + // Uncompressed BGR(A) data (24-bit and 32-bit) + case IMAGE_FORMAT_BGR888: + case IMAGE_FORMAT_BGRA8888: + // Uncompressed RGB(A) data (24-bit and 32-bit) + case IMAGE_FORMAT_RGB888: + case IMAGE_FORMAT_RGBA8888: + // Uncompressed 16-bit shorts + case IMAGE_FORMAT_RGBA16161616: + // Luminance data only + case IMAGE_FORMAT_I8: + // Luminance and alpha data + case IMAGE_FORMAT_IA88: + // Alpha data only + case IMAGE_FORMAT_A8: + // We will ignore the part about the bluescreen right now. + // I could not find any information about it. + case IMAGE_FORMAT_RGB888_BLUESCREEN: + case IMAGE_FORMAT_BGR888_BLUESCREEN: + // Just copy the data over - no compression. + if (iread(Image->Data, 1, Image->SizeOfData) != Image->SizeOfData) + bVtf = IL_FALSE; + else + bVtf = IL_TRUE; + break; + + // Uncompressed 24-bit data with an unused alpha channel (we discard it) + case IMAGE_FORMAT_BGRX8888: + SizeOfData = Image->Width * Image->Height * Image->Depth * 3; + Temp = CompData = ialloc(SizeOfData / 3 * 4); // Not compressed data + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData / 3 * 4) != SizeOfData / 3 * 4) { + bVtf = IL_FALSE; + break; + } + for (k = 0; k < SizeOfData; k += 3) { + Image->Data[k] = Temp[0]; + Image->Data[k+1] = Temp[1]; + Image->Data[k+2] = Temp[2]; + Temp += 4; + } + + break; + + // Uncompressed 16-bit floats (must be converted to 32-bit) + case IMAGE_FORMAT_RGBA16161616F: + SizeOfData = Image->Width * Image->Height * Image->Depth * Image->Bpp * 2; + CompData = ialloc(SizeOfData); // Not compressed data + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + bVtf = IL_FALSE; + break; + } + bVtf = iConvFloat16ToFloat32((ILuint*)Image->Data, (ILushort*)CompData, SizeOfData / 2); + break; + + // Uncompressed 32-bit ARGB and ABGR data. DevIL does not handle this + // internally, so we have to swap values. + case IMAGE_FORMAT_ARGB8888: + case IMAGE_FORMAT_ABGR8888: + if (iread(Image->Data, 1, Image->SizeOfData) != Image->SizeOfData) { + bVtf = IL_FALSE; + break; + } + else { + bVtf = IL_TRUE; + } + // Swap the data + for (k = 0; k < Image->SizeOfData; k += 4) { + SwapVal = Image->Data[k]; + Image->Data[k] = Image->Data[k+3]; + Image->Data[k+3] = SwapVal; + SwapVal = Image->Data[k+1]; + Image->Data[k+1] = Image->Data[k+2]; + Image->Data[k+2] = SwapVal; + } + break; + + // Uncompressed 16-bit RGB and BGR data. We have to expand this to 24-bit, since + // DevIL does not handle this internally. + // The data is in the file as: gggbbbbb rrrrrrggg + case IMAGE_FORMAT_RGB565: + case IMAGE_FORMAT_BGR565: + SizeOfData = Image->Width * Image->Height * Image->Depth * 2; + Data16Bit = CompData = ialloc(SizeOfData); // Not compressed data + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + bVtf = IL_FALSE; + break; + } + for (k = 0; k < Image->SizeOfData; k += 3) { + Image->Data[k] = (Data16Bit[0] & 0x1F) << 3; + Image->Data[k+1] = ((Data16Bit[1] & 0x07) << 5) | ((Data16Bit[0] & 0xE0) >> 3); + Image->Data[k+2] = Data16Bit[1] & 0xF8; + Data16Bit += 2; + } + break; + + // Uncompressed 16-bit BGRA data (1-bit alpha). We have to expand this to 32-bit, + // since DevIL does not handle this internally. + // Something seems strange with this one, but this is how VTFEdit outputs. + // The data is in the file as: gggbbbbb arrrrrgg + case IMAGE_FORMAT_BGRA5551: + SizeOfData = Image->Width * Image->Height * Image->Depth * 2; + Data16Bit = CompData = ialloc(SizeOfData); // Not compressed data + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + bVtf = IL_FALSE; + break; + } + for (k = 0; k < Image->SizeOfData; k += 4) { + Image->Data[k] = (Data16Bit[0] & 0x1F) << 3; + Image->Data[k+1] = ((Data16Bit[0] & 0xE0) >> 2) | ((Data16Bit[1] & 0x03) << 6); + Image->Data[k+2] = (Data16Bit[1] & 0x7C) << 1; + // 1-bit alpha is either off or on. + Image->Data[k+3] = ((Data16Bit[0] & 0x80) == 0x80) ? 0xFF : 0x00; + Data16Bit += 2; + } + break; + + // Same as above, but the alpha channel is unused. + case IMAGE_FORMAT_BGRX5551: + SizeOfData = Image->Width * Image->Height * Image->Depth * 2; + Data16Bit = CompData = ialloc(SizeOfData); // Not compressed data + if (iread(CompData, 1, SizeOfData) != SizeOfData) { + bVtf = IL_FALSE; + break; + } + for (k = 0; k < Image->SizeOfData; k += 3) { + Image->Data[k] = (Data16Bit[0] & 0x1F) << 3; + Image->Data[k+1] = ((Data16Bit[0] & 0xE0) >> 2) | ((Data16Bit[1] & 0x03) << 6); + Image->Data[k+2] = (Data16Bit[1] & 0x7C) << 1; + Data16Bit += 2; + } + break; + + // Data is reduced to a 4-bits per channel format. + case IMAGE_FORMAT_BGRA4444: + SizeOfData = Image->Width * Image->Height * Image->Depth * 4; + Temp = CompData = ialloc(SizeOfData / 2); // Not compressed data + if (CompData == NULL) + return IL_FALSE; + if (iread(CompData, 1, SizeOfData / 2) != SizeOfData / 2) { + bVtf = IL_FALSE; + break; + } + for (k = 0; k < SizeOfData; k += 4) { + // We double the data here. + Image->Data[k] = (Temp[0] & 0x0F) << 4 | (Temp[0] & 0x0F); + Image->Data[k+1] = (Temp[0] & 0xF0) >> 4 | (Temp[0] & 0xF0); + Image->Data[k+2] = (Temp[1] & 0x0F) << 4 | (Temp[1] & 0x0F); + Image->Data[k+3] = (Temp[1] & 0xF0) >> 4 | (Temp[1] & 0xF0); + Temp += 2; + } + break; + } + + ifree(CompData); + CompData = NULL; + if (bVtf == IL_FALSE) //@TODO: Do we need to do any cleanup here? + return IL_FALSE; + } + } + } + + ilBindImage(CurName); // Set to parent image first. + return ilFixImage(); +} + + +ILuint GetFaceFlag(ILuint FaceNum) +{ + switch (FaceNum) + { + case 0: + return IL_CUBEMAP_POSITIVEX; + case 1: + return IL_CUBEMAP_NEGATIVEX; + case 2: + return IL_CUBEMAP_POSITIVEY; + case 3: + return IL_CUBEMAP_NEGATIVEY; + case 4: + return IL_CUBEMAP_POSITIVEZ; + case 5: + return IL_CUBEMAP_NEGATIVEZ; + case 6: + return IL_SPHEREMAP; + } + + return IL_SPHEREMAP; // Should never reach here! +} + + +ILboolean VtfInitFacesMipmaps(ILimage *BaseImage, ILuint NumFaces, VTFHEAD *Header) +{ + ILimage *Image; + ILuint Face; + + // Initialize mipmaps under the base image. + VtfInitMipmaps(BaseImage, Header); + Image = BaseImage; + + // We have an environment map. + if (NumFaces != 1) { + Image->CubeFlags = IL_CUBEMAP_POSITIVEX; + } + + for (Face = 1; Face < NumFaces; Face++) { + Image->Faces = ilNewImageFull(Image->Width, Image->Height, Image->Depth, Image->Bpp, Image->Format, Image->Type, NULL); + if (Image->Faces == NULL) + return IL_FALSE; + Image = Image->Faces; + + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + // Set the flags that tell which face this is. + Image->CubeFlags = GetFaceFlag(Face); + + // Now we can initialize the mipmaps under each face. + VtfInitMipmaps(Image, Header); + } + + return IL_TRUE; +} + + +ILboolean VtfInitMipmaps(ILimage *BaseImage, VTFHEAD *Header) +{ + ILimage *Image; + ILuint Width, Height, Depth, Mipmap; + + Image = BaseImage; + Width = BaseImage->Width; Height = BaseImage->Height; Depth = BaseImage->Depth; + + for (Mipmap = 1; Mipmap < Header->MipmapCount; Mipmap++) { + // 1 is the smallest dimension possible. + Width = (Width >> 1) == 0 ? 1 : (Width >> 1); + Height = (Height >> 1) == 0 ? 1 : (Height >> 1); + Depth = (Depth >> 1) == 0 ? 1 : (Depth >> 1); + + Image->Mipmaps = ilNewImageFull(Width, Height, Depth, BaseImage->Bpp, BaseImage->Format, BaseImage->Type, NULL); + if (Image->Mipmaps == NULL) + return IL_FALSE; + Image = Image->Mipmaps; + + // ilNewImage does not set these. + Image->Format = BaseImage->Format; + Image->Type = BaseImage->Type; + // The origin should be in the upper left. + Image->Origin = IL_ORIGIN_UPPER_LEFT; + } + + return IL_TRUE; +} + + + +ILboolean CheckDimensions() +{ + if ((ilNextPower2(iCurImage->Width) != iCurImage->Width) || (ilNextPower2(iCurImage->Height) != iCurImage->Height)) { + ilSetError(IL_BAD_DIMENSIONS); + return IL_FALSE; + } + return IL_TRUE; +} + +//! Writes a Vtf file +ILboolean ilSaveVtf(const ILstring FileName) +{ + ILHANDLE VtfFile; + ILuint VtfSize; + + if (!CheckDimensions()) + return IL_FALSE; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + VtfFile = iopenw(FileName); + if (VtfFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + VtfSize = ilSaveVtfF(VtfFile); + iclosew(VtfFile); + + if (VtfSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a .vtf to an already-opened file +ILuint ilSaveVtfF(ILHANDLE File) +{ + ILuint Pos; + if (!CheckDimensions()) + return 0; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveVtfInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a .vtf to a memory "lump" +ILuint ilSaveVtfL(void *Lump, ILuint Size) +{ + ILuint Pos; + if (!CheckDimensions()) + return 0; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveVtfInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// Internal function used to save the Vtf. +ILboolean iSaveVtfInternal() +{ + ILimage *TempImage = iCurImage; + ILubyte *TempData, *CompData; + ILuint Format, i, CompSize; + ILenum Compression; + + // Find out if the user has specified to use DXT compression. + Compression = ilGetInteger(IL_VTF_COMP); + + //@TODO: Other formats + if (Compression == IL_DXT_NO_COMP) { + switch (TempImage->Format) + { + case IL_RGB: + Format = IMAGE_FORMAT_RGB888; + break; + case IL_RGBA: + Format = IMAGE_FORMAT_RGBA8888; + break; + case IL_BGR: + Format = IMAGE_FORMAT_BGR888; + break; + case IL_BGRA: + Format = IMAGE_FORMAT_BGRA8888; + break; + case IL_LUMINANCE: + Format = IMAGE_FORMAT_I8; + break; + case IL_ALPHA: + Format = IMAGE_FORMAT_A8; + break; + case IL_LUMINANCE_ALPHA: + Format = IMAGE_FORMAT_IA88; + break; + //case IL_COLOUR_INDEX: + default: + Format = IMAGE_FORMAT_BGRA8888; + TempImage = iConvertImage(iCurImage, IL_BGRA, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } + + //@TODO: When we have the half format available internally, also use IMAGE_FORMAT_RGBA16161616F. + if (TempImage->Format == IL_RGBA && TempImage->Type == IL_UNSIGNED_SHORT) { + Format = IMAGE_FORMAT_RGBA16161616; + } + else if (TempImage->Type != IL_UNSIGNED_BYTE) { //@TODO: Any possibility for shorts, etc. to be used? + TempImage = iConvertImage(iCurImage, Format, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } + } + else { // We are using DXT compression. + switch (Compression) + { + case IL_DXT1: + Format = IMAGE_FORMAT_DXT1_ONEBITALPHA;//IMAGE_FORMAT_DXT1; + break; + case IL_DXT3: + Format = IMAGE_FORMAT_DXT3; + break; + case IL_DXT5: + Format = IMAGE_FORMAT_DXT5; + break; + default: // Should never reach this point. + ilSetError(IL_INTERNAL_ERROR); + Format = IMAGE_FORMAT_DXT5; + } + } + + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + ilCloseImage(TempImage); + return IL_FALSE; + } + } else { + TempData = TempImage->Data; + } + + // Write the file signature. + iwrite("VTF", 1, 4); + // Write the file version - currently using 7.2 specs. + SaveLittleUInt(7); + SaveLittleUInt(2); + // Write the header size. + SaveLittleUInt(80); + // Now we write the width and height of the image. + SaveLittleUShort(TempImage->Width); + SaveLittleUShort(TempImage->Height); + //@TODO: This is supposed to be the flags used. What should we use here? Let users specify? + SaveLittleUInt(0); + // Number of frames in the animation. - @TODO: Change to use animations. + SaveLittleUShort(1); + // First frame in the animation + SaveLittleUShort(0); + // Padding + SaveLittleUInt(0); + // Reflectivity (3 floats) - @TODO: Use what values? User specified? + SaveLittleFloat(0.0f); + SaveLittleFloat(0.0f); + SaveLittleFloat(0.0f); + // Padding + SaveLittleUInt(0); + // Bumpmap scale + SaveLittleFloat(0.0f); + // Image format + SaveLittleUInt(Format); + // Mipmap count - @TODO: Use mipmaps + iputc(1); + // Low resolution image format - @TODO: Create low resolution image. + SaveLittleUInt(0xFFFFFFFF); + // Low resolution image width and height + iputc(0); + iputc(0); + // Depth of the image - @TODO: Support for volumetric images. + SaveLittleUShort(1); + + // Write final padding for the header (out to 80 bytes). + for (i = 0; i < 15; i++) { + iputc(0); + } + + if (Compression == IL_DXT_NO_COMP) { + // We just write the image data directly. + if (iwrite(TempImage->Data, TempImage->SizeOfData, 1) != 1) + return IL_FALSE; + } + else { // Do DXT compression here and write. + // We have to find out how much we are writing first. + CompSize = ilGetDXTCData(NULL, 0, Compression); + if (CompSize == 0) { + ilSetError(IL_INTERNAL_ERROR); + if (TempData != TempImage->Data) + ifree(TempData); + return IL_FALSE; + } + CompData = (ILubyte*)ialloc(CompSize); + if (CompData == NULL) { + if (TempData != TempImage->Data) + ifree(TempData); + return IL_FALSE; + } + + // DXT compress the data. + CompSize = ilGetDXTCData(CompData, CompSize, Compression); + if (CompSize == 0) { + ilSetError(IL_INTERNAL_ERROR); + if (TempData != TempImage->Data) + ifree(TempData); + return IL_FALSE; + } + // Finally write the data. + if (iwrite(CompData, CompSize, 1) != 1) { + ifree(CompData); + if (TempData != TempImage->Data) + ifree(TempData); + return IL_FALSE; + } + } + + if (TempData != TempImage->Data) + ifree(TempData); + if (TempImage != iCurImage) + ilCloseImage(TempImage); + + return IL_TRUE; +} + + +#endif//IL_NO_VTF diff --git a/libs/DevIL-1.7.8/src-IL/src/il_wal.c b/libs/DevIL-1.7.8/src-IL/src/il_wal.c new file mode 100644 index 00000000..82e5f1a0 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_wal.c @@ -0,0 +1,169 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_wal.c +// +// Description: Loads a Quake .wal texture. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_WAL +#include "il_manip.h" +#include "il_q2pal.h" + + +typedef struct WALHEAD +{ + ILbyte FileName[32]; // Image name + ILuint Width; // Width of first image + ILuint Height; // Height of first image + ILuint Offsets[4]; // Offsets to image data + ILbyte AnimName[32]; // Name of next frame + ILuint Flags; // ?? + ILuint Contents; // ?? + ILuint Value; // ?? +} WALHEAD; + +ILboolean iLoadWalInternal(void); + + +//! Reads a .wal file +ILboolean ilLoadWal(ILconst_string FileName) +{ + ILHANDLE WalFile; + ILboolean bWal = IL_FALSE; + + WalFile = iopenr(FileName); + if (WalFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bWal; + } + + bWal = ilLoadWalF(WalFile); + icloser(WalFile); + + return bWal; +} + + +//! Reads an already-opened .wal file +ILboolean ilLoadWalF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadWalInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .wal file +ILboolean ilLoadWalL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadWalInternal(); +} + + +ILboolean iLoadWalInternal() +{ + WALHEAD Header; + ILimage *Mipmaps[3], *CurImage; + ILuint i, NewW, NewH; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + CurImage = iCurImage; + + + // Read header + iread(&Header.FileName, 1, 32); + Header.Width = GetLittleUInt(); + Header.Height = GetLittleUInt(); + + for (i = 0; i < 4; i++) + Header.Offsets[i] = GetLittleUInt(); + + iread(Header.AnimName, 1, 32); + Header.Flags = GetLittleUInt(); + Header.Contents = GetLittleUInt(); + Header.Value = GetLittleUInt(); + + if (!ilTexImage(Header.Width, Header.Height, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + for (i = 0; i < 3; i++) { + Mipmaps[i] = (ILimage*)icalloc(sizeof(ILimage), 1); + if (Mipmaps[i] == NULL) + goto cleanup_error; + Mipmaps[i]->Pal.Palette = (ILubyte*)ialloc(768); + if (Mipmaps[i]->Pal.Palette == NULL) + goto cleanup_error; + memcpy(Mipmaps[i]->Pal.Palette, ilDefaultQ2Pal, 768); + Mipmaps[i]->Pal.PalType = IL_PAL_RGB24; + } + + NewW = Header.Width; + NewH = Header.Height; + for (i = 0; i < 3; i++) { + NewW /= 2; + NewH /= 2; + iCurImage = Mipmaps[i]; + if (!ilTexImage(NewW, NewH, 1, 1, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE, NULL)) + goto cleanup_error; + // Don't set until now so ilTexImage won't get rid of the palette. + Mipmaps[i]->Pal.PalSize = 768; + Mipmaps[i]->Origin = IL_ORIGIN_UPPER_LEFT; + } + + iCurImage = CurImage; + ilCloseImage(iCurImage->Mipmaps); + iCurImage->Mipmaps = Mipmaps[0]; + Mipmaps[0]->Mipmaps = Mipmaps[1]; + Mipmaps[1]->Mipmaps = Mipmaps[2]; + + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + if (iCurImage->Pal.Palette && iCurImage->Pal.PalSize && iCurImage->Pal.PalType != IL_PAL_NONE) + ifree(iCurImage->Pal.Palette); + iCurImage->Pal.Palette = (ILubyte*)ialloc(768); + if (iCurImage->Pal.Palette == NULL) + goto cleanup_error; + + iCurImage->Pal.PalSize = 768; + iCurImage->Pal.PalType = IL_PAL_RGB24; + memcpy(iCurImage->Pal.Palette, ilDefaultQ2Pal, 768); + + iseek(Header.Offsets[0], IL_SEEK_SET); + if (iread(iCurImage->Data, Header.Width * Header.Height, 1) != 1) + goto cleanup_error; + + for (i = 0; i < 3; i++) { + iseek(Header.Offsets[i+1], IL_SEEK_SET); + if (iread(Mipmaps[i]->Data, Mipmaps[i]->Width * Mipmaps[i]->Height, 1) != 1) + goto cleanup_error; + } + + // Fixes all images, even mipmaps. + return ilFixImage(); + +cleanup_error: + for (i = 0; i < 3; i++) { + ilCloseImage(Mipmaps[i]); + } + return IL_FALSE; +} + + +#endif//IL_NO_WAL diff --git a/libs/DevIL-1.7.8/src-IL/src/il_wbmp.c b/libs/DevIL-1.7.8/src-IL/src/il_wbmp.c new file mode 100644 index 00000000..27cf285e --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_wbmp.c @@ -0,0 +1,274 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-IL/src/il_wbmp.c +// +// Description: Reads from a Wireless Bitmap (.wbmp) file. Specs available from +// http://www.ibm.com/developerworks/wireless/library/wi-wbmp/ +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_WBMP +#include "il_bits.h" + + +ILboolean iLoadWbmpInternal(void); +ILuint WbmpGetMultibyte(void); +ILboolean iSaveWbmpInternal(void); + +// Reads a .wbmp file +ILboolean ilLoadWbmp(ILconst_string FileName) +{ + ILHANDLE WbmpFile; + ILboolean bWbmp = IL_FALSE; + + WbmpFile = iopenr(FileName); + if (WbmpFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bWbmp; + } + + iSetInputFile(WbmpFile); + + bWbmp = ilLoadWbmpF(WbmpFile); + + icloser(WbmpFile); + + return bWbmp; +} + + +//! Reads an already-opened .wbmp file +ILboolean ilLoadWbmpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadWbmpInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a .wbmp +ILboolean ilLoadWbmpL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadWbmpInternal(); +} + + +ILboolean iLoadWbmpInternal(void) +{ + ILuint Width, Height, BitPadding, i; + BITFILE *File; + ILubyte Padding[8]; + + if (iCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (igetc() != 0 || igetc() != 0) { // The first two bytes have to be 0 (the "header") + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + Width = WbmpGetMultibyte(); // Next follows the width and height. + Height = WbmpGetMultibyte(); + + if (Width == 0 || Height == 0) { // Must have at least some height and width. + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + if (!ilTexImage(Width, Height, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; // Always has origin in the upper left. + + BitPadding = (8 - (Width % 8)) % 8; // Has to be aligned on a byte boundary. The rest is padding. + File = bfile(iGetFile()); + if (File == NULL) + return IL_FALSE; //@TODO: Error? + + //@TODO: Do this without bread? Would be faster, since we would not have to do + // the second loop. + + // Reads the bits + for (i = 0; i < iCurImage->Height; i++) { + bread(&iCurImage->Data[iCurImage->Width * i], 1, iCurImage->Width, File); + //bseek(File, BitPadding, IL_SEEK_CUR); //@TODO: This function does not work correctly. + bread(Padding, 1, BitPadding, File); // Skip padding bits. + } + // Converts bit value of 1 to white and leaves 0 at 0 (2-colour images only). + for (i = 0; i < iCurImage->SizeOfData; i++) { + if (iCurImage->Data[i] == 1) + iCurImage->Data[i] = 0xFF; // White + } + + bclose(File); + + return IL_TRUE; +} + + +ILuint WbmpGetMultibyte() +{ + ILuint Val = 0, i; + ILubyte Cur; + + for (i = 0; i < 5; i++) { // Should not be more than 5 bytes. + Cur = igetc(); + Val = (Val << 7) | (Cur & 0x7F); // Drop the MSB of Cur. + if (!(Cur & 0x80)) { // Check the MSB and break if 0. + break; + } + } + + return Val; +} + + +ILboolean WbmpPutMultibyte(ILuint Val) +{ + ILint i, NumBytes = 0; + ILuint MultiVal = Val; + + do { + MultiVal >>= 7; + NumBytes++; + } while (MultiVal != 0); + + for (i = NumBytes - 1; i >= 0; i--) { + MultiVal = (Val >> (i * 7)) & 0x7F; + if (i != 0) + MultiVal |= 0x80; + iputc(MultiVal); + } + + return IL_TRUE; +} + + +//! Writes a Wbmp file +ILboolean ilSaveWbmp(const ILstring FileName) +{ + ILHANDLE WbmpFile; + ILuint WbmpSize; + + if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { + if (iFileExists(FileName)) { + ilSetError(IL_FILE_ALREADY_EXISTS); + return IL_FALSE; + } + } + + WbmpFile = iopenw(FileName); + if (WbmpFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + WbmpSize = ilSaveWbmpF(WbmpFile); + iclosew(WbmpFile); + + if (WbmpSize == 0) + return IL_FALSE; + return IL_TRUE; +} + + +//! Writes a .wbmp to an already-opened file +ILuint ilSaveWbmpF(ILHANDLE File) +{ + ILuint Pos; + iSetOutputFile(File); + Pos = itellw(); + if (iSaveWbmpInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +//! Writes a .wbmp to a memory "lump" +ILuint ilSaveWbmpL(void *Lump, ILuint Size) +{ + ILuint Pos; + iSetOutputLump(Lump, Size); + Pos = itellw(); + if (iSaveWbmpInternal() == IL_FALSE) + return 0; // Error occurred + return itellw() - Pos; // Return the number of bytes written. +} + + +// In il_quantizer.c +ILimage *iQuantizeImage(ILimage *Image, ILuint NumCols); +// In il_neuquant.c +ILimage *iNeuQuant(ILimage *Image, ILuint NumCols); + + +// Internal function used to save the Wbmp. +ILboolean iSaveWbmpInternal() +{ + ILimage *TempImage = NULL; + ILuint i, j; + ILint k; + ILubyte Val; + ILubyte *TempData; + + iputc(0); // First two header values + iputc(0); // must be 0. + + WbmpPutMultibyte(iCurImage->Width); // Write the width + WbmpPutMultibyte(iCurImage->Height); // and the height. + + //TempImage = iConvertImage(iCurImage, IL_LUMINANCE, IL_UNSIGNED_BYTE); + if (iGetInt(IL_QUANTIZATION_MODE) == IL_NEU_QUANT) + TempImage = iNeuQuant(iCurImage, 2); + else // Assume IL_WU_QUANT otherwise. + TempImage = iQuantizeImage(iCurImage, 2); + + if (TempImage == NULL) + return IL_FALSE; + + if (TempImage->Origin != IL_ORIGIN_UPPER_LEFT) { + TempData = iGetFlipped(TempImage); + if (TempData == NULL) { + ilCloseImage(TempImage); + return IL_FALSE; + } + } else { + TempData = TempImage->Data; + } + + for (i = 0; i < TempImage->Height; i++) { + for (j = 0; j < TempImage->Width; j += 8) { + Val = 0; + for (k = 0; k < 8; k++) { + if (j + k < TempImage->Width) { + //Val |= ((TempData[TempImage->Width * i + j + k] > 0x7F) ? (0x80 >> k) : 0x00); + Val |= ((TempData[TempImage->Width * i + j + k] == 1) ? (0x80 >> k) : 0x00); + } + } + iputc(Val); + } + } + + if (TempData != TempImage->Data) + ifree(TempData); + ilCloseImage(TempImage); + + return IL_TRUE; +} + +#endif//IL_NO_WBMP + diff --git a/libs/DevIL-1.7.8/src-IL/src/il_wdp.c b/libs/DevIL-1.7.8/src-IL/src/il_wdp.c new file mode 100644 index 00000000..fa78211c --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_wdp.c @@ -0,0 +1,429 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Last modified: 02/09/2009 +// +// Filename: src-IL/src/il_wdp.c +// +// Description: Reads a Microsoft HD Photo (.wdp or .hdp) +// Based very much on the Microsoft HD Photo Device Porting Kit 1.0 +// available at +// http://www.microsoft.com/downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en. +// +// Note: The license that the Device Porting Kit is under is not very clear. +// Commentary on the license can be found at http://en.wikipedia.org/wiki/HD_Photo. +// Lots of this code is taken from the examples in the DPK and from code +// within the DPK itself. For this reason, this file is not under the LGPL +// license, unlike the rest of DevIL. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_WDP +#include +#include "il_wdp.h" + +#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #ifndef _DEBUG + #pragma comment(lib, "wmplib.lib") + #else + #pragma comment(lib, "wmplib-d.lib") + #endif + #endif +#endif + + +//! Reads a WDP file +ILboolean ilLoadWdp(ILconst_string FileName) +{ + ILHANDLE WdpFile; + ILboolean bWdp = IL_FALSE; + + WdpFile = iopenr(FileName); + if (WdpFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bWdp; + } + + bWdp = ilLoadWdpF(WdpFile); + icloser(WdpFile); + + return bWdp; +} + + +//! Reads an already-opened WDP file +ILboolean ilLoadWdpF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadWdpInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains a WDP +ILboolean ilLoadWdpL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iLoadWdpInternal(); +} + +//@TODO: Put in ilPKImageEncode_WritePixels_DevIL? +ERR WriteDevILHeader(PKImageEncode* pIE) +{ + struct WMPStream* pS = pIE->pStream; + + if (IsEqualGUID(&GUID_PKPixelFormat24bppRGB, &pIE->guidPixFormat) || IsEqualGUID(&GUID_PKPixelFormat24bppBGR, &pIE->guidPixFormat)) + { + pIE->cbPixel = 3; + } + else if (IsEqualGUID(&GUID_PKPixelFormat32bppBGRA, &pIE->guidPixFormat) + || IsEqualGUID(&GUID_PKPixelFormat32bppBGR, &pIE->guidPixFormat) + || IsEqualGUID(&GUID_PKPixelFormat32bppPBGRA, &pIE->guidPixFormat)) + { + pIE->cbPixel = 4; + } + else if (IsEqualGUID(&GUID_PKPixelFormat8bppGray, &pIE->guidPixFormat)) + { + pIE->cbPixel = 1; + } + else if (IsEqualGUID(&GUID_PKPixelFormat16bppGray, &pIE->guidPixFormat)) + { + pIE->cbPixel = 2; + } + else if (IsEqualGUID(&GUID_PKPixelFormat128bppRGBAFloat, &pIE->guidPixFormat)) + { + pIE->cbPixel = 16;//4; + } + + + pIE->offPixel = pIE->offStart; + pIE->fHeaderDone = !IL_FALSE; + + return WMP_errSuccess; +} + +ERR ilPKImageEncode_WritePixels_DevIL(PKImageEncode* pIE, U32 cLine, U8* pbPixel, U32 cbStride) +{ + ERR err = WMP_errSuccess; + + struct WMPStream* pS = pIE->pStream; + size_t cbLineM = 0, cbLineS = 0; + I32 i = 0; + static U8 pPadding[4] = {0}; + + // header + if (!pIE->fHeaderDone) + { + // WriteBMPHeader() also inits this object + Call(WriteDevILHeader(pIE)); + } + + // body + // calculate line size in memory and in stream + cbLineM = pIE->cbPixel * pIE->uWidth; + cbLineS = (cbLineM + 3) / 4 * 4; + + //FailIf(pRect->X < 0 || pID->uWidth <= pRect->X, WMP_errInvalidParameter); + //FailIf(pRect->Y < 0 || pID->uHeight <= pRect->Y, WMP_errInvalidParameter); + //FailIf(pRect->Width < 0 || pID->uWidth < pRect->X + pRect->Width, WMP_errInvalidParameter); + //FailIf(pRect->Height < 0 || pID->uHeight < pRect->Y + pRect->Height, WMP_errInvalidParameter); + FailIf(cbStride < cbLineM, WMP_errInvalidParameter); + + for (i = cLine - 1; 0 <= i; --i) + { + size_t offM = cbStride * i; + size_t offS = cbLineS * (pIE->uHeight - (pIE->idxCurrentLine + i + 1)); + + Call(pS->SetPos(pS, pIE->offPixel + offS)); + Call(pS->Write(pS, pbPixel + offM, cbLineM)); + } + Call(pS->Write(pS, pPadding, (cbLineS - cbLineM))); + pIE->idxCurrentLine += cLine; + +Cleanup: + return err; +} + + +ERR PKImageEncode_Create_DevIL( + PKImageEncode** ppIE) +{ + ERR err = WMP_errSuccess; + PKImageEncode* pIE = NULL; + + Call(PKImageEncode_Create(ppIE)); + + pIE = *ppIE; + pIE->WritePixels = ilPKImageEncode_WritePixels_DevIL; + +Cleanup: + return err; +} + + +ERR iWmpDecAppCreateEncoderFromExt( + PKCodecFactory* pCFactory, + const char* szExt, + PKImageEncode** ppIE) +{ + ERR err = WMP_errSuccess; + const PKIID* pIID = NULL; + + // get encod PKIID + Call(GetImageEncodeIID(szExt, &pIID)); + + // Create encoder + //Call(PKCodecFactory_CreateCodec(pIID, ppIE)); + + Call(PKImageEncode_Create_DevIL(ppIE)); + +Cleanup: + return err; +} + + +ERR iCloseWS_File(struct WMPStream** ppWS) +{ + ERR err = WMP_errSuccess; + /*struct WMPStream* pWS = *ppWS; + + fclose(pWS->state.file.pFile); + Call(WMPFree((void**)ppWS)); + +Cleanup:*/ + return err; +} + +Bool iEOSWS_File(struct WMPStream* pWS) +{ + //return feof(pWS->state.file.pFile); + return ieof(); +} + +ERR iReadWS_File(struct WMPStream* pWS, void* pv, size_t cb) +{ + // For some reason, the WDP images load just fine, but it tries to read too much, + // so IL_FILE_READ_ERROR is set. So we get rid of the error. + if (iread(pv, 1, (ILuint)cb) != cb) + ilGetError(); + return WMP_errSuccess; +} + +ERR iWriteWS_File(struct WMPStream* pWS, const void* pv, size_t cb) +{ + ERR err = WMP_errSuccess; + + if (0 != cb) { + FailIf(1 != iwrite(pv, (ILuint)cb, 1), WMP_errFileIO); + } + +Cleanup: + return err; +} + +ERR iSetPosWS_File(struct WMPStream* pWS, size_t offPos) +{ + ERR err = WMP_errSuccess; + + //FailIf(0 != fseek(pWS->state.file.pFile, (long)offPos, SEEK_SET), WMP_errFileIO); + FailIf(0 != iseek((ILuint)offPos, IL_SEEK_SET), WMP_errFileIO); + +Cleanup: + return err; +} + +ERR iGetPosWS_File(struct WMPStream* pWS, size_t* poffPos) +{ + ERR err = WMP_errSuccess; + long lOff = 0; + + //FailIf(-1 == (lOff = ftell(pWS->state.file.pFile)), WMP_errFileIO); + lOff = itell(); + *poffPos = (size_t)lOff; + +Cleanup: + return err; +} + +ERR ilCreateWS_File(struct WMPStream** ppWS, const char* szFilename, const char* szMode) +{ + ERR err = WMP_errSuccess; + struct WMPStream* pWS = NULL; + + *ppWS = icalloc(1, sizeof(**ppWS)); + if (*ppWS == NULL) + return WMP_errOutOfMemory; + pWS = *ppWS; + + pWS->Close = iCloseWS_File; + pWS->EOS = iEOSWS_File; + + pWS->Read = iReadWS_File; + pWS->Write = iWriteWS_File; + //pWS->GetLine = GetLineWS_File; + + pWS->SetPos = iSetPosWS_File; + pWS->GetPos = iGetPosWS_File; + + //pWS->state.file.pFile = fopen(szFilename, szMode); + pWS->state.file.pFile = NULL; + //FailIf(NULL == pWS->state.file.pFile, WMP_errFileIO); + +Cleanup: + return err; +} + + +ERR ilPKCodecFactory_CreateDecoderFromFile(PKImageDecode** ppDecoder) +{ + ERR err = WMP_errSuccess; + + char *pExt = ".wdp"; // We are loading a WDP file, so we have to tell the library that with this extension. + PKIID* pIID = NULL; + + struct WMPStream* pStream = NULL; + PKImageDecode* pDecoder = NULL; + + // get decode PKIID + Call(GetImageDecodeIID(pExt, &pIID)); + + // create stream + Call(ilCreateWS_File(&pStream, NULL, "rb")); + + // Create decoder + Call(PKCodecFactory_CreateCodec(pIID, ppDecoder)); + pDecoder = *ppDecoder; + + // attach stream to decoder + Call(pDecoder->Initialize(pDecoder, pStream)); + pDecoder->fStreamOwner = !0; + +Cleanup: + return err; +} + + +ERR ilPKCreateFactory(PKFactory** ppFactory, U32 uVersion) +{ + ERR err = WMP_errSuccess; + PKFactory* pFactory = NULL; + + Call(PKAlloc(ppFactory, sizeof(**ppFactory))); + pFactory = *ppFactory; + + pFactory->CreateStream = PKCreateFactory_CreateStream; + + pFactory->CreateStreamFromFilename = ilCreateWS_File; + pFactory->CreateStreamFromMemory = CreateWS_Memory; + + pFactory->Release = PKCreateFactory_Release; + +Cleanup: + return err; +} + +ILboolean iLoadWdpInternal(/*ILconst_string FileName*/) +{ + ERR err = WMP_errSuccess; + PKFactory* pFactory = NULL; + PKCodecFactory* pCodecFactory = NULL; + PKImageDecode* pDecoder = NULL; + PKPixelInfo PI; + PKPixelFormatGUID guidPixFormat; + PKFormatConverter* pConverter = NULL; + U32 cFrame = 0, i = 0; + PKRect Rect; + struct WMPStream* pEncodeStream = NULL; + PKImageEncode* pEncoder = NULL; + + //Call(PKCreateFactory(&pFactory, PK_SDK_VERSION)); + //Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); + //Call(pCodecFactory->CreateDecoderFromFile(FileName, &pDecoder)); + Call(ilPKCreateFactory(&pFactory, PK_SDK_VERSION)); + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); + Call(ilPKCodecFactory_CreateDecoderFromFile(&pDecoder)); + + //guidPixFormat = GUID_PKPixelFormat24bppRGB; + guidPixFormat = GUID_PKPixelFormat32bppBGRA; + //guidPixFormat = GUID_PKPixelFormat8bppGray; + //guidPixFormat = GUID_PKPixelFormat16bppGray; + + // Color transcoding + if (IsEqualGUID(&guidPixFormat, &GUID_PKPixelFormat8bppGray) || IsEqualGUID(&guidPixFormat, &GUID_PKPixelFormat16bppGray)){ // ** => Y transcoding + pDecoder->guidPixFormat = guidPixFormat; + pDecoder->WMP.wmiI.cfColorFormat = Y_ONLY; + } + else if(IsEqualGUID(&guidPixFormat, &GUID_PKPixelFormat24bppRGB) && pDecoder->WMP.wmiI.cfColorFormat == CMYK){ // CMYK = > RGB + pDecoder->WMP.wmiI.cfColorFormat = CF_RGB; + pDecoder->guidPixFormat = guidPixFormat; + pDecoder->WMP.wmiI.bRGB = 1; //RGB + } + + PI.pGUIDPixFmt = &guidPixFormat; + PixelFormatLookup(&PI, LOOKUP_FORWARD); + + pDecoder->WMP.wmiSCP.bfBitstreamFormat = 0; + pDecoder->WMP.wmiSCP.uAlphaMode = 0; + pDecoder->WMP.wmiSCP.sbSubband = SB_ALL; + pDecoder->WMP.bIgnoreOverlap = FALSE; + + pDecoder->WMP.wmiI.cfColorFormat = PI.cfColorFormat; + + pDecoder->WMP.wmiI.bdBitDepth = PI.bdBitDepth; + pDecoder->WMP.wmiI.cBitsPerUnit = PI.cbitUnit; + + //==== Validate thumbnail decode parameters ===== + pDecoder->WMP.wmiI.cThumbnailWidth = pDecoder->WMP.wmiI.cWidth; + pDecoder->WMP.wmiI.cThumbnailHeight = pDecoder->WMP.wmiI.cHeight; + pDecoder->WMP.wmiI.bSkipFlexbits = FALSE; + + pCodecFactory->CreateFormatConverter(&pConverter); + pConverter->Initialize(pConverter, pDecoder, NULL, guidPixFormat); + + // Right now, we are just assuming one frame. + // @TODO: Deal with multiple frames. + //pDecoder->GetFrameCount(pDecoder, &cFrame); + //pDecoder->SelectFrame(pDecoder, 1); + + if (!ilTexImage(pDecoder->uWidth, pDecoder->uHeight, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL)) + goto Cleanup; + //ilTexImage(pDecoder->uWidth, pDecoder->uHeight, 1, 1, IL_LUMINANCE, IL_UNSIGNED_BYTE, Data); + + pFactory->CreateStreamFromMemory(&pEncodeStream, iCurImage->Data, iCurImage->SizeOfData); + iWmpDecAppCreateEncoderFromExt(pCodecFactory, ".wdp", &pEncoder); + pEncoder->Initialize(pEncoder, pEncodeStream, ".wdp", 0); + + pEncoder->pStream->GetPos(pEncoder->pStream, &pEncoder->offStart); + + // Set the region that we want to be the whole image. + Rect.X = 0; Rect.Y = 0; Rect.Height = pDecoder->uHeight; Rect.Width = pDecoder->uWidth; + pEncoder->SetPixelFormat(pEncoder, guidPixFormat); + pEncoder->SetSize(pEncoder, Rect.Width, Rect.Height); + pEncoder->WriteSource = PKImageEncode_Transcode; + pEncoder->WriteSource(pEncoder, pConverter, &Rect); + + +Cleanup: + // Release everything all at the end. + PKImageDecode_Release(&pDecoder); + if (pEncoder) + PKImageEncode_Release(&pEncoder); + PKCreateCodecFactory_Release(&pCodecFactory); + PKCreateFactory_Release(&pFactory); + PKFormatConverter_Release(&pConverter); + + if (err != WMP_errSuccess) + return IL_FALSE; + return IL_TRUE; +} + +#endif//IL_NO_WDP diff --git a/libs/DevIL-1.7.8/src-IL/src/il_xpm.c b/libs/DevIL-1.7.8/src-IL/src/il_xpm.c new file mode 100644 index 00000000..9ca847a4 --- /dev/null +++ b/libs/DevIL-1.7.8/src-IL/src/il_xpm.c @@ -0,0 +1,655 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/04/2009 +// +// Filename: src-IL/src/il_xpm.c +// +// Description: Reads from an .xpm file. +// +//----------------------------------------------------------------------------- + + +#include "il_internal.h" +#ifndef IL_NO_XPM +#include + + +//If this is defined, only xpm files with 1 char/pixel +//can be loaded. They load somewhat faster then, though +//(not much). +//#define XPM_DONT_USE_HASHTABLE + +ILboolean iIsValidXpm(void); +ILboolean iLoadXpmInternal(void); +ILint XpmGetsInternal(ILubyte *Buffer, ILint MaxLen); + +//! Checks if the file specified in FileName is a valid XPM file. +ILboolean ilIsValidXpm(ILconst_string FileName) +{ + ILHANDLE XpmFile; + ILboolean bXpm = IL_FALSE; + + if (!iCheckExtension(FileName, IL_TEXT("xpm"))) { + ilSetError(IL_INVALID_EXTENSION); + return bXpm; + } + + XpmFile = iopenr(FileName); + if (XpmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bXpm; + } + + bXpm = ilIsValidXpmF(XpmFile); + icloser(XpmFile); + + return bXpm; +} + + +//! Checks if the ILHANDLE contains a valid XPM file at the current position. +ILboolean ilIsValidXpmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iIsValidXpm(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Checks if Lump is a valid XPM lump. +ILboolean ilIsValidXpmL(const void *Lump, ILuint Size) +{ + iSetInputLump(Lump, Size); + return iIsValidXpm(); +} + + +// Internal function to get the header and check it. +ILboolean iIsValidXpm(void) +{ + ILubyte Buffer[10]; + ILuint Pos = itell(); + + XpmGetsInternal(Buffer, 10); + iseek(Pos, IL_SEEK_SET); // Restore position + + if (strncmp("/* XPM */", (char*)Buffer, strlen("/* XPM */"))) + return IL_FALSE; + return IL_TRUE; +} + + +// Reads an .xpm file +ILboolean ilLoadXpm(ILconst_string FileName) +{ + ILHANDLE XpmFile; + ILboolean bXpm = IL_FALSE; + + XpmFile = iopenr(FileName); + if (XpmFile == NULL) { + ilSetError(IL_COULD_NOT_OPEN_FILE); + return bXpm; + } + + iSetInputFile(XpmFile); + bXpm = ilLoadXpmF(XpmFile); + icloser(XpmFile); + + return bXpm; +} + + +//! Reads an already-opened .xpm file +ILboolean ilLoadXpmF(ILHANDLE File) +{ + ILuint FirstPos; + ILboolean bRet; + + iSetInputFile(File); + FirstPos = itell(); + bRet = iLoadXpmInternal(); + iseek(FirstPos, IL_SEEK_SET); + + return bRet; +} + + +//! Reads from a memory "lump" that contains an .xpm +ILboolean ilLoadXpmL(const void *Lump, ILuint Size) + { + iSetInputLump(Lump, Size); + return iLoadXpmInternal(); +} + + +typedef ILubyte XpmPixel[4]; + +#define XPM_MAX_CHAR_PER_PIXEL 2 + + +#ifndef XPM_DONT_USE_HASHTABLE + +//The following hash table code was inspired by the xpm +//loading code of xv, one of the best image viewers of X11 + +//For xpm files with more than one character/pixel, it is +//impractical to use a simple lookup table for the +//character-to-color mapping (because the table requires +//2^(chars/pixel) entries, this is quite big). +//Because of that, a hash table is used for the mapping. +//The hash table has 257 entries, and collisions are +//resolved by chaining. + +//257 is the smallest prime > 256 +#define XPM_HASH_LEN 257 + +typedef struct XPMHASHENTRY +{ + ILubyte ColourName[XPM_MAX_CHAR_PER_PIXEL]; + XpmPixel ColourValue; + struct XPMHASHENTRY *Next; +} XPMHASHENTRY; + + +static ILuint XpmHash(const ILubyte* name, int len) +{ + ILint i, sum; + for (sum = i = 0; i < len; ++i) + sum += name[i]; + return sum % XPM_HASH_LEN; +} + + +XPMHASHENTRY** XpmCreateHashTable() +{ + XPMHASHENTRY** Table = + (XPMHASHENTRY**)ialloc(XPM_HASH_LEN*sizeof(XPMHASHENTRY*)); + if (Table != NULL) + memset(Table, 0, XPM_HASH_LEN*sizeof(XPMHASHENTRY*)); + return Table; +} + + +void XpmDestroyHashTable(XPMHASHENTRY **Table) +{ + ILint i; + XPMHASHENTRY* Entry; + + for (i = 0; i < XPM_HASH_LEN; ++i) { + while (Table[i] != NULL) { + Entry = Table[i]->Next; + ifree(Table[i]); + Table[i] = Entry; + } + } + + ifree(Table); +} + + +void XpmInsertEntry(XPMHASHENTRY **Table, const ILubyte* Name, int Len, XpmPixel Colour) +{ + XPMHASHENTRY* NewEntry; + ILuint Index; + Index = XpmHash(Name, Len); + + NewEntry = (XPMHASHENTRY*)ialloc(sizeof(XPMHASHENTRY)); + if (NewEntry != NULL) { + NewEntry->Next = Table[Index]; + memcpy(NewEntry->ColourName, Name, Len); + memcpy(NewEntry->ColourValue, Colour, sizeof(Colour)); + Table[Index] = NewEntry; + } +} + + +void XpmGetEntry(XPMHASHENTRY **Table, const ILubyte* Name, int Len, XpmPixel Colour) +{ + XPMHASHENTRY* Entry; + ILuint Index; + + Index = XpmHash(Name, Len); + Entry = Table[Index]; + while (Entry != NULL && strncmp((char*)(Entry->ColourName), (char*)Name, Len) != 0) + Entry = Entry->Next; + + if (Entry != NULL) + memcpy(Colour, Entry->ColourValue, sizeof(Colour)); +} + +#endif //XPM_DONT_USE_HASHTABLE + + +ILint XpmGetsInternal(ILubyte *Buffer, ILint MaxLen) +{ + ILint i = 0, Current; + + if (ieof()) + return IL_EOF; + + while ((Current = igetc()) != IL_EOF && i < MaxLen - 1) { + if (Current == IL_EOF) + return 0; + if (Current == '\n') //unix line ending + break; + + if (Current == '\r') { //dos/mac line ending + Current = igetc(); + if (Current == '\n') //dos line ending + break; + + if (Current == IL_EOF) + break; + + Buffer[i++] = (ILubyte)Current; + continue; + } + Buffer[i++] = (ILubyte)Current; + } + + Buffer[i++] = 0; + + return i; +} + + +ILint XpmGets(ILubyte *Buffer, ILint MaxLen) +{ + ILint Size, i, j; + ILboolean NotComment = IL_FALSE, InsideComment = IL_FALSE; + + do { + Size = XpmGetsInternal(Buffer, MaxLen); + if (Size == IL_EOF) + return IL_EOF; + + //skip leading whitespace (sometimes there's whitespace + //before a comment or before the pixel data) + + for(i = 0; i < Size && isspace(Buffer[i]); ++i) ; + Size = Size - i; + for(j = 0; j < Size; ++j) + Buffer[j] = Buffer[j + i]; + + if (Size == 0) + continue; + + if (Buffer[0] == '/' && Buffer[1] == '*') { + for (i = 2; i < Size; i++) { + if (Buffer[i] == '*' && Buffer[i+1] == '/') { + break; + } + } + if (i >= Size) + InsideComment = IL_TRUE; + } + else if (InsideComment) { + for (i = 0; i < Size; i++) { + if (Buffer[i] == '*' && Buffer[i+1] == '/') { + break; + } + } + if (i < Size) + InsideComment = IL_FALSE; + } + else { + NotComment = IL_TRUE; + } + } while (!NotComment); + + return Size; +} + + +ILint XpmGetInt(ILubyte *Buffer, ILint Size, ILint *Position) +{ + char Buff[1024]; + ILint i, j; + ILboolean IsInNum = IL_FALSE; + + for (i = *Position, j = 0; i < Size; i++) { + if (isdigit(Buffer[i])) { + IsInNum = IL_TRUE; + Buff[j++] = Buffer[i]; + } + else { + if (IsInNum) { + Buff[j] = 0; + *Position = i; + return atoi(Buff); + } + } + } + + return -1; +} + + +ILboolean XpmPredefCol(char *Buff, XpmPixel *Colour) +{ + ILint len; + ILint val = 128; + + if (!stricmp(Buff, "none")) { + (*Colour)[0] = 0; + (*Colour)[1] = 0; + (*Colour)[2] = 0; + (*Colour)[3] = 0; + return IL_TRUE; + } + + (*Colour)[3] = 255; + + if (!stricmp(Buff, "black")) { + (*Colour)[0] = 0; + (*Colour)[1] = 0; + (*Colour)[2] = 0; + return IL_TRUE; + } + if (!stricmp(Buff, "white")) { + (*Colour)[0] = 255; + (*Colour)[1] = 255; + (*Colour)[2] = 255; + return IL_TRUE; + } + if (!stricmp(Buff, "red")) { + (*Colour)[0] = 255; + (*Colour)[1] = 0; + (*Colour)[2] = 0; + return IL_TRUE; + } + if (!stricmp(Buff, "green")) { + (*Colour)[0] = 0; + (*Colour)[1] = 255; + (*Colour)[2] = 0; + return IL_TRUE; + } + if (!stricmp(Buff, "blue")) { + (*Colour)[0] = 0; + (*Colour)[1] = 0; + (*Colour)[2] = 255; + return IL_TRUE; + } + if (!stricmp(Buff, "yellow")) { + (*Colour)[0] = 255; + (*Colour)[1] = 255; + (*Colour)[2] = 0; + return IL_TRUE; + } + if (!stricmp(Buff, "cyan")) { + (*Colour)[0] = 0; + (*Colour)[1] = 255; + (*Colour)[2] = 255; + return IL_TRUE; + } + if (!stricmp(Buff, "gray")) { + (*Colour)[0] = 128; + (*Colour)[1] = 128; + (*Colour)[2] = 128; + return IL_TRUE; + } + + //check for grayXXX codes (added 20040218) + len = ilCharStrLen(Buff); + if (len >= 4) { + if (Buff[0] == 'g' || Buff[0] == 'G' + || Buff[1] == 'r' || Buff[1] == 'R' + || Buff[2] == 'a' || Buff[2] == 'A' + || Buff[3] == 'y' || Buff[3] == 'Y') { + if (isdigit(Buff[4])) { // isdigit returns false on '\0' + val = Buff[4] - '0'; + if (isdigit(Buff[5])) { + val = val*10 + Buff[5] - '0'; + if (isdigit(Buff[6])) + val = val*10 + Buff[6] - '0'; + } + val = (255*val)/100; + } + (*Colour)[0] = (ILubyte)val; + (*Colour)[1] = (ILubyte)val; + (*Colour)[2] = (ILubyte)val; + return IL_TRUE; + } + } + + + // Unknown colour string, so use black + // (changed 20040218) + (*Colour)[0] = 0; + (*Colour)[1] = 0; + (*Colour)[2] = 0; + + return IL_FALSE; +} + + +#ifndef XPM_DONT_USE_HASHTABLE +ILboolean XpmGetColour(ILubyte *Buffer, ILint Size, int Len, XPMHASHENTRY **Table) +#else +ILboolean XpmGetColour(ILubyte *Buffer, ILint Size, int Len, XpmPixel* Colours) +#endif +{ + ILint i = 0, j, strLen = 0; + ILubyte ColBuff[3]; + char Buff[1024]; + + XpmPixel Colour; + ILubyte Name[XPM_MAX_CHAR_PER_PIXEL]; + + for ( ; i < Size; i++) { + if (Buffer[i] == '\"') + break; + } + i++; // Skip the quotes. + + if (i >= Size) + return IL_FALSE; + + // Get the characters. + for (j = 0; j < Len; ++j) { + Name[j] = Buffer[i++]; + } + + // Skip to the colour definition. + for ( ; i < Size; i++) { + if (Buffer[i] == 'c') + break; + } + i++; // Skip the 'c'. + + if (i >= Size || Buffer[i] != ' ') { // no 'c' found...assume black +#ifndef XPM_DONT_USE_HASHTABLE + memset(Colour, 0, sizeof(Colour)); + Colour[3] = 255; + XpmInsertEntry(Table, Name, Len, Colour); +#else + memset(Colours[Name[0]], 0, sizeof(Colour)); + Colours[Name[0]][3] = 255; +#endif + return IL_TRUE; + } + + for ( ; i < Size; i++) { + if (Buffer[i] != ' ') + break; + } + + if (i >= Size) + return IL_FALSE; + + if (Buffer[i] == '#') { + // colour string may 4 digits/color or 1 digit/color + // (added 20040218) TODO: is isxdigit() ANSI??? + ++i; + while (i + strLen < Size && isxdigit(Buffer[i + strLen])) + ++strLen; + + for (j = 0; j < 3; j++) { + if (strLen >= 10) { // 4 digits + ColBuff[0] = Buffer[i + j*4]; + ColBuff[1] = Buffer[i + j*4 + 1]; + } + else if (strLen >= 8) { // 3 digits + ColBuff[0] = Buffer[i + j*3]; + ColBuff[1] = Buffer[i + j*3 + 1]; + } + else if (strLen >= 6) { // 2 digits + ColBuff[0] = Buffer[i + j*2]; + ColBuff[1] = Buffer[i + j*2 + 1]; + } + else if(j < strLen) { // 1 digit, strLen >= 1 + ColBuff[0] = Buffer[i + j]; + ColBuff[1] = 0; + } + + ColBuff[2] = 0; // add terminating '\0' char + Colour[j] = (ILubyte)strtol((char*)ColBuff, NULL, 16); + } + Colour[3] = 255; // Full alpha. + } + else { + for (j = 0; i < Size; i++) { + if (!isalnum(Buffer[i])) + break; + Buff[j++] = Buffer[i]; + } + Buff[j] = 0; + + if (i >= Size) + return IL_FALSE; + + if (!XpmPredefCol(Buff, &Colour)) + + return IL_FALSE; + } + + +#ifndef XPM_DONT_USE_HASHTABLE + XpmInsertEntry(Table, Name, Len, Colour); +#else + memcpy(Colours[Name[0]], Colour, sizeof(Colour)); +#endif + return IL_TRUE; +} + + +ILboolean iLoadXpmInternal() +{ +#define BUFFER_SIZE 2000 + ILubyte Buffer[BUFFER_SIZE], *Data; + ILint Size, Pos, Width, Height, NumColours, i, x, y; + + ILint CharsPerPixel; + +#ifndef XPM_DONT_USE_HASHTABLE + XPMHASHENTRY **HashTable; +#else + XpmPixel *Colours; + ILint Offset; +#endif + + Size = XpmGetsInternal(Buffer, BUFFER_SIZE); + if (strncmp("/* XPM */", (char*)Buffer, strlen("/* XPM */"))) { + ilSetError(IL_INVALID_FILE_HEADER); + return IL_FALSE; + } + + Size = XpmGets(Buffer, BUFFER_SIZE); + // @TODO: Actually check the variable name here. + + Size = XpmGets(Buffer, BUFFER_SIZE); + Pos = 0; + Width = XpmGetInt(Buffer, Size, &Pos); + Height = XpmGetInt(Buffer, Size, &Pos); + NumColours = XpmGetInt(Buffer, Size, &Pos); + + CharsPerPixel = XpmGetInt(Buffer, Size, &Pos); + +#ifdef XPM_DONT_USE_HASHTABLE + if (CharsPerPixel != 1) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } +#endif + + if (CharsPerPixel > XPM_MAX_CHAR_PER_PIXEL + || Width*CharsPerPixel > BUFFER_SIZE) { + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return IL_FALSE; + } + +#ifndef XPM_DONT_USE_HASHTABLE + HashTable = XpmCreateHashTable(); + if (HashTable == NULL) + return IL_FALSE; +#else + Colours = ialloc(256 * sizeof(XpmPixel)); + if (Colours == NULL) + return IL_FALSE; +#endif + + for (i = 0; i < NumColours; i++) { + Size = XpmGets(Buffer, BUFFER_SIZE); +#ifndef XPM_DONT_USE_HASHTABLE + if (!XpmGetColour(Buffer, Size, CharsPerPixel, HashTable)) { + XpmDestroyHashTable(HashTable); +#else + if (!XpmGetColour(Buffer, Size, CharsPerPixel, Colours)) { + ifree(Colours); +#endif + return IL_FALSE; + } + } + + if (!ilTexImage(Width, Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) { +#ifndef XPM_DONT_USE_HASHTABLE + XpmDestroyHashTable(HashTable); +#else + ifree(Colours); +#endif + return IL_FALSE; + } + + Data = iCurImage->Data; + + for (y = 0; y < Height; y++) { + Size = XpmGets(Buffer, BUFFER_SIZE); + for (x = 0; x < Width; x++) { +#ifndef XPM_DONT_USE_HASHTABLE + XpmGetEntry(HashTable, &Buffer[1 + x*CharsPerPixel], CharsPerPixel, &Data[(x << 2)]); +#else + Offset = (x << 2); + Data[Offset + 0] = Colours[Buffer[x + 1]][0]; + Data[Offset + 1] = Colours[Buffer[x + 1]][1]; + Data[Offset + 2] = Colours[Buffer[x + 1]][2]; + Data[Offset + 3] = Colours[Buffer[x + 1]][3]; +#endif + } + + Data += iCurImage->Bps; + } + + //added 20040218 + iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; + + +#ifndef XPM_DONT_USE_HASHTABLE + XpmDestroyHashTable(HashTable); +#else + ifree(Colours); +#endif + return IL_TRUE; + +#undef BUFFER_SIZE +} + +#endif//IL_NO_XPM + diff --git a/libs/DevIL-1.7.8/src-ILU/ilur/ilur.c b/libs/DevIL-1.7.8/src-ILU/ilur/ilur.c new file mode 100644 index 00000000..cc8424af --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/ilur/ilur.c @@ -0,0 +1,530 @@ +#include +#include +#include + +#include +#include + +/* This program (ilur) is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** What are the classes of types of parameters of ILU functions? + */ +enum Parameter_types {PARAM_VOID, PARAM_ILUINT, PARAM_ILFLOAT, PARAM_OTHERS}; + +/** The structure wrapped around functions + */ +struct ilu_function +{ + char Name[32]; /**< Name of the function used by user nad help */ + int Parameter_type; /**< Lots of functions take the same kind of parameters */ + void * Callback; /**< Terribly type-unsafe... callback :-) */ +}; +typedef struct ilu_function Ilu_function; + +/** What will we be to able to find out during arguments parsing + */ +enum {FLAG_NONE = 0x0, FLAG_HELP = 0x1, FLAG_VERBOSE = 0x2, FLAG_LOAD = 0x4, FLAG_SAVE = 0x8}; +enum {ILU_ALIENIFY, ILU_BLURAVG, ILU_BLURGAUSSIAN, ILU_BUILDMIPMAPS, ILU_COMPAREIMAGE, ILU_CONTRAST, ILU_CROP, ILU_EDGEDETECTE, ILU_EDGEDETECTP, ILU_EDGEDETECTS, ILU_EMBOSS, ILU_ENLARGECANVAS, ILU_ENLARGEIMAGE, ILU_EQUALIZE, ILU_CONVOLUTION, ILU_FLIPIMAGE, ILU_GAMMACORRECT, ILU_INVERTALPHA, ILU_MIRROR, ILU_NEGATIVE, ILU_NOISIFY, ILU_PIXELIZE, ILU_REPLACECOLOUR, ILU_ROTATE, ILU_ROTATE3D, ILU_SATURATE1F, ILU_SATURATE4F, ILU_SCALE, ILU_SCALEALPHA, ILU_SCALECOLOURS, ILU_SETLANGUAGE, ILU_SHARPEN, ILU_SWAPCOLOURS, ILU_WAVE, ILU_FUN_COUNT}; + +/* security comes first */ +#define short_strlen 32 +#define long_strlen 128 + +char program_name[short_strlen]; /**< How is our executable called? */ +Ilu_function ilu_functions[ILU_FUN_COUNT]; /**< What functions are we dealing with? */ + +/** Just dump infos about functions to the structures so we can somehow automate the processing of user input later... + */ +void init_strings() +{ + ilu_functions[ILU_ALIENIFY] = (Ilu_function){ "iluAlienify", PARAM_VOID, & iluAlienify }; + ilu_functions[ILU_BLURAVG] = (Ilu_function){ "iluBlurAvg", PARAM_ILUINT, & iluBlurAvg }; + ilu_functions[ILU_BLURGAUSSIAN] = (Ilu_function){ "iluBlurGaussian", PARAM_ILUINT, & iluBlurGaussian }; + ilu_functions[ILU_BUILDMIPMAPS] = (Ilu_function){ "iluBuildMipmaps", PARAM_VOID, & iluBuildMipmaps }; + ilu_functions[ILU_COMPAREIMAGE] = (Ilu_function){ "iluCompareImage", PARAM_ILUINT, & iluCompareImage }; + ilu_functions[ILU_CONTRAST] = (Ilu_function){ "iluContrast", PARAM_ILFLOAT, & iluContrast }; + ilu_functions[ILU_CROP] = (Ilu_function){ "iluCrop", PARAM_OTHERS, & iluCrop }; + ilu_functions[ILU_EDGEDETECTE] = (Ilu_function){ "iluEdgeDetectE", PARAM_VOID, & iluEdgeDetectE }; + ilu_functions[ILU_EDGEDETECTP] = (Ilu_function){ "iluEdgeDetectP", PARAM_VOID, & iluEdgeDetectP }; + ilu_functions[ILU_EDGEDETECTS] = (Ilu_function){ "iluEdgeDetectS", PARAM_VOID, & iluEdgeDetectS }; + ilu_functions[ILU_EMBOSS] = (Ilu_function){ "iluEmboss", PARAM_VOID, & iluEmboss }; + ilu_functions[ILU_ENLARGECANVAS] = (Ilu_function){ "iluEnlargeCanvas", PARAM_OTHERS, & iluEnlargeCanvas }; + ilu_functions[ILU_ENLARGEIMAGE] = (Ilu_function){ "iluEnlargeImage", PARAM_OTHERS, & iluEnlargeImage }; + ilu_functions[ILU_EQUALIZE] = (Ilu_function){ "iluEqualize", PARAM_VOID, & iluEqualize }; + ilu_functions[ILU_CONVOLUTION] = (Ilu_function){ "iluConvolution", PARAM_OTHERS, & iluConvolution }; + ilu_functions[ILU_FLIPIMAGE] = (Ilu_function){ "iluFlipImage", PARAM_VOID, & iluFlipImage }; + ilu_functions[ILU_GAMMACORRECT] = (Ilu_function){ "iluGammaCorrect", PARAM_ILFLOAT, & iluGammaCorrect }; + ilu_functions[ILU_INVERTALPHA] = (Ilu_function){ "iluInvertAlpha", PARAM_VOID, & iluInvertAlpha }; + ilu_functions[ILU_MIRROR] = (Ilu_function){ "iluMirror", PARAM_VOID, & iluMirror }; + ilu_functions[ILU_NEGATIVE] = (Ilu_function){ "iluNegative", PARAM_VOID, & iluNegative }; + ilu_functions[ILU_NOISIFY] = (Ilu_function){ "iluNoisify", PARAM_ILFLOAT, & iluNoisify }; + ilu_functions[ILU_PIXELIZE] = (Ilu_function){ "iluPixelize", PARAM_ILUINT, & iluPixelize }; + ilu_functions[ILU_REPLACECOLOUR] = (Ilu_function){ "iluReplaceColour", PARAM_OTHERS, & iluReplaceColour }; + ilu_functions[ILU_ROTATE] = (Ilu_function){ "iluRotate", PARAM_ILFLOAT, & iluRotate }; + ilu_functions[ILU_ROTATE3D] = (Ilu_function){ "iluRotate3D", PARAM_OTHERS, & iluRotate3D }; + ilu_functions[ILU_SATURATE1F] = (Ilu_function){ "iluSaturate1f", PARAM_ILFLOAT, & iluSaturate1f }; + ilu_functions[ILU_SATURATE4F] = (Ilu_function){ "iluSaturate4f", PARAM_OTHERS, & iluSaturate4f }; + ilu_functions[ILU_SCALE] = (Ilu_function){ "iluScale", PARAM_OTHERS, & iluScale }; + ilu_functions[ILU_SCALEALPHA] = (Ilu_function){ "iluScaleAlpha", PARAM_ILFLOAT, & iluScaleAlpha }; + ilu_functions[ILU_SCALECOLOURS] = (Ilu_function){ "iluScaleColours", PARAM_OTHERS, & iluScaleColours }; + ilu_functions[ILU_SETLANGUAGE] = (Ilu_function){ "iluSetLanguage", PARAM_OTHERS, & iluSetLanguage }; + ilu_functions[ILU_SHARPEN] = (Ilu_function){ "iluSharpen", PARAM_OTHERS, & iluSharpen }; + ilu_functions[ILU_SWAPCOLOURS] = (Ilu_function){ "iluSwapColours", PARAM_VOID, & iluSwapColours }; + ilu_functions[ILU_WAVE] = (Ilu_function){ "iluWave", PARAM_ILFLOAT, & iluWave }; +} + +/** What is worthy to remember from what the user can tell us... + */ +struct params +{ + char Load_filename[long_strlen]; ///< Where to get the image + char Save_filename[long_strlen]; ///< And where to dump it in the end + + int Flags; ///< verbose, help, etc. + int Calls_count; ///< How many ILU functions are we going to apply to the image? + char ** Calls_strings; ///< How did the user specified the function calls? +}; +typedef struct params Params; + +/** Create a new Params structure in the space and return a pointer to it + */ +Params * create_params() +{ + Params * ret_val = (Params *)malloc(sizeof(Params)); + ret_val->Load_filename[0] = '\0'; + ret_val->Save_filename[0] = '\0'; + ret_val->Flags = 0; + ret_val->Calls_count = 0; + ret_val->Calls_strings = NULL; + return ret_val; +} + +/** What was created, must be destroyed! + */ +void destroy_params(Params * to_destroy) +{ + int i; + for(i = 0; i < to_destroy->Calls_count; i++) + {/* The main thing to free here are the call strings */ + free(to_destroy->Calls_strings[i]); + to_destroy->Calls_strings[i] = NULL; + } + /* Then free the call strings container */ + free(to_destroy->Calls_strings); + to_destroy->Calls_strings = NULL; + /* And let's remember that the parameter itself has to be freed */ + free(to_destroy); + to_destroy = NULL; +} + +/** This function receives the raw string passed from the command line + * \param string The passed string + * \param name The extracted name of the function + * \param params The extracted string between brackets + */ +int parse_function(const char * string, char * name, char * params) +{ + int i; + /* num of whitespaces in front of the function */ + int num_front_whitespaces = 0; + /* num of character that bears the first parameter char - beyond '(' */ + int in_parameters = 0; + /* trim the leading whitespaces */ + for (i = 0; i < long_strlen - 1; i++) + if(string[i] == ' ' || string[i] == '\t') + num_front_whitespaces++; + else + break; + /* copy the function name */ + for (; i < long_strlen - 1 && string[i] != '('; i++) + if(string[i] == ' ' || string[i] == '\t') + break; + else + name[i - num_front_whitespaces] = string[i]; + /* terminate the string */ + name[i - num_front_whitespaces] = '\0'; + /* finally get the parameter */ + for (; i < long_strlen - 1 && string[i] != ')'; i++) + if(string[i] == '(') + { + in_parameters = i + 1; + continue; + } + else + { + if(in_parameters != 0) + params[i - in_parameters] = string[i]; + } + /* again terminate the string */ + params[i - in_parameters] = '\0'; + return 0; +} + +/** Takes a string and removes whitespaces within + * \param string The input string + * \param nonwhitespaced The 'cleaned' string + */ +int remove_whitespaces(const char * string, char * nonwhitespaced) +{ + strncpy(nonwhitespaced, string, strlen(string) + 1); + int i; + /* How many whitespace chars were skipped? */ + int num_whitespaced = 0; + /* Go from the beginning and don't stop until the either end */ + for (i = 0; string[i] != '\0' && i < long_strlen; i++) + /* Ho, a whitespace that shouldn't be missed! */ + if( string[i] == ' ' || string[i] == '\t' ) + { + num_whitespaced++; + continue; + } + else /* No whitespace, moreover we are already inside the string... */ + { + /* Here we copy the stuff to the output parameter */ + nonwhitespaced[i - num_whitespaced] = string[i]; + } +} + +/** How to fill our Params structure? + */ +int parse_arguments(int argc, const char * argv[], Params * parameters) +{ + /* How many ILU functions are we going to apply to the image? */ + int calls_count = 0; + /* Let's store their corresponding indexes in argv... */ + int * fun_to_call = (int *)malloc(argc / 2 * sizeof(int)); + + int i; + for (i = 1; i < argc; i++) + { + /* Find out what to do and what to expect */ + if (argv[i][0] == '-') + {/* Ho, an option was passed... */ + if (argv[i][1] == '-') + {/* Deal with long options */ + if(strncmp(argv[i], "--apply", long_strlen)) + goto apply; /* Yeah, there are GOTO's here :-) */ + else if(strncmp(argv[i], "--load-from", long_strlen)) + goto load_from; + else if(strncmp(argv[i], "--save-to", long_strlen)) + goto save_to; + else if(strncmp(argv[i], "--verbose", long_strlen)) + goto verbose; + } + else switch(argv[i][1]) /* Well, maybe it wasn't a long option :-) */ + {/* Deal with long options */ + case 'h': + case '?': + help: + parameters->Flags |= FLAG_HELP; + break; + case 'a': + apply: + if (argc > i + 1) /* that there is maybe something like the parameter out there... */ + fun_to_call[calls_count++] = i + 1; + break; + case 'l': + load_from: + if (argc > i + 1) + {/* that there is maybe something like the parameter out there... */ + strncpy(parameters->Load_filename, argv[i + 1], long_strlen); + parameters->Flags |= FLAG_LOAD; + } + break; + case 's': + save_to: + if (argc > i + 1) + {/* that there is maybe something like the parameter out there... */ + strncpy(parameters->Save_filename, argv[i + 1], long_strlen); + parameters->Flags |= FLAG_SAVE; + } + break; + case 'v': + verbose: + parameters->Flags |= FLAG_VERBOSE; + break; + } + /* We don't use complicated parameters here, so no worries */ + }/* endif (argv[i][0] == '-') */ + }/* endif (argv[i][0] == '-') */ + /* let's save the valuable info to the output structure... */ + parameters->Calls_count = calls_count; + /* and let's also store the calls as passed by the user */ + parameters->Calls_strings = (char **)malloc(parameters->Calls_count * sizeof (char *)); + for (i = 0; i < calls_count; i++) + { + /* Yeah, there is probably more memory allocated than needed... */ + parameters->Calls_strings[i] = (char *)malloc(sizeof(char) * long_strlen); + strncpy(parameters->Calls_strings[i], argv[ fun_to_call[i] ], long_strlen); + } + + /* clean the mess... */ + free(fun_to_call); + fun_to_call = 0; +} + +void print_help() +{ + printf(" *** Beware, manually generated help (=> may not be 100%% up-to-date :-) ***\n"); + printf("\tTip: If you miss something, examine the source code\n\tNext tip: You can't stack the short options. Sorry.\n"); + printf("Run %s with this arguments:\n", program_name); + printf("\t-h, -? | --help: This help message\n"); + printf("\t-v | --verbose: Verbose run\n"); + printf("\t-l | --load_from : The filename of an image that will be loaded and played with\n"); + printf("\t-s | --save-to : The filename of the result\n"); + printf("\t-a | --apply : The operation to run. Beware of the braces, they annoy most shells, so you need to either enclose the parameter in quotation marks (recommended), or escape them (not recommended since it is clumsy)\n"); + printf("\tFunctions will be applied in order you have specified them, that is from left to right.\n"); + printf(" Functions we know of: "); + int i; + for (i = 0; i < ILU_FUN_COUNT - 1; i++) + printf("%s, ", ilu_functions[i].Name); + printf("%s.\n", ilu_functions[ILU_FUN_COUNT - 1].Name); + printf("\nExample call:\n\t%s -l source_image.png -s result_image.jpg -a 'iluAlienify()' -a 'iluContrast(0.8)'\n", program_name); +} + +/** + * Assumed that the right image is bound to IL + */ +int perform_operation(const char * operation, int verbose) +{ + /* Where to store the first parsing results? */ + char function[long_strlen], params[long_strlen], solid_params[long_strlen]; + /* Get the function name string and parameters string */ + parse_function(operation, function, params); + /* Get rid of any whitespaces from the parameters string */ + remove_whitespaces(params, solid_params); + if (verbose) + printf("Calling %s(%s)\n", function, solid_params); + /* What function was wanted? -1 means that we don't know */ + int function_index = -1; + int i; + for (i = 0; i < ILU_FUN_COUNT; i++) + if (strncmp(function, ilu_functions[i].Name, short_strlen) == 0) + {/* Yeah, this function was wanted. Let's have its index from the ilu_functions array */ + function_index = i; + break; /* nothing to do here any more */ + } + if (function_index == -1) + {/* Seems we haven't found anything... */ + fprintf(stderr, "Error: You have specified an invalid function name '%s' (have you called %s).\nRun '%s --help' command to get some help\n", function, operation, program_name); + return 1; + } + /* We are going to try something and we want to know how it ended */ + ILboolean return_value; + switch (ilu_functions[function_index].Parameter_type) + {/* First semi-automatic processing according to type of parameters */ + case PARAM_VOID: + { + ILboolean (* function)() = ilu_functions[function_index].Callback; + return_value = function(); + break; + }/* endcase PARAM_VOID */ + case PARAM_ILUINT: + { + /* first assign and determine the type of the Callback */ + ILboolean (* function)(ILuint) = ilu_functions[function_index].Callback; + /* then declare the parameter variables */ + ILuint param_value; + /* fill them */ + int success = sscanf(solid_params, "%u", & param_value); + if (success != 1) + {/* see how it ended */ + fprintf(stderr, "Error interpreting '%s' as unsigned integer (when calling %s)\n", solid_params, operation); + break; + } + /* execute the command and store the result */ + return_value = function(param_value); + break; + }/* endcase PARAM_ILUINT */ + case PARAM_ILFLOAT: + { + ILboolean (* function)(ILfloat) = ilu_functions[function_index].Callback; + double param_value; + int success = sscanf(solid_params, "%lf", & param_value); + if (success != 1) + { + fprintf(stderr, "Error interpreting '%s' as float (when calling %s)\n", solid_params, operation); + break; + } + return_value = function((ILfloat)param_value); + break; + }/* endcase PARAM_ILFLOAT */ + case PARAM_OTHERS: + switch (function_index) + {/* next, the manual processing according to names */ + case ILU_SHARPEN: + { + ILboolean (* function)(ILfloat, ILuint) = ilu_functions[function_index].Callback; + double factor; + ILuint iter; + int success = sscanf(solid_params, "%lf,%u", & factor, & iter); + if (success != 2) + { + fprintf(stderr, "Error interpreting '%s' as floating-point number and unsigned integer separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function((ILfloat)factor, iter); + break; + }/* endcase ILU_SHARPEN */ + case ILU_CROP: + { + ILboolean (* function)(ILuint, ILuint, ILuint, ILuint, ILuint, ILuint ) = ilu_functions[function_index].Callback; + ILuint xoff, yoff, zoff, width, height, depth; + int success = sscanf(solid_params, "%u,%u,%u,%u,%u,%u", & xoff, & yoff, & zoff, & width, & height, & depth); + if (success != 6) + { + fprintf(stderr, "Error interpreting '%s' as 6 unsigned integers separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function(xoff, yoff, zoff, width, height, depth); + break; + }/* endcase ILU_CROP */ + case ILU_ENLARGECANVAS: + case ILU_SCALE: + { + ILboolean (* function)(ILuint, ILuint, ILuint) = ilu_functions[function_index].Callback; + ILuint width, height, depth; + int success = sscanf(solid_params, "%u,%u,%u", & width, & height, & depth); + if (success != 3) + { + fprintf(stderr, "Error interpreting '%s' as 3 unsigned integers separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function(width, height, depth); + break; + }/* endcase ILU_ENLARGECANVAS + ILU_SCALE */ + case ILU_ENLARGEIMAGE: + case ILU_SCALECOLOURS: + { + ILboolean (* function)(ILfloat, ILfloat, ILfloat) = ilu_functions[function_index].Callback; + double first, second, third; + int success = sscanf(solid_params, "%lf,%lf,%lf", & first, & second, & third); + if (success != 3) + { + fprintf(stderr, "Error interpreting '%s' as 3 floating-point numbers separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function((ILfloat)first, (ILfloat)second, (ILfloat)third); + break; + }/* endcase ILU_ENLARGEIMAGE + ILU_SCALECOLOURS */ + case ILU_ROTATE3D: + case ILU_SATURATE4F: + { + ILboolean (* function)(ILfloat, ILfloat, ILfloat, ILfloat) = ilu_functions[function_index].Callback; + double first, second, third, fourth; + int success = sscanf(solid_params, "%lf,%lf,%lf,%lf", & first, & second, & third, & fourth); + if (success != 4) + { + fprintf(stderr, "Error interpreting '%s' as 4 floating-point numbers separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function((ILfloat)first, (ILfloat)second, (ILfloat)third, (ILfloat)fourth); + break; + }/* endcase ILU_ROTATE3D + ILU_SATURATE4F */ + case ILU_REPLACECOLOUR: + { + ILboolean (* function)(ILubyte, ILubyte, ILubyte, ILfloat ) = ilu_functions[function_index].Callback; + ILuint red, green, blue; + double tolerance; + int success = sscanf(solid_params, "%u,%u,%u,%lf", & red, & green, & blue, & tolerance); + if (success != 4) + { + fprintf(stderr, "Error interpreting '%s' as 3 8-bit unsigned integers and one floating-point number separated by comma (when calling %s)\n", solid_params, operation); + break; + } + return_value = function((ILubyte)red, (ILubyte)green, (ILubyte)blue, (ILfloat)tolerance); + break; + }/* endcase ILU_ROTATE3D + ILU_SATURATE4F * */ + /* iluConvolution(ILint *matrix, ILint scale, ILint bias); Any idea about this? */ + }/* endswitch(function_index) */ + break; + + }/* endswitch (ilu_functions[function_index].Parameter_type) */ + /* It didn't end good for some reason... */ + if (return_value == IL_FALSE) + { + int error= ilGetError(); + fprintf(stderr, "Something got wrong when calling %s(%s): %s\n", function, solid_params, iluErrorString(error) ); + return error; + } + return 0; +} + +int do_stuff(const Params * parameters) +{ + if (parameters->Flags & FLAG_HELP || ((parameters->Flags | FLAG_LOAD | FLAG_SAVE) != parameters->Flags) ) + {/* We wanted HELP or we did not get SAVE or LOAD */ + print_help(); /* tell the loser what to do, then :-) */ + return 0; + } + int verbose = parameters->Flags & FLAG_VERBOSE; + + int image_handle; + int w, h; + ILboolean result; + + /* Quite obvious stuff, just load an image */ + ilGenImages(1, & image_handle); + ilBindImage(image_handle); + result = ilLoadImage(parameters->Load_filename); + if (result == IL_FALSE) + { + int error = ilGetError(); + fprintf(stderr, "Error: Something went wrong when loading file '%s' (%s)\n", parameters->Load_filename, iluErrorString(error)); + return error; + } + /* If we get image's dimensions, people will believe that we have actually loaded something :-) */ + w = ilGetInteger(IL_IMAGE_WIDTH); + h = ilGetInteger(IL_IMAGE_HEIGHT); + if (verbose) + printf("Loaded '%s', size %dx%d\n", parameters->Load_filename, w, h); + /* Now let's do our stuff!!! */ + int i; + for (i = 0; i < parameters->Calls_count; i++) + perform_operation(parameters->Calls_strings[i], verbose); + /* our stuff has been done... */ + + result = ilSaveImage(parameters->Save_filename); + if (result == IL_FALSE) + { + int error = ilGetError(); + fprintf(stderr, "Error: Something went wrong when saving file '%s' (%s)\n", parameters->Save_filename, iluErrorString(error)); + ilDeleteImages(1, & image_handle); + return error; + } + ilDeleteImages(1, & image_handle); + return 0; +} + +int main(int argc, const char * argv[]) +{ + /* Name our little program */ + strncpy(program_name, argv[0], short_strlen); + /* Prepare ilu functions "database" */ + init_strings(); + /* initialize DevIL in order to get defined behavior of the app */ + ilInit(); + iluInit(); + /* Prepare command line parsing */ + Params * parameters = create_params(); + /* Do the parsing */ + parse_arguments(argc, argv, parameters); + /* Finally do what we wanted */ + do_stuff(parameters); + /* Clean after the party */ + destroy_params(parameters); + return 0; +} + diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_alloc.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_alloc.h new file mode 100644 index 00000000..59df82b7 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_alloc.h @@ -0,0 +1,27 @@ +#ifndef ALLOC_H +#define ALLOC_H + +#if defined(_WIN32) && defined(_MEM_DEBUG) + void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line); + void *m_alloc(unsigned long size, const char *file, unsigned long line); + void f_ree(void *ptr); + + #ifdef malloc + #undef malloc + #endif + + #ifdef calloc + #undef calloc + #endif + + #ifdef free + #undef free + #endif + + + #define malloc(size) m_alloc(size, __FILE__, __LINE__) + #define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__) + #define free(addr) f_ree(addr) +#endif//defined(_WIN32) && defined(_MEM_DEBUG) + +#endif//ALLOC_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-arabic.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-arabic.h new file mode 100644 index 00000000..666178b9 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-arabic.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/10/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err-arabic.h +// +// Description: Error functions in Arabic, translated by Abdullah Alshammari +// +//----------------------------------------------------------------------------- + + +#ifndef IL_ERR_ARABIC_H +#define IL_ERR_ARABIC_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsArabic[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("enumerant Ų®Ų§Ų·Ų¦"), + IL_TEXT("Ų®Ų§Ų±Ų¬ Ų­ŲÆŁŲÆ Ų§Ł„Ų°Ų§ŁŲ±Ų©"), + IL_TEXT("نسق الصŁŲ±Ų© ŲŗŁŲ± Ł…ŲÆŲ¹ŁŁ…"), + IL_TEXT("Ų®Ų·Ų£ داخلŁ"), + IL_TEXT("Ł‚ŁŁ…Ų© Ų®Ų§Ų·Ų¦Ų©"), + IL_TEXT("عملŁŲ© ŲŗŁŲ± Ų´Ų±Ų¹ŁŲ©"), + IL_TEXT("رقم (Ł‚ŁŁ…Ų©) المل٠غŁŲ± Ų´Ų±Ų¹Ł"), + IL_TEXT("Ų±Ų£Ų³ المل٠خاطئ"), + IL_TEXT("البارمتر(المعامل) Ų®Ų§Ų·Ų¦"), + IL_TEXT("Ł„Ų§ŁŁ…ŁŁ† ŁŲŖŲ­ الملŁ"), + IL_TEXT("Ų§Ł…ŲŖŲÆŲ§ŲÆ المل٠خاطئ"), + IL_TEXT("المل٠مŁŲ¬ŁŲÆ"), + IL_TEXT("out format equivalent"), + IL_TEXT("المŁŲÆŲ³(الستاŁ) ممتلئ"), + IL_TEXT("المŁŲÆŲ³ (الستاŁ) ŁŲ§Ų±Ųŗ"), + IL_TEXT("ŲŖŲ­ŁŁŁ„ Ų®Ų§Ų·Ų¦"), + IL_TEXT("Ų£ŲØŲ¹Ų§ŲÆ Ų®Ų§Ų·Ų¦Ų©"), + IL_TEXT("Ų­ŲÆŲ« Ų®Ų·Ų£ Ų£Ų«Ł†Ų§Ų Ł‚Ų±Ų§ŲŲ© الملŁ") +}; + +ILconst_string iluLibErrorStringsArabic[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© gif"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© jpeg"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© png"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© tiff"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© mng"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© jp2"), + IL_TEXT("Ų®Ų·Ų£ ŁŁ Ł…ŁŲŖŲØŲ© exr") +}; + +ILconst_string iluMiscErrorStringsArabic[2] = { + IL_TEXT("Ł„Ų§ŁŁŲ¬ŲÆ Ų®Ų·Ų£"), + IL_TEXT("Ų®Ų·Ų£ ŲŗŁŲ± Ł…Ų¹Ų±ŁŁ") +}; + +#endif//IL_ERR_ARABIC_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-dutch.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-dutch.h new file mode 100644 index 00000000..4d635793 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-dutch.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/08/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err_dutch.h +// +// Description: Error functions in Dutch, translated by Bart De Lathouwer +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_DUTCH_H +#define ILU_ERR_DUTCH_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsDutch[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("Ongeldige enumerant"), + IL_TEXT("Geen vrij geheugen meer"), + IL_TEXT("Format wordt nog niet ondersteund"), + IL_TEXT("Interne fout"), + IL_TEXT("Ongeldige waarde"), + IL_TEXT("Foute bewerking"), + IL_TEXT("Foute bestandswaarde"), + IL_TEXT("Foute bestandsbegin"), + IL_TEXT("Ongeldige parameter"), + IL_TEXT("Kan het bestand niet openen"), + IL_TEXT("ongeldige"), + IL_TEXT("Bestand bestaat reeds"), + IL_TEXT("uitgaand formaat equivalent"), + IL_TEXT("stapel overstroming"), + IL_TEXT("stapel onderstroming"), + IL_TEXT("ongeldige omzetting"), + IL_TEXT("slechte afmetingen"), + IL_TEXT("Leesfout in bestand") +}; + +ILconst_string iluLibErrorStringsDutch[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("fout in gif bibliotheek"), + IL_TEXT("fout in jpeg bibliotheek"), + IL_TEXT("fout in png bibliotheek"), + IL_TEXT("fout in tiff bibliotheek"), + IL_TEXT("fout in mng bibliotheek"), + IL_TEXT("fout in jp2 bibliotheek"), + IL_TEXT("fout in exr bibliotheek") +}; + +ILconst_string iluMiscErrorStringsDutch[2] = { + IL_TEXT("geen fout"), + IL_TEXT("onbekende fout") +}; + +#endif//ILU_ERR_DUTCH_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-english.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-english.h new file mode 100644 index 00000000..ae6ecb4a --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-english.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/08/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err_english.h +// +// Description: Error functions in English. +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_ENGLISH_H +#define ILU_ERR_ENGLISH_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsEnglish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("invalid enumerant"), + IL_TEXT("out of memory"), + IL_TEXT("format not supported yet"), + IL_TEXT("internal error"), + IL_TEXT("invalid value"), + IL_TEXT("illegal operation"), + IL_TEXT("illegal file value"), + IL_TEXT("invalid file header"), + IL_TEXT("invalid parameter"), + IL_TEXT("could not open file"), + IL_TEXT("invalid extension"), + IL_TEXT("file already exists"), + IL_TEXT("out format equivalent"), + IL_TEXT("stack overflow"), + IL_TEXT("stack underflow"), + IL_TEXT("invalid conversion"), + IL_TEXT("bad dimensions"), + IL_TEXT("file read error") +}; + +ILconst_string iluLibErrorStringsEnglish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("gif library error"), + IL_TEXT("jpeg library error"), + IL_TEXT("png library error"), + IL_TEXT("tiff library error"), + IL_TEXT("mng library error"), + IL_TEXT("jp2 library error"), + IL_TEXT("exr library error") +}; + +ILconst_string iluMiscErrorStringsEnglish[2] = { + IL_TEXT("no error"), + IL_TEXT("unknown error") +}; + +#endif//ILU_ERR_ENGLISH_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-french.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-french.h new file mode 100644 index 00000000..ec38c126 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-french.h @@ -0,0 +1,57 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/03/2009 +// +// Filename: src-ILU/include/ilu_error/ilu_err_french.h +// +// Description: Error functions in French, by Thibaut Cuvelier. +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_FRENCH_H +#define ILU_ERR_FRENCH_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("énumération invalide"), + IL_TEXT("dépassement de mémoire"), + IL_TEXT("format non supporté"), + IL_TEXT("erreur interne"), + IL_TEXT("valeur illégale"), + IL_TEXT("opération illégale"), + IL_TEXT("valeur de fichier illégale"), + IL_TEXT("en-tźte de fichier invalide"), + IL_TEXT("paramčtre invalide"), + IL_TEXT("ne peut pas ouvrir le fichier"), + IL_TEXT("extension invalide"), + IL_TEXT("fichier déją existant"), + IL_TEXT("équivalent hors-format"), + IL_TEXT("stack overflow"), //often used like this in French, so no need to translate + IL_TEXT("stack underflow"), + IL_TEXT("conversion invalide"), + IL_TEXT("mauvaises dimensions"), + IL_TEXT("erreur lors de la lecture du fichier") +}; + +ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothčque (but less used) + IL_TEXT("jpeg : erreur dans la librairie"), + IL_TEXT("png : erreur dans la librairie"), + IL_TEXT("tiff : erreur dans la librairie"), + IL_TEXT("mng : erreur dans la librairie"), + IL_TEXT("jp2 : erreur dans la librairie"), + IL_TEXT("exr : erreur dans la librairie") +}; + +ILconst_string iluMiscErrorStringsFrench[2] = { + IL_TEXT("pas d'erreur"), + IL_TEXT("erreur inconnue") +}; + +#endif//ILU_ERR_FRENCH_H + + diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-german.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-german.h new file mode 100644 index 00000000..bf3f05cf --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-german.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/05/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err_German.h +// +// Description: Error functions in German, translated by Andreas Stöckel. +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_GERMAN_H +#define ILU_ERR_GERMAN_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsGerman[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("Ungültiger Enumerator"), + IL_TEXT("Kein Speicher verfügbar"), + IL_TEXT("Das Format wird noch nicht unterstützt"), + IL_TEXT("Interner Fehler"), + IL_TEXT("Ungültiger Wert"), + IL_TEXT("Unzulässige Operation"), + IL_TEXT("Unzulässiger Datei-Wert"), + IL_TEXT("Unzulässiger Datei-Header"), + IL_TEXT("Unzulässiger Parameter"), + IL_TEXT("Datei konnte nicht geöffnet werden"), + IL_TEXT("Ungültiger Erweiterung"), + IL_TEXT("Die Datei existiert bereits"), + IL_TEXT("out format equivalent"), + IL_TEXT("Stack Überlauf"), + IL_TEXT("Stack Unterlauf"), + IL_TEXT("Ungültige Konvertierung"), + IL_TEXT("Unzulässige Abmessungen"), + IL_TEXT("Fehler beim Lesen der Datei") +}; + +ILconst_string iluLibErrorStringsGerman[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("Fehler in der gif Bibliothek"), + IL_TEXT("Fehler in der jpeg Bibliothek"), + IL_TEXT("Fehler in der png Bibliothek"), + IL_TEXT("Fehler in der tiff Bibliothek"), + IL_TEXT("Fehler in der mng Bibliothek"), + IL_TEXT("Fehler in der jp2 Bibliothek"), + IL_TEXT("Fehler in der exr Bibliothek") +}; + +ILconst_string iluMiscErrorStringsGerman[2] = { + IL_TEXT("Kein Fehler"), + IL_TEXT("Unbekannter Fehler") +}; + +#endif//ILU_ERR_GERMAN_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-japanese.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-japanese.h new file mode 100644 index 00000000..0f2cb5ae --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-japanese.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/10/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err-japanese.h +// +// Description: Error functions in Japanese, translated by Osamu Ohara +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_JAPANESE_H +#define ILU_ERR_JAPANESE_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsJapanese[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("ē„å¹ćŖå—ę™å€¤"), //"invalid enumerant"), + IL_TEXT("ćć¢ćŖäø¨č¶³"), //"out of memory"), + IL_TEXT("ć¾ć ć‚µć¯ć¼ćć•ć‚ć¦ć„ćŖć„ć•ć‚©ć¼ć˛ćć"), //"format not supported yet"), + IL_TEXT("内éØć‚Øć©ć¼"), //"internal error"), + IL_TEXT("ē„å¹ćŖå€¤"), //"invalid value"), + IL_TEXT("不正ćŖć‚Ŗćć¬ć¼ć‚·ć§ć³"), //"illegal operation"), + IL_TEXT("不正ćŖć•ć‚悤ć«ć®å€¤"), //"illegal file value"), + IL_TEXT("ē„å¹ćŖć•ć‚悤ć«ććć€"), //"invalid file header"), + IL_TEXT("ē„å¹ćŖć‘ć©ćタ"), //"invalid parameter"), + IL_TEXT("ć•ć‚悤ć«ćé–‹ć‘ć¾ć›ć‚“"), //"could not open file"), + IL_TEXT("ē„å¹ćŖę‹å¼µå­"), //"invalid extension"), + IL_TEXT("ć•ć‚悤ć«ćÆę—¢ć«å­åØć—ć¦ć„ć¾ć™"), //"file already exists"), + IL_TEXT("ē­‰ä¾ć•ć‚©ć¼ć˛ćć外"), //"out format equivalent"), + IL_TEXT("スタćクオć¼ćć¼ć•ć­ć¼"), //"stack overflow"), + IL_TEXT("スタćクアć³ć€ć¼ć•ć­ć¼"), //"stack underflow"), + IL_TEXT("ē„å¹ćŖå¤‰ę¸›"), //"invalid conversion"), + IL_TEXT("不正ćŖć‚µć‚¤ć‚ŗ"), //"bad dimensions"), + IL_TEXT("ć•ć‚悤ć«čŖ­ćæč¾¼ćæć‚Øć©ć¼") //"file read error" +}; + +ILconst_string iluLibErrorStringsJapanese[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("gifć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"gif library error"), + IL_TEXT("jpegć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"jpeg library error"), + IL_TEXT("pngć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"png library error"), + IL_TEXT("tiffć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"tiff library error"), + IL_TEXT("mngć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"mng library error" + IL_TEXT("jp2ć©ć‚¤ć–ć©ćŖć‚Øć©ć¼"), //"jp2 library error" + IL_TEXT("exrć©ć‚¤ć–ć©ćŖć‚Øć©ć¼") //"exr library error" +}; + +ILconst_string iluMiscErrorStringsJapanese[2] = { + IL_TEXT("エć©ć¼ē„ć—"), + IL_TEXT("äø¨ęˇćŖć‚Øć©ć¼") +}; + +#endif//ILU_ERR_JAPANESE_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-spanish.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-spanish.h new file mode 100644 index 00000000..77b5a240 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_error/ilu_err-spanish.h @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 11/08/2008 +// +// Filename: src-ILU/include/ilu_error/ilu_err-spanish.h +// +// Description: Error functions in Spanish, translated by Carlos Aragonés +// +//----------------------------------------------------------------------------- + + +#ifndef ILU_ERR_SPANISH_H +#define ILU_ERR_SPANISH_H + +#include "ilu_internal.h" + +ILconst_string iluErrorStringsSpanish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("enumerador incorrecto"), + IL_TEXT("no queda memoria disponible"), + IL_TEXT("formato no soportado todavķa"), + IL_TEXT("error interno"), + IL_TEXT("valor incorrecto"), + IL_TEXT("operación ilegaIL_TEXT("), + IL_TEXT("valor de fichero ilegaIL_TEXT("), + IL_TEXT("cabecera incorrecta"), + IL_TEXT("parįmetro incorrecto"), + IL_TEXT("no se puede abrir el fichero"), + IL_TEXT("extensión desconocida"), + IL_TEXT("el fichero ya existe"), + IL_TEXT("formato de salida equivalente"), + IL_TEXT("desbordamiento superior de pila"), + IL_TEXT("desbordamiento inferior de pila"), + IL_TEXT("conversión incorrecta"), + IL_TEXT("nśmero de dimensiones incorrecto"), + IL_TEXT("error de lectura en el fichero") +}; + +ILconst_string iluLibErrorStringsSpanish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { + IL_TEXT("error en la librerķa gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librerķa'. + IL_TEXT("error en la librerķa jpeg"), + IL_TEXT("error en la librerķa png"), + IL_TEXT("error en la librerķa tiff"), + IL_TEXT("error en la librerķa mng"), + IL_TEXT("error en la librerķa jp2"), + IL_TEXT("error en la librerķa exr"), +}; + +ILconst_string iluMiscErrorStringsSpanish[2] = { + IL_TEXT("no error"), + IL_TEXT("unknown error") +}; + +#endif//ILU_ERR_SPANISH_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_filter.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_filter.h new file mode 100644 index 00000000..946fe004 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_filter.h @@ -0,0 +1,81 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/28/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/include/ilu_filter.h +// +// Description: Applies filters to an image. +// +//----------------------------------------------------------------------------- + + +#ifndef FILTER_H +#define FILTER_H + +#include "ilu_internal.h" + + +static const ILint filter_average_scale = 9; +static const ILint filter_average_bias = 1; +static const ILint filter_average[] = +{ 1, 1, 1, + 1, 1, 1, + 1, 1, 1 }; + + +static const ILint filter_gaussian_scale = 16; +static const ILint filter_gaussian_bias = 1; +static const ILint filter_gaussian[] = +{ 1, 2, 1, + 2, 4, 2, + 1, 2, 1 }; + + +static const ILint filter_h_sobel_scale = 1; +static const ILint filter_h_sobel_bias = 0; +static const ILint filter_h_sobel[] = +{ 1, 2, 1, + 0, 0, 0, + -1, -2, -1 }; + + +static const ILint filter_v_sobel_scale = 1; +static const ILint filter_v_sobel_bias = 0; +static const ILint filter_v_sobel[] = +{ 1, 0, -1, + 2, 0, -2, + 1, 0, -1 }; + + +static const ILint filter_h_prewitt_scale = 1; +static const ILint filter_h_prewitt_bias = 0; +static const ILint filter_h_prewitt[] = +{ 1, 1, 1, + 0, 0, 0, + -1, -1, -1 }; + + +static const ILint filter_v_prewitt_scale = 1; +static const ILint filter_v_prewitt_bias = 0; +static const ILint filter_v_prewitt[] = +{ 1, 0, -1, + 1, 0, -1, + 1, 0, -1 }; + +static const ILint filter_emboss_scale = 1; +static const ILint filter_emboss_bias = 128; +static const ILint filter_emboss[] = +{ -1, 0, 1, + -1, 0, 1, + -1, 0, 1 }; + +static const ILint filter_embossedge_scale = 1; +static const ILint filter_embossedge_bias = 0; +static const ILint filter_embossedge[] = +{ -1, 0, 1, + -1, 0, 1, + -1, 0, 1 }; + +#endif//FILTER_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_internal.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_internal.h new file mode 100644 index 00000000..61980e6e --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_internal.h @@ -0,0 +1,100 @@ + +#ifndef INTERNAL_H +#define INTERNAL_H + +#include + +#ifdef _MSC_VER + #if _MSC_VER > 1000 + #pragma once + #pragma intrinsic(memcpy) + #pragma intrinsic(memset) + //pragma comment(linker, "/NODEFAULTLIB:libc") + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + + #ifdef _DEBUG + #define _CRTDBG_MAP_ALLOC + #include + #ifndef _WIN32_WCE + #include + #endif + #endif + #endif // _MSC_VER > 1000 +#endif + +#define _IL_BUILD_LIBRARY +#define _ILU_BUILD_LIBRARY + +// Standard headers +#include +#include +#include +#include + +// Local headers +#define _IL_BUILD_LIBRARY +#define _ILU_BUILD_LIBRARY + +#ifdef HAVE_CONFIG_H //if we use autotools, we have HAVE_CONFIG_H defined and we have to look for it like that +#include +#else // if we don't use autotools, we have to point to (possibly different) config.h than in the opposite case +#include +#endif + +#include +#include + + +// From DevIL's internal.h: +#ifdef _WIN32_WCE + #include + #define IL_TEXT(s) ((char*)TEXT(s)) +#elif _WIN32 + #include + #define IL_TEXT(s) TEXT(s) +#else + #define IL_TEXT(s) s + #define TEXT(s) s +#endif + +extern ILimage *iluCurImage; + + +// Useful global variables +extern const ILdouble IL_PI; +extern const ILdouble IL_DEGCONV; + + +#ifdef ILU_INTERNAL_C +#undef NOINLINE +#undef INLINE +#define INLINE +#endif + +// Internal functions +ILfloat ilCos(ILfloat Angle); +ILfloat ilSin(ILfloat Angle); +ILint ilRound(ILfloat Num); + +#ifndef NOINLINE +INLINE ILfloat ilCos(ILfloat Angle) { + return (ILfloat)(cos(Angle * IL_DEGCONV)); +} + +INLINE ILfloat ilSin(ILfloat Angle) { + return (ILfloat)(sin(Angle * IL_DEGCONV)); +} + + +INLINE ILint ilRound(ILfloat Num) { + return (ILint)(Num + 0.5); // this is truncating in away-from-0, not rounding +} +#endif + + + +ILuint iluScaleAdvanced(ILuint Width, ILuint Height, ILenum Filter); +ILubyte *iScanFill(void); + + +#endif//INTERNAL_H diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_region.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_region.h new file mode 100644 index 00000000..83df3247 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_region.h @@ -0,0 +1,28 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 07/09/2002 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_region.h +// +// Description: Creates an image region. +// +//----------------------------------------------------------------------------- + +#ifndef ILU_REGION_H +#define ILU_REGION_H + +#include "ilu_internal.h" + + +typedef struct Edge +{ + ILint yUpper; + ILfloat xIntersect, dxPerScan; + struct Edge *next; +} Edge; + + +#endif//ILU_REGION_H + diff --git a/libs/DevIL-1.7.8/src-ILU/include/ilu_states.h b/libs/DevIL-1.7.8/src-ILU/include/ilu_states.h new file mode 100644 index 00000000..aa1d20ae --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/include/ilu_states.h @@ -0,0 +1,20 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/28/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/include/ilu_states.h +// +// Description: The state machine +// +//----------------------------------------------------------------------------- + + +#ifndef STATES_H +#define STATES_H + +extern ILenum iluFilter; +extern ILenum iluPlacement; + +#endif//STATES_H diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.rc b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.rc new file mode 100644 index 00000000..704efd37 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILU: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILU: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILU" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILU.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utilities Library" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILU "Developer's Image Utilities Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.vcproj b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.vcproj new file mode 100644 index 00000000..bbbbf656 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU Unicode.vcproj @@ -0,0 +1,1113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.rc b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.rc new file mode 100644 index 00000000..1351cefe --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILU: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILU: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILU" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILU.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utilities Library" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILU "Developer's Image Utilities Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.vcproj b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.vcproj new file mode 100644 index 00000000..5c5b159d --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/ILU.vcproj @@ -0,0 +1,1112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/ilu.def b/libs/DevIL-1.7.8/src-ILU/msvc8/ilu.def new file mode 100644 index 00000000..b9587839 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/ilu.def @@ -0,0 +1,56 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +iluAlienify +iluBlurAvg +iluBlurGaussian +iluBuildMipmaps +iluColoursUsed +iluConvolution +iluCompareImage +iluContrast +iluCrop +iluDeleteImage +iluEdgeDetectE +iluEdgeDetectP +iluEdgeDetectS +iluEmboss +iluEnlargeCanvas +iluEnlargeImage +iluEqualize +iluErrorString +iluFlipImage +iluGenImage +iluGetImageInfo +iluGetString +iluGammaCorrect +iluGetInteger +iluGetIntegerv +iluImageParameter +iluInit +iluInvertAlpha +iluLoadImage +iluMirror +iluNegative +iluNoisify +iluPixelize +iluRegionfv +iluRegioniv +iluReplaceColour +iluRotate +iluRotate3D +iluSaturate1f +iluSaturate4f +iluScaleColours +iluScale +iluScaleAlpha +iluSetLanguage +iluSharpen +iluSwapColours +iluWave + + +; Internal but exported functions +iluRotate_ +iluRotate3D_ +iluScale_ diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/resource.h b/libs/DevIL-1.7.8/src-ILU/msvc8/resource.h new file mode 100644 index 00000000..f9f24ba4 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc8/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ILU Unicode.rc +// +#define IDC_OPENILU 109 +#define IDI_ICON1 155 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-ILU/msvc8/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-ILU/msvc8/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-ILU/msvc8/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.rc b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.rc new file mode 100644 index 00000000..704efd37 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILU: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILU: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILU" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILU.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utilities Library" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILU "Developer's Image Utilities Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.vcproj b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.vcproj new file mode 100644 index 00000000..4475eb05 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU Unicode.vcproj @@ -0,0 +1,3510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.dsp b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.dsp new file mode 100644 index 00000000..c4c6fb95 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.dsp @@ -0,0 +1,247 @@ +# Microsoft Developer Studio Project File - Name="ILU" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=ILU - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "ILU.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "ILU.mak" CFG="ILU - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "ILU - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILU - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILU - Win32 Dynamic" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "ILU" +# PROP Scc_LocalPath "..\.." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ILU - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "../../lib/debug" +# PROP BASE Intermediate_Dir "../src/obj/debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../lib/debug" +# PROP Intermediate_Dir "../src/obj/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../lib/debug/ilu-d.dll" /pdbtype:sept +# Begin Special Build Tool +TargetName=ilu-d +SOURCE="$(InputPath)" +PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\debug\$(TargetName).dll +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ILU - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib winspool.lib advapi32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib devil.lib /nologo /dll /machine:I386 /libpath:"../../lib" +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\..\lib\ilu.dll "C:\path\ilu.dll" +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ILU - Win32 Dynamic" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj/dynamic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj/dynamic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILU_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/ilu-l.dll" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/ilu-l.dll" +# Begin Special Build Tool +TargetName=ilu-l +SOURCE="$(InputPath)" +PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\$(TargetName).dll +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ILU - Win32 Debug" +# Name "ILU - Win32 Release" +# Name "ILU - Win32 Dynamic" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ilu.def +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_error.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_filter.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_filter_rcg.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_internal.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_main.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_manip.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_mipmap.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_noise.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_region.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_rotate.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_scale.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_scale2d.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_scale3d.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_states.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilu_utilities.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\IL\devil_internal_exports.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\il\ilu.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilu_filter.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilu_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilu_mipmap.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilu_region.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilu_states.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\resources\IL Logo.ico" +# End Source File +# Begin Source File + +SOURCE=.\ILU.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.rc b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.rc new file mode 100644 index 00000000..1351cefe --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILU: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILU: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILU" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILU.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utilities Library" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILU "Developer's Image Utilities Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.vcproj b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.vcproj new file mode 100644 index 00000000..cb70f90d --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ILU.vcproj @@ -0,0 +1,1109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/ilu.def b/libs/DevIL-1.7.8/src-ILU/msvc9/ilu.def new file mode 100644 index 00000000..b9587839 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/ilu.def @@ -0,0 +1,56 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +iluAlienify +iluBlurAvg +iluBlurGaussian +iluBuildMipmaps +iluColoursUsed +iluConvolution +iluCompareImage +iluContrast +iluCrop +iluDeleteImage +iluEdgeDetectE +iluEdgeDetectP +iluEdgeDetectS +iluEmboss +iluEnlargeCanvas +iluEnlargeImage +iluEqualize +iluErrorString +iluFlipImage +iluGenImage +iluGetImageInfo +iluGetString +iluGammaCorrect +iluGetInteger +iluGetIntegerv +iluImageParameter +iluInit +iluInvertAlpha +iluLoadImage +iluMirror +iluNegative +iluNoisify +iluPixelize +iluRegionfv +iluRegioniv +iluReplaceColour +iluRotate +iluRotate3D +iluSaturate1f +iluSaturate4f +iluScaleColours +iluScale +iluScaleAlpha +iluSetLanguage +iluSharpen +iluSwapColours +iluWave + + +; Internal but exported functions +iluRotate_ +iluRotate3D_ +iluScale_ diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/resource.h b/libs/DevIL-1.7.8/src-ILU/msvc9/resource.h new file mode 100644 index 00000000..ef602253 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/msvc9/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ILU.rc +// +#define IDC_OPENILU 109 +#define IDI_ICON1 155 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-ILU/msvc9/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-ILU/msvc9/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-ILU/msvc9/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_alloc.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_alloc.c new file mode 100644 index 00000000..a3051b2c --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_alloc.c @@ -0,0 +1,139 @@ +#include + + +#if defined(_WIN32) && defined(_MEM_DEBUG) + #include + + int bAtexit = 0; + + + typedef struct ALLOC_INFO + { + unsigned long address; + unsigned long size; + char file[64]; + unsigned long line; + struct ALLOC_INFO *Next; + } ALLOC_INFO; + ALLOC_INFO *AllocList; + + + void AddTrack(unsigned long addr, unsigned long size, const char *file, unsigned long line) + { + ALLOC_INFO *Temp; + + if (AllocList == NULL) { + AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds. + AllocList->address = addr; + AllocList->size = size; + AllocList->line = line; + strncpy(AllocList->file, file, 63); + AllocList->Next = NULL; + } + else { + Temp = AllocList; + AllocList = (ALLOC_INFO*)malloc(sizeof(ALLOC_INFO)); // Just assume it succeeds. + AllocList->address = addr; + AllocList->size = size; + AllocList->line = line; + strncpy(AllocList->file, file, 63); + AllocList->Next = Temp; + } + + return; + } + + + void RemoveTrack(unsigned long addr) + { + ALLOC_INFO *Temp, *Prev; + + Temp = AllocList; + Prev = NULL; + + if (Temp == NULL) + return; + + while (Temp != NULL) { + if (Temp->address == addr) { + if (Prev == NULL) { + AllocList = Temp->Next; + free(Temp); + } + else { + Prev->Next = Temp->Next; + free(Temp); + } + break; + } + Prev = Temp; + Temp = Temp->Next; + } + + return; + } + + + void DumpUnfreed(void) + { + unsigned long TotalSize = 0; + char buf[1024]; + ALLOC_INFO *i = AllocList; + + OutputDebugString("ILU Unfreed Information:\n"); + while (i != NULL) { + sprintf(buf, "%s(%d) : %d bytes unfreed at %d\n", i->file, i->line, i->size, i->address); + OutputDebugString(buf); + TotalSize += i->size; + + AllocList = i->Next; + free(i); + i = AllocList; + } + + sprintf(buf, "-----------------------------------------------------------\n"); + OutputDebugString(buf); + sprintf(buf, "Total Unfreed: %d bytes\n\n\n", TotalSize); + OutputDebugString(buf); + } + + void AddToAtexit() + { + if (bAtexit) + return; + atexit(DumpUnfreed); + bAtexit = 1; + } + + void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line) + { + ILvoid *ptr; + ptr = calloc(size, num); + if (!ptr) + return NULL; + AddToAtexit(); + AddTrack((unsigned long)ptr, size * num, file, line); + return ptr; + } + + + void *m_alloc(unsigned long size, const char *file, unsigned long line) + { + ILvoid *ptr; + ptr = malloc(size); + if (!ptr) + return NULL; + AddToAtexit(); + AddTrack((unsigned long)ptr, size, file, line); + return ptr; + } + + + void f_ree(void *ptr) + { + RemoveTrack((unsigned long)ptr); + free(ptr); + return; + } + +#endif//defined(_WIN32) && defined(_MEM_DEBUG) diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_error.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_error.c new file mode 100644 index 00000000..adb066c0 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_error.c @@ -0,0 +1,104 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/03/2009 +// +// Filename: src-ILU/src/ilu_error.c +// +// Description: Error functions +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_error/ilu_err-arabic.h" +#include "ilu_error/ilu_err-dutch.h" +#include "ilu_error/ilu_err-english.h" +#include "ilu_error/ilu_err-japanese.h" +#include "ilu_error/ilu_err-spanish.h" +#include "ilu_error/ilu_err-german.h" +#include "ilu_error/ilu_err-french.h" + + +ILconst_string *iluErrors; +ILconst_string *iluLibErrors; +ILconst_string *iluMiscErrors; +#define ILU_NUM_LANGUAGES 7 + +ILconst_string *iluErrorStrings[ILU_NUM_LANGUAGES] = { + iluErrorStringsEnglish, + iluErrorStringsArabic, + iluErrorStringsDutch, + iluErrorStringsFrench, + iluErrorStringsJapanese, + iluErrorStringsSpanish, + iluErrorStringsGerman +}; + +ILconst_string *iluLibErrorStrings[ILU_NUM_LANGUAGES] = { + iluLibErrorStringsEnglish, + iluLibErrorStringsArabic, + iluLibErrorStringsDutch, + iluLibErrorStringsFrench, + iluLibErrorStringsJapanese, + iluLibErrorStringsSpanish, + iluLibErrorStringsGerman +}; + +ILconst_string *iluMiscErrorStrings[ILU_NUM_LANGUAGES] = { + iluMiscErrorStringsEnglish, + iluMiscErrorStringsArabic, + iluMiscErrorStringsDutch, + iluMiscErrorStringsFrench, + iluMiscErrorStringsJapanese, + iluMiscErrorStringsSpanish, + iluMiscErrorStringsGerman +}; + + +ILconst_string ILAPIENTRY iluErrorString(ILenum Error) +{ + // Now we are dealing with Unicode strings. + if (Error == IL_NO_ERROR) { + return iluMiscErrors[0]; + } + if (Error == IL_UNKNOWN_ERROR) { + return iluMiscErrors[1]; + } + if (Error >= IL_INVALID_ENUM && Error <= IL_FILE_READ_ERROR) { + return (ILstring)iluErrors[Error - IL_INVALID_ENUM]; + } + if (Error >= IL_LIB_GIF_ERROR && Error <= IL_LIB_EXR_ERROR) { + return (ILstring)iluLibErrors[Error - IL_LIB_GIF_ERROR]; + } + + return iluMiscErrors[0]; +} + + +ILboolean ILAPIENTRY iluSetLanguage(ILenum Language) +{ + switch (Language) + { + case ILU_ENGLISH: + case ILU_ARABIC: + case ILU_DUTCH: + case ILU_FRENCH: + case ILU_JAPANESE: + case ILU_SPANISH: + case ILU_GERMAN: + iluErrors = iluErrorStrings[Language - ILU_ENGLISH]; + iluLibErrors = iluLibErrorStrings[Language - ILU_ENGLISH]; + iluMiscErrors = iluMiscErrorStrings[Language - ILU_ENGLISH]; + break; + + default: + ilSetError(IL_INVALID_ENUM); + return IL_FALSE; + } + + return IL_TRUE; +} + + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_filter.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_filter.c new file mode 100644 index 00000000..2b974468 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_filter.c @@ -0,0 +1,1318 @@ + +// Description: Applies filters to an image. + +#include "ilu_internal.h" +#include "ilu_filter.h" +#include +#include + + +// Could probably be optimized a bit...too many nested for loops. +//! Pixelizes an image +ILboolean ILAPIENTRY iluPixelize(ILuint PixSize) +{ + ILuint x, y, z, i, j, k, c, r, Total, Tested; + ILushort *ShortPtr; + ILuint *IntPtr; + ILdouble *DblPtr, DblTotal, DblTested; + ILubyte *RegionMask; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (PixSize == 0) + PixSize = 1; + r = 0; + + if (iluCurImage->Format == IL_COLOUR_INDEX) + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + + RegionMask = iScanFill(); + + switch (iluCurImage->Bpc) + { + case 1: + for (z = 0; z < iluCurImage->Depth; z += PixSize) { + for (y = 0; y < iluCurImage->Height; y += PixSize) { + for (x = 0; x < iluCurImage->Width; x += PixSize) { + for (c = 0; c < iluCurImage->Bpp; c++) { + Total = 0; Tested = 0; + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + Total += iluCurImage->Data[(z+k) * iluCurImage->SizeOfPlane + + (y+j) * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c]; + } + } + } + Total /= Tested; + + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + if (RegionMask) { + if (!RegionMask[(y+j) * iluCurImage->Width + (x+i)]) + continue; + } + iluCurImage->Data[(z+k) * iluCurImage->SizeOfPlane + (y+j) + * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c] = + Total; + } + } + } + } + } + } + } + break; + case 2: + ShortPtr = (ILushort*)iluCurImage->Data; + iluCurImage->Bps /= 2; + for (z = 0; z < iluCurImage->Depth; z += PixSize) { + for (y = 0; y < iluCurImage->Height; y += PixSize) { + for (x = 0; x < iluCurImage->Width; x += PixSize, r += PixSize) { + for (c = 0; c < iluCurImage->Bpp; c++) { + Total = 0; Tested = 0; + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + Total += ShortPtr[(z+k) * iluCurImage->SizeOfPlane + + (y+j) * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c]; + } + } + } + Total /= Tested; + + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + if (RegionMask[r+i]) { + ShortPtr[(z+k) * iluCurImage->SizeOfPlane + (y+j) + * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c] = + Total; + } + } + } + } + } + } + } + } + iluCurImage->Bps *= 2; + break; + case 4: + IntPtr = (ILuint*)iluCurImage->Data; + iluCurImage->Bps /= 4; + for (z = 0; z < iluCurImage->Depth; z += PixSize) { + for (y = 0; y < iluCurImage->Height; y += PixSize) { + for (x = 0; x < iluCurImage->Width; x += PixSize, r += PixSize) { + for (c = 0; c < iluCurImage->Bpp; c++) { + Total = 0; Tested = 0; + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + Total += IntPtr[(z+k) * iluCurImage->SizeOfPlane + + (y+j) * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c]; + } + } + } + Total /= Tested; + + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, Tested++) { + if (RegionMask[r+i]) { + IntPtr[(z+k) * iluCurImage->SizeOfPlane + (y+j) + * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c] = + Total; + } + } + } + } + } + } + } + } + iluCurImage->Bps *= 4; + break; + case 8: + DblPtr = (ILdouble*)iluCurImage->Data; + iluCurImage->Bps /= 8; + for (z = 0; z < iluCurImage->Depth; z += PixSize) { + for (y = 0; y < iluCurImage->Height; y += PixSize) { + for (x = 0; x < iluCurImage->Width; x += PixSize, r += PixSize) { + for (c = 0; c < iluCurImage->Bpp; c++) { + DblTotal = 0.0; DblTested = 0.0; + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, DblTested++) { + DblTotal += DblPtr[(z+k) * iluCurImage->SizeOfPlane + + (y+j) * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c]; + } + } + } + DblTotal /= DblTested; + + for (k = 0; k < PixSize && z+k < iluCurImage->Depth; k++) { + for (j = 0; j < PixSize && y+j < iluCurImage->Height; j++) { + for (i = 0; i < PixSize && x+i < iluCurImage->Width; i++, DblTested++) { + if (RegionMask[r+i]) { + DblPtr[(z+k) * iluCurImage->SizeOfPlane + (y+j) + * iluCurImage->Bps + (x+i) * iluCurImage->Bpp + c] = + DblTotal; + } + } + } + } + } + } + } + } + iluCurImage->Bps *= 8; + break; + } + + ifree(RegionMask); + + return IL_TRUE; +} + + +// Everything here was taken from a tutorial on "Elementary Digital Filtering" +// by Ender Wiggen, found at http://www.gamedev.net/reference/programming/features/edf/ + +// Needs some SERIOUS optimization. +ILubyte *Filter(ILimage *Image, const ILint *matrix, ILint scale, ILint bias) +{ + ILint x, y, c, LastX, LastY, Offsets[9]; + ILuint i, Temp, z; + ILubyte *Data, *ImgData, *NewData, *RegionMask; + ILdouble Num; + + if (Image == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return NULL; + } + + Data = (ILubyte*)ialloc(Image->SizeOfData); + if (Data == NULL) { + return NULL; + } + + RegionMask = iScanFill(); + + // Preserve original data. + ImgData = Image->Data; + NewData = Data; + + for (z = 0; z < Image->Depth; z++) { + LastX = Image->Width - 1; + LastY = Image->Height - 1; + for (y = 1; y < LastY; y++) { + for (x = 1; x < LastX; x++) { + Offsets[4] = ((y ) * Image->Width + (x )) * Image->Bpp; + if (RegionMask) { + if (!RegionMask[y * Image->Width + x]) { + for (c = 0; c < Image->Bpp; c++) { + Data[Offsets[4]+c] = Image->Data[Offsets[4]+c]; + } + continue; + } + } + + Offsets[0] = ((y-1) * Image->Width + (x-1)) * Image->Bpp; + Offsets[1] = ((y-1) * Image->Width + (x )) * Image->Bpp; + Offsets[2] = ((y-1) * Image->Width + (x+1)) * Image->Bpp; + Offsets[3] = ((y ) * Image->Width + (x-1)) * Image->Bpp; + Offsets[5] = ((y ) * Image->Width + (x+1)) * Image->Bpp; + Offsets[6] = ((y+1) * Image->Width + (x-1)) * Image->Bpp; + Offsets[7] = ((y+1) * Image->Width + (x )) * Image->Bpp; + Offsets[8] = ((y+1) * Image->Width + (x-1)) * Image->Bpp; + + // Always has at least one, so get rid of all those +c's + Num = Image->Data[Offsets[0]] * matrix[0] + + Image->Data[Offsets[1]] * matrix[1]+ + Image->Data[Offsets[2]] * matrix[2]+ + Image->Data[Offsets[3]] * matrix[3]+ + Image->Data[Offsets[4]] * matrix[4]+ + Image->Data[Offsets[5]] * matrix[5]+ + Image->Data[Offsets[6]] * matrix[6]+ + Image->Data[Offsets[7]] * matrix[7]+ + Image->Data[Offsets[8]] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[Offsets[4]] = 255; + else + Data[Offsets[4]] = Temp; + + for (c = 1; c < Image->Bpp; c++) { + Num = Image->Data[Offsets[0]+c] * matrix[0]+ + Image->Data[Offsets[1]+c] * matrix[1]+ + Image->Data[Offsets[2]+c] * matrix[2]+ + Image->Data[Offsets[3]+c] * matrix[3]+ + Image->Data[Offsets[4]+c] * matrix[4]+ + Image->Data[Offsets[5]+c] * matrix[5]+ + Image->Data[Offsets[6]+c] * matrix[6]+ + Image->Data[Offsets[7]+c] * matrix[7]+ + Image->Data[Offsets[8]+c] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[Offsets[4]+c] = 255; + else + Data[Offsets[4]+c] = Temp; + } + } + } + + + // Copy 4 corners + for (c = 0; c < Image->Bpp; c++) { + Data[c] = Image->Data[c]; + Data[Image->Bps - Image->Bpp + c] = Image->Data[Image->Bps - Image->Bpp + c]; + Data[(Image->Height - 1) * Image->Bps + c] = Image->Data[(Image->Height - 1) * Image->Bps + c]; + Data[Image->Height * Image->Bps - Image->Bpp + c] = + Image->Data[Image->Height * Image->Bps - Image->Bpp + c]; + } + + + // If we only copy the edge pixels, then they receive no filtering, making them + // look out of place after several passes of an image. So we filter the edge + // rows/columns, duplicating the edge pixels for one side of the "matrix". + + // First row + for (x = 1; x < (ILint)Image->Width-1; x++) { + if (RegionMask) { + if (!RegionMask[x]) { + Data[y + x * Image->Bpp + c] = Image->Data[y + x * Image->Bpp + c]; + continue; + } + } + for (c = 0; c < Image->Bpp; c++) { + Num = Image->Data[(x-1) * Image->Bpp + c] * matrix[0] + + Image->Data[x * Image->Bpp + c] * matrix[1]+ + Image->Data[(x+1) * Image->Bpp + c] * matrix[2]+ + Image->Data[(x-1) * Image->Bpp + c] * matrix[3]+ + Image->Data[x * Image->Bpp + c] * matrix[4]+ + Image->Data[(x+1) * Image->Bpp + c] * matrix[5]+ + Image->Data[(Image->Width + (x-1)) * Image->Bpp + c] * matrix[6]+ + Image->Data[(Image->Width + (x )) * Image->Bpp + c] * matrix[7]+ + Image->Data[(Image->Width + (x-1)) * Image->Bpp + c] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[x * Image->Bpp + c] = 255; + else + Data[x * Image->Bpp + c] = Temp; + } + } + + // Last row + y = (Image->Height - 1) * Image->Bps; + for (x = 1; x < (ILint)Image->Width-1; x++) { + if (RegionMask) { + if (!RegionMask[(Image->Height - 1) * Image->Width + x]) { + Data[y + x * Image->Bpp + c] = Image->Data[y + x * Image->Bpp + c]; + continue; + } + } + for (c = 0; c < Image->Bpp; c++) { + Num = Image->Data[y - Image->Bps + (x-1) * Image->Bpp + c] * matrix[0] + + Image->Data[y - Image->Bps + x * Image->Bpp + c] * matrix[1]+ + Image->Data[y - Image->Bps + (x+1) * Image->Bpp + c] * matrix[2]+ + Image->Data[y + (x-1) * Image->Bpp + c] * matrix[3]+ + Image->Data[y + x * Image->Bpp + c] * matrix[4]+ + Image->Data[y + (x+1) * Image->Bpp + c] * matrix[5]+ + Image->Data[y + (x-1) * Image->Bpp + c] * matrix[6]+ + Image->Data[y + x * Image->Bpp + c] * matrix[7]+ + Image->Data[y + (x-1) * Image->Bpp + c] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[y + x * Image->Bpp + c] = 255; + else + Data[y + x * Image->Bpp + c] = Temp; + } + } + + // Left side + for (i = 1, y = Image->Bps; i < Image->Height-1; i++, y += Image->Bps) { + if (RegionMask) { + if (!RegionMask[y / Image->Bpp]) { + Data[y + c] = Image->Data[y + c]; + continue; + } + } + for (c = 0; c < Image->Bpp; c++) { + Num = Image->Data[y - Image->Bps + c] * matrix[0] + + Image->Data[y - Image->Bps + Image->Bpp + c] * matrix[1]+ + Image->Data[y - Image->Bps + 2 * Image->Bpp + c] * matrix[2]+ + Image->Data[y + c] * matrix[3]+ + Image->Data[y + Image->Bpp + c] * matrix[4]+ + Image->Data[y + 2 * Image->Bpp + c] * matrix[5]+ + Image->Data[y + Image->Bps + c] * matrix[6]+ + Image->Data[y + Image->Bps + Image->Bpp + c] * matrix[7]+ + Image->Data[y + Image->Bps + 2 * Image->Bpp + c] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[y + c] = 255; + else + Data[y + c] = Temp; + } + } + + // Right side + for (i = 1, y = Image->Bps * 2 - Image->Bpp; i < Image->Height-1; i++, y += Image->Bps) { + if (RegionMask) { + if (!RegionMask[y / Image->Bpp + (Image->Width - 1)]) { + for (c = 0; c < Image->Bpp; c++) { + Data[y + c] = Image->Data[y + c]; + } + continue; + } + } + for (c = 0; c < Image->Bpp; c++) { + Num = Image->Data[y - Image->Bps + c] * matrix[0] + + Image->Data[y - Image->Bps + Image->Bpp + c] * matrix[1]+ + Image->Data[y - Image->Bps + 2 * Image->Bpp + c] * matrix[2]+ + Image->Data[y + c] * matrix[3]+ + Image->Data[y + Image->Bpp + c] * matrix[4]+ + Image->Data[y + 2 * Image->Bpp + c] * matrix[5]+ + Image->Data[y + Image->Bps + c] * matrix[6]+ + Image->Data[y + Image->Bps + Image->Bpp + c] * matrix[7]+ + Image->Data[y + Image->Bps + 2 * Image->Bpp + c] * matrix[8]; + + Temp = (ILuint)fabs((Num / (ILdouble)scale) + bias); + if (Temp > 255) + Data[y + c] = 255; + else + Data[y + c] = Temp; + } + } + + // Go to next "plane". + Image->Data += Image->SizeOfPlane; + Data += Image->SizeOfPlane; + } + + ifree(RegionMask); + + // Restore original data. + Image->Data = ImgData; + Data = NewData; + + return Data; +} + + +ILboolean ILAPIENTRY iluEdgeDetectP() +{ + ILubyte *HPass, *VPass; + ILuint i; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + + HPass = Filter(iluCurImage, filter_h_prewitt, filter_h_prewitt_scale, filter_h_prewitt_bias); + VPass = Filter(iluCurImage, filter_v_prewitt, filter_v_prewitt_scale, filter_v_prewitt_bias); + if (!HPass || !VPass) { + ifree(HPass); + ifree(VPass); + return IL_FALSE; + } + + // Combine the two passes + // Optimization by Matt Denham + for (i = 0; i < iluCurImage->SizeOfData; i++) { + if (HPass[i] == 0) + iluCurImage->Data[i] = VPass[i]; + else if (VPass[i] == 0) + iluCurImage->Data[i] = HPass[i]; + else + iluCurImage->Data[i] = (ILubyte)sqrt((float)(HPass[i]*HPass[i]+VPass[i]*VPass[i])); + } + + /*for (i = 0; i < iluCurImage->SizeOfData; i++) { + iluCurImage->Data[i] = (ILubyte)sqrt(HPass[i]*HPass[i]+VPass[i]*VPass[i]); + }*/ + + ifree(HPass); + ifree(VPass); + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY iluEdgeDetectS() +{ + ILubyte *HPass, *VPass; + ILuint i; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + HPass = Filter(iluCurImage, filter_h_sobel, filter_h_sobel_scale, filter_h_sobel_bias); + VPass = Filter(iluCurImage, filter_v_sobel, filter_v_sobel_scale, filter_v_sobel_bias); + if (!HPass || !VPass) { + ifree(HPass); + ifree(VPass); + return IL_FALSE; + } + + // Combine the two passes + // Optimization by Matt Denham + for (i = 0; i < iluCurImage->SizeOfData; i++) { + if (HPass[i] == 0) + iluCurImage->Data[i] = VPass[i]; + else if (VPass[i] == 0) + iluCurImage->Data[i] = HPass[i]; + else + iluCurImage->Data[i] = (ILubyte)sqrt((float)(HPass[i]*HPass[i]+VPass[i]*VPass[i])); + } + + /*for (i = 0; i < iluCurImage->SizeOfData; i++) { + iluCurImage->Data[i] = (ILubyte)sqrt(HPass[i]*HPass[i]+VPass[i]*VPass[i]); + }*/ + + ifree(HPass); + ifree(VPass); + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter) +{ + ILubyte *Data; + ILuint i; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + for (i = 0; i < Iter; i++) { + Data = Filter(iluCurImage, filter_average, filter_average_scale, filter_average_bias); + if (!Data) + return IL_FALSE; + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + } + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter) +{ + ILubyte *Data; + ILuint i; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + for (i = 0; i < Iter; i++) { + Data = Filter(iluCurImage, filter_gaussian, filter_gaussian_scale, filter_gaussian_bias ); + if (!Data) + return IL_FALSE; + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + } + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY iluEmboss() +{ + ILubyte *Data; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + Data = Filter(iluCurImage, filter_emboss, filter_emboss_scale, filter_emboss_bias); + if (!Data) + return IL_FALSE; + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + +/*ILboolean ILAPIENTRY iluEmboss() +{ + ILuint x, y, c, i = 0; + ILubyte *Data; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Data = (ILubyte*)ialloc(iluCurImage->SizeOfData); + if (Data == NULL) { + return IL_FALSE; + } + + for (y = 0; y < iluCurImage->Height; y++, i += iluCurImage->Bps) { + for (x = 0; x < (ILint)iluCurImage->Bps - iluCurImage->Bpp; x += iluCurImage->Bpp) { + for (c = 0; c < iluCurImage->Bpp; c++) { + Data[i+x+c] = iluCurImage->Data[i+x+c] - iluCurImage->Data[i+iluCurImage->Bpp+c] + 128; + } + } + Data[i+x] = 128; + } + + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + + return IL_TRUE; +}*/ + + +ILboolean ILAPIENTRY iluEdgeDetectE() +{ + ILubyte *Data; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + Data = Filter(iluCurImage, filter_embossedge, filter_embossedge_scale, filter_embossedge_bias); + if (!Data) + return IL_FALSE; + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + +ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale) +{ + ILuint i; + ILint alpha; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if( (iluCurImage->Format != IL_COLOUR_INDEX) && (iluCurImage->Type != IL_BYTE) ) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + switch (iluCurImage->Format) + { + case IL_BGRA: + case IL_RGBA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + alpha = (ILint)(iluCurImage->Data[i+3] * scale); + if (alpha > UCHAR_MAX) alpha = UCHAR_MAX; + if (alpha < 0) alpha = 0; + iluCurImage->Data[i+3] = (ILubyte)alpha; + } + break; + + case IL_COLOUR_INDEX: + switch (iluCurImage->Pal.PalType) + { + case IL_PAL_RGBA32: + case IL_PAL_BGRA32: + for (i = 0; i < iluCurImage->Pal.PalSize; i += ilGetInteger(IL_PALETTE_BPP)) { + alpha = (ILint)(iluCurImage->Pal.Palette[i+3] * scale); + if (alpha > UCHAR_MAX) alpha = UCHAR_MAX; + if (alpha < 0) alpha = 0; + iluCurImage->Pal.Palette[i+3] = (ILubyte)alpha; + } + break; + + default: + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + break; + + default: + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + return IL_TRUE; +} + +// Everything here was taken from "Grafica Obscura", +// found at http://www.sgi.com/grafica/matrix/index.html + + +// @TODO: fast float to byte +//! Scales image colours +ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b) { + ILuint i; + ILint red, grn, blu, grey; + ILushort *ShortPtr; + ILuint *IntPtr, NumPix; + ILdouble *DblPtr; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if( (iluCurImage->Format != IL_COLOUR_INDEX) && (iluCurImage->Type != IL_BYTE) ) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + switch (iluCurImage->Format) + { + case IL_RGB: + case IL_RGBA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + red = (ILint)(iluCurImage->Data[i] * r); + grn = (ILint)(iluCurImage->Data[i+1] * g); + blu = (ILint)(iluCurImage->Data[i+2] * b); + if (red > UCHAR_MAX) red = UCHAR_MAX; + if (red < 0) red = 0; + if (grn > UCHAR_MAX) grn = UCHAR_MAX; + if (grn < 0) grn = 0; + if (blu > UCHAR_MAX) blu = UCHAR_MAX; + if (blu < 0) blu = 0; + iluCurImage->Data[i] = (ILubyte)red; + iluCurImage->Data[i+1] = (ILubyte)grn; + iluCurImage->Data[i+2] = (ILubyte)blu; + } + break; + + case IL_BGR: + case IL_BGRA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + red = (ILint)(iluCurImage->Data[i+2] * r); + grn = (ILint)(iluCurImage->Data[i+1] * g); + blu = (ILint)(iluCurImage->Data[i] * b); + if (red > UCHAR_MAX) red = UCHAR_MAX; + if (red < 0) red = 0; + if (grn > UCHAR_MAX) grn = UCHAR_MAX; + if (grn < 0) grn = 0; + if (blu > UCHAR_MAX) blu = UCHAR_MAX; + if (blu < 0) blu = 0; + iluCurImage->Data[i+2] = (ILubyte)red; + iluCurImage->Data[i+1] = (ILubyte)grn; + iluCurImage->Data[i] = (ILubyte)blu; + } + break; + + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + NumPix = iluCurImage->SizeOfData / (iluCurImage->Bpc*iluCurImage->Bpp); + switch (iluCurImage->Bpc) { + case 1: + for (i = 0; i < NumPix; i+=iluCurImage->Bpp) { + grey = (ILint)(iluCurImage->Data[i] * r); + if (grey > UCHAR_MAX) grey = UCHAR_MAX; + if (grey < 0) grey = 0; + iluCurImage->Data[i] = (ILubyte)grey; + } + break; + + case 2: + ShortPtr = (ILushort*)iluCurImage->Data; + for (i = 0; i < NumPix; i+=iluCurImage->Bpp) { + grey = (ILint)(ShortPtr[i] * r); + if (grey > USHRT_MAX) grey = USHRT_MAX; + if (grey < 0) grey = 0; + ShortPtr[i] = (ILushort)grey; + } + break; + + case 4: + IntPtr = (ILuint*)iluCurImage->Data; + for (i = 0; i < NumPix; i+=iluCurImage->Bpp) { + grey = (ILint)(IntPtr[i] * r); + if (grey < 0) grey = 0; + IntPtr[i] = (ILuint)grey; + } + break; + + case 8: + DblPtr = (ILdouble*)iluCurImage->Data; + for (i = 0; i < NumPix; i+=iluCurImage->Bpp) { + DblPtr[i] = DblPtr[i] * r; + } + break; + } + break; + + case IL_COLOUR_INDEX: + switch (iluCurImage->Pal.PalType) + { + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + for (i = 0; i < iluCurImage->Pal.PalSize; i += ilGetInteger(IL_PALETTE_BPP)) { + red = (ILint)(iluCurImage->Pal.Palette[i] * r); + grn = (ILint)(iluCurImage->Pal.Palette[i+1] * g); + blu = (ILint)(iluCurImage->Pal.Palette[i+2] * b); + if (red > UCHAR_MAX) red = UCHAR_MAX; + if (red < 0) red = 0; + if (grn > UCHAR_MAX) grn = UCHAR_MAX; + if (grn < 0) grn = 0; + if (blu > UCHAR_MAX) blu = UCHAR_MAX; + if (blu < 0) blu = 0; + iluCurImage->Pal.Palette[i] = (ILubyte)red; + iluCurImage->Pal.Palette[i+1] = (ILubyte)grn; + iluCurImage->Pal.Palette[i+2] = (ILubyte)blu; + } + break; + + case IL_PAL_BGR24: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + for (i = 0; i < iluCurImage->Pal.PalSize; i += ilGetInteger(IL_PALETTE_BPP)) { + red = (ILint)(iluCurImage->Pal.Palette[i+2] * r); + grn = (ILint)(iluCurImage->Pal.Palette[i+1] * g); + blu = (ILint)(iluCurImage->Pal.Palette[i] * b); + if (red > UCHAR_MAX) red = UCHAR_MAX; + if (red < 0) red = 0; + if (grn > UCHAR_MAX) grn = UCHAR_MAX; + if (grn < 0) grn = 0; + if (blu > UCHAR_MAX) blu = UCHAR_MAX; + if (blu < 0) blu = 0; + iluCurImage->Pal.Palette[i+2] = (ILubyte)red; + iluCurImage->Pal.Palette[i+1] = (ILubyte)grn; + iluCurImage->Pal.Palette[i] = (ILubyte)blu; + } + break; + + + default: + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + break; + + default: + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + return IL_TRUE; +} + + +/*ILboolean ILAPIENTRY iluGammaCorrectScale(ILfloat Gamma) +{ + return iluScaleColours(Gamma, Gamma, Gamma); +}*/ + + +ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma) +{ + ILfloat Table[256]; + ILuint i, NumPix; + ILushort *ShortPtr; + ILuint *IntPtr; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + for (i = 0; i < 256; i++) { + Table[i] = (ILfloat)pow(i / 255.0, 1.0 / Gamma); + } + + // Do we need to clamp here? + if (iluCurImage->Format == IL_COLOUR_INDEX) { + for (i = 0; i < iluCurImage->Pal.PalSize; i++) { + iluCurImage->Pal.Palette[i] = (ILubyte)(Table[iluCurImage->Pal.Palette[i]] * 255); + } + } + else { + // Not too sure if this is the correct way of handling multiple bpc's. + switch (iluCurImage->Bpc) + { + case 1: + for (i = 0; i < iluCurImage->SizeOfData; i++) { + iluCurImage->Data[i] = (ILubyte)(Table[iluCurImage->Data[i]] * UCHAR_MAX); + } + break; + case 2: + NumPix = iluCurImage->SizeOfData / 2; + ShortPtr = (ILushort*)iluCurImage->Data; + for (i = 0; i < NumPix; i++) { + ShortPtr[i] = (ILushort)(Table[ShortPtr[i] >> 8] * USHRT_MAX); + } + break; + case 4: + NumPix = iluCurImage->SizeOfData / 4; + IntPtr = (ILuint*)iluCurImage->Data; + for (i = 0; i < NumPix; i++) { + IntPtr[i] = (ILuint)(Table[IntPtr[i] >> 24] * UINT_MAX); + } + break; + } + } + + return IL_TRUE; +} + + +// +// Colour matrix stuff follows +// --------------------------- +// + + +void iApplyMatrix(ILimage *Image, ILfloat Mat[4][4]) +{ + ILubyte *Data = Image->Data; + ILuint i; + ILubyte r, g, b; + + switch (Image->Format) + { + case IL_RGB: + case IL_RGBA: + for (i = 0; i < Image->SizeOfData; ) { + r = (ILubyte)(Data[i] * Mat[0][0] + Data[i+1] * Mat[1][0] + + Data[i+2] * Mat[2][0]);// + Mat[3][0]); + g = (ILubyte)(Data[i] * Mat[0][1] + Data[i+1] * Mat[1][1] + + Data[i+2] * Mat[2][1]);// + Mat[3][1]); + b = (ILubyte)(Data[i] * Mat[0][2] + Data[i+1] * Mat[1][2] + + Data[i+2] * Mat[2][2]);// + Mat[3][2]); + Data[i] = r; + Data[i+1] = g; + Data[i+2] = b; + i += Image->Bpp; + } + break; + + case IL_BGR: + case IL_BGRA: + for (i = 0; i < Image->SizeOfData; ) { + r = (ILubyte)(Data[i] * Mat[0][2] + Data[i+1] * Mat[1][2] + + Data[i+2] * Mat[2][2]);// + Mat[3][2]); + g = (ILubyte)(Data[i] * Mat[0][1] + Data[i+1] * Mat[1][1] + + Data[i+2] * Mat[2][1]);// + Mat[3][1]); + b = (ILubyte)(Data[i] * Mat[0][0] + Data[i+1] * Mat[1][0] + + Data[i+2] * Mat[2][0]);// + Mat[3][0]); + Data[i] = b; + Data[i+1] = g; + Data[i+2] = r; + i += Image->Bpp; + } + break; + + default: + ilSetError(ILU_ILLEGAL_OPERATION); + return; + } + + return; +} + + +void iIdentity(ILfloat *Matrix) +{ + *Matrix++ = 1.0; // row 1 + *Matrix++ = 0.0; + *Matrix++ = 0.0; + //*Matrix++ = 0.0; + *Matrix++ = 0.0; // row 2 + *Matrix++ = 1.0; + *Matrix++ = 0.0; + //*Matrix++ = 0.0; + *Matrix++ = 0.0; // row 3 + *Matrix++ = 0.0; + *Matrix++ = 1.0; + //*Matrix++ = 0.0; + /**Matrix++ = 0.0; // row 4 + *Matrix++ = 0.0; + *Matrix++ = 0.0; + *Matrix++ = 1.0;*/ +} + + +ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation) +{ + return iluSaturate4f(0.3086f, 0.6094f, 0.0820f, Saturation); +} + + +ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation) +{ + ILfloat Mat[4][4]; + ILfloat s = Saturation; + + Mat[0][0] = (1.0f - s) * r + s; + Mat[0][1] = (1.0f - s) * r; + Mat[0][2] = (1.0f - s) * r; + Mat[0][3] = 0.0f; + + Mat[1][0] = (1.0f - s) * g; + Mat[1][1] = (1.0f - s) * g + s; + Mat[1][2] = (1.0f - s) * g; + Mat[1][3] = 0.0f; + + Mat[2][0] = (1.0f - s) * b; + Mat[2][1] = (1.0f - s) * b; + Mat[2][2] = (1.0f - s) * b + s; + Mat[2][3] = 0.0f; + + Mat[3][0] = 0.0f; + Mat[3][1] = 0.0f; + Mat[3][2] = 0.0f; + Mat[3][3] = 1.0f; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iApplyMatrix(iluCurImage, Mat); + + return IL_TRUE; +} + + + +//! Funny as hell filter that I stumbled upon accidentally +ILboolean ILAPIENTRY iluAlienify(void) +{ + ILfloat Mat[3][3]; + ILubyte *Data; + ILuint i; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + Data = iluCurImage->Data; + + iIdentity((ILfloat*)Mat); + + switch (iluCurImage->Format) + { + case IL_BGR: + case IL_BGRA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + Data[i+2] = (ILubyte)(Data[i] * Mat[0][0] + Data[i+1] * Mat[1][0] + + Data[i+2] * Mat[2][0]);// + Mat[3][0]); + Data[i+1] = (ILubyte)(Data[i] * Mat[0][1] + Data[i+1] * Mat[1][1] + + Data[i+2] * Mat[2][1]);// + Mat[3][1]); + Data[i] = (ILubyte)(Data[i] * Mat[0][2] + Data[i+1] * Mat[1][2] + + Data[i+2] * Mat[2][2]);// + Mat[3][2]); + } + break; + + case IL_RGB: + case IL_RGBA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + Data[i] = (ILubyte)(Data[i] * Mat[0][2] + Data[i+1] * Mat[1][2] + + Data[i+2] * Mat[2][2]);// + Mat[3][2]); + Data[i+1] = (ILubyte)(Data[i] * Mat[0][1] + Data[i+1] * Mat[1][1] + + Data[i+2] * Mat[2][1]);// + Mat[3][1]); + Data[i+2] = (ILubyte)(Data[i] * Mat[0][0] + Data[i+1] * Mat[1][0] + + Data[i+2] * Mat[2][0]);// + Mat[3][0]); + } + break; + + default: + //ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + return IL_TRUE; +} + + + + +// Everything here was taken from +// http://bae.fse.missouri.edu/luw/course/image/project1/project1.html +// and http://www.sgi.com/grafica/interp/index.html + + + +void iIntExtImg(ILimage *Image1, ILimage *Image2, ILfloat a) +{ + ILuint i; + ILint d; + ILubyte *Data1, *Data2; + + Data1 = Image1->Data; + Data2 = Image2->Data; + + for (i = 0; i < Image2->SizeOfData; i++) { + d = (ILint)((1 - a) * *Data1 + a * *Data2); + // Limit a pixel value to the range [0, 255] + if (d < 0) + d = 0; + else if (d > 255) + d = 255; + *Data2 = d; + + Data1++; + Data2++; + } + + return; +} + + +// Works best when Gamma is in the range [0.0, 2.0]. +/*ILboolean ILAPIENTRY iluGammaCorrectInter(ILfloat Gamma) +{ + ILimage *Black; + ILuint i; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Black = ilNewImage(iluCurImage->Width, iluCurImage->Height, iluCurImage->Depth, iluCurImage->Bpp, iluCurImage->Bpc); + if (Black == NULL) { + return IL_FALSE; + } + + // Make Black all 0's + for (i = 0; i < Black->SizeOfData; i++) { + Black->Data[i] = 0; + } + + iIntExtImg(Black, iluCurImage, Gamma); + ilCloseImage(Black); + + return IL_TRUE; +}*/ + + +// Works best when Contrast is in the range [-0.5, 1.7]. +ILboolean ILAPIENTRY iluContrast(ILfloat Contrast) +{ + ILimage *Grey; + ILuint i; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(IL_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Grey = ilNewImage(iluCurImage->Width, iluCurImage->Height, iluCurImage->Depth, iluCurImage->Bpp, iluCurImage->Bpc); + if (Grey == NULL) { + return IL_FALSE; + } + + // Make Grey all 127's + for (i = 0; i < Grey->SizeOfData; i++) { + Grey->Data[i] = 127; + } + + iIntExtImg(Grey, iluCurImage, Contrast); + ilCloseImage(Grey); + + return IL_TRUE; +} + + +// Sharpens when Factor is in the range [1.0, 2.5]. +// Blurs when Factor is in the range [0.0, 1.0]. +ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter) +{ + ILimage *Blur, *CurImage; // iluBlur() changes iluCurImage + ILuint i; + + CurImage = ilGetCurImage(); + if (CurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Blur = ilNewImage(CurImage->Width, CurImage->Height, CurImage->Depth, CurImage->Bpp, CurImage->Bpc); + if (Blur == NULL) { + return IL_FALSE; + } + ilCopyImageAttr(Blur, CurImage); + + ilCopyPixels(0, 0, 0, CurImage->Width, CurImage->Height, 1, CurImage->Format, CurImage->Type, Blur->Data); + ilSetCurImage(Blur); + iluBlurGaussian(1); + + for (i = 0; i < Iter; i++) { + iIntExtImg(Blur, CurImage, Factor); + } + + ilCloseImage(Blur); + ilSetCurImage(CurImage); + + return IL_TRUE; +} + + +ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias) { + ILubyte *Data; + ILboolean Palette = IL_FALSE, Converted = IL_FALSE; + ILenum Type = 0; + ILimage *iluCurImage = ilGetCurImage(); + + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + Palette = IL_TRUE; + ilConvertImage(ilGetPalBaseType(iluCurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } else if (iluCurImage->Type > IL_UNSIGNED_BYTE) { + Converted = IL_TRUE; + Type = iluCurImage->Type; + ilConvertImage(iluCurImage->Format, IL_UNSIGNED_BYTE); + } + + Data = Filter(iluCurImage, matrix, scale, bias); + if (!Data) + return IL_FALSE; + ifree(iluCurImage->Data); + iluCurImage->Data = Data; + + if (Palette) + ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + else if (Converted) + ilConvertImage(iluCurImage->Format, Type); + + return IL_TRUE; +} + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_filter_rcg.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_filter_rcg.c new file mode 100644 index 00000000..3bad4cca --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_filter_rcg.c @@ -0,0 +1,491 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 10/12/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_filter_rcg.c +// +// Description: Scales an image. Based on the Graphic Gems III source. +// +//----------------------------------------------------------------------------- + + +/* + * Filtered Image Rescaling + * + * by Dale Schumacher + * + */ + +/* + Additional changes by Ray Gardener, Daylon Graphics Ltd. + December 4, 1999 + + Summary: + + - Horizontal filter contributions are calculated on the fly, + as each column is mapped from src to dst image. This lets + us omit having to allocate a temporary full horizontal stretch + of the src image. + + - If none of the src pixels within a sampling region differ, + then the output pixel is forced to equal (any of) the source pixel. + This ensures that filters do not corrupt areas of constant color. + + - Filter weight contribution results, after summing, are + rounded to the nearest pixel color value instead of + being casted to ILubyte (usually an int or char). Otherwise, + artifacting occurs. + + - All memory allocations checked for failure; zoom() returns + error code. new_image() returns NULL if unable to allocate + pixel storage, even if Image struct can be allocated. + Some assertions added. + + - load_image(), save_image() take filenames, not file handles. + + - TGA bitmap format available. If you want to add a filetype, + extend the gImageHandlers array, and factor in your load_image_xxx() + and save_image_xxx() functions. Search for string 'add your' + to find appropriate code locations. + + - The 'input' and 'output' command-line arguments do not have + to specify .bm files; any supported filetype is okay. + + - Added implementation of getopt() if compiling under Windows. +*/ + +#include +#include +#include +//#include +#include + +#include "ilu_internal.h" +#include "ilu_filter.h" +#include "ilu_states.h" + +#define filter_support (1.0) +double filter( double t) { + /* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */ + if(t < 0.0) t = -t; + if(t < 1.0) return((2.0 * t - 3.0) * t * t + 1.0); + return(0.0); +} + +#define box_support (0.5) + +double box_filter( double t) { + if((t > -0.5) && (t <= 0.5)) return(1.0); + return(0.0); +} + +#define triangle_support (1.0) +double triangle_filter( double t ) { + if(t < 0.0) t = -t; + if(t < 1.0) return(1.0 - t); + return(0.0); +} + +#define bell_support (1.5) + +double bell_filter( double t ) { + if(t < 0) t = -t; + if(t < .5) return(.75 - (t * t)); + if(t < 1.5) { + t = (t - 1.5); + return(.5 * (t * t)); + } + return(0.0); +} + +#define B_spline_support (2.0) + +#define FRAC_2_3 0.6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 +#define FRAC_1_6 0.1666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667 + +double B_spline_filter( double t ) { /* box (*) box (*) box (*) box */ + double tt; + + if(t < 0) t = -t; + if(t < 1) { + tt = t * t; + return((.5 * tt * t) - tt + (2.0 / 3.0)); + } else if(t < 2) { + t = 2 - t; + return((1.0 / 6.0) * (t * t * t)); + } + return(0.0); +} + +double sinc( double x) { + x *= IL_PI; + if(x != 0) return(sin(x) / x); + return(1.0); +} + +#define Lanczos3_support (3.0) +double Lanczos3_filter( double t ) { + if(t < 0) t = -t; + if(t < 3.0) return(sinc(t) * sinc(t/3.0)); + return(0.0); +} + +#define Mitchell_support (2.0) + +#define B (1.0 / 3.0) +#define C (1.0 / 3.0) + +double Mitchell_filter( double t ) { + double tt; + + tt = t * t; + if(t < 0) t = -t; + if(t < 1.0) { + t = (((12.0 - 9.0 * B - 6.0 * C) * (t * tt)) + + ((-18.0 + 12.0 * B + 6.0 * C) * tt) + + (6.0 - 2 * B)); + return(t / 6.0); + } else if(t < 2.0) { + t = (((-1.0 * B - 6.0 * C) * (t * tt)) + + ((6.0 * B + 30.0 * C) * tt) + + ((-12.0 * B - 48.0 * C) * t) + + (8.0 * B + 24 * C)); + return(t / 6.0); + } + return(0.0); +} + + +int roundcloser(double d) { + int n = (int) d; + double diff = d - (double)n; + if(diff < 0) + diff = -diff; + if(diff >= 0.5) + { + if(d < 0) + n--; + else + n++; + } + return n; +} + +int wrap_filter_sample(int i, int size) { + int j; + j = i % (size * 2); + if (j < 0) + j += (size * 2); + if (j < size) + return j; + return 2 * size - j - 1; +} + +/*char _Program[] = "fzoom"; +char _Version[] = "0.30"; +char _Copyright[] = "Public Domain 1991 by Dale Schumacher. Mods by Ray Gardener";*/ + + +/* Note: if you define ILubyte to something bigger than char, + you may need to add more support in bitmap file I/O functions. +*/ + +#define WHITE_PIXEL (255) +#define BLACK_PIXEL (0) + +#define CLAMP(v,l,h) ((v)<(l) ? (l) : (v) > (h) ? (h) : v) + +static ILuint c; // Current colour plane offset + +typedef struct { + int pixel; + double weight; +} CONTRIB; + +typedef struct { + int n; /* number of contributors */ + CONTRIB *p; /* pointer to list of contributions */ +} CLIST; + +CLIST *contrib; /* array of contribution lists */ + +/* + * generic image access and i/o support routines + */ + +/* + calc_x_contrib() + + Calculates the filter weights for a single target column. + contribX->p must be freed afterwards. + + Returns -1 if error, 0 otherwise. +*/ +int calc_x_contrib( CLIST *contribX, double xscale, double fwidth, int dstwidth, int srcwidth, double (*filterf)(double), int i) { + double width; + double fscale; + double center, left, right; + double weight; + int j, k, n; + + if(xscale < 1.0) + { + /* Shrinking image */ + width = fwidth / xscale; + fscale = 1.0 / xscale; + + contribX->n = 0; + contribX->p = (CONTRIB *)icalloc((int) (width * 2 + 1), + sizeof(CONTRIB)); + if (contribX->p == NULL) { + return -1; + } + + center = (double) i / xscale; + left = ceil(center - width); + right = floor(center + width); + for(j = (int)left; j <= right; ++j) + { + weight = center - (double) j; + weight = (*filterf)(weight / fscale) / fscale; + n = wrap_filter_sample(j, srcwidth); + + k = contribX->n++; + contribX->p[k].pixel = n; + contribX->p[k].weight = weight; + } + + } + else + { + /* Expanding image */ + contribX->n = 0; + contribX->p = (CONTRIB*)icalloc((int) (fwidth * 2 + 1), + sizeof(CONTRIB)); + if (contribX->p == NULL) { + return -1; + } + center = (double) i / xscale; + left = ceil(center - fwidth); + right = floor(center + fwidth); + + for(j = (int)left; j <= right; ++j) + { + weight = center - (double) j; + weight = (*filterf)(weight); + n = wrap_filter_sample(j, srcwidth); + k = contribX->n++; + contribX->p[k].pixel = n; + contribX->p[k].weight = weight; + } + } + return 0; +} /* calc_x_contrib */ + + +/* + zoom() + + Resizes bitmaps while resampling them. + Returns -1 if error, 0 if success. +*/ +int zoom( ILimage *dst, ILimage *src, double (*filterf)(double), double fwidth) { + ILubyte* tmp; + double xscale, yscale; /* zoom scale factors */ + int xx; + int i, j, k; /* loop variables */ + int n; /* pixel number */ + double center, left, right; /* filter calculation variables */ + double width, fscale, weight; /* filter calculation variables */ + ILubyte pel, pel2; + int bPelDelta; + CLIST *contribY; /* array of contribution lists */ + CLIST contribX; + int nRet = -1; + + /* create intermediate column to hold horizontal dst column zoom */ + tmp = (ILubyte*)ialloc(src->Height * sizeof(ILubyte)); + if (tmp == NULL) { + return 0; + } + + xscale = (double) dst->Width / (double) src->Width; + + /* Build y weights */ + /* pre-calculate filter contributions for a column */ + contribY = (CLIST*)icalloc(dst->Height, sizeof(CLIST)); + if (contribY == NULL) { + ifree(tmp); + return -1; + } + + yscale = (double) dst->Height / (double) src->Height; + + if(yscale < 1.0) + { + width = fwidth / yscale; + fscale = 1.0 / yscale; + for(i = 0; i < (ILint)dst->Height; ++i) + { + contribY[i].n = 0; + contribY[i].p = (CONTRIB*)icalloc((int) (width * 2 + 1), + sizeof(CONTRIB)); + if(contribY[i].p == NULL) { + ifree(tmp); + ifree(contribY); + return -1; + } + center = (double) i / yscale; + left = ceil(center - width); + right = floor(center + width); + for(j = (int)left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight / fscale) / fscale; + n = wrap_filter_sample(j, src->Height); + k = contribY[i].n++; + contribY[i].p[k].pixel = n; + contribY[i].p[k].weight = weight; + } + } + } else { + for(i = 0; i < (ILint)dst->Height; ++i) { + contribY[i].n = 0; + contribY[i].p = (CONTRIB*)icalloc((int) (fwidth * 2 + 1), + sizeof(CONTRIB)); + if (contribY[i].p == NULL) { + ifree(tmp); + ifree(contribY); + return -1; + } + center = (double) i / yscale; + left = ceil(center - fwidth); + right = floor(center + fwidth); + for(j = (int)left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight); + n = wrap_filter_sample(j, src->Height); + k = contribY[i].n++; + contribY[i].p[k].pixel = n; + contribY[i].p[k].weight = weight; + } + } + } + + + for(xx = 0; xx < (ILint)dst->Width; xx++) + { + if(0 != calc_x_contrib(&contribX, xscale, fwidth, + dst->Width, src->Width, filterf, xx)) + { + goto __zoom_cleanup; + } + /* Apply horz filter to make dst column in tmp. */ + for(k = 0; k < (ILint)src->Height; ++k) + { + weight = 0.0; + bPelDelta = IL_FALSE; + // Denton: Put get_pixel source here + //pel = get_pixel(src, contribX.p[0].pixel, k); + pel = src->Data[k * src->Bps + contribX.p[0].pixel * src->Bpp + c]; + for(j = 0; j < contribX.n; ++j) + { + // Denton: Put get_pixel source here + //pel2 = get_pixel(src, contribX.p[j].pixel, k); + pel2 = src->Data[k * src->Bps + contribX.p[j].pixel * src->Bpp + c]; + if(pel2 != pel) + bPelDelta = IL_TRUE; + weight += pel2 * contribX.p[j].weight; + } + weight = bPelDelta ? roundcloser(weight) : pel; + + tmp[k] = (ILubyte)CLAMP(weight, BLACK_PIXEL, WHITE_PIXEL); + } /* next row in temp column */ + + ifree(contribX.p); + + /* The temp column has been built. Now stretch it + vertically into dst column. */ + for(i = 0; i < (ILint)dst->Height; ++i) + { + weight = 0.0; + bPelDelta = IL_FALSE; + pel = tmp[contribY[i].p[0].pixel]; + + for(j = 0; j < contribY[i].n; ++j) + { + pel2 = tmp[contribY[i].p[j].pixel]; + if(pel2 != pel) + bPelDelta = IL_TRUE; + weight += pel2 * contribY[i].p[j].weight; + } + weight = bPelDelta ? roundcloser(weight) : pel; + // Denton: Put set_pixel source here + //put_pixel(dst, xx, i, (ILubyte)CLAMP(weight, BLACK_PIXEL, WHITE_PIXEL)); + dst->Data[i * dst->Bps + xx * dst->Bpp + c] = + (ILubyte)CLAMP(weight, BLACK_PIXEL, WHITE_PIXEL); + } /* next dst row */ + } /* next dst column */ + nRet = 0; /* success */ + +__zoom_cleanup: + ifree(tmp); + + // Free the memory allocated for vertical filter weights + for (i = 0; i < (ILint)dst->Height; ++i) + ifree(contribY[i].p); + ifree(contribY); + + return nRet; +} /* zoom */ + + +ILuint iluScaleAdvanced(ILuint Width, ILuint Height, ILenum Filter) +{ + double (*f)(double) = filter; + double s = filter_support; + ILimage *Dest; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Not supported yet. + if (iluCurImage->Type != IL_UNSIGNED_BYTE || + iluCurImage->Format == IL_COLOUR_INDEX || + iluCurImage->Depth > 1) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + switch (Filter) + { + case ILU_SCALE_BOX: f=box_filter; s=box_support; break; + case ILU_SCALE_TRIANGLE: f=triangle_filter; s=triangle_support; break; + case ILU_SCALE_BELL: f=bell_filter; s=bell_support; break; + case ILU_SCALE_BSPLINE: f=B_spline_filter; s=B_spline_support; break; + case ILU_SCALE_LANCZOS3: f=Lanczos3_filter; s=Lanczos3_support; break; + case ILU_SCALE_MITCHELL: f=Mitchell_filter; s=Mitchell_support; break; + //case 'h': f=filter; s=filter_support; break; + } + + Dest = ilNewImage(Width, Height, 1, iluCurImage->Bpp, 1); + Dest->Origin = iluCurImage->Origin; + Dest->Duration = iluCurImage->Duration; + for (c = 0; c < (ILuint)iluCurImage->Bpp; c++) { + if (zoom(Dest, iluCurImage, f, s) != 0) { + return IL_FALSE; + } + } + + ilTexImage(Width, Height, 1, iluCurImage->Bpp, iluCurImage->Format, iluCurImage->Type, Dest->Data); + iluCurImage->Origin = Dest->Origin; + iluCurImage->Duration = Dest->Duration; + ilCloseImage(Dest); + + return IL_TRUE; +} + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_internal.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_internal.c new file mode 100644 index 00000000..d1ef2380 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_internal.c @@ -0,0 +1,9 @@ + +#define ILU_INTERNAL_C + +#include "ilu_internal.h" + +const ILdouble IL_PI = 3.1415926535897932384626; +const ILdouble IL_DEGCONV = 0.0174532925199432957692; +ILimage *iluCurImage = NULL; + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_main.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_main.c new file mode 100644 index 00000000..79697ed2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_main.c @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/20/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_main.c +// +// Description: Startup functions +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_states.h" +#ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN + #include +#endif//_WIN32 + +#ifdef _WIN32 + #if (defined(IL_USE_PRAGMA_LIBS)) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #pragma comment(lib, "DevIL.lib") + #endif + #endif +#endif + +/* Only needed for MSVC++ unless extended to actually do something =) */ +#if defined(_WIN32) && defined(_MSC_VER) + +#ifndef IL_STATIC_LIB +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + hModule; ul_reason_for_call; lpReserved; + + if (ul_reason_for_call == DLL_PROCESS_ATTACH) { + //iluInit(); + } + + return TRUE; +} + +#endif +#endif + +void ILAPIENTRY iluInit() +{ + // Used mostly for rotations + //IL_PI = 4 * atan(1); // precomputed value of pi + //IL_DEGCONV = IL_PI / 180; // division is slow on some computers + + iluSetLanguage(ILU_ENGLISH); + return; +} + + +//#ifndef _WIN32_WCE +ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName) +{ + ILuint Id; + ilGenImages(1, &Id); + if (Id == 0) + return 0; + if (!ilLoadImage(FileName)) { + ilDeleteImages(1, &Id); + return 0; + } + return Id; +} +//#endif//_WIN32_WCE diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_manip.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_manip.c new file mode 100644 index 00000000..bf6d55b7 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_manip.c @@ -0,0 +1,905 @@ + +#include "ilu_internal.h" +#include "ilu_states.h" +#include +#include + + +ILboolean iluCrop2D(ILuint XOff, ILuint YOff, ILuint Width, ILuint Height) { + ILuint x, y, c, OldBps; + ILubyte *Data; + ILenum Origin; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Uh-oh, what about 0 dimensions?! + if (Width > iluCurImage->Width || Height > iluCurImage->Height) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Data = (ILubyte*)ialloc(iluCurImage->SizeOfData); + if (Data == NULL) { + return IL_FALSE; + } + + OldBps = iluCurImage->Bps; + Origin = iluCurImage->Origin; + ilCopyPixels(0, 0, 0, iluCurImage->Width, iluCurImage->Height, 1, iluCurImage->Format, iluCurImage->Type, Data); + if (!ilTexImage(Width, Height, iluCurImage->Depth, iluCurImage->Bpp, iluCurImage->Format, iluCurImage->Type, NULL)) { + free(Data); + return IL_FALSE; + } + iluCurImage->Origin = Origin; + + // @TODO: Optimize! (Especially XOff * iluCurImage->Bpp...get rid of it!) + for (y = 0; y < iluCurImage->Height; y++) { + for (x = 0; x < iluCurImage->Bps; x += iluCurImage->Bpp) { + for (c = 0; c < iluCurImage->Bpp; c++) { + iluCurImage->Data[y * iluCurImage->Bps + x + c] = + Data[(y + YOff) * OldBps + x + XOff * iluCurImage->Bpp + c]; + } + } + } + + ifree(Data); + + return IL_TRUE; +} + + +ILboolean iluCrop3D(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth) +{ + ILuint x, y, z, c, OldBps, OldPlane; + ILubyte *Data; + ILenum Origin; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Uh-oh, what about 0 dimensions?! + if (Width > iluCurImage->Width || Height > iluCurImage->Height || Depth > iluCurImage->Depth) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Data = (ILubyte*)ialloc(iluCurImage->SizeOfData); + if (Data == NULL) { + return IL_FALSE; + } + + OldBps = iluCurImage->Bps; + OldPlane = iluCurImage->SizeOfPlane; + Origin = iluCurImage->Origin; + ilCopyPixels(0, 0, 0, iluCurImage->Width, iluCurImage->Height, iluCurImage->Depth, iluCurImage->Format, iluCurImage->Type, Data); + if (!ilTexImage(Width - XOff, Height - YOff, Depth - ZOff, iluCurImage->Bpp, iluCurImage->Format, iluCurImage->Type, NULL)) { + ifree(Data); + } + iluCurImage->Origin = Origin; + + for (z = 0; z < iluCurImage->Depth; z++) { + for (y = 0; y < iluCurImage->Height; y++) { + for (x = 0; x < iluCurImage->Bps; x += iluCurImage->Bpp) { + for (c = 0; c < iluCurImage->Bpp; c++) { + iluCurImage->Data[z * iluCurImage->SizeOfPlane + y * iluCurImage->Bps + x + c] = + Data[(z + ZOff) * OldPlane + (y + YOff) * OldBps + (x + XOff) + c]; + } + } + } + } + + ifree(Data); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth) +{ + if (ZOff <= 1) + return iluCrop2D(XOff, YOff, Width, Height); + return iluCrop3D(XOff, YOff, ZOff, Width, Height, Depth); +} + + +//! Enlarges the canvas +ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth) +{ + ILubyte *Data/*, Clear[4]*/; + ILuint x, y, z, OldBps, OldH, OldD, OldPlane, AddX, AddY; + ILenum Origin; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Uh-oh, what about 0 dimensions?! + if (Width < iluCurImage->Width || Height < iluCurImage->Height || Depth < iluCurImage->Depth) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Origin == IL_ORIGIN_LOWER_LEFT) { + switch (iluPlacement) + { + case ILU_LOWER_LEFT: + AddX = 0; + AddY = 0; + break; + case ILU_LOWER_RIGHT: + AddX = Width - iluCurImage->Width; + AddY = 0; + break; + case ILU_UPPER_LEFT: + AddX = 0; + AddY = Height - iluCurImage->Height; + break; + case ILU_UPPER_RIGHT: + AddX = Width - iluCurImage->Width; + AddY = Height - iluCurImage->Height; + break; + case ILU_CENTER: + AddX = (Width - iluCurImage->Width) >> 1; + AddY = (Height - iluCurImage->Height) >> 1; + break; + default: + ilSetError(ILU_INVALID_PARAM); + return IL_FALSE; + } + } + else { // IL_ORIGIN_UPPER_LEFT + switch (iluPlacement) + { + case ILU_LOWER_LEFT: + AddX = 0; + AddY = Height - iluCurImage->Height; + break; + case ILU_LOWER_RIGHT: + AddX = Width - iluCurImage->Width; + AddY = Height - iluCurImage->Height; + break; + case ILU_UPPER_LEFT: + AddX = 0; + AddY = 0; + break; + case ILU_UPPER_RIGHT: + AddX = Width - iluCurImage->Width; + AddY = 0; + break; + case ILU_CENTER: + AddX = (Width - iluCurImage->Width) >> 1; + AddY = (Height - iluCurImage->Height) >> 1; + break; + default: + ilSetError(ILU_INVALID_PARAM); + return IL_FALSE; + } + } + + AddX *= iluCurImage->Bpp; + + Data = (ILubyte*)ialloc(iluCurImage->SizeOfData); + if (Data == NULL) { + return IL_FALSE; + } + + // Preserve old data. + OldPlane = iluCurImage->SizeOfPlane; + OldBps = iluCurImage->Bps; + OldH = iluCurImage->Height; + OldD = iluCurImage->Depth; + Origin = iluCurImage->Origin; + ilCopyPixels(0, 0, 0, iluCurImage->Width, iluCurImage->Height, OldD, iluCurImage->Format, iluCurImage->Type, Data); + + ilTexImage(Width, Height, Depth, iluCurImage->Bpp, iluCurImage->Format, iluCurImage->Type, NULL); + iluCurImage->Origin = Origin; + + ilClearImage(); + /*ilGetClear(Clear); + if (iluCurImage->Bpp == 1) { + memset(iluCurImage->Data, Clear[3], iluCurImage->SizeOfData); + } + else { + for (x = 0; x < iluCurImage->SizeOfData; x += iluCurImage->Bpp) { + for (y = 0; y < iluCurImage->Bpp; y++) { + iluCurImage->Data[y] = Clear[y]; + } + } + }*/ + + for (z = 0; z < OldD; z++) { + for (y = 0; y < OldH; y++) { + for (x = 0; x < OldBps; x++) { + iluCurImage->Data[z * iluCurImage->SizeOfPlane + (y + AddY) * iluCurImage->Bps + x + AddX] = + Data[z * OldPlane + y * OldBps + x]; + } + } + } + + ifree(Data); + + return IL_TRUE; +} + +//! Flips an image over its x axis +ILboolean ILAPIENTRY iluFlipImage() { + //ILubyte *StartPtr, *EndPtr; + //ILuint y, d; + ILimage *image = ilGetCurImage(); + + if( image == NULL ) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + iFlipBuffer(image->Data,image->Depth,image->Bps,image->Height); + /* + for( d = 0; d < image->Depth; d++ ) { + StartPtr = image->Data + d * image->SizeOfPlane; + EndPtr = image->Data + d * image->SizeOfPlane + + image->SizeOfPlane; + + for( y = 0; y < (image->Height/2); y++ ) { + EndPtr -= image->Bps; + iMemSwap(StartPtr,EndPtr,image->Bps); + StartPtr += image->Bps; + } + } + */ + return IL_TRUE; +} + + +//! Mirrors an image over its y axis +ILboolean ILAPIENTRY iluMirror() { + return iMirror(); +} + + +//! Inverts the alpha in the image +ILboolean ILAPIENTRY iluInvertAlpha() { + ILuint i, *IntPtr, NumPix; + ILubyte *Data; + ILushort *ShortPtr; + ILfloat *FltPtr; + ILdouble *DblPtr; + ILubyte Bpp; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format != IL_RGBA && + iluCurImage->Format != IL_BGRA && + iluCurImage->Format != IL_LUMINANCE_ALPHA) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Data = iluCurImage->Data; + Bpp = iluCurImage->Bpp; + NumPix = iluCurImage->Width * iluCurImage->Height * iluCurImage->Depth; + + switch (iluCurImage->Type) + { + case IL_BYTE: + case IL_UNSIGNED_BYTE: + Data += (Bpp - 1); + for( i = Bpp - 1; i < NumPix; i++, Data += Bpp ) + *(Data) = ~*(Data); + break; + + case IL_SHORT: + case IL_UNSIGNED_SHORT: + ShortPtr = ((ILushort*)Data) + Bpp-1; + for (i = Bpp - 1; i < NumPix; i++, ShortPtr += Bpp) + *(ShortPtr) = ~*(ShortPtr); + break; + + case IL_INT: + case IL_UNSIGNED_INT: + IntPtr = ((ILuint*)Data) + Bpp-1; + for (i = Bpp - 1; i < NumPix; i++, IntPtr += Bpp) + *(IntPtr) = ~*(IntPtr); + break; + + case IL_FLOAT: + FltPtr = ((ILfloat*)Data) + Bpp - 1; + for (i = Bpp - 1; i < NumPix; i++, FltPtr += Bpp) + *(FltPtr) = 1.0f - *(FltPtr); + break; + + case IL_DOUBLE: + DblPtr = ((ILdouble*)Data) + Bpp - 1; + for (i = Bpp - 1; i < NumPix; i++, DblPtr += Bpp) + *(DblPtr) = 1.0f - *(DblPtr); + break; + } + + return IL_TRUE; +} + + +//! Inverts the colours in the image +ILboolean ILAPIENTRY iluNegative() +{ + ILuint i, j, c, *IntPtr, NumPix, Bpp; + ILubyte *Data; + ILushort *ShortPtr; + ILubyte *RegionMask; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + if (!iluCurImage->Pal.Palette || !iluCurImage->Pal.PalSize || iluCurImage->Pal.PalType == IL_PAL_NONE) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + Data = iluCurImage->Pal.Palette; + i = iluCurImage->Pal.PalSize; + } + else { + Data = iluCurImage->Data; + i = iluCurImage->SizeOfData; + } + + RegionMask = iScanFill(); + + // @TODO: Optimize this some. + + NumPix = i / iluCurImage->Bpc; + Bpp = iluCurImage->Bpp; + + if (RegionMask) { + switch (iluCurImage->Bpc) + { + case 1: + for (j = 0, i = 0; j < NumPix; j += Bpp, i++, Data += Bpp) { + for (c = 0; c < Bpp; c++) { + if (RegionMask[i]) + *(Data+c) = ~*(Data+c); + } + } + break; + + case 2: + ShortPtr = (ILushort*)Data; + for (j = 0, i = 0; j < NumPix; j += Bpp, i++, ShortPtr += Bpp) { + for (c = 0; c < Bpp; c++) { + if (RegionMask[i]) + *(ShortPtr+c) = ~*(ShortPtr+c); + } + } + break; + + case 4: + IntPtr = (ILuint*)Data; + for (j = 0, i = 0; j < NumPix; j += Bpp, i++, IntPtr += Bpp) { + for (c = 0; c < Bpp; c++) { + if (RegionMask[i]) + *(IntPtr+c) = ~*(IntPtr+c); + } + } + break; + } + } + else { + switch (iluCurImage->Bpc) + { + case 1: + for (j = 0; j < NumPix; j++, Data++) { + *(Data) = ~*(Data); + } + break; + + case 2: + ShortPtr = (ILushort*)Data; + for (j = 0; j < NumPix; j++, ShortPtr++) { + *(ShortPtr) = ~*(ShortPtr); + } + break; + + case 4: + IntPtr = (ILuint*)Data; + for (j = 0; j < NumPix; j++, IntPtr++) { + *(IntPtr) = ~*(IntPtr); + } + break; + } + } + + ifree(RegionMask); + + return IL_TRUE; +} + + +// Taken from +// http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue2.html#Insight +// Hope they don't mind too much. =] +ILboolean ILAPIENTRY iluWave(ILfloat Angle) +{ + ILint Delta; + ILuint y; + ILubyte *DataPtr, *TempBuff; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + TempBuff = (ILubyte*)ialloc(iluCurImage->SizeOfData); + if (TempBuff == NULL) { + return IL_FALSE; + } + + for (y = 0; y < iluCurImage->Height; y++) { + Delta = (ILint) + (30 * sin((10 * Angle + y) * IL_DEGCONV) + + 15 * sin(( 7 * Angle + 3 * y) * IL_DEGCONV)); + + DataPtr = iluCurImage->Data + y * iluCurImage->Bps; + + if (Delta < 0) { + Delta = -Delta; + memcpy(TempBuff, DataPtr, iluCurImage->Bpp * Delta); + memcpy(DataPtr, DataPtr + iluCurImage->Bpp * Delta, iluCurImage->Bpp * (iluCurImage->Width - Delta)); + memcpy(DataPtr + iluCurImage->Bpp * (iluCurImage->Width - Delta), TempBuff, iluCurImage->Bpp * Delta); + } + else if (Delta > 0) { + memcpy(TempBuff, DataPtr, iluCurImage->Bpp * (iluCurImage->Width - Delta)); + memcpy(DataPtr, DataPtr + iluCurImage->Bpp * (iluCurImage->Width - Delta), iluCurImage->Bpp * Delta); + memcpy(DataPtr + iluCurImage->Bpp * Delta, TempBuff, iluCurImage->Bpp * (iluCurImage->Width - Delta)); + } + } + + ifree(TempBuff); + + return IL_TRUE; +} + + +// Swaps the colour order of the current image (rgb(a)->bgr(a) or vice-versa). +// Must be either an 8, 24 or 32-bit (coloured) image (or palette). +ILboolean ILAPIENTRY iluSwapColours() { + // Use ilConvert or other like that to convert the data? + // and extend that function to work even on paletted data + + ILimage *img = ilGetCurImage(); + if( img == NULL ) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Bpp == 1) { + if (ilGetBppPal(iluCurImage->Pal.PalType) == 0 || iluCurImage->Format != IL_COLOUR_INDEX) { + ilSetError(ILU_ILLEGAL_OPERATION); // Can be luminance. + return IL_FALSE; + } + + switch( img->Pal.PalType ) { + case IL_PAL_RGB24: + return ilConvertPal(IL_PAL_BGR24); + case IL_PAL_RGB32: + return ilConvertPal(IL_PAL_BGR32); + case IL_PAL_RGBA32: + return ilConvertPal(IL_PAL_BGRA32); + case IL_PAL_BGR24: + return ilConvertPal(IL_PAL_RGB24); + case IL_PAL_BGR32: + return ilConvertPal(IL_PAL_RGB32); + case IL_PAL_BGRA32: + return ilConvertPal(IL_PAL_RGBA32); + default: + ilSetError(ILU_INTERNAL_ERROR); + return IL_FALSE; + } + } + + switch( img->Format) { + case IL_RGB: + return ilConvertImage(IL_BGR, img->Type); + case IL_RGBA: + return ilConvertImage(IL_BGRA, img->Type); + case IL_BGR: + return ilConvertImage(IL_RGB, img->Type); + case IL_BGRA: + return ilConvertImage(IL_RGBA, img->Type); + } + + ilSetError(ILU_INTERNAL_ERROR); + return IL_FALSE; +} + + +typedef struct BUCKET { ILubyte Colours[4]; struct BUCKET *Next; } BUCKET; + +ILuint ILAPIENTRY iluColoursUsed() +{ + ILuint i, c, Bpp, ColVal, SizeData, BucketPos = 0, NumCols = 0; + BUCKET Buckets[8192], *Temp; + ILubyte ColTemp[4]; + ILboolean Matched; + BUCKET *Heap[9]; + ILuint HeapPos = 0, HeapPtr = 0, HeapSize; + + imemclear(Buckets, sizeof(BUCKET) * 8192); + for (c = 0; c < 9; c++) { + Heap[c] = 0; + } + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return 0; + } + + Bpp = iluCurImage->Bpp; + SizeData = iluCurImage->SizeOfData; + + // Create our miniature memory heap. + // I have determined that the average number of colours versus + // the number of pixels is about a 1:8 ratio, so divide by 8. + HeapSize = IL_MAX(1, iluCurImage->SizeOfData / iluCurImage->Bpp / 8); + Heap[0] = (BUCKET*)ialloc(HeapSize * sizeof(BUCKET)); + if (Heap[0] == NULL) + return IL_FALSE; + + for (i = 0; i < SizeData; i += Bpp) { + *(ILuint*)ColTemp = 0; + /*for (c = 0; c < Bpp; c++) { + ColTemp[c] = iluCurImage->Data[i + c]; + }*/ + ColTemp[0] = iluCurImage->Data[i]; + if (Bpp > 1) { + ColTemp[1] = iluCurImage->Data[i + 1]; + ColTemp[2] = iluCurImage->Data[i + 2]; + } + if (Bpp > 3) + ColTemp[3] = iluCurImage->Data[i + 3]; + + BucketPos = *(ILuint*)ColTemp % 8192; + + // Add to hash table + if (Buckets[BucketPos].Next == NULL) { + NumCols++; + //Buckets[BucketPos].Next = (BUCKET*)ialloc(sizeof(BUCKET)); + Buckets[BucketPos].Next = Heap[HeapPos] + HeapPtr++; + if (HeapPtr >= HeapSize) { + Heap[++HeapPos] = (BUCKET*)ialloc(HeapSize * sizeof(BUCKET)); + if (Heap[HeapPos] == NULL) + goto alloc_error; + HeapPtr = 0; + } + *(ILuint*)Buckets[BucketPos].Next->Colours = *(ILuint*)ColTemp; + Buckets[BucketPos].Next->Next = NULL; + } + else { + Matched = IL_FALSE; + Temp = Buckets[BucketPos].Next; + + ColVal = *(ILuint*)ColTemp; + while (Temp->Next != NULL) { + if (ColVal == *(ILuint*)Temp->Colours) { + Matched = IL_TRUE; + break; + } + Temp = Temp->Next; + } + if (!Matched) { + if (ColVal != *(ILuint*)Temp->Colours) { // Check against last entry + NumCols++; + Temp = Buckets[BucketPos].Next; + //Buckets[BucketPos].Next = (BUCKET*)ialloc(sizeof(BUCKET)); + Buckets[BucketPos].Next = Heap[HeapPos] + HeapPtr++; + if (HeapPtr >= HeapSize) { + Heap[++HeapPos] = (BUCKET*)ialloc(HeapSize * sizeof(BUCKET)); + if (Heap[HeapPos] == NULL) + goto alloc_error; + HeapPtr = 0; + } + Buckets[BucketPos].Next->Next = Temp; + *(ILuint*)Buckets[BucketPos].Next->Colours = *(ILuint*)ColTemp; + } + } + } + } + + // Delete our mini heap. + for (i = 0; i < 9; i++) { + if (Heap[i] == NULL) + break; + ifree(Heap[i]); + } + + return NumCols; + +alloc_error: + for (i = 0; i < 9; i++) { + ifree(Heap[i]); + } + + return 0; +} + + +ILboolean ILAPIENTRY iluCompareImage(ILuint Comp) +{ + ILimage *Original; + ILuint OrigName, i; + ILboolean Same = IL_TRUE; + + iluCurImage = ilGetCurImage(); + OrigName = ilGetCurName(); + + // Same image, so return true. + if (ilGetCurName() == Comp) + return IL_TRUE; + + if (iluCurImage == NULL || ilIsImage(Comp) == IL_FALSE) { + ilSetError(ILU_ILLEGAL_OPERATION); + return 0; + } + + ilBindImage(Comp); + Original = ilGetCurImage(); + + // @TODO: Should we check palettes, too? + if (Original->Bpp != iluCurImage->Bpp || + Original->Depth != iluCurImage->Depth || + Original->Format != iluCurImage->Format || + Original->Height != iluCurImage->Height || + Original->Origin != iluCurImage->Origin || + Original->Type != iluCurImage->Type || + Original->Width != iluCurImage->Width) { + ilBindImage(OrigName); + return IL_FALSE; + } + + for (i = 0; i < iluCurImage->SizeOfData; i++) { + if (Original->Data[i] != iluCurImage->Data[i]) { + Same = IL_FALSE; + break; + } + } + + ilBindImage(OrigName); + return Same; +} + + +// @TODO: FIX ILGETCLEARCALL! +ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance) +{ + ILubyte ClearCol[4]; + ILint TolVal, Distance, Dist1, Dist2, Dist3; + ILuint i, NumPix; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return 0; + } + + ilGetClear(ClearCol, IL_RGBA, IL_UNSIGNED_BYTE); + if (Tolerance > 1.0f || Tolerance < -1.0f) + Tolerance = 1.0f; // Clamp it. + TolVal = (ILuint)(fabs(Tolerance) * UCHAR_MAX); // To be changed. + NumPix = iluCurImage->Width * iluCurImage->Height * iluCurImage->Depth; + + if (Tolerance <= FLT_EPSILON && Tolerance >= 0) { + + //@TODO what is this? + } + else { + switch (iluCurImage->Format) + { + case IL_RGB: + case IL_RGBA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + Dist1 = (ILint)iluCurImage->Data[i] - (ILint)ClearCol[0]; + Dist2 = (ILint)iluCurImage->Data[i+1] - (ILint)ClearCol[1]; + Dist3 = (ILint)iluCurImage->Data[i+2] - (ILint)ClearCol[2]; + Distance = (ILint)sqrt((float)(Dist1 * Dist1 + Dist2 * Dist2 + Dist3 * Dist3)); + if (Distance >= -TolVal && Distance <= TolVal) { + iluCurImage->Data[i] = Red; + iluCurImage->Data[i+1] = Green; + iluCurImage->Data[i+2] = Blue; + } + } + break; + case IL_BGR: + case IL_BGRA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + Dist1 = (ILint)iluCurImage->Data[i] - (ILint)ClearCol[0]; + Dist2 = (ILint)iluCurImage->Data[i+1] - (ILint)ClearCol[1]; + Dist3 = (ILint)iluCurImage->Data[i+2] - (ILint)ClearCol[2]; + Distance = (ILint)sqrt((float)(Dist1 * Dist1 + Dist2 * Dist2 + Dist3 * Dist3)); + if (Distance >= -TolVal && Distance <= TolVal) { + iluCurImage->Data[i+2] = Red; + iluCurImage->Data[i+1] = Green; + iluCurImage->Data[i] = Blue; + } + } + break; + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + for (i = 0; i < iluCurImage->SizeOfData; i += iluCurImage->Bpp) { + Dist1 = (ILint)iluCurImage->Data[i] - (ILint)ClearCol[0]; + if (Dist1 >= -TolVal && Dist1 <= TolVal) { + iluCurImage->Data[i] = Blue; + } + } + break; + //case IL_COLOUR_INDEX: // @TODO + } + } + + return IL_TRUE; +} + + +// Credit goes to Lionel Brits for this (refer to credits.txt) +ILboolean ILAPIENTRY iluEqualize() { + ILuint Histogram[256]; // image Histogram + ILuint SumHistm[256]; // normalized Histogram and LUT + ILuint i = 0; // index variable + ILuint j = 0; // index variable + ILuint Sum=0; + ILuint NumPixels, Bpp; + ILint Intensity; + ILfloat Scale; + ILint IntensityNew; + ILimage *LumImage; + ILuint NewColour[4]; + ILubyte *BytePtr; + ILushort *ShortPtr; + ILuint *IntPtr; + + NewColour[0] = NewColour[1] = NewColour[2] = NewColour[3] = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return 0; + } + + // @TODO: Change to work with other types! + if (iluCurImage->Bpc > 1) { + ilSetError(ILU_INTERNAL_ERROR); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + NumPixels = iluCurImage->Pal.PalSize / ilGetBppPal(iluCurImage->Pal.PalType); + Bpp = ilGetBppPal(iluCurImage->Pal.PalType); + } else { + NumPixels = iluCurImage->Width * iluCurImage->Height * iluCurImage->Depth; + Bpp = iluCurImage->Bpp; + } + + // Clear the tables. + imemclear(Histogram, 256 * sizeof(ILuint)); + imemclear(SumHistm, 256 * sizeof(ILuint)); + + LumImage = iConvertImage(iluCurImage, IL_LUMINANCE, IL_UNSIGNED_BYTE); // the type must be left as it is! + if (LumImage == NULL) + return IL_FALSE; + for (i = 0; i < NumPixels; i++) { + Histogram[LumImage->Data[i]]++; + } + + // Calculate normalized Sum of Histogram. + for (i = 0; i < 256; i++) { + for (j = 0; j < i; j++) + Sum += Histogram[j]; + + SumHistm[i] = (Sum << 8) / NumPixels; + Sum = 0; + } + + + BytePtr = (iluCurImage->Format == IL_COLOUR_INDEX) ? iluCurImage->Pal.Palette : iluCurImage->Data; + ShortPtr = (ILushort*)iluCurImage->Data; + IntPtr = (ILuint*)iluCurImage->Data; + + // Transform image using new SumHistm as a LUT + for (i = 0; i < NumPixels; i++) { + Intensity = LumImage->Data[i]; + + // Look up the normalized intensity + IntensityNew = (ILint)SumHistm[Intensity]; + + // Find out by how much the intensity has been Scaled + Scale = (ILfloat)IntensityNew / (ILfloat)Intensity; + + switch (iluCurImage->Bpc) + { + case 1: + // Calculate new pixel(s) + NewColour[0] = (ILuint)(BytePtr[i * iluCurImage->Bpp] * Scale); + if (Bpp >= 3) { + NewColour[1] = (ILuint)(BytePtr[i * iluCurImage->Bpp + 1] * Scale); + NewColour[2] = (ILuint)(BytePtr[i * iluCurImage->Bpp + 2] * Scale); + } + + // Clamp values + if (NewColour[0] > UCHAR_MAX) + NewColour[0] = UCHAR_MAX; + if (Bpp >= 3) { + if (NewColour[1] > UCHAR_MAX) + NewColour[1] = UCHAR_MAX; + if (NewColour[2] > UCHAR_MAX) + NewColour[2] = UCHAR_MAX; + } + + // Store pixel(s) + BytePtr[i * iluCurImage->Bpp] = (ILubyte)NewColour[0]; + if (Bpp >= 3) { + BytePtr[i * iluCurImage->Bpp + 1] = (ILubyte)NewColour[1]; + BytePtr[i * iluCurImage->Bpp + 2] = (ILubyte)NewColour[2]; + } + break; + + /*case 2: + // Calculate new pixel + NewColour[0] = (ILuint)(ShortPtr[i * iluCurImage->Bpp] * Scale); + NewColour[1] = (ILuint)(ShortPtr[i * iluCurImage->Bpp + 1] * Scale); + NewColour[2] = (ILuint)(ShortPtr[i * iluCurImage->Bpp + 2] * Scale); + + // Clamp values + if (NewColour[0] > USHRT_MAX) + NewColour[0] = USHRT_MAX; + if (NewColour[1] > USHRT_MAX) + NewColour[1] = USHRT_MAX; + if (NewColour[2] > USHRT_MAX) + NewColour[2] = USHRT_MAX; + + // Store pixel + ShortPtr[i * iluCurImage->Bpp] = (ILushort)NewColour[0]; + ShortPtr[i * iluCurImage->Bpp + 1] = (ILushort)NewColour[1]; + ShortPtr[i * iluCurImage->Bpp + 2] = (ILushort)NewColour[2]; + break; + + case 4: + // Calculate new pixel + NewColour[0] = (ILuint)(IntPtr[i * iluCurImage->Bpp] * Scale); + NewColour[1] = (ILuint)(IntPtr[i * iluCurImage->Bpp + 1] * Scale); + NewColour[2] = (ILuint)(IntPtr[i * iluCurImage->Bpp + 2] * Scale); + + // Clamp values + if (NewColour[0] > UINT_MAX) + NewColour[0] = UINT_MAX; + if (NewColour[1] > UINT_MAX) + NewColour[1] = UINT_MAX; + if (NewColour[2] > UINT_MAX) + NewColour[2] = UINT_MAX; + + // Store pixel + IntPtr[i * 4 * iluCurImage->Bpp] = NewColour[0]; + IntPtr[i * 4 * iluCurImage->Bpp + 1] = NewColour[1]; + IntPtr[i * 4 * iluCurImage->Bpp + 2] = NewColour[2]; + break;*/ + } + } + + ilCloseImage(LumImage); + + return IL_TRUE; +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_mipmap.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_mipmap.c new file mode 100644 index 00000000..690bbe20 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_mipmap.c @@ -0,0 +1,60 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 02/21/2009 +// +// Filename: src-ILU/src/ilu_mipmap.c +// +// Description: Generates mipmaps for the current image. +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +//#include "ilu_mipmap.h" +//#include "ilu_states.h" + + +ILboolean iBuildMipmaps(ILimage *Parent, ILuint Width, ILuint Height, ILuint Depth) +{ + ILuint x1 = 0, x2 = 0, y1 = 0, y2 = 0; + + if (Parent->Width == 1 && Parent->Height == 1 && Parent->Depth == 1) { // Already at the last mipmap + return IL_TRUE; + } + + if (Width == 0) + Width = 1; + if (Height == 0) + Height = 1; + if (Depth == 0) + Depth = 1; + + Parent->Mipmaps = iluScale_(Parent, Width, Height, Depth); + if (Parent->Mipmaps == NULL) + return IL_FALSE; + + iBuildMipmaps(Parent->Mipmaps, Parent->Mipmaps->Width >> 1, Parent->Mipmaps->Height >> 1, Parent->Mipmaps->Depth >> 1); + + return IL_TRUE; +} + + +// Note: No longer changes all textures to powers of 2. +ILboolean ILAPIENTRY iluBuildMipmaps() +{ + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + // Get rid of any existing mipmaps. + if (iluCurImage->Mipmaps) { + ilCloseImage(iluCurImage->Mipmaps); + iluCurImage->Mipmaps = NULL; + } + + return iBuildMipmaps(iluCurImage, iluCurImage->Width >> 1, iluCurImage->Height >> 1, iluCurImage->Depth >> 1); +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_noise.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_noise.c new file mode 100644 index 00000000..c094be76 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_noise.c @@ -0,0 +1,225 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_noise.c +// +// Description: Noise generation functions +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include +//#include +#include + + +// Very simple right now. +// This will probably use Perlin noise and parameters in the future. +ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance) +{ + ILuint i, j, c, Factor, Factor2, NumPix; + ILint Val; + ILushort *ShortPtr; + ILuint *IntPtr; + ILubyte *RegionMask; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + RegionMask = iScanFill(); + + // @TODO: Change this to work correctly without time()! + //srand(time(NULL)); + NumPix = iluCurImage->SizeOfData / iluCurImage->Bpc; + + switch (iluCurImage->Bpc) + { + case 1: + Factor = (ILubyte)(Tolerance * (UCHAR_MAX / 2)); + if (Factor == 0) + return IL_TRUE; + Factor2 = Factor + Factor; + for (i = 0, j = 0; i < NumPix; i += iluCurImage->Bpp, j++) { + if (RegionMask) { + if (!RegionMask[j]) + continue; + } + Val = (ILint)((ILint)(rand() % Factor2) - Factor); + for (c = 0; c < iluCurImage->Bpp; c++) { + if ((ILint)iluCurImage->Data[i + c] + Val > UCHAR_MAX) + iluCurImage->Data[i + c] = UCHAR_MAX; + else if ((ILint)iluCurImage->Data[i + c] + Val < 0) + iluCurImage->Data[i + c] = 0; + else + iluCurImage->Data[i + c] += Val; + } + } + break; + case 2: + Factor = (ILushort)(Tolerance * (USHRT_MAX / 2)); + if (Factor == 0) + return IL_TRUE; + Factor2 = Factor + Factor; + ShortPtr = (ILushort*)iluCurImage->Data; + for (i = 0, j = 0; i < NumPix; i += iluCurImage->Bpp, j++) { + if (RegionMask) { + if (!RegionMask[j]) + continue; + } + Val = (ILint)((ILint)(rand() % Factor2) - Factor); + for (c = 0; c < iluCurImage->Bpp; c++) { + if ((ILint)ShortPtr[i + c] + Val > USHRT_MAX) + ShortPtr[i + c] = USHRT_MAX; + else if ((ILint)ShortPtr[i + c] + Val < 0) + ShortPtr[i + c] = 0; + else + ShortPtr[i + c] += Val; + } + } + break; + case 4: + Factor = (ILuint)(Tolerance * (UINT_MAX / 2)); + if (Factor == 0) + return IL_TRUE; + Factor2 = Factor + Factor; + IntPtr = (ILuint*)iluCurImage->Data; + for (i = 0, j = 0; i < NumPix; i += iluCurImage->Bpp, j++) { + if (RegionMask) { + if (!RegionMask[j]) + continue; + } + Val = (ILint)((ILint)(rand() % Factor2) - Factor); + for (c = 0; c < iluCurImage->Bpp; c++) { + if (IntPtr[i + c] + Val > UINT_MAX) + IntPtr[i + c] = UINT_MAX; + else if ((ILint)IntPtr[i + c] + Val < 0) + IntPtr[i + c] = 0; + else + IntPtr[i + c] += Val; + } + } + break; + } + + ifree(RegionMask); + + return IL_TRUE; +} + + + + +// Information on Perlin Noise taken from +// http://freespace.virgin.net/hugo.elias/models/m_perlin.htm + + +/*ILdouble Noise(ILint x, ILint y) +{ + ILint n; + n = x + y * 57; + n = (n<<13) ^ n; + return (1.0 - ( (n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0); +} + + +ILdouble SmoothNoise(ILint x, ILint y) +{ + ILdouble corners = ( Noise(x-1, y-1)+Noise(x+1, y-1)+Noise(x-1, y+1)+Noise(x+1, y+1) ) / 16; + ILdouble sides = ( Noise(x-1, y) +Noise(x+1, y) +Noise(x, y-1) +Noise(x, y+1) ) / 8; + ILdouble center = Noise(x, y) / 4; + return corners + sides + center; +} + + +ILdouble Interpolate(ILdouble a, ILdouble b, ILdouble x) +{ + ILdouble ft = x * 3.1415927; + ILdouble f = (1 - cos(ft)) * .5; + + return a*(1-f) + b*f; +} + + +ILdouble InterpolatedNoise(ILdouble x, ILdouble y) +{ + ILint integer_X, integer_Y; + ILdouble fractional_X, fractional_Y, v1, v2, v3, v4, i1, i2; + + integer_X = (ILint)x; + fractional_X = x - integer_X; + + integer_Y = (ILint)y; + fractional_Y = y - integer_Y; + + v1 = SmoothNoise(integer_X, integer_Y); + v2 = SmoothNoise(integer_X + 1, integer_Y); + v3 = SmoothNoise(integer_X, integer_Y + 1); + v4 = SmoothNoise(integer_X + 1, integer_Y + 1); + + i1 = Interpolate(v1, v2, fractional_X); + i2 = Interpolate(v3, v4, fractional_X); + + return Interpolate(i1, i2, fractional_Y); +} + + + +ILdouble PerlinNoise(ILdouble x, ILdouble y) +{ + ILuint i, n; + ILdouble total = 0, p, frequency, amplitude; + //p = persistence; + //n = Number_Of_Octaves - 1; + n = 2; + //p = .5; + + p = (ILdouble)(rand() % 1000) / 1000.0; + + + for (i = 0; i < n; i++) { + frequency = pow(2, i); + amplitude = pow(p, i); + + total = total + InterpolatedNoise(x * frequency, y * frequency) * amplitude; + } + + return total; +} + + + +ILboolean ILAPIENTRY iluNoisify() +{ + ILuint x, y, c; + ILint Val; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + for (y = 0; y < iluCurImage->Height; y++) { + for (x = 0; x < iluCurImage->Width; x++) { + Val = (ILint)(PerlinNoise(x, y) * 50.0); + + for (c = 0; c < iluCurImage->Bpp; c++) { + if ((ILint)iluCurImage->Data[y * iluCurImage->Bps + x * iluCurImage->Bpp + c] + Val > 255) + iluCurImage->Data[y * iluCurImage->Bps + x * iluCurImage->Bpp + c] = 255; + else if ((ILint)iluCurImage->Data[y * iluCurImage->Bps + x * iluCurImage->Bpp + c] + Val < 0) + iluCurImage->Data[y * iluCurImage->Bps + x * iluCurImage->Bpp + c] = 0; + else + iluCurImage->Data[y * iluCurImage->Bps + x * iluCurImage->Bpp + c] += Val; + } + } + } + + return IL_TRUE; +}*/ diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_region.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_region.c new file mode 100644 index 00000000..ea03e338 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_region.c @@ -0,0 +1,304 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 07/09/2002 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_region.c +// +// Description: Creates an image region. +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_region.h" + +ILpointi *RegionPointsi = NULL; +ILpointf *RegionPointsf = NULL; +ILuint PointNum = 0; +ILubyte *iRegionMask = NULL; + +void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n) +{ + if (Points == NULL || n == 0) { + ifree(RegionPointsi); + ifree(RegionPointsf); + RegionPointsf = NULL; + PointNum = 0; + return; + } + if (n < 3) { + ilSetError(ILU_INVALID_PARAM); + return; + } + ifree(RegionPointsi); + ifree(RegionPointsf); + RegionPointsf = (ILpointf*)ialloc(sizeof(ILpointf) * n); + if (RegionPointsf == NULL) + return; + memcpy(RegionPointsf, Points, sizeof(ILpointi) * n); + PointNum = n; + return; +} + + +void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n) +{ + if (Points == NULL || n == 0) { + ifree(RegionPointsi); + ifree(RegionPointsf); + RegionPointsi = NULL; + PointNum = 0; + return; + } + if (n < 3) { + ilSetError(ILU_INVALID_PARAM); + return; + } + ifree(RegionPointsi); + ifree(RegionPointsf); + RegionPointsi = (ILpointi*)ialloc(sizeof(ILpointi) * n); + if (RegionPointsi == NULL) + return; + memcpy(RegionPointsi, Points, sizeof(ILpointi) * n); + PointNum = n; + return; +} + + +// Inserts edge into list in order of increasing xIntersect field. +void InsertEdge(Edge *list, Edge *edge) +{ + Edge *p, *q = list; + + p = q->next; + while (p != NULL) { + if (edge->xIntersect < p->xIntersect) { + p = NULL; + } + else { + q = p; + p = p->next; + } + } + edge->next = q->next; + q->next = edge; +} + + +// For an index, return y-coordinate of next nonhorizontal line +ILint yNext(ILint k, ILint cnt, ILpointi *pts) +{ + ILint j; + + if ((k+1) > (cnt-1)) + j = 0; + else + j = k + 1; + + while (pts[k].y == pts[j].y) { + if ((j+1) > (cnt-1)) + j = 0; + else + j++; + } + + return pts[j].y; +} + + +// Store lower-y coordinate and inverse slope for each edge. Adjust +// and store upper-y coordinate for edges that are the lower member +// of a monotonically increasing or decreasing pair of edges +void MakeEdgeRec(ILpointi lower, ILpointi upper, ILint yComp, Edge *edge, Edge *edges[]) +{ + edge->dxPerScan = (ILfloat)(upper.x - lower.x) / (upper.y - lower.y); + edge->xIntersect = (ILfloat)lower.x; + if (upper.y < yComp) + edge->yUpper = upper.y - 1; + else + edge->yUpper = upper.y; + + InsertEdge(edges[lower.y], edge); +} + + +void BuildEdgeList(ILuint cnt, ILpointi *pts, Edge **edges) +{ + Edge *edge; + ILpointi v1, v2; + ILuint i; + ILint yPrev = pts[cnt - 2].y; + + v1.x = pts[cnt-1].x; + v1.y = pts[cnt-1].y; + + for (i = 0; i < cnt; i++) { + v2 = pts[i]; + if (v1.y != v2.y) { // nonhorizontal line + edge = (Edge*)ialloc(sizeof(Edge)); + if (v1.y < v2.y) { // up-going edge + MakeEdgeRec(v1, v2, yNext(i, cnt, pts), edge, edges); + } + else { // down-going edge + MakeEdgeRec(v2, v1, yPrev, edge, edges); + } + } + yPrev = v1.y; + v1 = v2; + } +} + + +void BuildActiveList(ILint scan, Edge *active, Edge *edges[]) +{ + Edge *p, *q; + + p = edges[scan]->next; + while (p) { + q = p->next; + InsertEdge(active, p); + p = q; + } +} + + +#define iRegionSetPixel(x,y) (iRegionMask[y * iluCurImage->Width + x] = 1 ) + + +void FillScan(ILint scan, Edge *active) +{ + Edge *p1, *p2; + ILint i; + + p1 = active->next; + while (p1) { + p2 = p1->next; + for (i = (ILuint)p1->xIntersect; i < p2->xIntersect; i++) { + iRegionSetPixel((ILuint)i, scan); + } + p1 = p2->next; + } +} + + +void DeleteAfter(Edge *q) +{ + Edge *p = q->next; + q->next = p->next; + free(p); +} + + +// Delete completed edges. Update 'xIntersect' field for others +void UpdateActiveList(ILint scan, Edge *active) +{ + Edge *q = active, *p = active->next; + + while (p) { + if (scan >= p->yUpper) { + p = p->next; + DeleteAfter(q); + } + else { + p->xIntersect = p->xIntersect + p->dxPerScan; + q = p; + p = p->next; + } + } +} + + +void ResortActiveList(Edge *active) +{ + Edge *q, *p = active->next; + + active->next = NULL; + while (p) { + q = p->next; + InsertEdge(active, p); + p = q; + } +} + + +ILubyte *iScanFill() +{ + Edge **edges = NULL, *active = NULL/*, *temp*/; + ILuint i, scan; + + iRegionMask = NULL; + + if ((RegionPointsi == NULL && RegionPointsf == NULL) || PointNum == 0) + return NULL; + + if (RegionPointsf) { + RegionPointsi = (ILpointi*)ialloc(sizeof(ILpointi) * PointNum); + if (RegionPointsi == NULL) + goto error; + } + + for (i = 0; i < PointNum; i++) { + if (RegionPointsf) { + RegionPointsi[i].x = (ILuint)(iluCurImage->Width * RegionPointsf[i].x); + RegionPointsi[i].y = (ILuint)(iluCurImage->Height * RegionPointsf[i].y); + } + if (RegionPointsi[i].x >= (ILint)iluCurImage->Width || RegionPointsi[i].y >= (ILint)iluCurImage->Height) + goto error; + } + + edges = (Edge**)ialloc(sizeof(Edge*) * iluCurImage->Height); + iRegionMask = (ILubyte*)ialloc(iluCurImage->Width * iluCurImage->Height * iluCurImage->Depth); + if (edges == NULL || iRegionMask == NULL) + goto error; + imemclear(iRegionMask, iluCurImage->Width * iluCurImage->Height * iluCurImage->Depth); + + for (i = 0; i < iluCurImage->Height; i++) { + edges[i] = (Edge*)ialloc(sizeof(Edge)); + edges[i]->next = NULL; + } + BuildEdgeList(PointNum, RegionPointsi, edges); + active = (Edge*)ialloc(sizeof(Edge)); + active->next = NULL; + + for (scan = 0; scan < iluCurImage->Height; scan++) { + BuildActiveList(scan, active, edges); + if (active->next) { + FillScan(scan, active); + UpdateActiveList(scan, active); + ResortActiveList(active); + } + } + + // Free edge records that have been allocated. + /*for (i = 0; i < iluCurImage->Height; i++) { + while (edges[i]) { + temp = edges[i]->next; + ifree(edges[i]); + edges[i] = temp; + } + }*/ + + ifree(edges); + + if (RegionPointsf) { + ifree(RegionPointsi); + RegionPointsi = NULL; + } + + return iRegionMask; + +error: + if (RegionPointsf) { + ifree(RegionPointsi); + RegionPointsi = NULL; + } + + // Free edge records that have been allocated. + + ifree(edges); + ifree(iRegionMask); + return NULL; +} + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_rotate.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_rotate.c new file mode 100644 index 00000000..30551342 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_rotate.c @@ -0,0 +1,369 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2002 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_rotate.c +// +// Description: Rotates an image. +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_states.h" + + +ILboolean ILAPIENTRY iluRotate(ILfloat Angle) +{ + ILimage *Temp, *Temp1, *CurImage = NULL; + ILenum PalType = 0; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Format == IL_COLOUR_INDEX) { + PalType = iluCurImage->Pal.PalType; + CurImage = iluCurImage; + iluCurImage = iConvertImage(iluCurImage, ilGetPalBaseType(CurImage->Pal.PalType), IL_UNSIGNED_BYTE); + } + + Temp = iluRotate_(iluCurImage, Angle); + if (Temp != NULL) { + if (PalType != 0) { + ilCloseImage(iluCurImage); + Temp1 = iConvertImage(Temp, IL_COLOUR_INDEX, IL_UNSIGNED_BYTE); + ilCloseImage(Temp); + Temp = Temp1; + ilSetCurImage(CurImage); + } + ilTexImage(Temp->Width, Temp->Height, Temp->Depth, Temp->Bpp, Temp->Format, Temp->Type, Temp->Data); + if (PalType != 0) { + iluCurImage = ilGetCurImage(); + iluCurImage->Pal.PalSize = Temp->Pal.PalSize; + iluCurImage->Pal.PalType = Temp->Pal.PalType; + iluCurImage->Pal.Palette = (ILubyte*)ialloc(Temp->Pal.PalSize); + if (iluCurImage->Pal.Palette == NULL) { + ilCloseImage(Temp); + return IL_FALSE; + } + memcpy(iluCurImage->Pal.Palette, Temp->Pal.Palette, Temp->Pal.PalSize); + } + + iluCurImage->Origin = Temp->Origin; + ilCloseImage(Temp); + return IL_TRUE; + } + return IL_FALSE; +} + + +ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle) +{ + ILimage *Temp; + +// return IL_FALSE; + + iluCurImage = ilGetCurImage(); + Temp = iluRotate3D_(iluCurImage, x, y, z, Angle); + if (Temp != NULL) { + ilTexImage(Temp->Width, Temp->Height, Temp->Depth, Temp->Bpp, Temp->Format, Temp->Type, Temp->Data); + iluCurImage->Origin = Temp->Origin; + ilSetPal(&Temp->Pal); + ilCloseImage(Temp); + return IL_TRUE; + } + return IL_FALSE; +} + + +//! Rotates a bitmap any angle. +// Code help comes from http://www.leunen.com/cbuilder/rotbmp.html. +ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle) +{ + ILimage *Rotated = NULL; + ILint x, y, c; + ILdouble Cos, Sin; + ILuint RotOffset, ImgOffset; + ILint MinX, MinY, MaxX, MaxY; + ILushort *ShortPtr; + ILuint *IntPtr; + ILdouble *DblPtr; + ILdouble Point1x, Point1y, Point2x, Point2y, Point3x, Point3y; + ILint SrcX, SrcY; + + // Multiples of 90 are special. + Angle = (ILfloat)fmod((ILdouble)Angle, 360.0); + if (Angle < 0) + Angle = 360.0f + Angle; + + Cos = (ILdouble)cos((IL_PI * Angle) / 180.0); + Sin = (ILdouble)sin((IL_PI * Angle) / 180.0); + + Point1x = (-(ILint)Image->Height * Sin); + Point1y = (Image->Height * Cos); + Point2x = (Image->Width * Cos - Image->Height * Sin); + Point2y = (Image->Height * Cos + Image->Width * Sin); + Point3x = (Image->Width * Cos); + Point3y = (Image->Width * Sin); + + MinX = (ILint)IL_MIN(0, IL_MIN(Point1x, IL_MIN(Point2x, Point3x))); + MinY = (ILint)IL_MIN(0, IL_MIN(Point1y, IL_MIN(Point2y, Point3y))); + MaxX = (ILint)IL_MAX(Point1x, IL_MAX(Point2x, Point3x)); + MaxY = (ILint)IL_MAX(Point1y, IL_MAX(Point2y, Point3y)); + + Rotated = (ILimage*)icalloc(1, sizeof(ILimage)); + if (Rotated == NULL) + return NULL; + if (ilCopyImageAttr(Rotated, Image) == IL_FALSE) { + ilCloseImage(Rotated); + return NULL; + } + + if (ilResizeImage(Rotated, (ILuint)ceil(fabs(MaxX) - MinX), (ILuint)ceil(fabs(MaxY) - MinY), 1, Image->Bpp, Image->Bpc) == IL_FALSE) { + ilCloseImage(Rotated); + return IL_FALSE; + } + + ilClearImage_(Rotated); + + ShortPtr = (ILushort*)iluCurImage->Data; + IntPtr = (ILuint*)iluCurImage->Data; + DblPtr = (ILdouble*)iluCurImage->Data; + + //if (iluFilter == ILU_NEAREST) { + switch (iluCurImage->Bpc) + { + case 1: // Byte-based (most images) + if (Angle == 90.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = x * Rotated->Bps + (Image->Width - 1 - y) * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + Rotated->Data[RotOffset + c] = Image->Data[ImgOffset + c]; + } + } + } + } + else if (Angle == 180.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - y) * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + Rotated->Data[RotOffset + c] = Image->Data[ImgOffset + c]; + } + } + } + } + else if (Angle == 270.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - x) * Rotated->Bps + y * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + Rotated->Data[RotOffset + c] = Image->Data[ImgOffset + c]; + } + } + } + } + else { + for (x = 0; x < (ILint)Rotated->Width; x++) { + for (y = 0; y < (ILint)Rotated->Height; y++) { + SrcX = (ILint)((x + MinX) * Cos + (y + MinY) * Sin); + SrcY = (ILint)((y + MinY) * Cos - (x + MinX) * Sin); + if (SrcX >= 0 && SrcX < (ILint)Image->Width && SrcY >= 0 && SrcY < (ILint)Image->Height) { + RotOffset = y * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = (ILuint)SrcY * Image->Bps + (ILuint)SrcX * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + Rotated->Data[RotOffset + c] = Image->Data[ImgOffset + c]; + } + } + } + } + } + break; + + case 2: // Short-based + Image->Bps /= 2; // Makes it easier to just + Rotated->Bps /= 2; // cast to short. + + if (Angle == 90.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = x * Rotated->Bps + (Image->Width - 1 - y) * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILushort*)(Rotated->Data))[RotOffset + c] = ShortPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 180.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - y) * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILushort*)(Rotated->Data))[RotOffset + c] = ShortPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 270.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - x) * Rotated->Bps + y * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILushort*)(Rotated->Data))[RotOffset + c] = ShortPtr[ImgOffset + c]; + } + } + } + } + else { + for (x = 0; x < (ILint)Rotated->Width; x++) { + for (y = 0; y < (ILint)Rotated->Height; y++) { + SrcX = (ILint)((x + MinX) * Cos + (y + MinY) * Sin); + SrcY = (ILint)((y + MinY) * Cos - (x + MinX) * Sin); + if (SrcX >= 0 && SrcX < (ILint)Image->Width && SrcY >= 0 && SrcY < (ILint)Image->Height) { + RotOffset = y * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = (ILuint)SrcY * Image->Bps + (ILuint)SrcX * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILushort*)(Rotated->Data))[RotOffset + c] = ShortPtr[ImgOffset + c]; + } + } + } + } + } + Image->Bps *= 2; + Rotated->Bps *= 2; + break; + + case 4: // Floats or 32-bit integers + Image->Bps /= 4; + Rotated->Bps /= 4; + + if (Angle == 90.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = x * Rotated->Bps + (Image->Width - 1 - y) * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILuint*)(Rotated->Data))[RotOffset + c] = IntPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 180.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - y) * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILuint*)(Rotated->Data))[RotOffset + c] = IntPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 270.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - x) * Rotated->Bps + y * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILuint*)(Rotated->Data))[RotOffset + c] = IntPtr[ImgOffset + c]; + } + } + } + } + else { + for (x = 0; x < (ILint)Rotated->Width; x++) { + for (y = 0; y < (ILint)Rotated->Height; y++) { + SrcX = (ILint)((x + MinX) * Cos + (y + MinY) * Sin); + SrcY = (ILint)((y + MinY) * Cos - (x + MinX) * Sin); + if (SrcX >= 0 && SrcX < (ILint)Image->Width && SrcY >= 0 && SrcY < (ILint)Image->Height) { + RotOffset = y * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = (ILuint)SrcY * Image->Bps + (ILuint)SrcX * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILuint*)(Rotated->Data))[RotOffset + c] = IntPtr[ImgOffset + c]; + } + } + } + } + } + Image->Bps *= 4; + Rotated->Bps *= 4; + break; + + case 8: // Double or 64-bit integers + Image->Bps /= 8; + Rotated->Bps /= 8; + + if (Angle == 90.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = x * Rotated->Bps + (Image->Width - 1 - y) * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILdouble*)(Rotated->Data))[RotOffset + c] = DblPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 180.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - y) * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILdouble*)(Rotated->Data))[RotOffset + c] = DblPtr[ImgOffset + c]; + } + } + } + } + else if (Angle == 270.0) { + for (x = 0; x < (ILint)Image->Width; x++) { + for (y = 0; y < (ILint)Image->Height; y++) { + RotOffset = (Image->Height - 1 - x) * Rotated->Bps + y * Rotated->Bpp; + ImgOffset = y * Image->Bps + x * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILdouble*)(Rotated->Data))[RotOffset + c] = DblPtr[ImgOffset + c]; + } + } + } + } + else { + for (x = 0; x < (ILint)Rotated->Width; x++) { + for (y = 0; y < (ILint)Rotated->Height; y++) { + SrcX = (ILint)((x + MinX) * Cos + (y + MinY) * Sin); + SrcY = (ILint)((y + MinY) * Cos - (x + MinX) * Sin); + if (SrcX >= 0 && SrcX < (ILint)Image->Width && SrcY >= 0 && SrcY < (ILint)Image->Height) { + RotOffset = y * Rotated->Bps + x * Rotated->Bpp; + ImgOffset = (ILuint)SrcY * Image->Bps + (ILuint)SrcX * Image->Bpp; + for (c = 0; c < Rotated->Bpp; c++) { + ((ILdouble*)(Rotated->Data))[RotOffset + c] = DblPtr[ImgOffset + c]; + } + } + } + } + } + Image->Bps *= 8; + Rotated->Bps *= 8; + break; + } + + return Rotated; +} + + +ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle) +{ + Image; x; y; z; Angle; + return NULL; +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_scale.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale.c new file mode 100644 index 00000000..55424a58 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale.c @@ -0,0 +1,307 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/27/2008 +// +// Filename: src-ILU/src/ilu_scale.c +// +// Description: Scales an image. +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_states.h" + + +ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim) +{ + if (XDim <= 0.0f || YDim <= 0.0f || ZDim <= 0.0f) { + ilSetError(ILU_INVALID_PARAM); + return IL_FALSE; + } + + iluCurImage = ilGetCurImage(); + return iluScale((ILuint)(iluCurImage->Width * XDim), (ILuint)(iluCurImage->Height * YDim), + (ILuint)(iluCurImage->Depth * ZDim)); +} + + +ILimage *iluScale1D_(ILimage *Image, ILimage *Scaled, ILuint Width); +ILimage *iluScale2D_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height); +ILimage *iluScale3D_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth); + + +ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth) +{ + ILimage *Temp; + ILboolean UsePal; + ILenum PalType; + ILenum Origin; + + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Width == Width && iluCurImage->Height == Height && iluCurImage->Depth == Depth) + return IL_TRUE; + + // A parameter of 0 is not valid. Let's just assume that the user wanted a value of 1 instead. + if (Width == 0) Width = 1; + if (Height == 0) Height = 1; + if (Depth == 0) Depth = 1; + + if ((iluCurImage->WidthHeightType != IL_UNSIGNED_BYTE || + iluCurImage->Format == IL_COLOUR_INDEX || + iluCurImage->Depth > 1) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (iluCurImage->Width > Width) // shrink width first + { + Origin = iluCurImage->Origin; + Temp = iluScale_(iluCurImage, Width, iluCurImage->Height, iluCurImage->Depth); + if (Temp != NULL) { + if (!ilTexImage(Temp->Width, Temp->Height, Temp->Depth, Temp->Bpp, Temp->Format, Temp->Type, Temp->Data)) { + ilCloseImage(Temp); + return IL_FALSE; + } + iluCurImage->Origin = Origin; + ilCloseImage(Temp); + } + } + else if (iluCurImage->Height > Height) // shrink height first + { + Origin = iluCurImage->Origin; + Temp = iluScale_(iluCurImage, iluCurImage->Width, Height, iluCurImage->Depth); + if (Temp != NULL) { + if (!ilTexImage(Temp->Width, Temp->Height, Temp->Depth, Temp->Bpp, Temp->Format, Temp->Type, Temp->Data)) { + ilCloseImage(Temp); + return IL_FALSE; + } + iluCurImage->Origin = Origin; + ilCloseImage(Temp); + } + } + + return (ILboolean)iluScaleAdvanced(Width, Height, iluFilter); + } + } + + + Origin = iluCurImage->Origin; + UsePal = (iluCurImage->Format == IL_COLOUR_INDEX); + PalType = iluCurImage->Pal.PalType; + Temp = iluScale_(iluCurImage, Width, Height, Depth); + if (Temp != NULL) { + if (!ilTexImage(Temp->Width, Temp->Height, Temp->Depth, Temp->Bpp, Temp->Format, Temp->Type, Temp->Data)) { + ilCloseImage(Temp); + return IL_FALSE; + } + iluCurImage->Origin = Origin; + ilCloseImage(Temp); + if (UsePal) { + if (!ilConvertImage(IL_COLOUR_INDEX, IL_UNSIGNED_BYTE)) + return IL_FALSE; + ilConvertPal(PalType); + } + return IL_TRUE; + } + + return IL_FALSE; +} + + +ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth) +{ + ILimage *Scaled, *CurImage, *ToScale; + ILenum Format, PalType; + + CurImage = ilGetCurImage(); + Format = Image->Format; + if (Format == IL_COLOUR_INDEX) { + ilSetCurImage(Image); + PalType = Image->Pal.PalType; + ToScale = iConvertImage(iluCurImage, ilGetPalBaseType(Image->Pal.PalType), iluCurImage->Type); + } + else { + ToScale = Image; + } + + // So we don't replicate this 3 times (one in each iluScalexD_() function. + Scaled = (ILimage*)icalloc(1, sizeof(ILimage)); + if (ilCopyImageAttr(Scaled, ToScale) == IL_FALSE) { + ilCloseImage(Scaled); + if (ToScale != Image) + ilCloseImage(ToScale); + ilSetCurImage(CurImage); + return NULL; + } + if (ilResizeImage(Scaled, Width, Height, Depth, ToScale->Bpp, ToScale->Bpc) == IL_FALSE) { + ilCloseImage(Scaled); + if (ToScale != Image) + ilCloseImage(ToScale); + ilSetCurImage(CurImage); + return NULL; + } + + if (Height <= 1 && Image->Height <= 1) { + iluScale1D_(ToScale, Scaled, Width); + } + if (Depth <= 1 && Image->Depth <= 1) { + iluScale2D_(ToScale, Scaled, Width, Height); + } + else { + iluScale3D_(ToScale, Scaled, Width, Height, Depth); + } + + if (Format == IL_COLOUR_INDEX) { + //ilSetCurImage(Scaled); + //ilConvertImage(IL_COLOUR_INDEX); + ilSetCurImage(CurImage); + ilCloseImage(ToScale); + } + + return Scaled; +} + + +ILimage *iluScale1D_(ILimage *Image, ILimage *Scaled, ILuint Width) +{ + ILuint x1, x2; + ILuint NewX1, NewX2, NewX3, x, c; + ILdouble ScaleX, t1, t2, f; + ILushort *ShortPtr, *SShortPtr; + ILuint *IntPtr, *SIntPtr; + + if (Image == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ScaleX = (ILdouble)Width / Image->Width; + + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + + if (iluFilter == ILU_NEAREST) { + switch (Image->Bpc) + { + case 1: + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + Scaled->Data[NewX1 + c] = Image->Data[NewX2 + c]; + } + } + break; + case 2: + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SShortPtr[NewX1 + c] = ShortPtr[NewX2 + c]; + } + } + break; + case 4: + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SIntPtr[NewX1 + c] = IntPtr[NewX2 + c]; + } + } + break; + } + } + else { // IL_LINEAR or IL_BILINEAR + switch (Image->Bpc) + { + case 1: + NewX3 = 0; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t2 = t1 * Width - (ILuint)(t1 * Width); + f = (1.0 - cos(t2 * IL_PI)) * .5; + NewX1 = ((ILuint)(t1 * Width / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t1 * Width / ScaleX) + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + x1 = Image->Data[NewX1 + c]; + x2 = Image->Data[NewX2 + c]; + + Scaled->Data[NewX3 + c] = (ILubyte)(x1 * (1.0 - f) + x2 * f); + } + + NewX3 += Scaled->Bpp; + } + break; + case 2: + NewX3 = 0; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t2 = t1 * Width - (ILuint)(t1 * Width); + f = (1.0 - cos(t2 * IL_PI)) * .5; + NewX1 = ((ILuint)(t1 * Width / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t1 * Width / ScaleX) + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + x1 = ShortPtr[NewX1 + c]; + x2 = ShortPtr[NewX2 + c]; + + SShortPtr[NewX3 + c] = (ILushort)(x1 * (1.0 - f) + x2 * f); + } + + NewX3 += Scaled->Bpp; + } + break; + case 4: + NewX3 = 0; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t2 = t1 * Width - (ILuint)(t1 * Width); + f = (1.0 - cos(t2 * IL_PI)) * .5; + NewX1 = ((ILuint)(t1 * Width / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t1 * Width / ScaleX) + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + x1 = IntPtr[NewX1 + c]; + x2 = IntPtr[NewX2 + c]; + + SIntPtr[NewX3 + c] = (ILuint)(x1 * (1.0 - f) + x2 * f); + } + + NewX3 += Scaled->Bpp; + } + break; + } + } + + return Scaled; +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_scale2d.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale2d.c new file mode 100644 index 00000000..fc579d73 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale2d.c @@ -0,0 +1,479 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_scale2d.c +// +// Description: Scales an image. +// +//----------------------------------------------------------------------------- + + +// NOTE: Don't look at this file if you wish to preserve your sanity! + + +#include "ilu_internal.h" +#include "ilu_states.h" + + +ILimage *iluScale2DNear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height); +ILimage *iluScale2DLinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height); +ILimage *iluScale2DBilinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height); + +static ILuint x1, x2; +static ILuint NewY1, NewY2, NewX1, NewX2, Size, x, y, c; +static ILdouble ScaleX, ScaleY, t1, t2, t3, t4, f, ft, NewX; +static ILdouble Table[2][4]; // Assumes we don't have larger than 32-bit images. +static ILuint ImgBps, SclBps; +static ILushort *ShortPtr, *SShortPtr; +static ILuint *IntPtr, *SIntPtr; +static ILfloat *FloatPtr, *SFloatPtr; + + + +ILimage *iluScale2D_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height) +{ + if (Image == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ScaleX = (ILfloat)Width / Image->Width; + ScaleY = (ILfloat)Height / Image->Height; + + if (iluFilter == ILU_NEAREST) + return iluScale2DNear_(Image, Scaled, Width, Height); + else if (iluFilter == ILU_LINEAR) + return iluScale2DLinear_(Image, Scaled, Width, Height); + // iluFilter == ILU_BILINEAR + return iluScale2DBilinear_(Image, Scaled, Width, Height); +} + + +ILimage *iluScale2DNear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height) +{ + ImgBps = Image->Bps / Image->Bpc; + SclBps = Scaled->Bps / Scaled->Bpc; + + switch (Image->Bpc) + { + case 1: + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + Scaled->Data[NewY1 + NewX1 + c] = Image->Data[NewY2 + NewX2 + c]; + x1 = 0; + } + } + } + break; + + case 2: + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SShortPtr[NewY1 + NewX1 + c] = ShortPtr[NewY2 + NewX2 + c]; + x1 = 0; + } + } + } + break; + + case 4: + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SIntPtr[NewY1 + NewX1 + c] = IntPtr[NewY2 + NewX2 + c]; + x1 = 0; + } + } + } + break; + } + + return Scaled; +} + + +ILimage *iluScale2DLinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height) +{ + ImgBps = Image->Bps / Image->Bpc; + SclBps = Scaled->Bps / Scaled->Bpc; + + switch (Image->Bpc) + { + case 1: + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = Image->Data[NewY1 + NewX1 + c]; + x2 = Image->Data[NewY1 + NewX2 + c]; + Scaled->Data[Size + c] = (ILubyte)((1.0 - f) * x1 + f * x2); + } + } + } + break; + + case 2: + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = ShortPtr[NewY1 + NewX1 + c]; + x2 = ShortPtr[NewY1 + NewX2 + c]; + SShortPtr[Size + c] = (ILushort)((1.0 - f) * x1 + f * x2); + } + } + } + break; + + case 4: + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = IntPtr[NewY1 + NewX1 + c]; + x2 = IntPtr[NewY1 + NewX2 + c]; + SIntPtr[Size + c] = (ILuint)((1.0 - f) * x1 + f * x2); + } + } + } + break; + } + + return Scaled; +} + + +// Rewrote using an algorithm described by Paul Nettle at +// http://www.gamedev.net/reference/articles/article669.asp. +ILimage *iluScale2DBilinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height) +{ + ILfloat ul, ll, ur, lr; + ILfloat FracX, FracY; + ILfloat SrcX, SrcY; + ILuint iSrcX, iSrcY, iSrcXPlus1, iSrcYPlus1, ulOff, llOff, urOff, lrOff; + + ImgBps = Image->Bps / Image->Bpc; + SclBps = Scaled->Bps / Scaled->Bpc; + + switch (Image->Bpc) + { + case 1: + for (y = 0; y < Height; y++) { + for (x = 0; x < Width; x++) { + // Calculate where we want to choose pixels from in our source image. + SrcX = (ILfloat)x / (ILfloat)ScaleX; + SrcY = (ILfloat)y / (ILfloat)ScaleY; + // Integer part of SrcX and SrcY + iSrcX = (ILuint)floor(SrcX); + iSrcY = (ILuint)floor(SrcY); + // Fractional part of SrcX and SrcY + FracX = SrcX - (ILfloat)(iSrcX); + FracY = SrcY - (ILfloat)(iSrcY); + + // We do not want to go past the right edge of the image or past the last line in the image, + // so this takes care of that. Normally, iSrcXPlus1 is iSrcX + 1, but if this is past the + // right side, we have to bring it back to iSrcX. The same goes for iSrcYPlus1. + if (iSrcX < Image->Width - 1) + iSrcXPlus1 = iSrcX + 1; + else + iSrcXPlus1 = iSrcX; + if (iSrcY < Image->Height - 1) + iSrcYPlus1 = iSrcY + 1; + else + iSrcYPlus1 = iSrcY; + + // Find out how much we want each of the four pixels contributing to the final values. + ul = (1.0f - FracX) * (1.0f - FracY); + ll = (1.0f - FracX) * FracY; + ur = FracX * (1.0f - FracY); + lr = FracX * FracY; + + for (c = 0; c < Scaled->Bpp; c++) { + // We just calculate the offsets for each pixel here... + ulOff = iSrcY * Image->Bps + iSrcX * Image->Bpp + c; + llOff = iSrcYPlus1 * Image->Bps + iSrcX * Image->Bpp + c; + urOff = iSrcY * Image->Bps + iSrcXPlus1 * Image->Bpp + c; + lrOff = iSrcYPlus1 * Image->Bps + iSrcXPlus1 * Image->Bpp + c; + + // ...and then we do the actual interpolation here. + Scaled->Data[y * Scaled->Bps + x * Scaled->Bpp + c] = (ILubyte)( + ul * Image->Data[ulOff] + ll * Image->Data[llOff] + ur * Image->Data[urOff] + lr * Image->Data[lrOff]); + } + } + } + break; + + case 2: + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + Height--; // Only use regular Height once in the following loop. + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + NewY2 = (ILuint)((y+1) / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + t3 = (1.0 - t2); + t4 = t1 * NewX; + NewX1 = (ILuint)(t4) * Image->Bpp; + NewX2 = (ILuint)(t4 + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + Table[0][c] = t3 * ShortPtr[NewY1 + NewX1 + c] + + t2 * ShortPtr[NewY1 + NewX2 + c]; + + Table[1][c] = t3 * ShortPtr[NewY2 + NewX1 + c] + + t2 * ShortPtr[NewY2 + NewX2 + c]; + } + + // Linearly interpolate between the table values. + t1 = y / (ILdouble)(Height + 1); // Height+1 is the real height now. + t3 = (1.0 - t1); + Size = y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SShortPtr[Size + c] = + (ILushort)(t3 * Table[0][c] + t1 * Table[1][c]); + } + } + } + + // Calculate the last row. + NewY1 = (ILuint)(Height / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + ft = (t4 - (ILuint)(t4)) * IL_PI; + f = (1.0 - cos(ft)) * .5; // Cosine interpolation + NewX1 = (ILuint)(t1 * NewX) * Image->Bpp; + NewX2 = (ILuint)(t1 * NewX + 1) * Image->Bpp; + + Size = Height * SclBps + x * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SShortPtr[Size + c] = (ILushort)((1.0 - f) * ShortPtr[NewY1 + NewX1 + c] + + f * ShortPtr[NewY1 + NewX2 + c]); + } + } + break; + + case 4: + if (Image->Type != IL_FLOAT) { + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + Height--; // Only use regular Height once in the following loop. + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + NewY2 = (ILuint)((y+1) / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + t3 = (1.0 - t2); + t4 = t1 * NewX; + NewX1 = (ILuint)(t4) * Image->Bpp; + NewX2 = (ILuint)(t4 + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + Table[0][c] = t3 * IntPtr[NewY1 + NewX1 + c] + + t2 * IntPtr[NewY1 + NewX2 + c]; + + Table[1][c] = t3 * IntPtr[NewY2 + NewX1 + c] + + t2 * IntPtr[NewY2 + NewX2 + c]; + } + + // Linearly interpolate between the table values. + t1 = y / (ILdouble)(Height + 1); // Height+1 is the real height now. + t3 = (1.0 - t1); + Size = y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SIntPtr[Size + c] = + (ILuint)(t3 * Table[0][c] + t1 * Table[1][c]); + } + } + } + + // Calculate the last row. + NewY1 = (ILuint)(Height / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + ft = (t4 - (ILuint)(t4)) * IL_PI; + f = (1.0 - cos(ft)) * .5; // Cosine interpolation + NewX1 = (ILuint)(t1 * NewX) * Image->Bpp; + NewX2 = (ILuint)(t1 * NewX + 1) * Image->Bpp; + + Size = Height * SclBps + x * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SIntPtr[Size + c] = (ILuint)((1.0 - f) * IntPtr[NewY1 + NewX1 + c] + + f * IntPtr[NewY1 + NewX2 + c]); + } + } + + } + + else { // IL_FLOAT + FloatPtr = (ILfloat*)Image->Data; + SFloatPtr = (ILfloat*)Scaled->Data; + Height--; // Only use regular Height once in the following loop. + + for (y = 0; y < Height; y++) { + + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + + NewY2 = (ILuint)((y+1) / ScaleY) * ImgBps; + + for (x = 0; x < Width; x++) { + + NewX = Width / ScaleX; + + t1 = x / (ILdouble)Width; + + t4 = t1 * Width; + + t2 = t4 - (ILuint)(t4); + + t3 = (1.0 - t2); + + t4 = t1 * NewX; + + NewX1 = (ILuint)(t4) * Image->Bpp; + + NewX2 = (ILuint)(t4 + 1) * Image->Bpp; + + + + for (c = 0; c < Scaled->Bpp; c++) { + + Table[0][c] = t3 * FloatPtr[NewY1 + NewX1 + c] + + + t2 * FloatPtr[NewY1 + NewX2 + c]; + + + + Table[1][c] = t3 * FloatPtr[NewY2 + NewX1 + c] + + + t2 * FloatPtr[NewY2 + NewX2 + c]; + + } + + + + // Linearly interpolate between the table values. + + t1 = y / (ILdouble)(Height + 1); // Height+1 is the real height now. + + t3 = (1.0 - t1); + + Size = y * SclBps + x * Scaled->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + + SFloatPtr[Size + c] = + + (ILfloat)(t3 * Table[0][c] + t1 * Table[1][c]); + + } + + } + + } + + + + // Calculate the last row. + + NewY1 = (ILuint)(Height / ScaleY) * ImgBps; + + for (x = 0; x < Width; x++) { + + NewX = Width / ScaleX; + + t1 = x / (ILdouble)Width; + + t4 = t1 * Width; + + ft = (t4 - (ILuint)(t4)) * IL_PI; + + f = (1.0 - cos(ft)) * .5; // Cosine interpolation + + NewX1 = (ILuint)(t1 * NewX) * Image->Bpp; + + NewX2 = (ILuint)(t1 * NewX + 1) * Image->Bpp; + + + + Size = Height * SclBps + x * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + + SFloatPtr[Size + c] = (ILfloat)((1.0 - f) * FloatPtr[NewY1 + NewX1 + c] + + + f * FloatPtr[NewY1 + NewX2 + c]); + + } + + } + + } + + break; + } + + return Scaled; +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_scale3d.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale3d.c new file mode 100644 index 00000000..9d0c3831 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_scale3d.c @@ -0,0 +1,313 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_scale.c +// +// Description: Scales an image. +// +//----------------------------------------------------------------------------- + + +// NOTE: Don't look at this file if you wish to preserve your sanity! + + +#include "ilu_internal.h" +#include "ilu_states.h" + + +ILimage *iluScale3DNear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth); +ILimage *iluScale3DLinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth); +ILimage *iluScale3DBilinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth); + +static ILuint Size, NewX1, NewX2, NewY1, NewY2, NewZ1, NewZ2, x, y, z, c; +static ILdouble ScaleX, ScaleY, ScaleZ, x1, x2, t1, t2, t4, f, ft; +//ILdouble Table[2][2][4]; // Assumes we don't have larger than 32-bit images. +static ILuint ImgBps, SclBps, ImgPlane, SclPlane; +static ILushort *ShortPtr, *SShortPtr; +static ILuint *IntPtr, *SIntPtr; + + +ILimage *iluScale3D_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth) +{ + if (Image == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return IL_FALSE; + } + + ScaleX = (ILfloat)Width / Image->Width; + ScaleY = (ILfloat)Height / Image->Height; + ScaleZ = (ILfloat)Depth / Image->Depth; + + //if (iluFilter == ILU_NEAREST) + return iluScale3DNear_(Image, Scaled, Width, Height, Depth); + //else if (iluFilter == ILU_LINEAR) + //return iluScale3DLinear_(Image, Scaled, Width, Height, Depth); + + // iluFilter == ILU_BILINEAR + //return iluScale3DBilinear_(Image, Scaled, Width, Height, Depth); +} + + +ILimage *iluScale3DNear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth) +{ + ImgBps = Image->Bps / Image->Bpc; + SclBps = Scaled->Bps / Scaled->Bpc; + ImgPlane = Image->SizeOfPlane / Image->Bpc; + SclPlane = Scaled->SizeOfPlane / Scaled->Bpc; + + switch (Image->Bpc) + { + case 1: + for (z = 0; z < Depth; z++) { + NewZ1 = z * SclPlane; + NewZ2 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + Scaled->Data[NewZ1 + NewY1 + NewX1 + c] = + Image->Data[NewZ2 + NewY2 + NewX2 + c]; + } + } + } + } + break; + + case 2: + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + for (z = 0; z < Depth; z++) { + NewZ1 = z * SclPlane; + NewZ2 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SShortPtr[NewZ1 + NewY1 + NewX1 + c] = + ShortPtr[NewZ2 + NewY2 + NewX2 + c]; + } + } + } + } + break; + + case 4: + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + for (z = 0; z < Depth; z++) { + NewZ1 = z * SclPlane; + NewZ2 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = y * SclBps; + NewY2 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + NewX1 = x * Scaled->Bpp; + NewX2 = (ILuint)(x / ScaleX) * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + SIntPtr[NewZ1 + NewY1 + NewX1 + c] = + IntPtr[NewZ2 + NewY2 + NewX2 + c]; + } + } + } + } + break; + } + + return Scaled; +} + + +ILimage *iluScale3DLinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth) +{ + ImgBps = Image->Bps / Image->Bpc; + SclBps = Scaled->Bps / Scaled->Bpc; + ImgPlane = Image->SizeOfPlane / Image->Bpc; + SclPlane = Scaled->SizeOfPlane / Scaled->Bpc; + + switch (Image->Bpc) + { + case 1: + for (z = 0; z < Depth; z++) { + NewZ1 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = z * SclPlane + y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = Image->Data[NewZ1 + NewY1 + NewX1 + c]; + x2 = Image->Data[NewZ1 + NewY1 + NewX2 + c]; + Scaled->Data[Size + c] = (ILubyte)((1.0 - f) * x1 + f * x2); + } + } + } + } + break; + + case 2: + ShortPtr = (ILushort*)Image->Data; + SShortPtr = (ILushort*)Scaled->Data; + for (z = 0; z < Depth; z++) { + NewZ1 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = z * SclPlane + y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = ShortPtr[NewZ1 + NewY1 + NewX1 + c]; + x2 = ShortPtr[NewZ1 + NewY1 + NewX2 + c]; + SShortPtr[Size + c] = (ILubyte)((1.0 - f) * x1 + f * x2); + } + } + } + } + break; + + case 4: + IntPtr = (ILuint*)Image->Data; + SIntPtr = (ILuint*)Scaled->Data; + for (z = 0; z < Depth; z++) { + NewZ1 = (ILuint)(z / ScaleZ) * ImgPlane; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * ImgBps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = z * SclPlane + y * SclBps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = IntPtr[NewZ1 + NewY1 + NewX1 + c]; + x2 = IntPtr[NewZ1 + NewY1 + NewX2 + c]; + SIntPtr[Size + c] = (ILubyte)((1.0 - f) * x1 + f * x2); + } + } + } + } + break; + } + + return Scaled; +} + + +/*ILimage *iluScale3DBilinear_(ILimage *Image, ILimage *Scaled, ILuint Width, ILuint Height, ILuint Depth); +{ + Depth--; // Only use regular Depth once in the following loop. + Height--; // Only use regular Height once in the following loop. + for (z = 0; z < Depth; z++) { + NewZ1 = (ILuint)(z / ScaleZ) * Image->SizeOfPlane; + NewZ2 = (ILuint)((z+1) / ScaleZ) * Image->SizeOfPlane; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * Image->Bps; + NewY2 = (ILuint)((y+1) / ScaleY) * Image->Bps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + t3 = (1.0 - t2); + t4 = t1 * NewX; + NewX1 = (ILuint)(t4) * Image->Bpp; + NewX2 = (ILuint)(t4 + 1) * Image->Bpp; + + for (c = 0; c < Scaled->Bpp; c++) { + Table[0][0][c] = t3 * Image->Data[NewZ1 + NewY1 + NewX1 + c] + + t2 * Image->Data[NewZ1 + NewY1 + NewX2 + c]; + + Table[0][1][c] = t3 * Image->Data[NewZ1 + NewY2 + NewX1 + c] + + t2 * Image->Data[NewZ1 + NewY2 + NewX2 + c]; + + Table[1][0][c] = t3 * Image->Data[NewZ2 + NewY1 + NewX1 + c] + + t2 * Image->Data[NewZ2 + NewY1 + NewX2 + c]; + + Table[1][1][c] = t3 * Image->Data[NewZ2 + NewY2 + NewX1 + c] + + t2 * Image->Data[NewZ2 + NewY2 + NewX2 + c]; + } + + // Linearly interpolate between the table values. + t1 = y / (ILdouble)(Height + 1); // Height+1 is the real height now. + t2 = z / (ILdouble)(Depth + 1); // Depth+1 is the real depth now. + t3 = (1.0 - t1); + Size = z * Scaled->SizeOfPlane + y * Scaled->Bps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = t3 * Table[0][0][c] + t1 * Table[0][1][c]; + x2 = t3 * Table[1][0][c] + t1 * Table[1][1][c]; + Scaled->Data[Size + c] = (ILubyte)((1.0 - t2) * x1 + t2 * x2); + } + } + } + + // Calculate the last row. + NewY1 = (ILuint)(Height / ScaleY) * Image->Bps; + for (x = 0; x < Width; x++) { + NewX = Width / ScaleX; + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + ft = (t4 - (ILuint)(t4)) * IL_PI; + f = (1.0 - cos(ft)) * .5; // Cosine interpolation + NewX1 = (ILuint)(t1 * NewX) * Image->Bpp; + NewX2 = (ILuint)(t1 * NewX + 1) * Image->Bpp; + + Size = Height * Scaled->Bps + x * Image->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + Scaled->Data[Size + c] = (ILubyte)((1.0 - f) * Image->Data[NewY1 + NewX1 + c] + + f * Image->Data[NewY1 + NewX2 + c]); + } + } + } + + NewZ1 = (ILuint)(Depth / ScaleZ) * Image->SizeOfPlane; + for (y = 0; y < Height; y++) { + NewY1 = (ILuint)(y / ScaleY) * Image->Bps; + for (x = 0; x < Width; x++) { + t1 = x / (ILdouble)Width; + t4 = t1 * Width; + t2 = t4 - (ILuint)(t4); + ft = t2 * IL_PI; + f = (1.0 - cos(ft)) * .5; + NewX1 = ((ILuint)(t4 / ScaleX)) * Image->Bpp; + NewX2 = ((ILuint)(t4 / ScaleX) + 1) * Image->Bpp; + + Size = (Depth) * Scaled->SizeOfPlane + y * Scaled->Bps + x * Scaled->Bpp; + for (c = 0; c < Scaled->Bpp; c++) { + x1 = Image->Data[NewZ1 + NewY1 + NewX1 + c]; + x2 = Image->Data[NewZ1 + NewY1 + NewX2 + c]; + Scaled->Data[Size + c] = (ILubyte)((1.0 - f) * x1 + f * x2); + } + } + } + } + + return Scaled; +} +*/ + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_scaling.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_scaling.c new file mode 100644 index 00000000..c2893a30 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_scaling.c @@ -0,0 +1,466 @@ +// http://www.cse.ucsc.edu/~pang/160/f98/Gems/GemsIII/ + +/* + * Filtered Image Rescaling + * + * by Dale Schumacher + */ + +#if 0 + +#include "ilu_internal.h" + +char _Copyright[] = "Public Domain 1991 by Dale Schumacher"; + +#define WHITE_PIXEL (255) +#define BLACK_PIXEL (0) + +/* + * generic image access and i/o support routines + */ + + +ILubyte get_pixel(ILuint x, ILuint y) +{ + Image *im = NULL; + int yy = -1; + Pixel *p = NULL; + + if((x < 0) || (x >= image->xsize) || (y < 0) || (y >= image->ysize)) { + return(0); + } + if((im != image) || (yy != y)) { + im = image; + yy = y; + p = image->data + (y * image->span); + } + return(p[x]); +} + +void +get_row(row, image, y) +Pixel *row; +Image *image; +int y; +{ + if((y < 0) || (y >= image->ysize)) { + return; + } + memcpy(row, + image->data + (y * image->span), + (sizeof(Pixel) * image->xsize)); +} + +void +get_column(column, image, x) +Pixel *column; +Image *image; +int x; +{ + int i, d; + Pixel *p; + + if((x < 0) || (x >= image->xsize)) { + return; + } + d = image->span; + for(i = image->ysize, p = image->data + x; i-- > 0; p += d) { + *column++ = *p; + } +} + +Pixel +put_pixel(image, x, y, data) +Image *image; +int x, y; +Pixel data; +{ + Image *im = NULL; + ILint yy = -1; + Pixel *p = NULL; + + if((x < 0) || (x >= image->xsize) || (y < 0) || (y >= image->ysize)) { + return(0); + } + if((im != image) || (yy != y)) { + im = image; + yy = y; + p = image->data + (y * image->span); + } + return(p[x] = data); +} + + +/* + * filter function definitions + */ + +#define filter_support (1.0) + +double filter( double t) { + /* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */ + if(t < 0.0) t = -t; + if(t < 1.0) return((2.0 * t - 3.0) * t * t + 1.0); + return(0.0); +} + +#define box_support (0.5) + +double box_filter( double t) { + if((t > -0.5) && (t <= 0.5)) return(1.0); + return(0.0); +} + +#define triangle_support (1.0) + +double triangle_filter( double t ) { + if(t < 0.0) t = -t; + if(t < 1.0) return(1.0 - t); + return(0.0); +} + +#define bell_support (1.5) + +double bell_filter( double t) { /* box (*) box (*) box */ + if(t < 0) t = -t; + if(t < .5) return(.75 - (t * t)); + if(t < 1.5) { + t = (t - 1.5); + return(.5 * (t * t)); + } + return(0.0); +} + +#define B_spline_support (2.0) + +double +B_spline_filter(t) /* box (*) box (*) box (*) box */ +double t; +{ + double tt; + + if(t < 0) t = -t; + if(t < 1) { + tt = t * t; + return((.5 * tt * t) - tt + (2.0 / 3.0)); + } else if(t < 2) { + t = 2 - t; + return((1.0 / 6.0) * (t * t * t)); + } + return(0.0); +} + +double +sinc(x) +double x; +{ + x *= IL_PI; + if(x != 0) return(sin(x) / x); + return(1.0); +} + +#define Lanczos3_support (3.0) + +double +Lanczos3_filter(t) +double t; +{ + if(t < 0) t = -t; + if(t < 3.0) return(sinc(t) * sinc(t/3.0)); + return(0.0); +} + +#define Mitchell_support (2.0) + +#define B (1.0 / 3.0) +#define C (1.0 / 3.0) + +double +Mitchell_filter(t) +double t; +{ + double tt; + + tt = t * t; + if(t < 0) t = -t; + if(t < 1.0) { + t = (((12.0 - 9.0 * B - 6.0 * C) * (t * tt)) + + ((-18.0 + 12.0 * B + 6.0 * C) * tt) + + (6.0 - 2 * B)); + return(t / 6.0); + } else if(t < 2.0) { + t = (((-1.0 * B - 6.0 * C) * (t * tt)) + + ((6.0 * B + 30.0 * C) * tt) + + ((-12.0 * B - 48.0 * C) * t) + + (8.0 * B + 24 * C)); + return(t / 6.0); + } + return(0.0); +} + +/* + * image rescaling routine + */ + +typedef struct { + int pixel; + double weight; +} CONTRIB; + +typedef struct { + int n; /* number of contributors */ + CONTRIB *p; /* pointer to list of contributions */ +} CLIST; + +CLIST *contrib; /* array of contribution lists */ + +void +zoom(dst, src, filterf, fwidth) +Image *dst; /* destination image structure */ +Image *src; /* source image structure */ +double (*filterf)(); /* filter function */ +double fwidth; /* filter width (support) */ +{ + Image *tmp; /* intermediate image */ + double xscale, yscale; /* zoom scale factors */ + int i, j, k; /* loop variables */ + int n; /* pixel number */ + double center, left, right; /* filter calculation variables */ + double width, fscale, weight; /* filter calculation variables */ + Pixel *raster; /* a row or column of pixels */ + + /* create intermediate image to hold horizontal zoom */ + tmp = new_image(dst->xsize, src->ysize); + xscale = (double) dst->xsize / (double) src->xsize; + yscale = (double) dst->ysize / (double) src->ysize; + + /* pre-calculate filter contributions for a row */ + contrib = (CLIST*)icalloc(dst->xsize, sizeof(CLIST)); + if(xscale < 1.0) { + width = fwidth / xscale; + fscale = 1.0 / xscale; + for(i = 0; i < dst->xsize; ++i) { + contrib[i].n = 0; + contrib[i].p = (CONTRIB*)icalloc((int) (width * 2 + 1), + sizeof(CONTRIB)); + center = (double) i / xscale; + left = ceil(center - width); + right = floor(center + width); + for(j = left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight / fscale) / fscale; + if(j < 0) { + n = -j; + } else if(j >= src->xsize) { + n = (src->xsize - j) + src->xsize - 1; + } else { + n = j; + } + k = contrib[i].n++; + contrib[i].p[k].pixel = n; + contrib[i].p[k].weight = weight; + } + } + } else { + for(i = 0; i < dst->xsize; ++i) { + contrib[i].n = 0; + contrib[i].p = (CONTRIB*)icalloc((int) (fwidth * 2 + 1), sizeof(CONTRIB)); + center = (double) i / xscale; + left = ceil(center - fwidth); + right = floor(center + fwidth); + for(j = left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight); + if(j < 0) { + n = -j; + } else if(j >= src->xsize) { + n = (src->xsize - j) + src->xsize - 1; + } else { + n = j; + } + k = contrib[i].n++; + contrib[i].p[k].pixel = n; + contrib[i].p[k].weight = weight; + } + } + } + + /* apply filter to zoom horizontally from src to tmp */ + raster = (Pixel*)icalloc(src->xsize, sizeof(Pixel)); + for(k = 0; k < tmp->ysize; ++k) { + get_row(raster, src, k); + for(i = 0; i < tmp->xsize; ++i) { + weight = 0.0; + for(j = 0; j < contrib[i].n; ++j) { + weight += raster[contrib[i].p[j].pixel] + * contrib[i].p[j].weight; + } + put_pixel(tmp, i, k, + (Pixel)CLAMP(weight, BLACK_PIXEL, WHITE_PIXEL)); + } + } + ifree(raster); + + /* free the memory allocated for horizontal filter weights */ + for(i = 0; i < tmp->xsize; ++i) { + ifree(contrib[i].p); + } + ifree(contrib); + + /* pre-calculate filter contributions for a column */ + contrib = (CLIST*)icalloc(dst->ysize, sizeof(CLIST)); + if(yscale < 1.0) { + width = fwidth / yscale; + fscale = 1.0 / yscale; + for(i = 0; i < dst->ysize; ++i) { + contrib[i].n = 0; + contrib[i].p = (CONTRIB*)icalloc((int) (width * 2 + 1), sizeof(CONTRIB)); + center = (double) i / yscale; + left = ceil(center - width); + right = floor(center + width); + for(j = left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight / fscale) / fscale; + if(j < 0) { + n = -j; + } else if(j >= tmp->ysize) { + n = (tmp->ysize - j) + tmp->ysize - 1; + } else { + n = j; + } + k = contrib[i].n++; + contrib[i].p[k].pixel = n; + contrib[i].p[k].weight = weight; + } + } + } else { + for(i = 0; i < dst->ysize; ++i) { + contrib[i].n = 0; + contrib[i].p = (CONTRIB*)icalloc((int) (fwidth * 2 + 1), + sizeof(CONTRIB)); + center = (double) i / yscale; + left = ceil(center - fwidth); + right = floor(center + fwidth); + for(j = left; j <= right; ++j) { + weight = center - (double) j; + weight = (*filterf)(weight); + if(j < 0) { + n = -j; + } else if(j >= tmp->ysize) { + n = (tmp->ysize - j) + tmp->ysize - 1; + } else { + n = j; + } + k = contrib[i].n++; + contrib[i].p[k].pixel = n; + contrib[i].p[k].weight = weight; + } + } + } + + /* apply filter to zoom vertically from tmp to dst */ + raster = (Pixel*)icalloc(tmp->ysize, sizeof(Pixel)); + for(k = 0; k < dst->xsize; ++k) { + get_column(raster, tmp, k); + for(i = 0; i < dst->ysize; ++i) { + weight = 0.0; + for(j = 0; j < contrib[i].n; ++j) { + weight += raster[contrib[i].p[j].pixel] + * contrib[i].p[j].weight; + } + put_pixel(dst, k, i, + (Pixel)CLAMP(weight, BLACK_PIXEL, WHITE_PIXEL)); + } + } + ifree(raster); + + /* free the memory allocated for vertical filter weights */ + for(i = 0; i < dst->ysize; ++i) { + ifree(contrib[i].p); + } + ifree(contrib); + + free_image(tmp); +} + +/* + * command line interface + */ + +void +usage() +{ + fprintf(stderr, "usage: %s [-options] input.bm output.bm\n", _Program); + fprintf(stderr, "\ +options:\n\ + -x xsize output x size\n\ + -y ysize output y size\n\ + -f filter filter type\n\ +{b=box, t=triangle, q=bell, B=B-spline, h=hermite, l=Lanczos3, m=Mitchell}\n\ +"); + exit(1); +} + + +main(argc, argv) +int argc; +char *argv[]; +{ + register int c; + int optind; + char *optarg; + int xsize = 0, ysize = 0; + double (*f)() = filter; + double s = filter_support; + char *dstfile, *srcfile; + Image *dst, *src; + FILE *fp; + + while((c = getopt(argc, argv, "x:y:f:V")) != EOF) { + switch(c) { + case 'x': xsize = atoi(optarg); break; + case 'y': ysize = atoi(optarg); break; + case 'f': + switch(*optarg) { + case 'b': f=box_filter; s=box_support; break; + case 't': f=triangle_filter; s=triangle_support; break; + case 'q': f=bell_filter; s=bell_support; break; + case 'B': f=B_spline_filter; s=B_spline_support; break; + case 'h': f=filter; s=filter_support; break; + case 'l': f=Lanczos3_filter; s=Lanczos3_support; break; + case 'm': f=Mitchell_filter; s=Mitchell_support; break; + default: usage(); + } + break; + case 'V': banner(); exit(EXIT_SUCCESS); + case '?': usage(); + default: usage(); + } + } + if((argc - optind) != 2) usage(); + srcfile = argv[optind]; + dstfile = argv[optind + 1]; + if(((fp = fopen(srcfile, "r")) == NULL) + || ((src = load_image(fp)) == NULL)) { + fprintf(stderr, "%s: can't load source image '%s'\n", + _Program, srcfile); + exit(EXIT_FAILURE); + } + fclose(fp); + if(xsize <= 0) xsize = src->xsize; + if(ysize <= 0) ysize = src->ysize; + dst = new_image(xsize, ysize); + zoom(dst, src, f, s); + if(((fp = fopen(dstfile, "w")) == NULL) + || (save_image(fp, dst) != 0)) { + fprintf(stderr, "%s: can't save destination image '%s'\n", + _Program, dstfile); + exit(EXIT_FAILURE); + } + fclose(fp); + exit(EXIT_SUCCESS); +} + +#endif + + diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_states.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_states.c new file mode 100644 index 00000000..4d11ef0a --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_states.c @@ -0,0 +1,115 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-ILU/src/ilu_states.c +// +// Description: The state machine +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" +#include "ilu_states.h" + + +ILconst_string _iluVendor = IL_TEXT("Abysmal Software"); +ILconst_string _iluVersion = IL_TEXT("Developer's Image Library Utilities (ILU) 1.7.8");// IL_TEXT(__DATE__)); + + +ILstring ILAPIENTRY iluGetString(ILenum StringName) +{ + switch (StringName) + { + case ILU_VENDOR: + return (ILstring)_iluVendor; + //changed 2003-09-04 + case ILU_VERSION_NUM: + return (ILstring)_iluVersion; + default: + ilSetError(ILU_INVALID_PARAM); + break; + } + return NULL; +} + + +void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param) +{ + switch (Mode) + { + case ILU_VERSION_NUM: + *Param = ILU_VERSION; + break; + + case ILU_FILTER: + *Param = iluFilter; + break; + + default: + ilSetError(ILU_INVALID_ENUM); + } + return; +} + + +ILint ILAPIENTRY iluGetInteger(ILenum Mode) +{ + ILint Temp; + Temp = 0; + iluGetIntegerv(Mode, &Temp); + return Temp; +} + + +ILenum iluFilter = ILU_NEAREST; +ILenum iluPlacement = ILU_CENTER; + +void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param) +{ + switch (PName) + { + case ILU_FILTER: + switch (Param) + { + case ILU_NEAREST: + case ILU_LINEAR: + case ILU_BILINEAR: + case ILU_SCALE_BOX: + case ILU_SCALE_TRIANGLE: + case ILU_SCALE_BELL: + case ILU_SCALE_BSPLINE: + case ILU_SCALE_LANCZOS3: + case ILU_SCALE_MITCHELL: + iluFilter = Param; + break; + default: + ilSetError(ILU_INVALID_ENUM); + return; + } + break; + + case ILU_PLACEMENT: + switch (Param) + { + case ILU_LOWER_LEFT: + case ILU_LOWER_RIGHT: + case ILU_UPPER_LEFT: + case ILU_UPPER_RIGHT: + case ILU_CENTER: + iluPlacement = Param; + break; + default: + ilSetError(ILU_INVALID_ENUM); + return; + } + break; + + default: + ilSetError(ILU_INVALID_ENUM); + return; + } + return; +} diff --git a/libs/DevIL-1.7.8/src-ILU/src/ilu_utilities.c b/libs/DevIL-1.7.8/src-ILU/src/ilu_utilities.c new file mode 100644 index 00000000..95ef763b --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILU/src/ilu_utilities.c @@ -0,0 +1,63 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2001 <--Y2K Compliant! =] +// +// Filename: src-ILU/src/ilu_utilities.c +// +// Description: Utility functions +// +//----------------------------------------------------------------------------- + + +#include "ilu_internal.h" + + +void ILAPIENTRY iluDeleteImage(ILuint Id) +{ + ilDeleteImages(1, &Id); + return; +} + + +ILuint ILAPIENTRY iluGenImage() +{ + ILuint Id; + ilGenImages(1, &Id); + ilBindImage(Id); + return Id; +} + + +//! Retrieves information about the current bound image. +void ILAPIENTRY iluGetImageInfo(ILinfo *Info) +{ + iluCurImage = ilGetCurImage(); + if (iluCurImage == NULL || Info == NULL) { + ilSetError(ILU_ILLEGAL_OPERATION); + return; + } + + Info->Id = ilGetCurName(); + Info->Data = ilGetData(); + Info->Width = iluCurImage->Width; + Info->Height = iluCurImage->Height; + Info->Depth = iluCurImage->Depth; + Info->Bpp = iluCurImage->Bpp; + Info->SizeOfData = iluCurImage->SizeOfData; + Info->Format = iluCurImage->Format; + Info->Type = iluCurImage->Type; + Info->Origin = iluCurImage->Origin; + Info->Palette = iluCurImage->Pal.Palette; + Info->PalType = iluCurImage->Pal.PalType; + Info->PalSize = iluCurImage->Pal.PalSize; + iGetIntegervImage(iluCurImage, IL_NUM_IMAGES, + (ILint*)&Info->NumNext); + iGetIntegervImage(iluCurImage, IL_NUM_MIPMAPS, + (ILint*)&Info->NumMips); + iGetIntegervImage(iluCurImage, IL_NUM_LAYERS, + (ILint*)&Info->NumLayers); + + return; +} diff --git a/libs/DevIL-1.7.8/src-ILUT/include/ilut_allegro.h b/libs/DevIL-1.7.8/src-ILUT/include/ilut_allegro.h new file mode 100644 index 00000000..fe02e6a1 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/include/ilut_allegro.h @@ -0,0 +1,27 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 04/20/2002 <--Y2K Compliant! =] +// +// Filename: src-ILUT/include/ilut_alleg.h (Don't want to conflict with allegro.h) +// +// Description: +// +//----------------------------------------------------------------------------- + +// xxxxAllegro.h has to be included before il/il.h!xxx +//#ifdef ALLEGRO_VERSION // Check to make sure Allegro is present +#ifdef ILUT_USE_ALLEGRO + +#ifndef ILUT_ALLEG_H +#define ILUT_ALLEG_H + +#include + + + +#endif//ILUT_ALLEG_H +#endif//ILUT_USE_ALLEGRO +//#endif//ALLEGRO_VERSION + diff --git a/libs/DevIL-1.7.8/src-ILUT/include/ilut_internal.h b/libs/DevIL-1.7.8/src-ILUT/include/ilut_internal.h new file mode 100644 index 00000000..030f7025 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/include/ilut_internal.h @@ -0,0 +1,99 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 02/07/2002 <--Y2K Compliant! =] +// +// Filename: src-ILUT/include/ilut_internal.h +// +// Description: Internal stuff for ILUT +// +//----------------------------------------------------------------------------- + + +#ifndef INTERNAL_H +#define INTERNAL_H + +#define _IL_BUILD_LIBRARY +#define _ILU_BUILD_LIBRARY +#define _ILUT_BUILD_LIBRARY + +//#define WIN32_LEAN_AND_MEAN + +/*#if defined(_WIN32) && !defined(HAVE_CONFIG_H) +#define HAVE_CONFIG_H +#endif*/ + +#ifdef HAVE_CONFIG_H //if we use autotools, we have HAVE_CONFIG_H defined and we have to look for it like that +#include +#else // if we don't use autotools, we have to point to (possibly different) config.h than in the opposite case +#include +#endif + +#include + +#ifdef _WIN32 +#ifdef _MSC_VER + #if _MSC_VER > 1000 + #pragma warning(disable: 4996) // "The POSIX name for this item is deprecated." AND "This function or variable may be unsafe." + #endif // _MSC_VER > 1000 + #endif +#endif + +/* +#ifdef _MSC_VER + #if _MSC_VER > 1000 + pragma once + pragma intrinsic(memcpy) + pragma intrinsic(memset) + #endif // _MSC_VER > 1000 +#endif +*/ + +#include +#include + +#include + +extern ILimage *ilutCurImage; + +void ilutDefaultStates(void); + + +#ifdef _UNICODE + #define IL_TEXT(s) L##s +#else + #define IL_TEXT(s) (s) +#endif + + +// ImageLib Utility Toolkit's OpenGL Functions +#ifdef ILUT_USE_OPENGL + ILboolean ilutGLInit(); +#endif + +// ImageLib Utility Toolkit's Win32 Functions +#ifdef ILUT_USE_WIN32 + ILboolean ilutWin32Init(); +#endif + +// ImageLib Utility Toolkit's Win32 Functions +#ifdef ILUT_USE_DIRECTX8 + ILboolean ilutD3D8Init(); +#endif + +#ifdef ILUT_USE_DIRECTX9 + ILboolean ilutD3D9Init(); +#endif + +#ifdef ILUT_USE_DIRECTX10 + ILboolean ilutD3D10Init(); +#endif + +#define CUBEMAP_SIDES 6 +#ifndef SAFE_RELEASE +#define SAFE_RELEASE(p) {if((p)!=NULL){(p)->lpVtbl->Release(p);(p)=NULL;}} +#endif + + +#endif//INTERNAL_H diff --git a/libs/DevIL-1.7.8/src-ILUT/include/ilut_opengl.h b/libs/DevIL-1.7.8/src-ILUT/include/ilut_opengl.h new file mode 100644 index 00000000..8479243b --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/include/ilut_opengl.h @@ -0,0 +1,47 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/09/2009 +// +// Filename: src-ILUT/include/ilut_opengl.h +// +// Description: OpenGL functions for images +// +//----------------------------------------------------------------------------- + +#ifndef ILUT_OPENGL_H +#define ILUT_OPENGL_H + +#include "ilut_internal.h" + +#ifndef min +#define min(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifdef ILUT_USE_OPENGL +ILenum ilutGLFormat(ILenum, ILubyte); +ILimage* MakeGLCompliant2D(ILimage *Src); +ILimage* MakeGLCompliant3D(ILimage *Src); +ILboolean IsExtensionSupported(const char *extension); + + +#ifdef _WIN32 + #include + #include +#elif linux + #include + #include // patch #1504388. X86_64 Problems by Hans de Goede +#elif defined __APPLE__ + #include + void* aglGetProcAddress (const GLubyte *name); +#endif + +typedef void (ILAPIENTRY * ILGLTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *data); +typedef void (ILAPIENTRY * ILGLTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *data); +typedef void (ILAPIENTRY * ILGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (ILAPIENTRY * ILGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); + + +#endif //ILUT_USE_OPENGL +#endif //ILUT_OPENGL_H diff --git a/libs/DevIL-1.7.8/src-ILUT/include/ilut_states.h b/libs/DevIL-1.7.8/src-ILUT/include/ilut_states.h new file mode 100644 index 00000000..2675e09f --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/include/ilut_states.h @@ -0,0 +1,57 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/28/2001 <--Y2K Compliant! =] +// +// Filename: src-ILUT/include/ilut_states.h +// +// Description: State machine +// +//----------------------------------------------------------------------------- + +#ifndef STATES_H +#define STATES_H + +#include "ilut_internal.h" + + +ILboolean ilutAble(ILenum Mode, ILboolean Flag); + + +#define ILUT_ATTRIB_STACK_MAX 32 + +ILuint ilutCurrentPos = 0; // Which position on the stack + +// +// Various states +// + +typedef struct ILUT_STATES +{ + + // ILUT states + ILboolean ilutUsePalettes; + ILboolean ilutOglConv; + ILboolean ilutForceIntegerFormat; + ILenum ilutDXTCFormat; + + // GL states + ILboolean ilutUseS3TC; + ILboolean ilutGenS3TC; + ILboolean ilutAutodetectTextureTarget; + ILint MaxTexW; + ILint MaxTexH; + ILint MaxTexD; + + // D3D states + ILuint D3DMipLevels; + ILenum D3DPool; + ILint D3DAlphaKeyColor; // 0x00rrggbb format , -1 for none + +} ILUT_STATES; + +ILUT_STATES ilutStates[ILUT_ATTRIB_STACK_MAX]; + + +#endif//STATES_H diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.rc b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.rc new file mode 100644 index 00000000..6969c0f3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILUT: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILUT" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILUT.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utility Toolkit Library" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.vcproj b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.vcproj new file mode 100644 index 00000000..1852060e --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT Unicode.vcproj @@ -0,0 +1,778 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.dsp b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.dsp new file mode 100644 index 00000000..35c8c1f6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.dsp @@ -0,0 +1,228 @@ +# Microsoft Developer Studio Project File - Name="ILUT" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=ILUT - WIN32 DEBUG +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "ILUT.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "ILUT.mak" CFG="ILUT - WIN32 DEBUG" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "ILUT - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 Dynamic" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "ILUT" +# PROP Scc_LocalPath "..\.." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ILUT - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "../../lib/debug" +# PROP BASE Intermediate_Dir "../src/obj/debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../lib/debug" +# PROP Intermediate_Dir "../src/obj/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 devil.lib ilu.lib delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:".\ilut.def" /out:"c:\path\ilut.dll" /pdbtype:sept /libpath:"../../lib" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ILUT - Win32 Dynamic" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj/dynamic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj/dynamic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /out:"../../lib/ilut-l.dll" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /out:"../../lib/ilut-l.dll" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +TargetName=ilut-l +SOURCE="$(InputPath)" +PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\$(TargetName).dll +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ILUT - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /D "IL_STATIC_LIB" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 devil.lib ilu.lib kernel32.lib winspool.lib advapi32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /libpath:"../../lib" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\..\lib\ilut.dll "C:\path\ilut.dll" +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ILUT - Win32 Debug" +# Name "ILUT - Win32 Dynamic" +# Name "ILUT - Win32 Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ilut.def + +!IF "$(CFG)" == "ILUT - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ILUT - Win32 Dynamic" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ILUT - Win32 Release" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_directx.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_internal.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_main.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_opengl.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_sdlsurface.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_states.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_win32.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\IL\devil_internal_exports.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\il\ilut.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_opengl.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_states.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\resources\IL Logo.ico" +# End Source File +# Begin Source File + +SOURCE=.\ILUT.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.rc b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.rc new file mode 100644 index 00000000..55045ff6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILUT: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILUT" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILUT.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utility Toolkit Library" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.vcproj b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.vcproj new file mode 100644 index 00000000..ac92659e --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ILUT.vcproj @@ -0,0 +1,812 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/ilut.def b/libs/DevIL-1.7.8/src-ILUT/msvc8/ilut.def new file mode 100644 index 00000000..1df72c41 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/ilut.def @@ -0,0 +1,74 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +ilutConvertToHBitmap + +ilutConvertSliceToHBitmap +;ilutConvertToSDLSurface +;ilutSDLSurfaceFromBitmap +;ilutSDLSurfaceLoadImage +;ilutD3D8LoadSurface +;ilutD3D8MipFunc +;ilutD3D8Texture +;ilutD3D8TexFromFile +;ilutD3D8VolumeTexture +;ilutD3D8VolTexFromFile +;ilutD3D8TexFromFileInMemory +;ilutD3D8VolTexFromFileInMemory +;ilutD3D8TexFromFileHandle +;ilutD3D8VolTexFromFileHandle +;ilutD3D8TexFromResource +;ilutD3D8VolTexFromResource +;ilutD3D9LoadSurface +;ilutD3D9MipFunc +;ilutD3D9Texture +;ilutD3D9TexFromFile +;ilutD3D9VolumeTexture +;ilutD3D9VolTexFromFile +;ilutD3D9TexFromFileInMemory +;ilutD3D9VolTexFromFileInMemory +;ilutD3D9TexFromFileHandle +;ilutD3D9VolTexFromFileHandle +;ilutD3D9TexFromResource +;ilutD3D9VolTexFromResource +ilutDisable +ilutEnable +ilutFreePaddedData +ilutGetBmpInfo +ilutGetBoolean +ilutGetBooleanv +ilutGetHPal +ilutGetInteger +ilutGetIntegerv +ilutGetPaddedData +ilutGetString +ilutGetWinClipboard +ilutInit +ilutIsDisabled +ilutIsEnabled +ilutLoadResource +ilutGLBindMipmaps +ilutGLBindTexImage +ilutGLBuildMipmaps +ilutGLLoadImage +ilutGLSaveImage +ilutGLScreen +ilutGLScreenie +ilutGLSetTex +ilutGLSetTex2D +ilutGLSetTex3D +ilutGLSubTex +ilutGLSubTex2D +ilutGLSubTex3D +ilutGLTexImage +ilutPopAttrib +ilutPushAttrib +ilutRenderer +ilutSetHBitmap +ilutSetHPal +ilutSetInteger +ilutSetWinClipboard +ilutWinLoadImage +ilutWinLoadUrl +ilutWinPrint +ilutWinSaveImage diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/resource.h b/libs/DevIL-1.7.8/src-ILUT/msvc8/resource.h new file mode 100644 index 00000000..f6707e83 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ILUT Unicode.rc +// +#define IDC_OPENILUT 109 +#define IDI_ICON1 155 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/ILUT.rc b/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/ILUT.rc new file mode 100644 index 00000000..cde2e77b --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc8/resources/ILUT.rc @@ -0,0 +1,135 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,2,4 + PRODUCTVERSION 0,1,2,4 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A great portable image library in development\0" + VALUE "CompanyName", "Abysmal Software\0" + VALUE "FileDescription", "ILUT: A great portable image library in development\0" + VALUE "FileVersion", "1.2.4\0" + VALUE "InternalName", "ILUT\0" + VALUE "LegalCopyright", "Copyright © 2000-2001\0" + VALUE "LegalTrademarks", "Under LGPL License\0" + VALUE "OriginalFilename", "ILUT.dll\0" + VALUE "PrivateBuild", "Open Source\0" + VALUE "ProductName", "Developer's Image Utility Toolkit Library\0" + VALUE "ProductVersion", "1.2.4\0" + VALUE "SpecialBuild", "eh?\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.2.4" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.rc b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.rc new file mode 100644 index 00000000..6969c0f3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILUT: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILUT" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILUT.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utility Toolkit Library" + VALUE "ProductVersion", "1.7.8 Unicode" + VALUE "SpecialBuild", "Unicode" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.vcproj b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.vcproj new file mode 100644 index 00000000..e77dcabc --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT Unicode.vcproj @@ -0,0 +1,1451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.dsp b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.dsp new file mode 100644 index 00000000..35c8c1f6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.dsp @@ -0,0 +1,228 @@ +# Microsoft Developer Studio Project File - Name="ILUT" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=ILUT - WIN32 DEBUG +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "ILUT.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "ILUT.mak" CFG="ILUT - WIN32 DEBUG" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "ILUT - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 Dynamic" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ILUT - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "ILUT" +# PROP Scc_LocalPath "..\.." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ILUT - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "../../lib/debug" +# PROP BASE Intermediate_Dir "../src/obj/debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "../../lib/debug" +# PROP Intermediate_Dir "../src/obj/debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 devil.lib ilu.lib delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:".\ilut.def" /out:"c:\path\ilut.dll" /pdbtype:sept /libpath:"../../lib" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ILUT - Win32 Dynamic" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj/dynamic" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj/dynamic" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /out:"../../lib/ilut-l.dll" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /out:"../../lib/ilut-l.dll" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +TargetName=ilut-l +SOURCE="$(InputPath)" +PostBuild_Cmds=..\..\projects\msvc\insdll.bat ..\..\lib\$(TargetName).dll +# End Special Build Tool + +!ELSEIF "$(CFG)" == "ILUT - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "../../lib" +# PROP BASE Intermediate_Dir "../src/obj" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../../lib" +# PROP Intermediate_Dir "../src/obj" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /I "../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ILUT_EXPORTS" /D "IL_STATIC_LIB" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 delayimp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 devil.lib ilu.lib kernel32.lib winspool.lib advapi32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib /nologo /dll /machine:I386 /def:".\ilut.def" /libpath:"../../lib" /delayload:d3d8.dll /delayload:sdl.dll +# SUBTRACT LINK32 /pdb:none +# Begin Special Build Tool +SOURCE="$(InputPath)" +PostBuild_Cmds=copy ..\..\lib\ilut.dll "C:\path\ilut.dll" +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "ILUT - Win32 Debug" +# Name "ILUT - Win32 Dynamic" +# Name "ILUT - Win32 Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ilut.def + +!IF "$(CFG)" == "ILUT - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ILUT - Win32 Dynamic" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ILUT - Win32 Release" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_directx.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_internal.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_main.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_opengl.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_sdlsurface.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_states.c +# End Source File +# Begin Source File + +SOURCE=..\src\ilut_win32.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\IL\devil_internal_exports.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\il\ilut.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_internal.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_opengl.h +# End Source File +# Begin Source File + +SOURCE=..\include\ilut_states.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\resources\IL Logo.ico" +# End Source File +# Begin Source File + +SOURCE=.\ILUT.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.rc b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.rc new file mode 100644 index 00000000..55045ff6 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.rc @@ -0,0 +1,132 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,7,8 + PRODUCTVERSION 0,1,7,8 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A portable image library in development" + VALUE "CompanyName", "Abysmal Software" + VALUE "FileDescription", "ILUT: A portable image library in development" + VALUE "FileVersion", "1.7.8" + VALUE "InternalName", "ILUT" + VALUE "LegalCopyright", "Copyright © 2000-2008" + VALUE "LegalTrademarks", "Under LGPL License" + VALUE "OriginalFilename", "ILUT.dll" + VALUE "PrivateBuild", "Open Source" + VALUE "ProductName", "Developer's Image Utility Toolkit Library" + VALUE "ProductVersion", "1.7.8 Ansi" + VALUE "SpecialBuild", "Ansi" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.7.8" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.vcproj b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.vcproj new file mode 100644 index 00000000..a9cc7906 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ILUT.vcproj @@ -0,0 +1,817 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/ilut.def b/libs/DevIL-1.7.8/src-ILUT/msvc9/ilut.def new file mode 100644 index 00000000..096e3c4e --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/ilut.def @@ -0,0 +1,70 @@ +; To remove an export, add a semicolon at the beginning of the line to comment it out. + +EXPORTS +ilutConvertToHBitmap + +ilutConvertSliceToHBitmap +;ilutConvertToSDLSurface +;ilutSDLSurfaceFromBitmap +;ilutSDLSurfaceLoadImage +;ilutD3D8LoadSurface +;ilutD3D8MipFunc +;ilutD3D8Texture +;ilutD3D8TexFromFile +;ilutD3D8VolumeTexture +;ilutD3D8VolTexFromFile +;ilutD3D8TexFromFileInMemory +;ilutD3D8VolTexFromFileInMemory +;ilutD3D8TexFromFileHandle +;ilutD3D8VolTexFromFileHandle +;ilutD3D8TexFromResource +;ilutD3D8VolTexFromResource +;ilutD3D9LoadSurface +;ilutD3D9MipFunc +;ilutD3D9Texture +;ilutD3D9TexFromFile +;ilutD3D9VolumeTexture +;ilutD3D9VolTexFromFile +;ilutD3D9TexFromFileInMemory +;ilutD3D9VolTexFromFileInMemory +;ilutD3D9TexFromFileHandle +;ilutD3D9VolTexFromFileHandle +;ilutD3D9TexFromResource +;ilutD3D9VolTexFromResource +ilutDisable +ilutEnable +ilutFreePaddedData +ilutGetBmpInfo +ilutGetBoolean +ilutGetBooleanv +ilutGetHPal +ilutGetInteger +ilutGetIntegerv +ilutGetPaddedData +ilutGetString +ilutGetWinClipboard +ilutInit +ilutIsDisabled +ilutIsEnabled +ilutLoadResource +ilutGLBindMipmaps +ilutGLBindTexImage +ilutGLBuildMipmaps +ilutGLLoadImage +ilutGLSaveImage +ilutGLScreen +ilutGLScreenie +ilutGLSetTex +ilutGLSubTex +ilutGLTexImage +ilutPopAttrib +ilutPushAttrib +ilutRenderer +ilutSetHBitmap +ilutSetHPal +ilutSetInteger +ilutSetWinClipboard +ilutWinLoadImage +ilutWinLoadUrl +ilutWinPrint +ilutWinSaveImage diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/resource.h b/libs/DevIL-1.7.8/src-ILUT/msvc9/resource.h new file mode 100644 index 00000000..2efce68d --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ILUT.rc +// +#define IDC_OPENILUT 109 +#define IDI_ICON1 155 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/IL Logo.ico b/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/IL Logo.ico new file mode 100644 index 00000000..e05ac9b1 Binary files /dev/null and b/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/IL Logo.ico differ diff --git a/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/ILUT.rc b/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/ILUT.rc new file mode 100644 index 00000000..cde2e77b --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/msvc9/resources/ILUT.rc @@ -0,0 +1,135 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +#include "resource.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""resource.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,1,2,4 + PRODUCTVERSION 0,1,2,4 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "ILUT: A great portable image library in development\0" + VALUE "CompanyName", "Abysmal Software\0" + VALUE "FileDescription", "ILUT: A great portable image library in development\0" + VALUE "FileVersion", "1.2.4\0" + VALUE "InternalName", "ILUT\0" + VALUE "LegalCopyright", "Copyright © 2000-2001\0" + VALUE "LegalTrademarks", "Under LGPL License\0" + VALUE "OriginalFilename", "ILUT.dll\0" + VALUE "PrivateBuild", "Open Source\0" + VALUE "ProductName", "Developer's Image Utility Toolkit Library\0" + VALUE "ProductVersion", "1.2.4\0" + VALUE "SpecialBuild", "eh?\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON DISCARDABLE "resources\\IL Logo.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDC_OPENILUT "Developer's Image Utility Toolkit Library, Version 1.2.4" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_allegro.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_allegro.c new file mode 100644 index 00000000..a4094061 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_allegro.c @@ -0,0 +1,131 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2000 by Denton Woods +// Last modified: 11/23/2000 <--Y2K Compliant! =] +// +// Filename: openilut/allegro.c +// +// Description: Allegro functions for images +// +//----------------------------------------------------------------------------- + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif //HAVE_CONFIG_H + +#ifdef ILUT_USE_ALLEGRO +#include "ilut_allegro.h" +#endif + +#include "ilut_internal.h" + +#ifdef ILUT_USE_ALLEGRO + +ILboolean ilConvertPal(ILenum DestFormat); + +// Does not account for converting luminance... +BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal) +{ + BITMAP *Bitmap; + ILimage *TempImage; + ILuint i = 0, j = 0; + + ilutCurImage = ilGetCurImage(); + + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + // Should be IL_BGR(A), but Djgpp screws up somewhere along the line. + if (ilutCurImage->Format == IL_RGB || ilutCurImage->Format == IL_RGBA) { + iluSwapColours(); + } + + if (ilutCurImage->Origin == IL_ORIGIN_LOWER_LEFT) + iluFlipImage(); + if (ilutCurImage->Type > IL_UNSIGNED_BYTE) {} // Can't do anything about this right now... + if (ilutCurImage->Type == IL_BYTE) {} // Can't do anything about this right now... + + Bitmap = create_bitmap_ex(ilutCurImage->Bpp * 8, ilutCurImage->Width, ilutCurImage->Height); + if (Bitmap == NULL) { + return IL_FALSE; + } + memcpy(Bitmap->dat, ilutCurImage->Data, ilutCurImage->SizeOfData); + + // Should we make this toggleable? + if (ilutCurImage->Bpp == 8 && ilutCurImage->Pal.PalType != IL_PAL_NONE) { + // Use the image's palette if there is one + + // ilConvertPal is destructive to the original image + // @TODO: Use new ilCopyPal!!! + TempImage = ilNewImage(ilutCurImage->Width, ilutCurImage->Height, ilutCurImage->Depth, ilutCurImage->Bpp, 1); + ilCopyImageAttr(TempImage, ilutCurImage); + ilSetCurImage(TempImage); + + if (!ilConvertPal(IL_PAL_RGB24)) { + destroy_bitmap(Bitmap); + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + for (; i < ilutCurImage->Pal.PalSize && i < 768; i += 3, j++) { + Pal[j].r = TempImage->Pal.Palette[i+0]; + Pal[j].g = TempImage->Pal.Palette[i+1]; + Pal[j].b = TempImage->Pal.Palette[i+2]; + Pal[j].filler = 255; + } + + ilCloseImage(TempImage); + ilSetCurImage(ilutCurImage); + } + + return Bitmap; +} + + +#ifndef _WIN32_WCE +BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName) +{ + ILuint ImgId; + PALETTE Pal; + + ilGenImages(1, &ImgId); + ilBindImage(ImgId); + if (!ilLoadImage(FileName)) { + ilDeleteImages(1, &ImgId); + return 0; + } + + ilDeleteImages(1, &ImgId); + + return ilutConvertToAlleg(Pal); +} +#endif//_WIN32_WCE + + +// Unfinished +ILboolean ILAPIENTRY ilutAllegFromBitmap(BITMAP *Bitmap) +{ + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Bitmap == NULL || Bitmap->w == 0 || Bitmap->h == 0) { + ilSetError(ILUT_INVALID_PARAM); + return IL_FALSE; + } + + if (!ilTexImage(Bitmap->w, Bitmap->h, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + ilutCurImage->Origin = IL_ORIGIN_LOWER_LEFT; // I have no idea. + + return IL_TRUE; +} + +#endif//ILUT_USE_ALLEGRO + diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx.c new file mode 100644 index 00000000..e16560ff --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx.c @@ -0,0 +1,542 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/25/2001 +// +// Filename: src-ILUT/src/ilut_directx.c +// +// Description: DirectX 8 functions for textures +// +//----------------------------------------------------------------------------- + +#include "ilut_internal.h" +#ifdef ILUT_USE_DIRECTX8 + +#include +//#include +//pragma comment(lib, "d3d8.lib") +//pragma comment(lib, "d3dx8.lib") + +ILimage* MakeD3D8Compliant(IDirect3DDevice8 *Device, D3DFORMAT *DestFormat); +ILenum GetD3D8Compat(ILenum Format); +D3DFORMAT GetD3DFormat(ILenum Format); +ILboolean iD3D8CreateMipmaps(IDirect3DTexture8 *Texture, ILimage *Image); + +ILboolean FormatsDX8Checked = IL_FALSE; +ILboolean FormatsDX8supported[6] = + { IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE }; +D3DFORMAT FormatsDX8[6] = + { D3DFMT_R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_L8, D3DFMT_DXT1, D3DFMT_DXT3, D3DFMT_DXT5 }; + + +ILboolean ilutD3D8Init() +{ + + return IL_TRUE; +} + + +ILvoid CheckFormatsDX8(IDirect3DDevice8 *Device) +{ + D3DDISPLAYMODE DispMode; + HRESULT hr; + IDirect3D8 *TestD3D8; + ILuint i; + + IDirect3DDevice8_GetDirect3D(Device, (IDirect3D8**)&TestD3D8); + IDirect3DDevice8_GetDisplayMode(Device, &DispMode); + + for (i = 0; i < 6; i++) { + hr = IDirect3D8_CheckDeviceFormat(TestD3D8, D3DADAPTER_DEFAULT, + D3DDEVTYPE_HAL, DispMode.Format, 0, D3DRTYPE_TEXTURE, FormatsDX8[i]); + FormatsDX8supported[i] = SUCCEEDED(hr); + } + + IDirect3D8_Release(TestD3D8); + FormatsDX8Checked = IL_TRUE; + + return; +} + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutD3D8TexFromFile(IDirect3DDevice8 *Device, char *FileName, IDirect3DTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return IL_FALSE; + + *Texture = ilutD3D8Texture(Device); + + return IL_TRUE; +} +#endif//_WIN32_WCE + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(IDirect3DDevice8 *Device, char *FileName, IDirect3DVolumeTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return IL_FALSE; + + *Texture = ilutD3D8VolumeTexture(Device); + + return IL_TRUE; +} +#endif//_WIN32_WCE + + +ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadL(IL_TYPE_UNKNOWN, Lump, Size)) + return IL_FALSE; + + *Texture = ilutD3D8Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(IDirect3DDevice8 *Device, ILvoid *Lump, ILuint Size, IDirect3DVolumeTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadL(IL_TYPE_UNKNOWN, Lump, Size)) + return IL_FALSE; + + *Texture = ilutD3D8VolumeTexture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D8TexFromResource(IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DTexture8 **Texture) +{ + HRSRC Resource; + ILubyte *Data; + + iBindImageTemp(); + + Resource = (HRSRC)LoadResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)); + Data = (ILubyte*)LockResource(Resource); + if (!ilLoadL(IL_TYPE_UNKNOWN, Data, SizeofResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)))) + return IL_FALSE; + + *Texture = ilutD3D8Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DVolumeTexture8 **Texture) +{ + HRSRC Resource; + ILubyte *Data; + + iBindImageTemp(); + + Resource = (HRSRC)LoadResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)); + Data = (ILubyte*)LockResource(Resource); + if (!ilLoadL(IL_TYPE_UNKNOWN, Data, SizeofResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)))) + return IL_FALSE; + + *Texture = ilutD3D8VolumeTexture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(IDirect3DDevice8 *Device, ILHANDLE File, IDirect3DTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadF(IL_TYPE_UNKNOWN, File)) + return IL_FALSE; + + *Texture = ilutD3D8Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(IDirect3DDevice8 *Device, ILHANDLE File, IDirect3DVolumeTexture8 **Texture) +{ + iBindImageTemp(); + if (!ilLoadF(IL_TYPE_UNKNOWN, File)) + return IL_FALSE; + + *Texture = ilutD3D8VolumeTexture(Device); + + return IL_TRUE; +} + + +D3DFORMAT D3DGetDXTCNumDX8(ILenum DXTCFormat) +{ + switch (DXTCFormat) + { + case IL_DXT1: + return D3DFMT_DXT1; + case IL_DXT3: + return D3DFMT_DXT3; + case IL_DXT5: + return D3DFMT_DXT5; + } + + return D3DFMT_UNKNOWN; +} + + +IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(IDirect3DDevice8 *Device) +{ + IDirect3DTexture8 *Texture; + D3DLOCKED_RECT Rect; + D3DFORMAT Format; + ILimage *Image; + ILenum DXTCFormat; + ILuint Size; + ILubyte *Buffer; + + Image = ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!FormatsDX8Checked) + CheckFormatsDX8(Device); + + if (ilutGetBoolean(ILUT_D3D_USE_DXTC) && FormatsDX8supported[3] && FormatsDX8supported[4] && FormatsDX8supported[5]) { + if (ilutCurImage->DxtcData != NULL && ilutCurImage->DxtcSize != 0) { + Format = D3DGetDXTCNumDX8(ilutCurImage->DxtcFormat); + + if (FAILED(IDirect3DDevice8_CreateTexture(Device, ilutCurImage->Width, + ilutCurImage->Height, ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, + (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture))) + return NULL; + if (FAILED(IDirect3DTexture8_LockRect(Texture, 0, &Rect, NULL, 0))) + return NULL; + memcpy(Rect.pBits, ilutCurImage->DxtcData, ilutCurImage->DxtcSize); + goto success; + } + + if (ilutGetBoolean(ILUT_D3D_GEN_DXTC)) { + DXTCFormat = ilutGetInteger(ILUT_DXTC_FORMAT); + + Size = ilGetDXTCData(NULL, 0, DXTCFormat); + if (Size != 0) { + Buffer = (ILubyte*)ialloc(Size); + if (Buffer == NULL) + return NULL; + Size = ilGetDXTCData(Buffer, Size, DXTCFormat); + if (Size == 0) { + ifree(Buffer); + return NULL; + } + + Format = D3DGetDXTCNumDX8(DXTCFormat); + if (FAILED(IDirect3DDevice8_CreateTexture(Device, ilutCurImage->Width, + ilutCurImage->Height, ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, + (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture))) { + ifree(Buffer); + return NULL; + } + if (FAILED(IDirect3DTexture8_LockRect(Texture, 0, &Rect, NULL, 0))) { + ifree(Buffer); + return NULL; + } + memcpy(Rect.pBits, Buffer, Size); + ifree(Buffer); + goto success; + } + } + } + + Image = MakeD3D8Compliant(Device, &Format); + if (Image == NULL) { + if (Image != ilutCurImage) + ilCloseImage(Image); + return NULL; + } + if (FAILED(IDirect3DDevice8_CreateTexture(Device, Image->Width, Image->Height, + ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture))) { + if (Image != ilutCurImage) + ilCloseImage(Image); + return NULL; + } + if (FAILED(IDirect3DTexture8_LockRect(Texture, 0, &Rect, NULL, 0))) + return NULL; + memcpy(Rect.pBits, Image->Data, Image->SizeOfPlane); + +success: + IDirect3DTexture8_UnlockRect(Texture, 0); + // Just let D3DX filter for us. + //D3DXFilterTexture(Texture, NULL, D3DX_DEFAULT, D3DX_FILTER_BOX); + iD3D8CreateMipmaps(Texture, Image); + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return Texture; +} + + +IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(IDirect3DDevice8 *Device) +{ + IDirect3DVolumeTexture8 *Texture; + D3DLOCKED_BOX Box; + D3DFORMAT Format; + ILimage *Image; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!FormatsDX8Checked) + CheckFormatsDX8(Device); + + Image = MakeD3D8Compliant(Device, &Format); + if (Image == NULL) + return NULL; + if (FAILED(IDirect3DDevice8_CreateVolumeTexture(Device, Image->Width, Image->Height, + Image->Depth, 1, 0, Format, (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture))) + return NULL; + if (FAILED(IDirect3DVolumeTexture8_LockBox(Texture, 0, &Box, NULL, 0))) + return NULL; + + memcpy(Box.pBits, Image->Data, Image->SizeOfData); + if (!IDirect3DVolumeTexture8_UnlockBox(Texture, 0)) + return IL_FALSE; + + // We don't want to have mipmaps for such a large image. + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return Texture; +} + + +ILimage *MakeD3D8Compliant(IDirect3DDevice8 *Device, D3DFORMAT *DestFormat) +{ + ILimage *Converted, *Scaled, *CurImage; + + *DestFormat = D3DFMT_A8R8G8B8; + + // Images must be in BGRA format. + if (ilutCurImage->Format != IL_BGRA) { + Converted = iConvertImage(ilutCurImage, IL_BGRA, IL_UNSIGNED_BYTE); + if (Converted == NULL) + return NULL; + } + else { + Converted = ilutCurImage; + } + + // Images must have their origin in the upper left. + if (Converted->Origin != IL_ORIGIN_UPPER_LEFT) { + CurImage = ilutCurImage; + ilSetCurImage(Converted); + iluFlipImage(); + ilSetCurImage(CurImage); + } + + // Images must have powers-of-2 dimensions. + if (ilNextPower2(ilutCurImage->Width) != ilutCurImage->Width || + ilNextPower2(ilutCurImage->Height) != ilutCurImage->Height || + ilNextPower2(ilutCurImage->Depth) != ilutCurImage->Depth) { + Scaled = iluScale_(Converted, ilNextPower2(ilutCurImage->Width), + ilNextPower2(ilutCurImage->Height), ilNextPower2(ilutCurImage->Depth)); + if (Converted != ilutCurImage) { + ilCloseImage(Converted); + } + if (Scaled == NULL) { + return NULL; + } + Converted = Scaled; + } + + return Converted; +} + + +ILboolean iD3D8CreateMipmaps(IDirect3DTexture8 *Texture, ILimage *Image) +{ + D3DLOCKED_RECT Rect; + D3DSURFACE_DESC Desc; + ILuint NumMips, Width, Height, i; + ILimage *CurImage, *MipImage, *Temp; + + NumMips = IDirect3DTexture8_GetLevelCount(Texture); + Width = Image->Width; + Height = Image->Height; + + CurImage = ilGetCurImage(); + MipImage = ilCopyImage_(CurImage); + ilSetCurImage(MipImage); + if (!iluBuildMipmaps()) { + ilCloseImage(MipImage); + ilSetCurImage(CurImage); + return IL_FALSE; + } + ilSetCurImage(CurImage); + Temp = MipImage->Mipmaps; + + // Counts the base texture as 1. + for (i = 1; i < NumMips && Temp != NULL; i++) { + if (FAILED(IDirect3DTexture8_LockRect(Texture, i, &Rect, NULL, 0))) + return IL_FALSE; + + Width = IL_MAX(1, Width / 2); + Height = IL_MAX(1, Height / 2); + + IDirect3DTexture8_GetLevelDesc(Texture, i, &Desc); + if (Desc.Width != Width || Desc.Height != Height) { + IDirect3DTexture8_UnlockRect(Texture, i); + return IL_FALSE; + } + + memcpy(Rect.pBits, Temp->Data, Temp->SizeOfData); + + IDirect3DTexture8_UnlockRect(Texture, i); + Temp = Temp->Next; + } + + ilCloseImage(MipImage); + + return IL_TRUE; +} + + +// +// SaveSurfaceToFile.cpp +// +// Copyright (c) 2001 David Galeano +// +// Permission to use, copy, modify and distribute this software +// is hereby granted, provided that both the copyright notice and +// this permission notice appear in all copies of the software, +// derivative works or modified versions. +// +// THE AUTHOR ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" +// CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES +// WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. +// + +ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(IDirect3DDevice8 *Device, IDirect3DSurface8 *Surface) +{ + HRESULT hr; + D3DSURFACE_DESC d3dsd; + LPDIRECT3DSURFACE8 SurfaceCopy; + D3DLOCKED_RECT d3dLR; + ILboolean bHasAlpha; + ILubyte *Image, *ImageAux, *Data; + ILuint y, x; + ILushort dwColor; + + IDirect3DSurface8_GetDesc(Surface, &d3dsd); + + bHasAlpha = (d3dsd.Format == D3DFMT_A8R8G8B8 || d3dsd.Format == D3DFMT_A1R5G5B5); + + if (bHasAlpha) { + if (!ilTexImage(d3dsd.Width, d3dsd.Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + } + else { + if (!ilTexImage(d3dsd.Width, d3dsd.Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + } + + hr = IDirect3DDevice8_CreateImageSurface(Device, d3dsd.Width, d3dsd.Height, d3dsd.Format, &SurfaceCopy); + if (FAILED(hr)) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + hr = IDirect3DDevice8_CopyRects(Device, Surface, NULL, 0, SurfaceCopy, NULL); + if (FAILED(hr)) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + hr = IDirect3DSurface8_LockRect(SurfaceCopy, &d3dLR, NULL, D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY); + if (FAILED(hr)) { + IDirect3DSurface8_Release(SurfaceCopy); + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Image = (ILubyte*)d3dLR.pBits; + Data = ilutCurImage->Data; + + for (y = 0; y < d3dsd.Height; y++) { + if (d3dsd.Format == D3DFMT_X8R8G8B8) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + Data[0] = ImageAux[0]; + Data[1] = ImageAux[1]; + Data[2] = ImageAux[2]; + + Data += 3; + ImageAux += 4; + } + } + else if (d3dsd.Format == D3DFMT_A8R8G8B8) { + memcpy(Data, Image, d3dsd.Width * 4); + } + else if (d3dsd.Format == D3DFMT_R5G6B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x7e0)>>5)<<2); + Data[2] = (ILubyte)(((dwColor&0xf800)>>11)<<3); + + Data += 3; + ImageAux += 2; + } + } + else if (d3dsd.Format == D3DFMT_X1R5G5B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x3e0)>>5)<<3); + Data[2] = (ILubyte)(((dwColor&0x7c00)>>10)<<3); + + Data += 3; + ImageAux += 2; + } + } + else if (d3dsd.Format == D3DFMT_A1R5G5B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x3e0)>>5)<<3); + Data[2] = (ILubyte)(((dwColor&0x7c00)>>10)<<3); + Data[3] = (ILubyte)(((dwColor&0x8000)>>15)*255); + + Data += 4; + ImageAux += 2; + } + } + + Image += d3dLR.Pitch; + } + + IDirect3DSurface8_UnlockRect(SurfaceCopy); + IDirect3DSurface8_Release(SurfaceCopy); + + return IL_TRUE; +} + +#endif//ILUT_USE_DIRECTX8 diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx9.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx9.c new file mode 100644 index 00000000..11f33bd5 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_directx9.c @@ -0,0 +1,886 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 01/30/2009 +// +// Filename: src-ILUT/src/ilut_directx9.c +// +// Description: DirectX 9 functions for textures +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" +#ifdef ILUT_USE_DIRECTX9 + + +#include + +//#include +//#include +#pragma comment(lib, "d3d9.lib") +#pragma comment(lib, "d3dx9.lib") + + +ILimage* MakeD3D9Compliant(IDirect3DDevice9 *Device, D3DFORMAT *DestFormat); +ILenum GetD3D9Compat(ILenum Format); +//D3DFORMAT GetD3DFormat(ILenum Format); +D3DFORMAT D3DGetDXTCNumDX9(ILenum DXTCFormat); +ILenum D3DGetDXTCFormat(D3DFORMAT DXTCNum); +ILboolean iD3D9CreateMipmaps(IDirect3DTexture9 *Texture, ILimage *Image); +IDirect3DTexture9* iD3DMakeTexture( IDirect3DDevice9 *Device, void *Data, ILuint DLen, ILuint Width, ILuint Height, D3DFORMAT Format, D3DPOOL Pool, ILuint Levels ); + + +#define ILUT_TEXTUREFORMAT_D3D9_COUNT 7 +ILboolean FormatsDX9Checked = IL_FALSE; +ILboolean FormatsDX9supported[ILUT_TEXTUREFORMAT_D3D9_COUNT] = + { IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE, IL_FALSE }; +D3DFORMAT FormatsDX9[ILUT_TEXTUREFORMAT_D3D9_COUNT] = + { D3DFMT_R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_L8, D3DFMT_DXT1, D3DFMT_DXT3, D3DFMT_DXT5, D3DFMT_A16B16G16R16F}; + + +ILboolean ilutD3D9Init() +{ + + return IL_TRUE; +} + + +void CheckFormatsDX9(IDirect3DDevice9 *Device) +{ + D3DDISPLAYMODE DispMode; + HRESULT hr; + IDirect3D9 *TestD3D9; + ILuint i; + + IDirect3DDevice9_GetDirect3D(Device, (IDirect3D9**)&TestD3D9); + IDirect3DDevice9_GetDisplayMode(Device, 0, &DispMode); + + for (i = 0; i < ILUT_TEXTUREFORMAT_D3D9_COUNT; i++) { + hr = IDirect3D9_CheckDeviceFormat(TestD3D9, D3DADAPTER_DEFAULT, + D3DDEVTYPE_HAL, DispMode.Format, 0, D3DRTYPE_TEXTURE, FormatsDX9[i]); + FormatsDX9supported[i] = (ILboolean)SUCCEEDED(hr); + } + + IDirect3D9_Release(TestD3D9); + FormatsDX9Checked = IL_TRUE; + + return; +} + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutD3D9TexFromFile(IDirect3DDevice9 *Device, ILconst_string FileName, IDirect3DTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return IL_FALSE; + + *Texture = ilutD3D9Texture(Device); + + return IL_TRUE; +} +#endif//_WIN32_WCE + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(IDirect3DDevice9 *Device, + ILconst_string FileName, IDirect3DCubeTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return IL_FALSE; + + *Texture = ilutD3D9CubeTexture(Device); + + return IL_TRUE; +} + +#endif//_WIN32_WCE +ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(IDirect3DDevice9 *Device, + void *Lump, ILuint Size, IDirect3DCubeTexture9 **Texture) +{ + iBindImageTemp(); + if( !ilLoadL(IL_TYPE_UNKNOWN, Lump, Size) ) + return IL_FALSE; + + *Texture = ilutD3D9CubeTexture(Device); + + return IL_TRUE; + } + +ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(IDirect3DDevice9 *Device, + HMODULE SrcModule, ILconst_string SrcResource, IDirect3DCubeTexture9 **Texture) +{ + HRSRC Resource; + ILubyte *Data; + + iBindImageTemp(); + + Resource = (HRSRC)LoadResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)); + Data = (ILubyte*)LockResource(Resource); + if (!ilLoadL(IL_TYPE_UNKNOWN, Data, SizeofResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)))) + return IL_FALSE; + + *Texture = ilutD3D9CubeTexture(Device); + + return IL_TRUE; + } + +ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(IDirect3DDevice9 *Device, + ILHANDLE File, IDirect3DCubeTexture9 **Texture) +{ + iBindImageTemp(); + if( !ilLoadF(IL_TYPE_UNKNOWN, File) ) + return IL_FALSE; + + *Texture = ilutD3D9CubeTexture(Device); + + return IL_TRUE; +} + +D3DCUBEMAP_FACES iToD3D9Cube(ILuint cube) +{ + switch (cube) + { + case IL_CUBEMAP_POSITIVEX: + return D3DCUBEMAP_FACE_POSITIVE_X; + case IL_CUBEMAP_NEGATIVEX: + return D3DCUBEMAP_FACE_NEGATIVE_X; + case IL_CUBEMAP_POSITIVEY: + return D3DCUBEMAP_FACE_POSITIVE_Y; + case IL_CUBEMAP_NEGATIVEY: + return D3DCUBEMAP_FACE_NEGATIVE_Y; + case IL_CUBEMAP_POSITIVEZ: + return D3DCUBEMAP_FACE_POSITIVE_Z; + case IL_CUBEMAP_NEGATIVEZ: + return D3DCUBEMAP_FACE_NEGATIVE_Z; + default: + return D3DCUBEMAP_FACE_POSITIVE_X; //??? + } + } + + IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture(IDirect3DDevice9 *Device) + { + IDirect3DCubeTexture9 *Texture; + D3DLOCKED_RECT Box; + D3DFORMAT Format; + ILimage *StartImage; + ILimage *Image; + int i; + Texture=NULL; + Image=NULL; + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!FormatsDX9Checked) + CheckFormatsDX9(Device); + + Image = MakeD3D9Compliant(Device, &Format); + if (Image == NULL) { + if (Image != ilutCurImage) + ilCloseImage(Image); + return NULL; + } + + StartImage = ilutCurImage; + if (FAILED(IDirect3DDevice9_CreateCubeTexture(Device, StartImage->Width, + ilutGetInteger(ILUT_D3D_MIPLEVELS),0,Format, (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture, NULL))) + return NULL; + for (i = 0; i < CUBEMAP_SIDES; i++) { + if (ilutCurImage==NULL || ilutCurImage->CubeFlags == 0) { + SAFE_RELEASE(Texture) + return NULL; + } + Image = ilutCurImage; + + Image = MakeD3D9Compliant(Device, &Format); + if( Image == NULL ) { + SAFE_RELEASE(Texture) + return NULL; + } + if( FAILED(IDirect3DCubeTexture9_LockRect(Texture,iToD3D9Cube(Image->CubeFlags), 0, &Box, NULL, /*D3DLOCK_DISCARD*/0))) { + SAFE_RELEASE(Texture) + return NULL; + } + + memcpy(Box.pBits, Image->Data, Image->SizeOfData); + if (IDirect3DCubeTexture9_UnlockRect(Texture,iToD3D9Cube(Image->CubeFlags), 0) != D3D_OK) { + SAFE_RELEASE(Texture) + return IL_FALSE; + } + ilutCurImage=ilutCurImage->Faces; + } + ilutCurImage = StartImage; + + // We don't want to have mipmaps for such a large image. + //if (Image != ilutCurImage) + // ilCloseImage(Image); + + return Texture; +} + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(IDirect3DDevice9 *Device, ILconst_string FileName, IDirect3DVolumeTexture9 **Texture) { + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return IL_FALSE; + + *Texture = ilutD3D9VolumeTexture(Device); + + return IL_TRUE; +} +#endif//_WIN32_WCE + + +ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(IDirect3DDevice9 *Device, void *Lump, ILuint Size, IDirect3DTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadL(IL_TYPE_UNKNOWN, Lump, Size)) + return IL_FALSE; + + *Texture = ilutD3D9Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(IDirect3DDevice9 *Device, void *Lump, ILuint Size, IDirect3DVolumeTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadL(IL_TYPE_UNKNOWN, Lump, Size)) + return IL_FALSE; + + *Texture = ilutD3D9VolumeTexture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D9TexFromResource(IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, IDirect3DTexture9 **Texture) +{ + HRSRC Resource; + ILubyte *Data; + + iBindImageTemp(); + + Resource = (HRSRC)LoadResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)); + Data = (ILubyte*)LockResource(Resource); + if (!ilLoadL(IL_TYPE_UNKNOWN, Data, SizeofResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)))) + return IL_FALSE; + + *Texture = ilutD3D9Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, IDirect3DVolumeTexture9 **Texture) +{ + HRSRC Resource; + ILubyte *Data; + + iBindImageTemp(); + + Resource = (HRSRC)LoadResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)); + Data = (ILubyte*)LockResource(Resource); + if (!ilLoadL(IL_TYPE_UNKNOWN, Data, SizeofResource(SrcModule, FindResource(SrcModule, SrcResource, RT_BITMAP)))) + return IL_FALSE; + + *Texture = ilutD3D9VolumeTexture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(IDirect3DDevice9 *Device, ILHANDLE File, IDirect3DTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadF(IL_TYPE_UNKNOWN, File)) + return IL_FALSE; + + *Texture = ilutD3D9Texture(Device); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(IDirect3DDevice9 *Device, ILHANDLE File, IDirect3DVolumeTexture9 **Texture) +{ + iBindImageTemp(); + if (!ilLoadF(IL_TYPE_UNKNOWN, File)) + return IL_FALSE; + + *Texture = ilutD3D9VolumeTexture(Device); + + return IL_TRUE; +} + + +D3DFORMAT D3DGetDXTCNumDX9(ILenum DXTCFormat) +{ + switch (DXTCFormat) + { + case IL_DXT1: + return D3DFMT_DXT1; + case IL_DXT3: + return D3DFMT_DXT3; + case IL_DXT5: + return D3DFMT_DXT5; + } + + return D3DFMT_UNKNOWN; +} + + +ILenum D3DGetDXTCFormat(D3DFORMAT DXTCNum) +{ + switch (DXTCNum) + { + case D3DFMT_DXT1: + return IL_DXT1; + case D3DFMT_DXT3: + return IL_DXT3; + case D3DFMT_DXT5: + return IL_DXT5; + } + + return D3DFMT_UNKNOWN; +} + + +IDirect3DTexture9* iD3DMakeTexture( IDirect3DDevice9 *Device, void *Data, ILuint DLen, ILuint Width, ILuint Height, D3DFORMAT Format, D3DPOOL Pool, ILuint Levels ) +{ + IDirect3DTexture9 *Texture; + D3DLOCKED_RECT Rect; + + if (FAILED(IDirect3DDevice9_CreateTexture(Device, Width, Height, Levels, + 0, Format, Pool, &Texture, NULL))) + return NULL; + if (FAILED(IDirect3DTexture9_LockRect(Texture, 0, &Rect, NULL, 0))) + return NULL; + memcpy(Rect.pBits, Data, DLen); + IDirect3DTexture9_UnlockRect(Texture, 0); + + return Texture; +} + +IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture(IDirect3DDevice9 *Device) +{ + IDirect3DTexture9 *Texture; +// D3DLOCKED_RECT Rect; + D3DFORMAT Format; + ILimage *Image; + ILenum DXTCFormat; + ILuint Size; + ILubyte *Buffer; + + Image = ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!FormatsDX9Checked) + CheckFormatsDX9(Device); + + if (ilutGetBoolean(ILUT_D3D_USE_DXTC) && FormatsDX9supported[3] && FormatsDX9supported[4] && FormatsDX9supported[5]) { + if (ilutCurImage->DxtcData != NULL && ilutCurImage->DxtcSize != 0) { + ILuint dxtcFormat = ilutGetInteger(ILUT_DXTC_FORMAT); + Format = D3DGetDXTCNumDX9(ilutCurImage->DxtcFormat); + ilutSetInteger(ILUT_DXTC_FORMAT, ilutCurImage->DxtcFormat); + + Texture = iD3DMakeTexture(Device, ilutCurImage->DxtcData, ilutCurImage->DxtcSize, + ilutCurImage->Width, ilutCurImage->Height, Format, + (D3DPOOL)(ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT ? D3DPOOL_SYSTEMMEM : ilutGetInteger(ILUT_D3D_POOL)), ilutGetInteger(ILUT_D3D_MIPLEVELS)); + if (!Texture) + return NULL; + iD3D9CreateMipmaps(Texture, Image); + if (ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT) { + IDirect3DTexture9 *SysTex = Texture; + // copy texture to device memory + if (FAILED(IDirect3DDevice9_CreateTexture(Device, ilutCurImage->Width, + ilutCurImage->Height, ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, + D3DPOOL_DEFAULT, &Texture, NULL))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + if (FAILED(IDirect3DDevice9_UpdateTexture(Device, (LPDIRECT3DBASETEXTURE9)SysTex, (LPDIRECT3DBASETEXTURE9)Texture))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + IDirect3DTexture9_Release(SysTex); + } + ilutSetInteger(ILUT_DXTC_FORMAT, dxtcFormat); + + goto success; + } + + if (ilutGetBoolean(ILUT_D3D_GEN_DXTC)) { + DXTCFormat = ilutGetInteger(ILUT_DXTC_FORMAT); + +/* +Image = MakeD3D9Compliant(Device, &Format); + if (Image == NULL) { + if (Image != ilutCurImage) + ilCloseImage(Image); + return NULL; + } +*/ + + Size = ilGetDXTCData(NULL, 0, DXTCFormat); + if (Size != 0) { + Buffer = (ILubyte*)ialloc(Size); + if (Buffer == NULL) + return NULL; + Size = ilGetDXTCData(Buffer, Size, DXTCFormat); + if (Size == 0) { + ifree(Buffer); + return NULL; + } + + Format = D3DGetDXTCNumDX9(DXTCFormat); + Texture = iD3DMakeTexture(Device, Buffer, Size, + ilutCurImage->Width, ilutCurImage->Height, Format, + (D3DPOOL)(ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT ? D3DPOOL_SYSTEMMEM : ilutGetInteger(ILUT_D3D_POOL)), ilutGetInteger(ILUT_D3D_MIPLEVELS)); + if (!Texture) + return NULL; + iD3D9CreateMipmaps(Texture, Image); + if (ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT) { + IDirect3DTexture9 *SysTex = Texture; + + if (FAILED(IDirect3DDevice9_CreateTexture(Device, ilutCurImage->Width, + ilutCurImage->Height, ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, + D3DPOOL_DEFAULT, &Texture, NULL))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + if (FAILED(IDirect3DDevice9_UpdateTexture(Device, (LPDIRECT3DBASETEXTURE9)SysTex, (LPDIRECT3DBASETEXTURE9)Texture))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + IDirect3DTexture9_Release(SysTex); + } + + goto success; + } + } + } + + Image = MakeD3D9Compliant(Device, &Format); + if (Image == NULL) { + if (Image != ilutCurImage) + ilCloseImage(Image); + return NULL; + } + + Texture = iD3DMakeTexture(Device, Image->Data, Image->SizeOfPlane, + Image->Width, Image->Height, Format, + (D3DPOOL)(ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT ? D3DPOOL_SYSTEMMEM : ilutGetInteger(ILUT_D3D_POOL)), ilutGetInteger(ILUT_D3D_MIPLEVELS)); + if (!Texture) + return NULL; + iD3D9CreateMipmaps(Texture, Image); + if (ilutGetInteger(ILUT_D3D_POOL) == D3DPOOL_DEFAULT) { + IDirect3DTexture9 *SysTex = Texture; + // create texture in system memory + if (FAILED(IDirect3DDevice9_CreateTexture(Device, Image->Width, + Image->Height, ilutGetInteger(ILUT_D3D_MIPLEVELS), 0, Format, + (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture, NULL))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + if (FAILED(IDirect3DDevice9_UpdateTexture(Device, (LPDIRECT3DBASETEXTURE9)SysTex, (LPDIRECT3DBASETEXTURE9)Texture))) { + IDirect3DTexture9_Release(SysTex); + return NULL; + } + IDirect3DTexture9_Release(SysTex); + } +// if (Image != ilutCurImage) +// ilCloseImage(Image); + +success: + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return Texture; +} + + +IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture(IDirect3DDevice9 *Device) +{ + IDirect3DVolumeTexture9 *Texture; + D3DLOCKED_BOX Box; + D3DFORMAT Format; + ILimage *Image; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!FormatsDX9Checked) + CheckFormatsDX9(Device); + + Image = MakeD3D9Compliant(Device, &Format); + if (Image == NULL) + return NULL; + if (FAILED(IDirect3DDevice9_CreateVolumeTexture(Device, Image->Width, Image->Height, + Image->Depth, 1, 0, Format, (D3DPOOL)ilutGetInteger(ILUT_D3D_POOL), &Texture, NULL))) + return NULL; + if (FAILED(IDirect3DVolumeTexture9_LockBox(Texture, 0, &Box, NULL, 0))) + return NULL; + + memcpy(Box.pBits, Image->Data, Image->SizeOfData); + if (!IDirect3DVolumeTexture9_UnlockBox(Texture, 0)) + return IL_FALSE; + + // We don't want to have mipmaps for such a large image. + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return Texture; +} + + + +ILimage *MakeD3D9Compliant(IDirect3DDevice9 *Device, D3DFORMAT *DestFormat) +{ + ILuint color; + ILimage *Converted, *Scaled, *CurImage; + ILuint nConversionType, ilutFormat; + ILboolean bForceIntegerFormat = ilutGetBoolean(ILUT_FORCE_INTEGER_FORMAT); + + Device; + ilutFormat = ilutCurImage->Format; + nConversionType = ilutCurImage->Type; + + if (!ilutCurImage) + return NULL; + + switch (ilutCurImage->Type) + { + case IL_UNSIGNED_BYTE: + case IL_BYTE: + case IL_SHORT: + case IL_UNSIGNED_SHORT: + case IL_INT: + case IL_UNSIGNED_INT: + *DestFormat = D3DFMT_A8R8G8B8; + nConversionType = IL_UNSIGNED_BYTE; + ilutFormat = IL_BGRA; + break; + case IL_FLOAT: + case IL_DOUBLE: + case IL_HALF: + if (bForceIntegerFormat || (!FormatsDX9supported[6])) + { + *DestFormat = D3DFMT_A8R8G8B8; + nConversionType = IL_UNSIGNED_BYTE; + ilutFormat = IL_BGRA; + } + else + { + *DestFormat = D3DFMT_A16B16G16R16F; + nConversionType = IL_HALF; + ilutFormat = IL_RGBA; + + // + } + break; + } + + // Images must be in BGRA format. + if (((ilutCurImage->Format != ilutFormat)) + || (ilutCurImage->Type != nConversionType)) + { + Converted = iConvertImage(ilutCurImage, ilutFormat, nConversionType); + if (Converted == NULL) + return NULL; + } + else + { + Converted = ilutCurImage; + } + + // perform alpha key on images if requested + color=ilutGetInteger(ILUT_D3D_ALPHA_KEY_COLOR); + if((color>=0) && (nConversionType == IL_UNSIGNED_BYTE)) + { + ILubyte *data; + ILubyte *maxdata; + ILuint t; + + data=(Converted->Data); + maxdata=(Converted->Data+Converted->SizeOfData); + while(dataOrigin != IL_ORIGIN_UPPER_LEFT) + { + CurImage = ilutCurImage; + ilSetCurImage(Converted); + iluFlipImage(); + ilSetCurImage(CurImage); + } + + // Images must have powers-of-2 dimensions. + if (ilNextPower2(ilutCurImage->Width) != ilutCurImage->Width || + ilNextPower2(ilutCurImage->Height) != ilutCurImage->Height || + ilNextPower2(ilutCurImage->Depth) != ilutCurImage->Depth) { + Scaled = iluScale_(Converted, ilNextPower2(ilutCurImage->Width), + ilNextPower2(ilutCurImage->Height), ilNextPower2(ilutCurImage->Depth)); + if (Converted != ilutCurImage) { + ilCloseImage(Converted); + } + if (Scaled == NULL) { + return NULL; + } + Converted = Scaled; + } + + return Converted; +} + + +ILboolean iD3D9CreateMipmaps(IDirect3DTexture9 *Texture, ILimage *Image) +{ + D3DLOCKED_RECT Rect; + D3DSURFACE_DESC Desc; + ILuint NumMips, srcMips, Width, Height, i; + ILimage *CurImage, *MipImage, *Temp; + ILenum DXTCFormat; + ILuint Size; + ILubyte *Buffer; + ILboolean useDXTC = IL_FALSE; + + NumMips = IDirect3DTexture9_GetLevelCount(Texture); + Width = Image->Width; + Height = Image->Height; + + if (NumMips == 1) + return IL_TRUE; + + CurImage = ilGetCurImage(); + MipImage = Image; + iGetIntegervImage(MipImage, IL_NUM_MIPMAPS, (ILint*) &srcMips); + if ( srcMips != NumMips-1) { + MipImage = ilCopyImage_(Image); + ilSetCurImage(MipImage); + if (!iluBuildMipmaps()) { + ilCloseImage(MipImage); + ilSetCurImage(CurImage); + return IL_FALSE; + } + } +// ilSetCurImage(CurImage); + Temp = MipImage->Mipmaps; + + if (ilutGetBoolean(ILUT_D3D_USE_DXTC) && FormatsDX9supported[3] && FormatsDX9supported[4] && FormatsDX9supported[5]) + useDXTC = IL_TRUE; + + // Counts the base texture as 1. + for (i = 1; i < NumMips && Temp != NULL; i++) { + ilSetCurImage(Temp); + if (FAILED(IDirect3DTexture9_LockRect(Texture, i, &Rect, NULL, 0))) + return IL_FALSE; + + Width = IL_MAX(1, Width / 2); + Height = IL_MAX(1, Height / 2); + + IDirect3DTexture9_GetLevelDesc(Texture, i, &Desc); + if (Desc.Width != Width || Desc.Height != Height) { + IDirect3DTexture9_UnlockRect(Texture, i); + return IL_FALSE; + } + + if (useDXTC) { + if (Temp->DxtcData != NULL && Temp->DxtcSize != 0) { + memcpy(Rect.pBits, Temp->DxtcData, Temp->DxtcSize); + } else if (ilutGetBoolean(ILUT_D3D_GEN_DXTC)) { + DXTCFormat = ilutGetInteger(ILUT_DXTC_FORMAT); + + Size = ilGetDXTCData(NULL, 0, DXTCFormat); + if (Size != 0) { + Buffer = (ILubyte*)ialloc(Size); + if (Buffer == NULL) { + IDirect3DTexture9_UnlockRect(Texture, i); + return IL_FALSE; + } + Size = ilGetDXTCData(Buffer, Size, DXTCFormat); + if (Size == 0) { + ifree(Buffer); + IDirect3DTexture9_UnlockRect(Texture, i); + return IL_FALSE; + } + memcpy(Rect.pBits, Buffer, Size); + } else { + IDirect3DTexture9_UnlockRect(Texture, i); + return IL_FALSE; + } + } else { + IDirect3DTexture9_UnlockRect(Texture, i); + return IL_FALSE; + } + } else + memcpy(Rect.pBits, Temp->Data, Temp->SizeOfData); + + IDirect3DTexture9_UnlockRect(Texture, i); + Temp = Temp->Mipmaps; + } + + if (MipImage != Image) + ilCloseImage(MipImage); + ilSetCurImage(CurImage); + + return IL_TRUE; +} + + +// +// SaveSurfaceToFile.cpp +// +// Copyright (c) 2001 David Galeano +// +// Permission to use, copy, modify and distribute this software +// is hereby granted, provided that both the copyright notice and +// this permission notice appear in all copies of the software, +// derivative works or modified versions. +// +// THE AUTHOR ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" +// CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES +// WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. +// + +ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(IDirect3DDevice9 *Device, IDirect3DSurface9 *Surface) +{ + HRESULT hr; + D3DSURFACE_DESC d3dsd; + LPDIRECT3DSURFACE9 SurfaceCopy; + D3DLOCKED_RECT d3dLR; + ILboolean bHasAlpha; + ILubyte *Image, *ImageAux, *Data; + ILuint y, x; + ILushort dwColor; + + IDirect3DSurface9_GetDesc(Surface, &d3dsd); + + bHasAlpha = (ILboolean)(d3dsd.Format == D3DFMT_A8R8G8B8 || d3dsd.Format == D3DFMT_A1R5G5B5); + + if (bHasAlpha) { + if (!ilTexImage(d3dsd.Width, d3dsd.Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + } + else { + if (!ilTexImage(d3dsd.Width, d3dsd.Height, 1, 3, IL_BGR, IL_UNSIGNED_BYTE, NULL)) { + return IL_FALSE; + } + } + + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(Device, d3dsd.Width, d3dsd.Height, d3dsd.Format, D3DPOOL_SCRATCH, &SurfaceCopy, NULL); + if (FAILED(hr)) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + hr = IDirect3DDevice9_StretchRect(Device, Surface, NULL, SurfaceCopy, NULL, D3DTEXF_NONE); + if (FAILED(hr)) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + hr = IDirect3DSurface9_LockRect(SurfaceCopy, &d3dLR, NULL, D3DLOCK_NO_DIRTY_UPDATE | D3DLOCK_NOSYSLOCK | D3DLOCK_READONLY); + if (FAILED(hr)) { + IDirect3DSurface9_Release(SurfaceCopy); + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Image = (ILubyte*)d3dLR.pBits; + Data = ilutCurImage->Data; + + for (y = 0; y < d3dsd.Height; y++) { + if (d3dsd.Format == D3DFMT_X8R8G8B8) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + Data[0] = ImageAux[0]; + Data[1] = ImageAux[1]; + Data[2] = ImageAux[2]; + + Data += 3; + ImageAux += 4; + } + } + else if (d3dsd.Format == D3DFMT_A8R8G8B8) { + memcpy(Data, Image, d3dsd.Width * 4); + } + else if (d3dsd.Format == D3DFMT_R5G6B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x7e0)>>5)<<2); + Data[2] = (ILubyte)(((dwColor&0xf800)>>11)<<3); + + Data += 3; + ImageAux += 2; + } + } + else if (d3dsd.Format == D3DFMT_X1R5G5B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x3e0)>>5)<<3); + Data[2] = (ILubyte)(((dwColor&0x7c00)>>10)<<3); + + Data += 3; + ImageAux += 2; + } + } + else if (d3dsd.Format == D3DFMT_A1R5G5B5) { + ImageAux = Image; + for (x = 0; x < d3dsd.Width; x++) { + dwColor = *((ILushort*)ImageAux); + + Data[0] = (ILubyte)((dwColor&0x001f)<<3); + Data[1] = (ILubyte)(((dwColor&0x3e0)>>5)<<3); + Data[2] = (ILubyte)(((dwColor&0x7c00)>>10)<<3); + Data[3] = (ILubyte)(((dwColor&0x8000)>>15)*255); + + Data += 4; + ImageAux += 2; + } + } + + Image += d3dLR.Pitch; + } + + IDirect3DSurface9_UnlockRect(SurfaceCopy); + IDirect3DSurface9_Release(SurfaceCopy); + + return IL_TRUE; +} + +#endif//ILUT_USE_DIRECTX9 diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_internal.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_internal.c new file mode 100644 index 00000000..6c1c20da --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_internal.c @@ -0,0 +1,18 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/15/2002 <--Y2K Compliant! =] +// +// Filename: src-ILUT/src/ilut_internal.c +// +// Description: Internal stuff for ILUT +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" + +//#if !defined(__APPLE__) + ILimage *ilutCurImage = NULL; +//#endif diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_main.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_main.c new file mode 100644 index 00000000..1f21cea2 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_main.c @@ -0,0 +1,76 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/28/2001 <--Y2K Compliant! =] +// +// Filename: src-ILUT/src/ilut_main.c +// +// Description: Startup functions +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" + +#ifdef _WIN32 +#ifndef IL_STATIC_LIB + //#define WIN32_LEAN_AND_MEAN + #include + + +#ifdef _WIN32 + #if (defined(IL_USE_PRAGMA_LIBS)) + #if defined(_MSC_VER) || defined(__BORLANDC__) + #pragma comment(lib, "ILU.lib") + #endif + #endif +#endif + + + +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + hModule; lpReserved; + + // only initialize when attached to a new process. setup can cause errors in OpenIL + // when called on a per thread basis + if (ul_reason_for_call == DLL_PROCESS_ATTACH) { + //ilutInit(); + } + + return TRUE; +} +#endif + +#else // Should check if gcc? + +// Should be able to condense this... +static void GccMain() __attribute__((constructor)); +static void GccMain() +{ + //ilutInit(); +} + +#endif + + +void ILAPIENTRY ilutInit() +{ + ilutDefaultStates(); // Set states to their defaults + // Can cause crashes if DevIL is not initialized yet + +#ifdef ILUT_USE_OPENGL + ilutGLInit(); // default renderer is OpenGL +#endif + +#ifdef ILUT_USE_DIRECTX8 + ilutD3D8Init(); +#endif + +#ifdef ILUT_USE_DIRECTX9 + ilutD3D9Init(); +#endif + + return; +} diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_opengl.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_opengl.c new file mode 100644 index 00000000..a0530047 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_opengl.c @@ -0,0 +1,923 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2002 by Denton Woods +// Last modified: 05/25/2002 <--Y2K Compliant! =] +// +// Filename: src-ILUT/src/ilut_opengl.c +// +// Description: OpenGL functions for images +// +//----------------------------------------------------------------------------- + + +#include "ilut_opengl.h" + +#ifdef ILUT_USE_OPENGL + +#include +#include + +#ifdef __APPLE__ +#include +#include +void *aglGetProcAddress( const GLubyte *name ) { + // deprecated code! and wasn't working + /*NSSymbol symbol; + char* symbolName; + // prepend a '_' for the Unix C symbol mangling convention + int len = strlen((const char*)name); + symbolName = malloc(len + 2); + memcpy(symbolName+1, (const char*)name, len ); + symbolName[0] = '_'; + symbol = NULL; + if (NSIsSymbolNameDefined(symbolName)) + symbol = NSLookupAndBindSymbol(symbolName); + free(symbolName); + return symbol ? NSAddressOfSymbol(symbol) : NULL; + */ + // not deprecated code! and isn't working :( + // now the address is directly known with glext.h include + const int len = strlen((const char*)name); + char *symbolName = calloc(len + 2,1); + + memcpy(symbolName+1, (const char*)name, len ); + symbolName[0] = '_'; + printf("searching %s as %s ",name,symbolName); + void *image = dlopen(NULL,RTLD_LAZY); // brutal solution + if( image == NULL ) { + return NULL; + } + return dlsym(image,symbolName); +} +#endif + +#ifdef _MSC_VER + #pragma comment(lib, "opengl32.lib") + #pragma comment(lib, "Glu32.lib") +// #pragma comment(lib, "freeglut.lib") +#endif + +#ifdef linux + // fix for glXGetProcAddressARB + #define GLX_GLXEXT_PROTOTYPES + #include +#endif + +//used for automatic texture target detection +#define ILGL_TEXTURE_CUBE_MAP 0x8513 +#define ILGL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define ILGL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define ILGL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define ILGL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define ILGL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define ILGL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define ILGL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define ILGL_CLAMP_TO_EDGE 0x812F +#define ILGL_TEXTURE_WRAP_R 0x8072 + +// Not defined in OpenGL 1.1 headers. +#define ILGL_TEXTURE_DEPTH 0x8071 +#define ILGL_TEXTURE_3D 0x806F +#define ILGL_MAX_3D_TEXTURE_SIZE 0x8073 + + +static ILboolean HasCubemapHardware = IL_FALSE; +static ILboolean HasNonPowerOfTwoHardware = IL_FALSE; +#if defined(_WIN32) || defined(_WIN64) || defined(linux) || defined(__APPLE__) + ILGLTEXIMAGE3DARBPROC ilGLTexImage3D = NULL; + ILGLTEXSUBIMAGE3DARBPROC ilGLTexSubImage3D = NULL; + ILGLCOMPRESSEDTEXIMAGE2DARBPROC ilGLCompressed2D = NULL; + ILGLCOMPRESSEDTEXIMAGE3DARBPROC ilGLCompressed3D = NULL; +#endif + + +// Absolutely *have* to call this if planning on using the image library with OpenGL. +// Call this after OpenGL has initialized. +ILboolean ilutGLInit() +{ + ILint MaxTexW, MaxTexH, MaxTexD = 1; + + // Should we really be setting all this ourselves? Seems too much like a glu(t) approach... + glEnable(GL_TEXTURE_2D); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + +//#ifndef GL_VERSION_1_3 + #if (defined (_WIN32) || defined(_WIN64)) + if (IsExtensionSupported("GL_ARB_texture_compression") && + IsExtensionSupported("GL_EXT_texture_compression_s3tc")) { + ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC)wglGetProcAddress("glCompressedTexImage2DARB"); + } + if (IsExtensionSupported("GL_EXT_texture3D")) { + ilGLTexImage3D = (ILGLTEXIMAGE3DARBPROC)wglGetProcAddress("glTexImage3D"); + ilGLTexImage3D = (ILGLTEXIMAGE3DARBPROC)wglGetProcAddress("glTexSubImage3D"); + } + if (IsExtensionSupported("GL_ARB_texture_compression") && + IsExtensionSupported("GL_EXT_texture_compression_s3tc") && + IsExtensionSupported("GL_EXT_texture3D")) { + ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)wglGetProcAddress("glCompressedTexImage3DARB"); + } + #elif linux + if (IsExtensionSupported("GL_ARB_texture_compression") && + IsExtensionSupported("GL_EXT_texture_compression_s3tc")) { + ilGLCompressed2D = (ILGLCOMPRESSEDTEXIMAGE2DARBPROC) + glXGetProcAddressARB((const GLubyte*)"glCompressedTexImage2DARB"); + } + if (IsExtensionSupported("GL_EXT_texture3D")) { + ilGLTexImage3D = (ILGLTEXIMAGE3DARBPROC)glXGetProcAddressARB((const GLubyte*)"glTexImage3D"); + } + if (IsExtensionSupported("GL_ARB_texture_compression") && + IsExtensionSupported("GL_EXT_texture_compression_s3tc") && + IsExtensionSupported("GL_EXT_texture3D")) { + ilGLCompressed3D = (ILGLCOMPRESSEDTEXIMAGE3DARBPROC)glXGetProcAddressARB((const GLubyte*)"glCompressedTexImage3DARB"); + } + #elif defined(__APPLE__) + // Mac OS X headers are OpenGL 1.4 compliant already. + ilGLCompressed2D = glCompressedTexImage2DARB;//(ILGLCOMPRESSEDTEXIMAGE2DARBPROC)aglGetProcAddress((const GLubyte *)"glCompressedTexImage2DARB"); + ilGLTexImage3D = glTexImage3D; + ilGLCompressed3D = glCompressedTexImage3DARB; + #else + return IL_FALSE; // @TODO: Find any other systems that we could be on. + #endif +//#else +//#endif//GL_VERSION_1_3 + + // Use PROXY_TEXTURE_2D/3D with glTexImage2D/3D() to test more accurately... + glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*)&MaxTexW); + glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*)&MaxTexH); + if (ilGLTexImage3D != NULL) + glGetIntegerv(ILGL_MAX_3D_TEXTURE_SIZE, (GLint*)&MaxTexD); + if (MaxTexW <= 0 || MaxTexH <= 0 || MaxTexD <= 0) { + MaxTexW = MaxTexH = 256; // Trying this because of the VooDoo series of cards. + MaxTexD = 1; + } + + ilutSetInteger(ILUT_MAXTEX_WIDTH, MaxTexW); + ilutSetInteger(ILUT_MAXTEX_HEIGHT, MaxTexH); + ilutSetInteger(ILUT_MAXTEX_DEPTH, MaxTexD); + + if (IsExtensionSupported("GL_ARB_texture_cube_map")) + HasCubemapHardware = IL_TRUE; + if (IsExtensionSupported("GL_ARB_texture_non_power_of_two")) + HasNonPowerOfTwoHardware = IL_TRUE; + + return IL_TRUE; +} + + +// @TODO: Check what dimensions an image has and use the appropriate IL_IMAGE_XD #define! + +GLuint ILAPIENTRY ilutGLBindTexImage() +{ + GLuint TexID = 0, Target = GL_TEXTURE_2D; + ILimage *Image; + + Image = ilGetCurImage(); + if (Image == NULL) + return 0; + + if (ilutGetBoolean(ILUT_GL_AUTODETECT_TEXTURE_TARGET)) { + if (HasCubemapHardware && Image->CubeFlags != 0) + Target = ILGL_TEXTURE_CUBE_MAP; + + } + + glGenTextures(1, &TexID); + glBindTexture(Target, TexID); + + if (Target == GL_TEXTURE_2D) { + glTexParameteri(Target, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(Target, GL_TEXTURE_WRAP_T, GL_REPEAT); + } + else if (Target == ILGL_TEXTURE_CUBE_MAP) { + glTexParameteri(Target, GL_TEXTURE_WRAP_S, ILGL_CLAMP_TO_EDGE); + glTexParameteri(Target, GL_TEXTURE_WRAP_T, ILGL_CLAMP_TO_EDGE); + glTexParameteri(Target, ILGL_TEXTURE_WRAP_R, ILGL_CLAMP_TO_EDGE); + } + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_SWAP_BYTES, IL_FALSE); + + if (!ilutGLTexImage(0)) { + glDeleteTextures(1, &TexID); + return 0; + } + + return TexID; +} + + +ILuint GLGetDXTCNum(ILenum DXTCFormat) +{ + switch (DXTCFormat) + { + // Constants from glext.h. + case IL_DXT1: + DXTCFormat = 0x83F1; + break; + case IL_DXT3: + DXTCFormat = 0x83F2; + break; + case IL_DXT5: + DXTCFormat = 0x83F3; + break; + } + + return DXTCFormat; +} + + +// We assume *all* states have been set by the user, including 2D texturing! +ILboolean ILAPIENTRY ilutGLTexImage_(GLuint Level, GLuint Target, ILimage *Image) +{ + ILimage *ImageCopy, *OldImage; +#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) + ILenum DXTCFormat; + ILuint Size; + ILubyte *Buffer; +#endif + + if (Image == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + OldImage = ilGetCurImage(); + +#if defined (_MSC_VER) || defined (linux) || defined(__APPLE__) + if (ilutGetBoolean(ILUT_GL_USE_S3TC) && ilGLCompressed2D != NULL) { + if (Image->DxtcData != NULL && Image->DxtcSize != 0) { + DXTCFormat = GLGetDXTCNum(Image->DxtcFormat); + ilGLCompressed2D(Target, Level, DXTCFormat, Image->Width, + Image->Height, 0, Image->DxtcSize, Image->DxtcData); + return IL_TRUE; + } + + if (ilutGetBoolean(ILUT_GL_GEN_S3TC)) { + DXTCFormat = ilutGetInteger(ILUT_S3TC_FORMAT); + + ilSetCurImage(Image); + Size = ilGetDXTCData(NULL, 0, DXTCFormat); + if (Size != 0) { + Buffer = (ILubyte*)ialloc(Size); + if (Buffer == NULL) { + ilSetCurImage(OldImage); + return IL_FALSE; + } + + Size = ilGetDXTCData(Buffer, Size, DXTCFormat); + if (Size == 0) { + ilSetCurImage(OldImage); + ifree(Buffer); + return IL_FALSE; + } + + DXTCFormat = GLGetDXTCNum(DXTCFormat); + ilGLCompressed2D(Target, Level, DXTCFormat, Image->Width, + Image->Height, 0, Size, Buffer); + ifree(Buffer); + ilSetCurImage(OldImage); + return IL_TRUE; + } + ilSetCurImage(OldImage); + } + } +#endif//_MSC_VER + + ImageCopy = MakeGLCompliant2D(Image); + if (ImageCopy == NULL) + return IL_FALSE; + + glTexImage2D( + Target, + Level, + ilutGLFormat(ImageCopy->Format, ImageCopy->Bpp), + ImageCopy->Width, + ImageCopy->Height, + 0, + ImageCopy->Format, + ImageCopy->Type, + ImageCopy->Data); + + if (Image != ImageCopy) + ilCloseImage(ImageCopy); + + return IL_TRUE; +} + +GLuint iToGLCube(ILuint cube) +{ + switch (cube) { + case IL_CUBEMAP_POSITIVEX: + return ILGL_TEXTURE_CUBE_MAP_POSITIVE_X; + case IL_CUBEMAP_POSITIVEY: + return ILGL_TEXTURE_CUBE_MAP_POSITIVE_Y; + case IL_CUBEMAP_POSITIVEZ: + return ILGL_TEXTURE_CUBE_MAP_POSITIVE_Z; + case IL_CUBEMAP_NEGATIVEX: + return ILGL_TEXTURE_CUBE_MAP_NEGATIVE_X; + case IL_CUBEMAP_NEGATIVEY: + return ILGL_TEXTURE_CUBE_MAP_NEGATIVE_Y; + case IL_CUBEMAP_NEGATIVEZ: + return ILGL_TEXTURE_CUBE_MAP_NEGATIVE_Z; + + default: + return ILGL_TEXTURE_CUBE_MAP_POSITIVE_X; //??? + } +} + +ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level) +{ + ILimage *Temp; + + ilutCurImage = ilGetCurImage(); + + if (!ilutGetBoolean(ILUT_GL_AUTODETECT_TEXTURE_TARGET)) + return ilutGLTexImage_(Level, GL_TEXTURE_2D, ilGetCurImage()); + else { + // Autodetect texture target + + // Cubemap + if (ilutCurImage->CubeFlags != 0 && HasCubemapHardware) { //bind to cubemap + Temp = ilutCurImage; + while (Temp != NULL && Temp->CubeFlags != 0) { + ilutGLTexImage_(Level, iToGLCube(Temp->CubeFlags), Temp); + Temp = Temp->Next; + } + return IL_TRUE; //@TODO: check for errors?? + } + else // 2D texture + return ilutGLTexImage_(Level, GL_TEXTURE_2D, ilGetCurImage()); + } +} + +GLuint ILAPIENTRY ilutGLBindMipmaps() +{ + GLuint TexID = 0; + +// glPushAttrib(GL_ALL_ATTRIB_BITS); + + glGenTextures(1, &TexID); + glBindTexture(GL_TEXTURE_2D, TexID); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); + + if (!ilutGLBuildMipmaps()) { + glDeleteTextures(1, &TexID); + return 0; + } + +// glPopAttrib(); + + return TexID; +} + + +ILboolean ILAPIENTRY ilutGLBuildMipmaps() +{ + ILimage *Image; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Image = MakeGLCompliant2D(ilutCurImage); + if (Image == NULL) + return IL_FALSE; + + gluBuild2DMipmaps(GL_TEXTURE_2D, ilutGLFormat(Image->Format, Image->Bpp), Image->Width, + Image->Height, Image->Format, Image->Type, Image->Data); + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff) +{ + return ilutGLSubTex2D(TexID, XOff, YOff); +} + + +ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff, ILuint YOff) +{ + ILimage *Image; + ILint Width, Height; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Image = MakeGLCompliant2D(ilutCurImage); + if (Image == NULL) + return IL_FALSE; + + glBindTexture(GL_TEXTURE_2D, TexID); + + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, (GLint*)&Width); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, (GLint*)&Height); + + if (Image->Width + XOff > (ILuint)Width || Image->Height + YOff > (ILuint)Height) { + ilSetError(ILUT_BAD_DIMENSIONS); + return IL_FALSE; + } + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_SWAP_BYTES, IL_FALSE); + glTexSubImage2D(GL_TEXTURE_2D, 0, XOff, YOff, Image->Width, Image->Height, Image->Format, + Image->Type, Image->Data); + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff, ILuint YOff, ILuint ZOff) +{ + ILimage *Image; + ILint Width, Height, Depth; + + if (ilGLTexSubImage3D == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); // Set a different error? + return IL_FALSE; + } + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + Image = MakeGLCompliant3D(ilutCurImage); + if (Image == NULL) + return IL_FALSE; + + glBindTexture(ILGL_TEXTURE_3D, TexID); + + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, (GLint*)&Width); + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, (GLint*)&Height); + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, ILGL_TEXTURE_DEPTH, (GLint*)&Depth); + + if (Image->Width + XOff > (ILuint)Width || Image->Height + YOff > (ILuint)Height + || Image->Depth + ZOff > (ILuint)Depth) { + ilSetError(ILUT_BAD_DIMENSIONS); + return IL_FALSE; + } + + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_SWAP_BYTES, IL_FALSE); + ilGLTexSubImage3D(ILGL_TEXTURE_3D, 0, XOff, YOff, ZOff, Image->Width, Image->Height, Image->Depth, + Image->Format, Image->Type, Image->Data); + + if (Image != ilutCurImage) + ilCloseImage(Image); + + return IL_TRUE; +} + + +ILimage* MakeGLCompliant2D(ILimage *Src) +{ + ILimage *Dest = Src, *Temp; + ILboolean Created = IL_FALSE; + ILenum Filter; + ILubyte *Flipped; + ILboolean need_resize = IL_FALSE; + ILint MaxTexW, MaxTexH; + + MaxTexW = ilutGetInteger(ILUT_MAXTEX_WIDTH); + MaxTexH = ilutGetInteger(ILUT_MAXTEX_HEIGHT); + + if (Src->Pal.Palette != NULL && Src->Pal.PalSize != 0 && Src->Pal.PalType != IL_PAL_NONE) { + //ilSetCurImage(Src); + Dest = iConvertImage(Src, ilGetPalBaseType(Src->Pal.PalType), IL_UNSIGNED_BYTE); + //Dest = iConvertImage(IL_BGR); + //ilSetCurImage(ilutCurImage); + if (Dest == NULL) + return NULL; + + Created = IL_TRUE; + + // Change here! + + + // Set Dest's palette stuff here + Dest->Pal.PalType = IL_PAL_NONE; + } + + if (HasNonPowerOfTwoHardware == IL_FALSE && + (Src->Width != ilNextPower2(Src->Width) || + Src->Height != ilNextPower2(Src->Height) )) { + need_resize = IL_TRUE; + } + + if ((ILint)Src->Width > MaxTexW || (ILint)Src->Height > MaxTexH) + need_resize = IL_TRUE; + + if (need_resize == IL_TRUE) { + if (!Created) { + Dest = ilCopyImage_(Src); + if (Dest == NULL) { + return NULL; + } + Created = IL_TRUE; + } + + Filter = iluGetInteger(ILU_FILTER); + if (Src->Format == IL_COLOUR_INDEX) { + iluImageParameter(ILU_FILTER, ILU_NEAREST); + Temp = HasNonPowerOfTwoHardware == IL_TRUE ? + iluScale_(Dest, min((ILuint)MaxTexW, Dest->Width), min((ILuint)MaxTexH, Dest->Height), 1) + : iluScale_(Dest, min((ILuint)MaxTexW, ilNextPower2(Dest->Width)), + min((ILuint)MaxTexH, ilNextPower2(Dest->Height)), 1); + iluImageParameter(ILU_FILTER, Filter); + } else { + iluImageParameter(ILU_FILTER, ILU_BILINEAR); + Temp = HasNonPowerOfTwoHardware == IL_TRUE ? + iluScale_(Dest, min((ILuint)MaxTexW, Dest->Width), min((ILuint)MaxTexH, Dest->Height), 1) + : iluScale_(Dest, min((ILuint)MaxTexW, (ILint)ilNextPower2(Dest->Width)), + min(MaxTexH, (ILint)ilNextPower2(Dest->Height)), 1); + iluImageParameter(ILU_FILTER, Filter); + } + + ilCloseImage(Dest); + if (!Temp) { + return NULL; + } + Dest = Temp; + } + + if (Dest->Origin != IL_ORIGIN_LOWER_LEFT) { + Flipped = iGetFlipped(Dest); + ifree(Dest->Data); + Dest->Data = Flipped; + Dest->Origin = IL_ORIGIN_LOWER_LEFT; + } + + return Dest; +} + + +ILimage* MakeGLCompliant3D(ILimage *Src) +{ + ILimage *Dest = Src, *Temp; + ILboolean Created = IL_FALSE; + ILenum Filter; + ILubyte *Flipped; + ILboolean need_resize = IL_FALSE; + ILint MaxTexW, MaxTexH, MaxTexD; + + MaxTexW = ilutGetInteger(ILUT_MAXTEX_WIDTH); + MaxTexH = ilutGetInteger(ILUT_MAXTEX_HEIGHT); + MaxTexD = ilutGetInteger(ILUT_MAXTEX_DEPTH); + + if (Src->Pal.Palette != NULL && Src->Pal.PalSize != 0 && Src->Pal.PalType != IL_PAL_NONE) { + //ilSetCurImage(Src); + Dest = iConvertImage(Src, ilGetPalBaseType(Src->Pal.PalType), IL_UNSIGNED_BYTE); + //Dest = iConvertImage(IL_BGR); + //ilSetCurImage(ilutCurImage); + if (Dest == NULL) + return NULL; + + Created = IL_TRUE; + + // Change here! + + + // Set Dest's palette stuff here + Dest->Pal.PalType = IL_PAL_NONE; + } + + if (HasNonPowerOfTwoHardware == IL_FALSE && + (Src->Width != ilNextPower2(Src->Width) || + Src->Height != ilNextPower2(Src->Height) || + Src->Depth != ilNextPower2(Src->Depth) )) { + need_resize = IL_TRUE; + } + + if ((ILint)Src->Width > MaxTexW || (ILint)Src->Height > MaxTexH || (ILint)Src->Depth > MaxTexD) + need_resize = IL_TRUE; + + if (need_resize == IL_TRUE) { + if (!Created) { + Dest = ilCopyImage_(Src); + if (Dest == NULL) { + return NULL; + } + Created = IL_TRUE; + } + + Filter = iluGetInteger(ILU_FILTER); + if (Src->Format == IL_COLOUR_INDEX) { + iluImageParameter(ILU_FILTER, ILU_NEAREST); + Temp = HasNonPowerOfTwoHardware == IL_TRUE ? + iluScale_(Dest, min((ILuint)MaxTexW, Dest->Width), min((ILuint)MaxTexH, Dest->Height), min((ILuint)MaxTexD, Dest->Depth)) + : iluScale_(Dest, min((ILuint)MaxTexW, ilNextPower2(Dest->Width)), + min((ILuint)MaxTexH, ilNextPower2(Dest->Height)), + min((ILuint)MaxTexD, ilNextPower2(Dest->Height))); + iluImageParameter(ILU_FILTER, Filter); + } else { + iluImageParameter(ILU_FILTER, ILU_BILINEAR); + Temp = HasNonPowerOfTwoHardware == IL_TRUE ? + iluScale_(Dest, min((ILuint)MaxTexW, Dest->Width), min((ILuint)MaxTexH, Dest->Height), min((ILuint)MaxTexD, Dest->Depth)) + : iluScale_(Dest, min((ILuint)MaxTexW, (ILint)ilNextPower2(Dest->Width)), + min(MaxTexH, (ILint)ilNextPower2(Dest->Height)), + min(MaxTexD, (ILint)ilNextPower2(Dest->Depth))); + iluImageParameter(ILU_FILTER, Filter); + } + + ilCloseImage(Dest); + if (!Temp) { + return NULL; + } + Dest = Temp; + } + + if (Dest->Origin != IL_ORIGIN_LOWER_LEFT) { + Flipped = iGetFlipped(Dest); + ifree(Dest->Data); + Dest->Data = Flipped; + Dest->Origin = IL_ORIGIN_LOWER_LEFT; + } + + return Dest; +} + + +//! Just a convenience function. +#ifndef _WIN32_WCE +GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName) +{ + GLuint TexId; + //ILuint Id; + + iBindImageTemp(); + //ilGenImages(1, &Id); + //ilBindImage(Id); + + if (!ilLoadImage(FileName)) + return 0; + + TexId = ilutGLBindTexImage(); + + //ilDeleteImages(1, &Id); + + return TexId; +} +#endif//_WIN32_WCE + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID) +{ + ILuint CurName; + ILboolean Saved; + + CurName = ilGetCurName(); + + iBindImageTemp(); + + if (!ilutGLSetTex(TexID)) { + ilBindImage(CurName); + return IL_FALSE; + } + + Saved = ilSaveImage(FileName); + ilBindImage(CurName); + + return Saved; +} +#endif//_WIN32_WCE + + +//! Takes a screenshot of the current OpenGL window. +ILboolean ILAPIENTRY ilutGLScreen() +{ + ILuint ViewPort[4]; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + glGetIntegerv(GL_VIEWPORT, (GLint*)ViewPort); + + if (!ilTexImage(ViewPort[2], ViewPort[3], 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; // Error already set. + ilutCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + glPixelStorei(GL_PACK_ALIGNMENT, 1); + glReadPixels(0, 0, ViewPort[2], ViewPort[3], GL_RGB, GL_UNSIGNED_BYTE, ilutCurImage->Data); + + return IL_TRUE; +} + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutGLScreenie() +{ + FILE *File; + ILchar Buff[255]; + ILuint i, CurName; + ILboolean ReturnVal = IL_TRUE; + + CurName = ilGetCurName(); + + // Could go above 128 easily... + for (i = 0; i < 128; i++) { +#ifndef _UNICODE + sprintf(Buff, "screen%d.tga", i); + File = fopen(Buff, "rb"); +#else + swprintf(Buff, 128, L"screen%d.tga", i); + // Windows has a different function, _wfopen, to open UTF16 files, + // whereas Linux just uses fopen. + #ifdef _WIN32 + File = _wfopen(Buff, L"rb"); + #else + File = fopen((char*)Buff, "rb"); + #endif +#endif + if (!File) + break; + fclose(File); + } + + if (i == 127) { + ilSetError(ILUT_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + iBindImageTemp(); + if (!ilutGLScreen()) { + ReturnVal = IL_FALSE; + } + + if (ReturnVal) + ilSave(IL_TGA, Buff); + + ilBindImage(CurName); + + return ReturnVal; +} +#endif//_WIN32_WCE + + +//! Deprecated - use ilutGLSetTex2D instead. +ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID) +{ + return ilutGLSetTex2D(TexID); +} + + +ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID) +{ + ILubyte *Data; + ILuint Width, Height; + + glBindTexture(GL_TEXTURE_2D, TexID); + + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, (GLint*)&Width); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, (GLint*)&Height); + + Data = (ILubyte*)ialloc(Width * Height * 4); + if (Data == NULL) { + return IL_FALSE; + } + + glGetTexImage(GL_TEXTURE_2D, 0, IL_BGRA, GL_UNSIGNED_BYTE, Data); + + if (!ilTexImage(Width, Height, 1, 4, IL_BGRA, IL_UNSIGNED_BYTE, Data)) { + ifree(Data); + return IL_FALSE; + } + ilutCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + ifree(Data); + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID) +{ + ILubyte *Data; + ILuint Width, Height, Depth; + + if (ilGLTexImage3D == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); // Set a different error? + return IL_FALSE; + } + + glBindTexture(ILGL_TEXTURE_3D, TexID); + + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, (GLint*)&Width); + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, (GLint*)&Height); + glGetTexLevelParameteriv(ILGL_TEXTURE_3D, 0, ILGL_TEXTURE_DEPTH, (GLint*)&Depth); + + Data = (ILubyte*)ialloc(Width * Height * Depth * 4); + if (Data == NULL) { + return IL_FALSE; + } + + glGetTexImage(ILGL_TEXTURE_3D, 0, IL_BGRA, GL_UNSIGNED_BYTE, Data); + + if (!ilTexImage(Width, Height, Depth, 4, IL_BGRA, IL_UNSIGNED_BYTE, Data)) { + ifree(Data); + return IL_FALSE; + } + ilutCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + ifree(Data); + return IL_TRUE; +} + + + +ILenum ilutGLFormat(ILenum Format, ILubyte Bpp) +{ + if (Format == IL_RGB || Format == IL_BGR) { + if (ilutIsEnabled(ILUT_OPENGL_CONV)) { + return GL_RGB8; + } + } + else if (Format == IL_RGBA || Format == IL_BGRA) { + if (ilutIsEnabled(ILUT_OPENGL_CONV)) { + return GL_RGBA8; + } + } + else if (Format == IL_ALPHA) { + if (ilutIsEnabled(ILUT_OPENGL_CONV)) { + return GL_ALPHA; + } + } + + return Bpp; +} + + +// From http://www.opengl.org/News/Special/OGLextensions/OGLextensions.html +// Should we make this accessible outside the lib? +ILboolean IsExtensionSupported(const char *extension) +{ + const GLubyte *extensions;// = NULL; + const GLubyte *start; + GLubyte *where, *terminator; + + // Extension names should not have spaces. + where = (GLubyte *) strchr(extension, ' '); + if (where || *extension == '\0') + return IL_FALSE; + extensions = glGetString(GL_EXTENSIONS); + if (!extensions) + return IL_FALSE; + // It takes a bit of care to be fool-proof about parsing the + // OpenGL extensions string. Don't be fooled by sub-strings, etc. + start = extensions; + for (;;) { + where = (GLubyte *)strstr((const char *) start, extension); + if (!where) + break; + terminator = where + strlen(extension); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') + return IL_TRUE; + start = terminator; + } + return IL_FALSE; +} + + +#endif//ILUT_USE_OPENGL diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_sdlsurface.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_sdlsurface.c new file mode 100644 index 00000000..938e6b50 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_sdlsurface.c @@ -0,0 +1,207 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2002 by Denton Woods +// Copyright (C) 2002 Nelson Rush. +// Last modified: 05/18/2002 +// +// Filename: src-ILUT/src/ilut_sdlsurface.c +// +// Description: SDL Surface functions for images +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" +#ifdef ILUT_USE_SDL +#include +//#include "endian.h" + +#ifdef _MSC_VER + #pragma comment(lib, "sdl.lib") +#endif//_MSC_VER + +int isBigEndian; +int rmask, gmask, bmask, amask; + +void InitSDL() +{ +//#if SDL_BYTEORDER == SDL_BIG_ENDIAN +#ifdef __BIG_ENDIAN__ + isBigEndian = 1; + rmask = 0xFF000000; + gmask = 0x00FF0000; + bmask = 0x0000FF00; + amask = 0x000000FF; +#else + isBigEndian = 0; + rmask = 0x000000FF; + gmask = 0x0000FF00; + bmask = 0x00FF0000; + amask = 0xFF000000; +#endif + return; +} + +//ILboolean ilConvertPal(ILenum DestFormat); + +//ILpal *Pal; + +// Does not account for converting luminance... +SDL_Surface *ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags) +{ + SDL_Surface *Bitmap = NULL; + ILuint i = 0, Pad, BppPal; + ILubyte *Dest, *Data; + ILimage *Image; + + Image = ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + InitSDL(); + + // Should be IL_BGR(A). + if (ilutCurImage->Format == IL_RGB || ilutCurImage->Format == IL_RGBA) { + if (!isBigEndian) { + //iluSwapColours(); // No need to swap colors. Just use the bitmasks. + rmask = 0x00FF0000; + gmask = 0x0000FF00; + bmask = 0x000000FF; + } + } + else if (ilutCurImage->Format == IL_BGR || ilutCurImage->Format == IL_BGRA) { + if (isBigEndian) { + rmask = 0x0000FF00; + gmask = 0x00FF0000; + bmask = 0xFF000000; + } + } + else if (Image->Format != IL_COLOR_INDEX) { // We have to convert the image. + #ifdef __BIG_ENDIAN__ + Image = iConvertImage(Image, IL_RGBA, IL_UNSIGNED_BYTE); + #else + Image = iConvertImage(Image, IL_BGRA, IL_UNSIGNED_BYTE); + #endif + if (Image == NULL) + return NULL; + } + + if (Image->Type != IL_UNSIGNED_BYTE) { + // We do not have to worry about Image != iCurImage at this point, because if it was converted, + // it was converted to a type of unsigned byte. + Image = iConvertImage(Image, Image->Format, IL_UNSIGNED_BYTE); + if (Image == NULL) + return NULL; + } + + Data = Image->Data; + if (Image->Origin == IL_ORIGIN_LOWER_LEFT) { + Data = iGetFlipped(Image); + if (Data == NULL) + goto done; + } + + Bitmap = SDL_CreateRGBSurface(flags, Image->Width, Image->Height, Image->Bpp * 8, + rmask,gmask,bmask,amask); + if (Bitmap == NULL) + goto done; + + if (SDL_MUSTLOCK(Bitmap)) + SDL_LockSurface(Bitmap); + + Pad = Bitmap->pitch - Image->Bps; + if (Pad == 0) { + memcpy(Bitmap->pixels, Data, Image->SizeOfData); + } + else { // Must pad the lines on some images. + Dest = Bitmap->pixels; + for (i = 0; i < Image->Height; i++) { + memcpy(Dest, Data + i * Image->Bps, Image->Bps); + imemclear(Dest + Image->Bps, Pad); + Dest += Bitmap->pitch; + } + } + + if (SDL_MUSTLOCK(Bitmap)) + SDL_UnlockSurface(Bitmap); + + if (Image->Format == IL_COLOR_INDEX) { + BppPal = ilGetBppPal(Image->Pal.PalType); + switch (ilutCurImage->Pal.PalType) + { + case IL_PAL_RGB24: + case IL_PAL_RGB32: + case IL_PAL_RGBA32: + for (i = 0; i < ilutCurImage->Pal.PalSize / BppPal; i++) { + (Bitmap->format)->palette->colors[i].r = ilutCurImage->Pal.Palette[i*BppPal+0]; + (Bitmap->format)->palette->colors[i].g = ilutCurImage->Pal.Palette[i*BppPal+1]; + (Bitmap->format)->palette->colors[i].b = ilutCurImage->Pal.Palette[i*BppPal+2]; + (Bitmap->format)->palette->colors[i].unused = 0xFF; + } + break; + case IL_PAL_BGR24: + case IL_PAL_BGR32: + case IL_PAL_BGRA32: + for (i = 0; i < ilutCurImage->Pal.PalSize / BppPal; i++) { + (Bitmap->format)->palette->colors[i].b = ilutCurImage->Pal.Palette[i*BppPal+0]; + (Bitmap->format)->palette->colors[i].g = ilutCurImage->Pal.Palette[i*BppPal+1]; + (Bitmap->format)->palette->colors[i].r = ilutCurImage->Pal.Palette[i*BppPal+2]; + (Bitmap->format)->palette->colors[i].unused = 0xFF; + } + break; + default: + ilSetError(IL_INTERNAL_ERROR); // Do anything else? + } + } + +done: + if (Data != Image->Data) + ifree(Data); // This is flipped data. + if (Image != ilutCurImage) + ilCloseImage(Image); // This is a converted image. + return Bitmap; // This is NULL if there was an error. +} + + +#ifndef _WIN32_WCE +SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName) +{ + SDL_Surface *Surface; + + iBindImageTemp(); + if (!ilLoadImage(FileName)) { + return NULL; + } + + Surface = ilutConvertToSDLSurface(SDL_SWSURFACE); + + return Surface; +} +#endif//_WIN32_WCE + + +// Unfinished +ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(SDL_Surface *Bitmap) +{ + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (Bitmap == NULL || Bitmap->w == 0 || Bitmap->h == 0) { + ilSetError(ILUT_INVALID_PARAM); + return IL_FALSE; + } + + if (!ilTexImage(Bitmap->w, Bitmap->h, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) + return IL_FALSE; + + return IL_TRUE; +} + + +#endif//ILUT_USE_SDL diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_states.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_states.c new file mode 100644 index 00000000..46c0cb1b --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_states.c @@ -0,0 +1,424 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2009 by Denton Woods +// Last modified: 03/07/2009 +// +// Filename: src-ILUT/src/ilut_states.c +// +// Description: The state machine +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" +#include "ilut_states.h" +//#ifdef ILUT_USE_OPENGL + #include "ilut_opengl.h" +//#endif + + +ILconst_string _ilutVendor = IL_TEXT("Abysmal Software"); +//ILconst_string _ilutVersion = IL_TEXT("Developer's Image Library Utility Toolkit (ILUT) 1.7.8 " IL_TEXT(__DATE__)); +ILconst_string _ilutVersion = IL_TEXT("Developer's Image Library Utility Toolkit (ILUT) 1.7.8"); + + +// Set all states to their defaults +void ilutDefaultStates() +{ + ilutStates[ilutCurrentPos].ilutUsePalettes = IL_FALSE; + ilutStates[ilutCurrentPos].ilutForceIntegerFormat = IL_FALSE; + ilutStates[ilutCurrentPos].ilutOglConv = IL_FALSE; // IL_TRUE ? + ilutStates[ilutCurrentPos].ilutDXTCFormat = 0; + ilutStates[ilutCurrentPos].ilutUseS3TC = IL_FALSE; + ilutStates[ilutCurrentPos].ilutGenS3TC = IL_FALSE; + ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget = IL_FALSE; + ilutStates[ilutCurrentPos].MaxTexW = 256; + ilutStates[ilutCurrentPos].MaxTexH = 256; + ilutStates[ilutCurrentPos].MaxTexD = 1; + ilutStates[ilutCurrentPos].D3DMipLevels = 0; + ilutStates[ilutCurrentPos].D3DPool = 0; + ilutStates[ilutCurrentPos].D3DAlphaKeyColor = -1; +} + + +void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels) +{ + ilutStates[ilutCurrentPos].D3DMipLevels = NumLevels; + return; +} + + +ILstring ILAPIENTRY ilutGetString(ILenum StringName) +{ + switch (StringName) + { + case ILUT_VENDOR: + return (ILstring)_ilutVendor; + //changed 2003-09-04 + case ILUT_VERSION_NUM: + return (ILstring)_ilutVersion; + default: + ilSetError(ILUT_INVALID_PARAM); + break; + } + return NULL; +} + + +ILboolean ILAPIENTRY ilutEnable(ILenum Mode) +{ + return ilutAble(Mode, IL_TRUE); +} + + +ILboolean ILAPIENTRY ilutDisable(ILenum Mode) +{ + return ilutAble(Mode, IL_FALSE); +} + + +ILboolean ilutAble(ILenum Mode, ILboolean Flag) +{ + switch (Mode) + { + case ILUT_PALETTE_MODE: + ilutStates[ilutCurrentPos].ilutUsePalettes = Flag; + break; + + case ILUT_FORCE_INTEGER_FORMAT: + ilutStates[ilutCurrentPos].ilutForceIntegerFormat = Flag; + break; + + case ILUT_OPENGL_CONV: + ilutStates[ilutCurrentPos].ilutOglConv = Flag; + break; + + case ILUT_GL_USE_S3TC: + ilutStates[ilutCurrentPos].ilutUseS3TC = Flag; + break; + + case ILUT_GL_GEN_S3TC: + ilutStates[ilutCurrentPos].ilutGenS3TC = Flag; + break; + + case ILUT_GL_AUTODETECT_TEXTURE_TARGET: + ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget = Flag; + break; + + + default: + ilSetError(ILUT_INVALID_ENUM); + return IL_FALSE; + } + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode) +{ + switch (Mode) + { + case ILUT_PALETTE_MODE: + return ilutStates[ilutCurrentPos].ilutUsePalettes; + + case ILUT_FORCE_INTEGER_FORMAT: + return ilutStates[ilutCurrentPos].ilutForceIntegerFormat; + + case ILUT_OPENGL_CONV: + return ilutStates[ilutCurrentPos].ilutOglConv; + + case ILUT_GL_USE_S3TC: + return ilutStates[ilutCurrentPos].ilutUseS3TC; + + case ILUT_GL_GEN_S3TC: + return ilutStates[ilutCurrentPos].ilutGenS3TC; + + case ILUT_GL_AUTODETECT_TEXTURE_TARGET: + return ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget; + + + default: + ilSetError(ILUT_INVALID_ENUM); + } + + return IL_FALSE; +} + + +ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode) +{ + return !ilutIsEnabled(Mode); +} + + +void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param) +{ + switch (Mode) + { + case ILUT_PALETTE_MODE: + *Param = ilutStates[ilutCurrentPos].ilutUsePalettes; + break; + + case ILUT_FORCE_INTEGER_FORMAT: + *Param = ilutStates[ilutCurrentPos].ilutForceIntegerFormat; + break; + + case ILUT_OPENGL_CONV: + *Param = ilutStates[ilutCurrentPos].ilutOglConv; + break; + + case ILUT_GL_USE_S3TC: + *Param = ilutStates[ilutCurrentPos].ilutUseS3TC; + break; + + case ILUT_GL_GEN_S3TC: + *Param = ilutStates[ilutCurrentPos].ilutGenS3TC; + break; + + case ILUT_GL_AUTODETECT_TEXTURE_TARGET: + *Param = ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget; + break; + + default: + ilSetError(ILUT_INVALID_ENUM); + } + return; +} + + +ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode) +{ + ILboolean Temp = IL_FALSE; + ilutGetBooleanv(Mode, &Temp); + return Temp; +} + + +void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param) +{ + switch (Mode) + { + /*case IL_ORIGIN_MODE: + *Param = ilutStates[ilutCurrentPos].ilutOriginMode; + break;*/ + case ILUT_MAXTEX_WIDTH: + *Param = ilutStates[ilutCurrentPos].MaxTexW; + break; + case ILUT_MAXTEX_HEIGHT: + *Param = ilutStates[ilutCurrentPos].MaxTexH; + break; + case ILUT_MAXTEX_DEPTH: + *Param = ilutStates[ilutCurrentPos].MaxTexD; + break; + case ILUT_VERSION_NUM: + *Param = ILUT_VERSION; + break; + case ILUT_PALETTE_MODE: + *Param = ilutStates[ilutCurrentPos].ilutUsePalettes; + break; + case ILUT_FORCE_INTEGER_FORMAT: + *Param = ilutStates[ilutCurrentPos].ilutForceIntegerFormat; + break; + case ILUT_OPENGL_CONV: + *Param = ilutStates[ilutCurrentPos].ilutOglConv; + break; + case ILUT_GL_USE_S3TC: + *Param = ilutStates[ilutCurrentPos].ilutUseS3TC; + break; + case ILUT_GL_GEN_S3TC: + *Param = ilutStates[ilutCurrentPos].ilutUseS3TC; + break; + case ILUT_S3TC_FORMAT: + *Param = ilutStates[ilutCurrentPos].ilutDXTCFormat; + break; + case ILUT_GL_AUTODETECT_TEXTURE_TARGET: + *Param = ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget; + break; + case ILUT_D3D_MIPLEVELS: + *Param = ilutStates[ilutCurrentPos].D3DMipLevels; + break; + case ILUT_D3D_ALPHA_KEY_COLOR: + *Param = ilutStates[ilutCurrentPos].D3DAlphaKeyColor; + break; + case ILUT_D3D_POOL: + *Param = ilutStates[ilutCurrentPos].D3DPool; + break; + + default: + ilSetError(ILUT_INVALID_ENUM); + } + return; +} + + +ILint ILAPIENTRY ilutGetInteger(ILenum Mode) +{ + ILint Temp = 0; + ilutGetIntegerv(Mode, &Temp); + return Temp; +} + + +void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param) +{ + switch (Mode) + { + case ILUT_S3TC_FORMAT: + if (Param >= IL_DXT1 && Param <= IL_DXT5) { + ilutStates[ilutCurrentPos].ilutDXTCFormat = Param; + return; + } + +//#ifdef ILUT_USE_OPENGL + case ILUT_MAXTEX_WIDTH: + if (Param >= 1) { + ilutStates[ilutCurrentPos].MaxTexW = Param; + return; + } + break; + case ILUT_MAXTEX_HEIGHT: + if (Param >= 1) { + ilutStates[ilutCurrentPos].MaxTexH = Param; + return; + } + break; + case ILUT_MAXTEX_DEPTH: + if (Param >= 1) { + ilutStates[ilutCurrentPos].MaxTexD = Param; + return; + } + break; + case ILUT_GL_USE_S3TC: + if (Param == IL_TRUE || Param == IL_FALSE) { + ilutStates[ilutCurrentPos].ilutUseS3TC = (ILboolean)Param; + return; + } + break; + case ILUT_GL_GEN_S3TC: + if (Param == IL_TRUE || Param == IL_FALSE) { + ilutStates[ilutCurrentPos].ilutGenS3TC = (ILboolean)Param; + return; + } + break; + case ILUT_GL_AUTODETECT_TEXTURE_TARGET: + if (Param == IL_TRUE || Param == IL_FALSE) { + ilutStates[ilutCurrentPos].ilutAutodetectTextureTarget = (ILboolean)Param; + return; + } + break; +//#endif//ILUT_USE_OPENGL + +//#ifdef ILUT_USE_DIRECTX8 + case ILUT_D3D_MIPLEVELS: + if (Param >= 0) { + ilutStates[ilutCurrentPos].D3DMipLevels = Param; + return; + } + break; + + case ILUT_D3D_ALPHA_KEY_COLOR: + ilutStates[ilutCurrentPos].D3DAlphaKeyColor = Param; + return; + break; + + case ILUT_D3D_POOL: + if (Param >= 0 && Param <= 2) { + ilutStates[ilutCurrentPos].D3DPool = Param; + return; + } + break; +//#endif//ILUT_USE_DIRECTX8 + + default: + ilSetError(ILUT_INVALID_ENUM); + } + + ilSetError(IL_INVALID_PARAM); // Parameter not in valid bounds. + return; +} + + +void ILAPIENTRY ilutPushAttrib(ILuint Bits) +{ + // Should we check here to see if ilCurrentPos is negative? + + if (ilutCurrentPos >= ILUT_ATTRIB_STACK_MAX - 1) { + ilutCurrentPos = ILUT_ATTRIB_STACK_MAX - 1; + ilSetError(ILUT_STACK_OVERFLOW); + return; + } + + ilutCurrentPos++; + + //memcpy(&ilutStates[ilutCurrentPos], &ilutStates[ilutCurrentPos - 1], sizeof(ILUT_STATES)); + + if (Bits & ILUT_OPENGL_BIT) { + ilutStates[ilutCurrentPos].ilutUsePalettes = ilutStates[ilutCurrentPos-1].ilutUsePalettes; + ilutStates[ilutCurrentPos].ilutOglConv = ilutStates[ilutCurrentPos-1].ilutOglConv; + } + if (Bits & ILUT_D3D_BIT) { + ilutStates[ilutCurrentPos].D3DMipLevels = ilutStates[ilutCurrentPos-1].D3DMipLevels; + ilutStates[ilutCurrentPos].D3DAlphaKeyColor = ilutStates[ilutCurrentPos-1].D3DAlphaKeyColor; + } + + return; +} + + +void ILAPIENTRY ilutPopAttrib() +{ + if (ilutCurrentPos <= 0) { + ilutCurrentPos = 0; + ilSetError(ILUT_STACK_UNDERFLOW); + return; + } + + // Should we check here to see if ilutCurrentPos is too large? + ilutCurrentPos--; + + return; +} + + +ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer) +{ + if (Renderer > ILUT_WIN32) { + ilSetError(ILUT_INVALID_VALUE); + return IL_FALSE; + } + + switch (Renderer) + { + #ifdef ILUT_USE_OPENGL + case ILUT_OPENGL: + return ilutGLInit(); + #endif + + #ifdef ILUT_USE_WIN32 + case ILUT_WIN32: + return ilutWin32Init(); + #endif + + #ifdef ILUT_USE_DIRECTX8 + case ILUT_DIRECT3D8: + return ilutD3D8Init(); + #endif + + #ifdef ILUT_USE_DIRECTX9 + case ILUT_DIRECT3D9: + return ilutD3D9Init(); + #endif + + #ifdef ILUT_USE_DIRECTX10 + case ILUT_DIRECT3D10: + return ilutD3D10Init(); + #endif + + default: + ilSetError(ILUT_NOT_SUPPORTED); + } + + return IL_FALSE; +} diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_win32.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_win32.c new file mode 100644 index 00000000..3e43deb3 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_win32.c @@ -0,0 +1,856 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Utility Toolkit Sources +// Copyright (C) 2000-2008 by Denton Woods +// Last modified: 12/14/2008 +// +// Filename: src-ILUT/src/ilut_win32.c +// +// Description: Windows functions for images +// +//----------------------------------------------------------------------------- + + +#include "ilut_internal.h" +#ifdef ILUT_USE_WIN32 +#include +#include + +// For ilutWinLoadUrl(). +#ifdef _MSC_VER +#pragma comment(lib, "wininet.lib") +#endif + + +#if !_WIN32_WCE && (_WIN32 && __GNUC__) + PRINTDLG Pd; +#endif//_WIN32_WCE + +ILboolean ilutWin32Init() +{ + + + return IL_TRUE; +} + + +ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice) +{ + ILubyte *Data, *DataBackup; + HBITMAP hBitmap = NULL; + ILimage *TempImage = NULL; + ILuint pad, i, j, k, l, m, n, DepthBackup; + ILpal *palImg; + ILboolean alloc_buffer; + + //reserve space for palette in every case... + ILubyte buff[sizeof(BITMAPINFOHEADER) + 256*sizeof(RGBQUAD)]; + BITMAPINFO *info = (BITMAPINFO*)buff; + RGBQUAD *pal = info->bmiColors; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + //check if the image has the wanted slice + if (slice < 0 || slice >= ilutCurImage->Depth) { + ilSetError(ILUT_INVALID_PARAM); + return NULL; + } + + // Fool iConvertImage into thinking that the current image has + // only one slice, the one we want: + DepthBackup = ilutCurImage->Depth; + DataBackup = ilutCurImage->Data; + ilutCurImage->Depth = 1; + ilutCurImage->Data += ilutCurImage->SizeOfPlane*slice; + + if (ilutCurImage->Type != IL_UNSIGNED_BYTE) + TempImage = iConvertImage(ilutCurImage, ilutCurImage->Format, IL_UNSIGNED_BYTE); + else + TempImage = ilutCurImage; + if (TempImage == NULL) { + goto error; + } + + //changed 2003-09-09: use Temp! + ilSetCurImage(TempImage); + + hBitmap = CreateCompatibleBitmap(hDC, ilutCurImage->Width, ilutCurImage->Height); + if (hBitmap == NULL) { + ilSetError(IL_UNKNOWN_ERROR); + goto error; + } + + info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + info->bmiHeader.biWidth = TempImage->Width; + if (TempImage->Origin == IL_ORIGIN_UPPER_LEFT) + info->bmiHeader.biHeight = -(ILint)TempImage->Height; + else + info->bmiHeader.biHeight = TempImage->Height; + info->bmiHeader.biPlanes = 1; + info->bmiHeader.biCompression = 0; + info->bmiHeader.biSizeImage = 0; + info->bmiHeader.biXPelsPerMeter = 0; + info->bmiHeader.biYPelsPerMeter = 0; + info->bmiHeader.biClrUsed = 0; + info->bmiHeader.biClrImportant = 0; + + pad = (4 - TempImage->Bps%4)%4; + alloc_buffer = (ILboolean)!(pad == 0 && TempImage->Format != IL_RGB + && TempImage->Format != IL_RGBA && TempImage->Format != IL_LUMINANCE_ALPHA); + if (!alloc_buffer) { + Data = TempImage->Data; + } + else { + ILsizei DataSize = 0; + if (TempImage->Format == IL_RGBA) { // Strip alpha during byte swapping for faster upload to GDI. + // Recalculate pad, because it changes when bpp changes. + pad = (4 - (3 * TempImage->Width) % 4) % 4; + DataSize = (TempImage->Width + pad) * TempImage->Height * 3; + } + // Strip alpha channel from grayscale image. + else if (TempImage->Format == IL_LUMINANCE_ALPHA) { + // Added 01-09-2009: Recalculate pad. + pad = (4 - TempImage->Width % 4) % 4; + DataSize = (TempImage->Width + pad) * TempImage->Height; + } + else { + DataSize = (TempImage->Width + pad) * TempImage->Height * TempImage->Bpp; + } + + Data = (ILubyte*)ialloc(DataSize); + if (Data == NULL) { + goto error; + } + + if (TempImage->Format == IL_RGB || TempImage->Format == IL_RGBA) { + //swap bytes + m = (TempImage->Format == IL_RGB)?3:4; + k = l = 0; + for (j = 0; j < TempImage->Height; j++) { + for (i = 0, n = 0; i < 3*TempImage->Width; i += 3, n += m) { + Data[l + i] = TempImage->Data[k + n + 2]; + Data[l + i + 1] = TempImage->Data[k + n + 1]; + Data[l + i + 2] = TempImage->Data[k + n]; + } + + k += TempImage->Bps; + l += 3*TempImage->Width + pad; + } + } + else if (TempImage->Format == IL_LUMINANCE_ALPHA) { + //strip alpha channel + //recalculate pad because it included alpha channel info + pad = (4 - TempImage->Width%4)%4; + k = l = 0; + for (j = 0; j < TempImage->Height; j++) { + for (i = 0, n = 0; i < TempImage->Width; ++i, n += 2) { + Data[l + i] = TempImage->Data[k + n]; + } + k += TempImage->Bps; + l += TempImage->Width + pad; + } + } + else + for (i = 0; i < TempImage->Height; i++) + memcpy(Data + i*(TempImage->Bps + pad), TempImage->Data + i*TempImage->Bps, TempImage->Bps); + } + + switch (TempImage->Format) + { + case IL_LUMINANCE: + case IL_LUMINANCE_ALPHA: + case IL_COLOUR_INDEX: + if (TempImage->Format != IL_COLOUR_INDEX) { + //generate greyscale palette + for (i = 0; i < 256; i++) + pal[i].rgbRed = pal[i].rgbGreen = pal[i].rgbBlue = (ILubyte)i; + } + else { + palImg = iConvertPal(&TempImage->Pal, IL_PAL_BGR32); + if (palImg != NULL) { + memcpy(pal, palImg->Palette, palImg->PalSize); + ilClosePal(palImg); + } + else { + //ilSetError(IL_INVALID_PARAM); + // Generate greyscale palette <-- Why is this here? + for (i = 0; i < 256; i++) + pal[i].rgbRed = pal[i].rgbGreen = pal[i].rgbBlue = (ILubyte)i; + } + } + info->bmiHeader.biBitCount = 8; + break; + + case IL_RGB: + case IL_BGR: + case IL_RGBA: //alpha is removed during byte swapping + info->bmiHeader.biBitCount = 24; + break; + + case IL_BGRA: + info->bmiHeader.biBitCount = 32; + break; + + /*default: + ilSetError(IL_FORMAT_NOT_SUPPORTED); + return hBitmap;*/ + } + + // Restore original data + ilutCurImage->Data = DataBackup; + ilutCurImage->Depth = DepthBackup; + + SetDIBits(hDC, hBitmap, 0, ilutCurImage->Height, Data, info, DIB_RGB_COLORS); + + if (alloc_buffer) + ifree(Data); + + if (ilutCurImage != TempImage) { + ilSetCurImage(ilutCurImage); + ilCloseImage(TempImage); + } + + return hBitmap; + +error: + // Restore original data + ilutCurImage->Data = DataBackup; + ilutCurImage->Depth = DepthBackup; + if (ilutCurImage != TempImage) { + ilSetCurImage(ilutCurImage); + ilCloseImage(TempImage); + } + ilSetCurImage(ilutCurImage); + if (hBitmap) + DeleteObject(hBitmap); + + return NULL; +} + +HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC) +{ + return ilutConvertSliceToHBitmap(hDC, 0); +} + +ILubyte* ILAPIENTRY iGetPaddedData(ILimage *Image) +{ + ILubyte *NewData = NULL, *TempBuff = NULL; + ILuint i, CurPos = 0, PadSize; + ILubyte *TempData = NULL; + + if (Image == NULL) { + ilSetError(ILUT_INVALID_PARAM); + return NULL; + } + + if (Image->Origin != IL_ORIGIN_LOWER_LEFT) { + TempData = iGetFlipped(Image); + } + else { + TempData = Image->Data; + } + + if (Image->Format == IL_RGB || Image->Format == IL_RGBA) { + TempBuff = (ILubyte*)ialloc(Image->SizeOfData); + + if (TempBuff == NULL) { + return NULL; + } + // Swap red and blue. + for (i = 0; i < Image->SizeOfData; i += Image->Bpp) { + TempBuff[i] = TempData[i+2]; + TempBuff[i+1] = TempData[i+1]; + TempBuff[i+2] = TempData[i]; + // Copy the alpha channel if present. + if (Image->Bpp == 4) + TempBuff[i+3] = TempData[i+3]; + } + } + else { + TempBuff = TempData; + } + + PadSize = (4 - (Image->Bps % 4)) % 4; + NewData = (ILubyte*)ialloc((Image->Width + PadSize) * Image->Height * Image->Bpp); + if (NewData == NULL) { + return NULL; + } + + for (i = 0; i < Image->Height; i++) { + memcpy(NewData + CurPos, TempBuff + Image->Bps * i, Image->Bps); + CurPos += Image->Bps; + memset(NewData + CurPos, 0, PadSize); + CurPos += PadSize; + } + + if (TempData != TempBuff && TempData != Image->Data) + ifree(TempData); + if (TempBuff != Image->Data) + ifree(TempBuff); + + return NewData; +} + + + +void ILAPIENTRY ilutFreePaddedData(ILubyte *Data) +{ + ifree(Data); + return; +} + + +// DirectX/GDI insists that all scanlines end on a dword boundary. =( +ILubyte* ILAPIENTRY ilutGetPaddedData() +{ + return iGetPaddedData(ilGetCurImage()); +} + + +// @TODO: Figure how to mess with multiple bpc's! +void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info) +{ + ILuint NewBps, Padding; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return; + } + + Padding = (4 - (ilutCurImage->Bps % 4)) % 4; + NewBps = ilutCurImage->Bps/* + Padding*/; + + Info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + Info->bmiHeader.biWidth = ilutCurImage->Width; + Info->bmiHeader.biHeight = ilutCurImage->Height; + Info->bmiHeader.biPlanes = 1; + Info->bmiHeader.biBitCount = ilutCurImage->Bpp << 3; + Info->bmiHeader.biCompression = BI_RGB; + Info->bmiHeader.biSizeImage = NewBps * ilutCurImage->Height; + Info->bmiHeader.biXPelsPerMeter = 0; + Info->bmiHeader.biYPelsPerMeter = 0; + Info->bmiHeader.biClrUsed = ilutCurImage->Bpp == 1 ? 255 : 0; + if (Info->bmiHeader.biClrUsed < 24) + Info->bmiHeader.biClrImportant = Info->bmiHeader.biClrUsed; + else + Info->bmiHeader.biClrImportant = 0; + + return; +} + + +//! Just a convenience function. +HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC) +{ + HBITMAP Bitmap; + + iBindImageTemp(); + if (!ilLoadImage(FileName)) + return 0; + + Bitmap = ilutConvertToHBitmap(hDC); + + return Bitmap; +} + + +#ifndef _WIN32_WCE +ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap) +{ + ILuint CurName; + ILboolean Saved; + + CurName = ilGetCurName(); + + iBindImageTemp(); + + if (!ilutSetHBitmap(Bitmap)) { + ilBindImage(CurName); + return IL_FALSE; + } + + Saved = ilSaveImage(FileName); + ilBindImage(CurName); + + return Saved; +} +#endif//_WIN32_WCE + + +// @TODO: Just create a copy of the palette! +// Credit for this goes to the OpenGL SuperBible. +HPALETTE ILAPIENTRY ilutGetHPal() +{ + HPALETTE Palette; + LOGPALETTE *LogPal; + ILuint NumEntries, i; + ILenum CurPalType; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + if (!ilutCurImage->Pal.Palette || !ilutCurImage->Pal.PalSize || ilutCurImage->Pal.PalType == IL_PAL_NONE) { + //ilSetError(ILUT_ILLEGAL_OPERATION); + return NULL; + } + + CurPalType = ilutCurImage->Pal.PalType; + if (!ilConvertPal(IL_PAL_RGB24)) { + return NULL; // ilConvertPal already sets the error + } + NumEntries = ilutCurImage->Pal.PalSize / 3; + + LogPal = (LOGPALETTE*)ialloc(sizeof(LOGPALETTE) + NumEntries * sizeof(PALETTEENTRY)); + if (!LogPal) { + return NULL; + } + + LogPal->palVersion = 0x300; + LogPal->palNumEntries = (WORD)NumEntries; + + for (i = 0; i < NumEntries; i++) { + LogPal->palPalEntry[i].peRed = ilutCurImage->Pal.Palette[i * 3]; + LogPal->palPalEntry[i].peGreen = ilutCurImage->Pal.Palette[i * 3 + 1]; + LogPal->palPalEntry[i].peBlue = ilutCurImage->Pal.Palette[i * 3 + 2]; + LogPal->palPalEntry[i].peFlags = 0; + } + + Palette = CreatePalette(LogPal); + ifree(LogPal); + + ilConvertPal(CurPalType); // Should we check the return value? + + return Palette; +} + + +ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap) +{ +#ifndef _WIN32_WCE + BITMAPINFO Info[2]; + HWND hWnd; + HDC hDC; + ILubyte *Buffer1 = NULL, *Buffer2 = NULL; + ILuint i, j, PadSize, Bps; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + hWnd = GetForegroundWindow(); + hDC = GetDC(hWnd); + + // Query the dimensions + memset(&Info, 0, sizeof(BITMAPINFO)); + Info[0].bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + GetDIBits(hDC, Bitmap, 0, 0, NULL, Info, DIB_RGB_COLORS); + + // @TODO: Implement this shitz0rz! + if (Info[0].bmiHeader.biBitCount < 24) { + ReleaseDC(hWnd, hDC); //added 20040527 + return IL_FALSE; + } + + Buffer1 = (ILubyte*)ialloc(Info[0].bmiHeader.biSizeImage); + Buffer2 = (ILubyte*)ialloc(Info[0].bmiHeader.biSizeImage); + if (Buffer1 == NULL || Buffer2 == NULL) { + ReleaseDC(hWnd, hDC); //added 20040527 + ifree(Buffer1); + ifree(Buffer2); + return IL_FALSE; + } + + //GetBitmapBits + GetDIBits(hDC, Bitmap, 0, Info[0].bmiHeader.biHeight, Buffer1, Info, DIB_RGB_COLORS); + + Bps = Info[0].bmiHeader.biWidth * (Info[0].bmiHeader.biBitCount >> 3); + PadSize = (4 - (Bps % 4)) % 4; + + // Remove the padding. + for (i = 0, j = 0; i < Info[0].bmiHeader.biSizeImage; i += Bps + PadSize, j += Bps) { + memcpy(Buffer2 + j, Buffer1 + i, Bps); + } + + if (Info[0].bmiHeader.biBitCount == 24) { + ilTexImage(Info[0].bmiHeader.biWidth, Info[0].bmiHeader.biHeight, 1, + (ILubyte)(Info[0].bmiHeader.biBitCount >> 3), IL_BGR, IL_UNSIGNED_BYTE, Buffer2); + } + else if (Info[0].bmiHeader.biBitCount == 32) { + ilTexImage(Info[0].bmiHeader.biWidth, Info[0].bmiHeader.biHeight, 1, + (ILubyte)(Info[0].bmiHeader.biBitCount >> 3), IL_BGRA, IL_UNSIGNED_BYTE, Buffer2); + } + ilutCurImage->Origin = IL_ORIGIN_LOWER_LEFT; + + ReleaseDC(hWnd, hDC); //added 20040527 + ifree(Buffer1); + ifree(Buffer2); + +#endif//_WIN32_WCE + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal) +{ + LPPALETTEENTRY PalEntries; + ILuint NumEntries, i; + ILubyte *TempPal; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + NumEntries = GetPaletteEntries(Pal, 0, 0, NULL); + if (NumEntries == 0) + return IL_TRUE; // @TODO: Determine if correct... + + PalEntries = (LPPALETTEENTRY)ialloc(NumEntries * sizeof(PALETTEENTRY)); + if (PalEntries == NULL) { + return IL_FALSE; + } + + NumEntries = GetPaletteEntries(Pal, 0, NumEntries, PalEntries); + + TempPal = (ILubyte*)ialloc(NumEntries * 3); + if (TempPal == NULL) { + ifree(PalEntries); + return IL_FALSE; + } + if (ilutCurImage->Pal.Palette) + ifree(ilutCurImage->Pal.Palette); + ilutCurImage->Pal.Palette = TempPal; + ilutCurImage->Pal.PalSize = NumEntries * 3; + ilutCurImage->Pal.PalType = IL_PAL_RGB24; + + for (i = 0; i < NumEntries; i++) { + *TempPal++ = PalEntries[i].peRed; + *TempPal++ = PalEntries[i].peGreen; + *TempPal++ = PalEntries[i].peBlue; + } + + ifree(PalEntries); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutSetWinClipboard() +{ + HBITMAP Bitmap; + HANDLE Handle; + HWND hWnd; + HDC hDC; + ILimage *TempImage, *CurImage; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (ilutCurImage->Format != IL_BGR || ilutCurImage->Bps > 1) { + TempImage = iConvertImage(ilutCurImage, IL_BGR, IL_UNSIGNED_BYTE); + if (TempImage == NULL) + return IL_FALSE; + } + else + TempImage = ilutCurImage; + + CurImage = ilutCurImage; + ilSetCurImage(TempImage); + + hWnd = GetForegroundWindow(); + hDC = GetDC(hWnd); + + if (!OpenClipboard(NULL)) { + if (TempImage != ilutCurImage) + ilCloseImage(TempImage); + ilSetCurImage(CurImage); + ilSetError(ILUT_ILLEGAL_OPERATION); // Dunno if this is the correct error. + ReleaseDC(hWnd, hDC); //added 20040604 + if (TempImage != ilutCurImage) + ilCloseImage(TempImage); + ilSetCurImage(CurImage); + return IL_FALSE; + } + + //note that this is not the best method to put an image into the + //clipboard, CF_DIB is much better because HBITMAPS are device-dependent. + //TODO: eventually change that if there is a need + Bitmap = ilutConvertToHBitmap(hDC); + ReleaseDC(hWnd, hDC); //added 20040604 + + EmptyClipboard(); + Handle = SetClipboardData(CF_BITMAP, Bitmap); + + CloseClipboard(); + + //DeleteObject(Bitmap); // Needed? No! Clipboard takes care of image. + + if (TempImage != ilutCurImage) + ilCloseImage(TempImage); + ilSetCurImage(CurImage); + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutGetWinClipboard() +{ + //HBITMAP Bitmap; + HWND hWnd; + HGLOBAL hGlobal; + PTSTR pGlobal, data; + BITMAPFILEHEADER *BmpHeader; + BITMAPINFOHEADER *InfoHeader; + SIZE_T Size; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + if (IsClipboardFormatAvailable(CF_DIB)) { + hWnd = GetForegroundWindow(); + + if (!OpenClipboard(hWnd)) { + ilSetError(ILUT_ILLEGAL_OPERATION); // Dunno if this is the correct error. + return IL_FALSE; + } + + hGlobal = GetClipboardData(CF_DIB); + if (!hGlobal) { + CloseClipboard(); + return IL_FALSE; // No error? + } + + //copy DIB to buffer because windows delivers it without the + //BITMAPFILEHEADER that DevIL needs to load the image + Size = GlobalSize(hGlobal); + //@TODO: Size should never be larger than an ILuint? + data = (PTSTR)ialloc((ILuint)Size + sizeof(BITMAPFILEHEADER)); + pGlobal = (PTSTR)GlobalLock(hGlobal); + if (!pGlobal || !data) { + ifree(data); + CloseClipboard(); + return IL_FALSE; // No error? + } + memcpy(data + sizeof(BITMAPFILEHEADER), pGlobal, Size); + GlobalUnlock(hGlobal); + CloseClipboard(); + + //create BITMAPFILEHEADER + InfoHeader = (BITMAPINFOHEADER*)(data + sizeof(BITMAPFILEHEADER)); + BmpHeader = (BITMAPFILEHEADER*)data; + BmpHeader->bfType = 'B' | ('M' << 8); + //@TODO: Again, could it ever be larger than an unsigned integer (DWORD)? + BmpHeader->bfSize = (DWORD)Size + sizeof(BITMAPFILEHEADER); + BmpHeader->bfReserved1 = BmpHeader->bfReserved2 = 0; + BmpHeader->bfOffBits = sizeof(BITMAPFILEHEADER) + InfoHeader->biSize + InfoHeader->biClrUsed*4; + if (InfoHeader->biCompression == BI_BITFIELDS) + BmpHeader->bfOffBits += 12; + + return ilLoadL(IL_BMP, data, BmpHeader->bfSize); + } + /* + //this is not required becaus CF_BITMAP is converted to CF_DIB automatically + //when needed. CF_DIB suffices. + else if (IsClipboardFormatAvailable(CF_BITMAP)) { + hWnd = GetForegroundWindow(); + + if (!OpenClipboard(hWnd)) { + ilSetError(ILUT_ILLEGAL_OPERATION); // Dunno if this is the correct error. + return IL_FALSE; + } + + Bitmap = (HBITMAP)GetClipboardData(CF_BITMAP); + if (!Bitmap) { + CloseClipboard(); + return IL_FALSE; // No error? + } + + if (!ilutSetHBitmap(Bitmap)) { + CloseClipboard(); + return IL_FALSE; + } + + CloseClipboard(); + }*/ + + //no data in clipboard + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; +} + + +ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC) +{ +#if !defined(_WIN32_WCE) && !(defined(_WIN32) && defined(__GNUC__)) + PRINTDLG Pd; + DOCINFO Di; + HBITMAP Bitmap, hReplaced; + HDC hMemDC; + + ilutCurImage = ilGetCurImage(); + if (ilutCurImage == NULL) { + ilSetError(ILUT_ILLEGAL_OPERATION); + return IL_FALSE; + } + + //@TODO: Needs error checking! + hMemDC = CreateCompatibleDC(hDC); + Bitmap = ilutConvertToHBitmap(hDC); + hReplaced = (HBITMAP)SelectObject(hMemDC, Bitmap); + + memset(&Pd, 0, sizeof(PRINTDLG)); + Pd.lStructSize = sizeof(PRINTDLG); + Pd.hwndOwner = GetForegroundWindow(); + Pd.Flags = PD_RETURNDC; + Pd.nCopies = 1; + Pd.nFromPage = 0xFFFF; + Pd.nToPage = 0xFFFF; + Pd.nMinPage = 1; + Pd.nMaxPage = 0xFFFF; + + if (!PrintDlg(&Pd)) + return (0L); + + Di.cbSize = sizeof(DOCINFO); + Di.lpszDocName = IL_TEXT("DevIL Print Job"); + Di.lpszOutput = NULL; + Di.lpszDatatype = NULL; + Di.fwType = 0; + + StartDoc(Pd.hDC, &Di); + StartPage(Pd.hDC); + + StretchBlt(Pd.hDC, XPos, YPos, Width, Height, hMemDC, 0, 0, ilutCurImage->Width, ilutCurImage->Height, SRCCOPY); + + EndPage(Pd.hDC); + EndDoc(Pd.hDC); + DeleteObject(Bitmap); + DeleteObject(hReplaced); + DeleteDC(Pd.hDC); + +#endif + + return IL_TRUE; +} + + +ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type) +{ + HRSRC Resource = (HRSRC)LoadResource(hInst, FindResource(hInst, MAKEINTRESOURCE(ID), ResourceType)); + ILubyte *Data = (ILubyte*)LockResource(Resource); + + return ilLoadL(Type, Data, SizeofResource(hInst, FindResource(hInst, MAKEINTRESOURCE(ID), ResourceType))); +} + + +#if !defined(_WIN32_WCE) && !(defined(_WIN32) && defined(__GNUC__)) +#define BUFFSIZE 8192 // Change to suit the efficiency. +ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url) +{ + HINTERNET Handle, UrlHandle; + DWORD BytesRead = 0, Context = 1; + ILubyte Buff[BUFFSIZE], *Buffer, *TempBuff; + ILuint BufferSize = 0, i; + ILboolean Is404 = IL_TRUE; + char Buffer404[] = { '<', 'h', 't', 'm', 'l', '>' }; + + Buffer = (ILubyte*)ialloc(0); + if (Buffer == NULL) { + return IL_FALSE; + } + + Handle = InternetOpen(IL_TEXT("Developer's Image Library"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + if (Handle == NULL) { + ifree(Buffer); + ilSetError(ILUT_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + // Try again if fails the first time, loading only from the cache. + UrlHandle = InternetOpenUrl(Handle, Url, NULL, 0, 0, Context); + if (UrlHandle == NULL) { + InternetCloseHandle(Handle); + Handle = InternetOpen(IL_TEXT("Developer's Image Library"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_FROM_CACHE); + if (Handle == NULL) { + ifree(Buffer); + ilSetError(ILUT_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + UrlHandle = InternetOpenUrl(Handle, Url, NULL, 0, 0, Context); + if (UrlHandle == NULL) { + ifree(Buffer); + InternetCloseHandle(Handle); + ilSetError(ILUT_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + } + + do { + if (!InternetReadFile(UrlHandle, Buff, BUFFSIZE, &BytesRead)) { + InternetCloseHandle(UrlHandle); + InternetCloseHandle(Handle); + ifree(Buffer); + ilSetError(ILUT_COULD_NOT_OPEN_FILE); + return IL_FALSE; + } + + TempBuff = (ILubyte*)ialloc(BufferSize + BytesRead); + if (TempBuff == NULL) { + ifree(Buffer); + return IL_FALSE; + } + + memcpy(TempBuff, Buffer, BufferSize); + memcpy(TempBuff + BufferSize, Buff, BytesRead); + ifree(Buffer); + Buffer = TempBuff; + + BufferSize += BytesRead; + } while (BytesRead > 0); + + InternetCloseHandle(UrlHandle); + InternetCloseHandle(Handle); + + // If the image does not exist, the server usually returns a 404 HTML page. + for (i = 0; i < sizeof(Buffer404) && i < BufferSize; i++) { + if (tolower(Buffer[i]) != Buffer404[i]) { + Is404 = IL_FALSE; + break; + } + } + + if (!Is404) { + if (!ilLoadL(ilTypeFromExt(Url), Buffer, BufferSize)) { + if (!ilLoadL(IL_TYPE_UNKNOWN, Buffer, BufferSize)) { + ifree(Buffer); + return IL_FALSE; + } + } + } + + ifree(Buffer); + + return IL_TRUE; +} +#endif + + +#endif//ILUT_USE_WIN32 diff --git a/libs/DevIL-1.7.8/src-ILUT/src/ilut_x11.c b/libs/DevIL-1.7.8/src-ILUT/src/ilut_x11.c new file mode 100644 index 00000000..bb5ad249 --- /dev/null +++ b/libs/DevIL-1.7.8/src-ILUT/src/ilut_x11.c @@ -0,0 +1,399 @@ +//----------------------------------------------------------------------------- +// +// ImageLib Sources +// Copyright (C) 2002 by Denton Woods +// Copyright (C) 2002 Nelson Rush. +// Last modified: 05/18/2002 +// +// Filename: src-ILUT/src/ilut_x11.c +// +// Description: X11 Pixmap and XImage binding functions (with XShm) +// +//----------------------------------------------------------------------------- + +/* +** This file was created by Jesse Maurais Wed April 4, 2007 +** Contact: www.jessemaurais@gmail.com +** +** +** This patch to the Devil Tookit binds to the X Windows System Version 11, +** using client-side XImages and server-side Pixmaps, with support for both +** ZPixmaps and the insane XYPixmap format. (Depends on the X server) +** +** If the XShm extension to X11 is present at the time of ./configure then +** support for shared memory XImages and Pixmaps is also compiled in. Note +** that "shared" does not mean Devil and X are sharing the same memory space. +** This is not possible, because both libraries make byte-for-byte copies +** of their data. It means that memory is part of an inter-process memory +** segment (see XShm spec). +** +** TODO +** 1) Assumed the display depth is 24 bits (the most common) but there should +** be a check, and iXConvertImage should handle this properly. I don't think +** this should be difficult to modify from whats here. +** 2) It would be nice to convert from an XImage back to a Devil image for +** saving changes. Would be seful for an interactive image editor. +** 3) Possibly some additional OpenGL bindings for GLX Pbuffers. +** +** FYI +** It was a long night figuring out the under-documented XYPixmap format. +*/ + + +#include "ilut_internal.h" +#ifdef ILUT_USE_X11 + + +int bits; // bits per pixel +int field; // bits per channel +int bytes; // bytes per pixel +int grain; // bytes per line +int width; // pixels per line +int height; // number of lines +ILpal* palette; // for indexed colors +char* data; // pointer to pixels + + + +void iXGrabImage( ILimage * img ) +{ + bits = img->Bpp*8; // bits per pixel + field = img->Bpc; // bits per channel + bytes = img->Bpp; // bytes per pixel + grain = img->Bps; // bytes per line + width = img->Width; + height = img->Height; + palette = &img->Pal; + data = (char*)img->Data; +} + + +Bool iXGrabCurrentImage(void) +{ + ilutCurImage = ilGetCurImage(); + if (!ilutCurImage) { + return False; + } + iXGrabImage(ilutCurImage); + return True; +} + + +void iXConvertImage( Display * dpy, XImage * img ) +{ + int x,y,z; + int sX,dX; + int sY,dY; + int sZ,dZ; + int plane; + + + ILimage * tmp; + + switch ( img->byte_order ) + { + case LSBFirst: + tmp = iConvertImage( ilutCurImage,IL_BGR,IL_UNSIGNED_BYTE ); + break; + case MSBFirst: + tmp = iConvertImage( ilutCurImage,IL_RGB,IL_UNSIGNED_BYTE ); + break; + default: + return; + } + + if ( !tmp ) return; + iXGrabImage( tmp ); + + + switch ( img->format ) + { + case ZPixmap: + + for ( y = 0; y < height; y ++ ) + { + dY = y * img->bytes_per_line; + sY = y * grain; + + for ( x = 0; x < width; x ++ ) + { + dX = x * img->bits_per_pixel / 8; + sX = x * bytes; + + for ( z = 0; z < bytes; z ++ ) + { + img->data[dX+dY+z] = data[sX+sY+z]; + } + } + } + + break; + + case XYPixmap: + + for ( y = 0; y < height; y ++ ) + { + sY = y * grain; + + for ( x = 0; x < width; x ++ ) + { + sX = x * bytes; + + for ( z = 0; z < bits; z ++ ) + { + sZ = z / 8; + dZ = z % 8; + + if ( data[sY+sX+sZ] & ( 1 << dZ ) ) + { + plane = bits - z - 1; + + sZ = x % 8; + dX = x / 8; + dY = y * img->bytes_per_line; + dZ = plane * img->bytes_per_line * height; + + img->data[dZ+dY+dX] |= 1 << sZ; + } + } + } + } + + break; + + default: + ilSetError( ILUT_NOT_SUPPORTED ); + } + + ilCloseImage( tmp ); +} + +ILboolean ilutXInit(void) { + return IL_TRUE; +} + + + + + + + +XImage * ILAPIENTRY ilutXCreateImage( Display * dpy ) +{ + Visual * vis; + XImage * img; + char * buffer; + + if (!iXGrabCurrentImage()) { + return NULL; + } + + buffer = malloc( width * height * 4 ); + if (!buffer) { + return NULL; + } + + vis = CopyFromParent; + img = XCreateImage( dpy,vis, 24,ZPixmap,0,buffer,width,height,8,0 ); + if (!img) { + free(buffer); + return NULL; + } + + iXConvertImage( dpy,img ); + + return img; +} + + + +Pixmap ILAPIENTRY ilutXCreatePixmap( Display * dpy, Drawable draw ) +{ + XImage * img; + GC gc; + Pixmap pix; + + img = ilutXCreateImage( dpy ); + if (!img) { + return None; + } + + gc = DefaultGC(dpy,DefaultScreen(dpy)); + if (!gc) { + XDestroyImage( img ); + return None; + } + + pix = XCreatePixmap( dpy,draw, width,height,24 ); + if (!pix ) { + XDestroyImage( img ); + return None; + } + + XPutImage( dpy,pix,gc,img, 0,0,0,0,width,height ); + + XDestroyImage( img ); + + return pix; +} + + + +XImage * ILAPIENTRY ilutXLoadImage( Display * dpy, char * filename ) +{ + iBindImageTemp(); + if (!ilLoadImage(filename)) { + return NULL; + } + return ilutXCreateImage( dpy ); +} + + + +Pixmap ILAPIENTRY ilutXLoadPixmap( Display * dpy, Drawable draw, char * filename ) +{ + iBindImageTemp(); + if (!ilLoadImage(filename)) { + return None; + } + return ilutXCreatePixmap( dpy,draw ); +} + + + + + + +#ifdef ILUT_USE_XSHM +#include +#include +#include + + +XImage * ILAPIENTRY ilutXShmCreateImage( Display * dpy, XShmSegmentInfo * info ) +{ + Visual * vis; + XImage * img; + + // Get server supported format + + int size,format = XShmPixmapFormat( dpy ); + + // Grab the current image + + if (!iXGrabCurrentImage()) { + return NULL; + } + + // Create a shared image + + vis = CopyFromParent; + img = XShmCreateImage( dpy,vis, 24,format,NULL,info,width,height ); + + if (!img) { + return NULL; + } + + // Create shared memory + + size = img->bytes_per_line * img->height; + + info->shmid = shmget( IPC_PRIVATE, size, IPC_CREAT | 0666 ); + info->shmaddr = img->data = shmat( info->shmid, 0, 0 ); + info->readOnly = False; + + // Attach to server + + XShmAttach( dpy,info ); + + // Copy image pixels to shared memory + + iXConvertImage( dpy,img ); + + return img; +} + + + +void ILAPIENTRY ilutXShmDestroyImage( Display * dpy, XImage * img, XShmSegmentInfo * info ) +{ + XShmDetach( dpy,info ); + XDestroyImage( img ); + XFlush( dpy ); + + shmdt( info->shmaddr ); + shmctl( info->shmid, IPC_RMID, 0 ); +} + + + +Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display * dpy, Drawable draw, XShmSegmentInfo * info ) +{ + Pixmap pix; + XImage*img; + + // Create a dumby image + + img = ilutXShmCreateImage( dpy,info ); + if (!img) { + return None; + } + + // Use the same memory segment in the pixmap + + pix = XShmCreatePixmap( dpy,draw, info->shmaddr,info,width,height,24 ); + if (!pix) { + ilutXShmDestroyImage( dpy,img,info ); + return None; + } + + // Riddance to the image + + XDestroyImage( img ); + + return pix; +} + + + +void ILAPIENTRY ilutXShmFreePixmap( Display * dpy, Pixmap pix, XShmSegmentInfo * info ) +{ + XShmDetach( dpy,info ); + XFreePixmap( dpy,pix ); + XFlush( dpy ); + + shmdt( info->shmaddr ); + shmctl( info->shmid, IPC_RMID, 0 ); +} + + + +XImage * ILAPIENTRY ilutXShmLoadImage( Display * dpy, char* filename, XShmSegmentInfo * info ) +{ + iBindImageTemp(); + if (!ilLoadImage(filename)) { + return NULL; + } + return ilutXShmCreateImage( dpy,info ); +} + + + +Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display * dpy, Drawable draw, char* filename, XShmSegmentInfo * info ) +{ + iBindImageTemp(); + if (!ilLoadImage(filename)) { + return None; + } + return ilutXShmCreatePixmap( dpy,draw,info ); +} + + + + + +#endif//ILUT_USE_XSHM + + +#endif//ILUT_USE_X11 + diff --git a/libs/DevIL-1.7.8/test/Makefile.am b/libs/DevIL-1.7.8/test/Makefile.am new file mode 100644 index 00000000..34daefb4 --- /dev/null +++ b/libs/DevIL-1.7.8/test/Makefile.am @@ -0,0 +1,16 @@ +all_include = $(srcdir)/../include +AM_CPPFLAGS = -I $(all_include) + +check_PROGRAMS = testil +check_SCRIPTS = format_test/format_checks.sh + +testil_SOURCES = format_test/testil.c +testil_LDADD = +if BUILD_ILU +testil_LDADD += ../lib/libILU.la +else +testil_LDADD += ../lib/libIL.la +endif + +TESTS_ENVIRONMENT = /bin/bash +TESTS = $(check_SCRIPTS) diff --git a/libs/DevIL-1.7.8/test/Makefile.in b/libs/DevIL-1.7.8/test/Makefile.in new file mode 100644 index 00000000..c3034c02 --- /dev/null +++ b/libs/DevIL-1.7.8/test/Makefile.in @@ -0,0 +1,581 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = testil$(EXEEXT) +@BUILD_ILU_TRUE@am__append_1 = ../lib/libILU.la +@BUILD_ILU_FALSE@am__append_2 = ../lib/libIL.la +subdir = test +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/allegro.m4 $(top_srcdir)/m4/ax_check_gl.m4 \ + $(top_srcdir)/m4/ax_check_glu.m4 \ + $(top_srcdir)/m4/ax_check_glut.m4 \ + $(top_srcdir)/m4/ax_lang_compiler_ms.m4 \ + $(top_srcdir)/m4/devil-api_checks.m4 \ + $(top_srcdir)/m4/devil-definitions.m4 \ + $(top_srcdir)/m4/devil-report.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/pkg.m4 $(top_srcdir)/m4/sdl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/IL/config.h +CONFIG_CLEAN_FILES = +am_testil_OBJECTS = testil.$(OBJEXT) +testil_OBJECTS = $(am_testil_OBJECTS) +testil_DEPENDENCIES = $(am__append_1) $(am__append_2) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/IL +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(testil_SOURCES) +DIST_SOURCES = $(testil_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLEGRO_CONFIG = @ALLEGRO_CONFIG@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL_LTVERSION = @DEVIL_LTVERSION@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENERAL_CFLAGS = @GENERAL_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLUT_LIBS = @GLUT_LIBS@ +GLU_CFLAGS = @GLU_CFLAGS@ +GLU_LIBS = @GLU_LIBS@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +ILUT_CFLAGS = @ILUT_CFLAGS@ +ILUT_LIBS = @ILUT_LIBS@ +ILU_CFLAGS = @ILU_CFLAGS@ +ILU_LIBS = @ILU_LIBS@ +IL_CFLAGS = @IL_CFLAGS@ +IL_LIBS = @IL_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBILUT_WIN32LIBPATH = @LIBILUT_WIN32LIBPATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLATFORM = @PLATFORM@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SUPPORTED_FORMATS = @SUPPORTED_FORMATS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_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_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +allegro_CFLAGS = @allegro_CFLAGS@ +allegro_LIBS = @allegro_LIBS@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +all_include = $(srcdir)/../include +AM_CPPFLAGS = -I $(all_include) +check_SCRIPTS = format_test/format_checks.sh +testil_SOURCES = format_test/testil.c +testil_LDADD = $(am__append_1) $(am__append_2) +TESTS_ENVIRONMENT = /bin/bash +TESTS = $(check_SCRIPTS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +testil$(EXEEXT): $(testil_OBJECTS) $(testil_DEPENDENCIES) + @rm -f testil$(EXEEXT) + $(LINK) $(testil_OBJECTS) $(testil_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testil.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@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@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@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 $@ $< + +testil.o: format_test/testil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testil.o -MD -MP -MF $(DEPDIR)/testil.Tpo -c -o testil.o `test -f 'format_test/testil.c' || echo '$(srcdir)/'`format_test/testil.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testil.Tpo $(DEPDIR)/testil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='format_test/testil.c' object='testil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testil.o `test -f 'format_test/testil.c' || echo '$(srcdir)/'`format_test/testil.c + +testil.obj: format_test/testil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT testil.obj -MD -MP -MF $(DEPDIR)/testil.Tpo -c -o testil.obj `if test -f 'format_test/testil.c'; then $(CYGPATH_W) 'format_test/testil.c'; else $(CYGPATH_W) '$(srcdir)/format_test/testil.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testil.Tpo $(DEPDIR)/testil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='format_test/testil.c' object='testil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o testil.obj `if test -f 'format_test/testil.c'; then $(CYGPATH_W) 'format_test/testil.c'; else $(CYGPATH_W) '$(srcdir)/format_test/testil.c'; fi` + +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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + +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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +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) + +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 + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +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 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS 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/libs/DevIL-1.7.8/test/format_test/format_checks.sh.in b/libs/DevIL-1.7.8/test/format_test/format_checks.sh.in new file mode 100644 index 00000000..4e480b72 --- /dev/null +++ b/libs/DevIL-1.7.8/test/format_test/format_checks.sh.in @@ -0,0 +1,62 @@ +#!/bin/bash + +VERBOSE="" # set VERBOSE="v" for verbose mode +# that @expression@ will be substituted by the 'confgure' script +EXTENSIONS="@SUPPORTED_FORMATS@" +# Here are the extensions that should support saving according to docs +#CAN_SAVE=" BMP DDS HDR ICO JPG PCX PNG PPM PSD RAW SGI TGA TIF XPM " RAW and XPM are problematic... +CAN_SAVE="BMP DDS EXR HDR ICO JP2 JPG PCX PNG PPM PSD SGI TGA TIF" +# List of formats that we don't test since they are problematic +PROBLEMATIC="RAW WBMP XPM" + +echo "Running saving and loading consistency test..." +FAILED_FORMATS="" +PASSED_FORMATS="" + +# if using Wine makes sense, use it... +if [ "x@BUILD_OS@" != "x@HOST_OS@" ] + then + if [ "x@PLATFORM@" = "xMINGW32" -o "x@PLATFORM@" = "xCYGWIN" ] + then + test $(which wine 2> /dev/null) && WINE="wine" + echo "Warning: Using wine to test executables (not 100% reliable)" + fi +fi + +for EXTENSION in $EXTENSIONS +do + #echo expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*' + if [ $(expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*') -eq 0 -o $(expr match "' $PROBLEMATIC '" '.*\s'$EXTENSION'\s.*') -ne 0 ] + then # This extension is not considered as supported... + continue; + fi + test -n "$VERBOSE" && echo $WINE ./testil@EXEEXT@ -e $EXTENSION + # EXEEXT comes in when one compiles on platforms that append extensions to executables (testil.exe) + $WINE ./testil@EXEEXT@ -e$VERBOSE $EXTENSION + + # We have to capture whether the test has failed or not + if [ ! $? -eq 0 ] + then # we have an error here... + FAILED_FORMATS="$FAILED_FORMATS $EXTENSION" + FAILED="$?" + else #no error... + PASSED_FORMATS="$PASSED_FORMATS $EXTENSION" + fi +done + +#let's tell something to the user as well: +if [ "x$FAILED" = "x" ] +then #everything went fine + echo "All examined formats were OK:$PASSED_FORMATS" +else #something went wrong + echo "Errors were encountered during the test :-(" + echo "Formats that were OK:$PASSED_FORMATS" + echo "Failed formats: $FAILED_FORMATS" + FAILED="1" +fi # end of something went wrong +echo "Problematic (untested) formats: $PROBLEMATIC" + +echo + +# And we have to tell the result to the shell, too... +exit $FAILED diff --git a/libs/DevIL-1.7.8/test/format_test/testil.c b/libs/DevIL-1.7.8/test/format_test/testil.c new file mode 100644 index 00000000..6f100ce9 --- /dev/null +++ b/libs/DevIL-1.7.8/test/format_test/testil.c @@ -0,0 +1,629 @@ +#include + +/* This program (testil) is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#define _USE_MATH_DEFINES // Have to add for MSVC++ to use M_PI properly. +#include +#include +#include + +#ifdef WORDS_BIGENDIAN +enum colors {ALPHA, BLUE, GREEN, RED}; +#else /* not WORDS_BIGENDIAN */ +enum colors {RED, GREEN, BLUE, ALPHA}; +#endif /* not WORDS_BIGENDIAN */ + +/* We would need ILU just because of iluErrorString() function... */ +/* So make it possible for both with and without ILU! */ +#ifdef ILU_ENABLED +#include +#define ERROR_LOADING_FILE_MACRO(filename, code) fprintf(stderr, "Error loading file '%s'\nReason: %s\n", (filename), iluErrorString((code))) +#define ERROR_SAVING_FILE_MACRO(filename, code) fprintf(stderr, "Error saving file '%s'\nReason: %s\n", (filename), iluErrorString((code))) +#else /* not ILU_ENABLED */ +#define ERROR_LOADING_FILE_MACRO(filename, code) fprintf(stderr, "Error loading file '%s'\nError code: 0x%X\n", (filename), (unsigned int)(code)) +#define ERROR_SAVING_FILE_MACRO(filename, code) fprintf(stderr, "Error saving file '%s'\nError code: 0x%X\n", (filename), (unsigned int)(code)) +#endif /* not ILU_ENABLED */ + +/** How did the tests ended? */ +enum test_results {TEST_OK = 0, TEST_FAIL = 0x1, TEST_FAIL_QUANTIL = 0x2, TEST_FAIL_INTEGRAL = 0x4 }; + +/** Parsing and parsing results (Parameters.flags) related: What options were passed? */ +enum {ACTION_HELP = 0x1, ACTION_VERBOSE = 0x2, ACTION_PRESERVE_TESTFILE = 0x4, ACTION_ROUGH_MODE = 0x8, ACTION_TEST_ALPHA = 0x10 }; +/** Parsing only: What sort of options to expect? */ +enum {EXPECT_EXTENSION = 0x1, EXPECT_QUANTILE = 0x2, EXPECT_FILENAME = 0x4, EXPECT_RESOLUTION = 0x8, EXPECT_IMAGES = 0x10}; +/** What to test for? */ +enum {TEST_NOTHING, TEST_EXTENSION, TEST_IS_TEST_IMAGE, TEST_IMAGES_ARE_SAME}; + +int compare_ILubyte (const void * a, const void * b) +{ return ( *(ILubyte * )a - *(ILubyte * )b ); } + +/* +struct PIXEL +{ + ILubyte color[4]; +}; +typedef struct PIXEL pixel;*/ + +/** What we collect from the comand line... + */ +struct parameters +{ + /* ** Input parameters ** */ + /** In the case we want to test filename */ + char first_filename[64]; + /** In the case we want to compare two filenames */ + char second_filename[64]; + /** or test extension... */ + char * extension; + + /*** Tests parameters ***/ + /** how talkative should we be? */ + int verbose; + /** what about preserve-testfile, rough mode? */ + int flags; + /* How many bytes per pixel? */ + int bpp; + /** If we want to tweak test image sizes... */ + int resolution[2]; + /** Quantile test specs */ + double quantile_spec; + int quantile_treshold; + /** Integral test specs */ + double integral_treshold; +}; +typedef struct parameters Parameters; + +/** Function generates test pattern when given data and dimensions + * \param data Image data. 32bits per pixel + * \param w, h Width and height of the image + */ +void generate_test_image(ILubyte * data, int w, int h, Parameters params) +{ + int test_alpha = params.flags & ACTION_TEST_ALPHA; + int bpp = params.bpp; + + int i, j, index, j_index; + double red, green, blue, sum; + /* For easier notations */ + int h_5 = h / 5; + for (j = 0, index = 0; j < h_5 * 3; j++) + for (i = 0; i < w * bpp; i += bpp) /* We jump bpp bytes ahead with each pixel */ + {/* Making 27 samples from the RGB cube. */ + index = 9 * (j / h_5) + (i * 9) / w / bpp; + j_index = j * w * bpp; /* just to make stuff look nice */ + data[j_index + i + RED] = 255 / 6 + (255 / 3) * (index % 3) ; + data[j_index + i + GREEN] = 255 / 6 + (255 / 3) * ((index % 9) / 3 ); + data[j_index + i + BLUE] = 255 / 6 + (255 / 3) * (index / 9); + if (test_alpha) + data[j_index + i + ALPHA] = 255 - 63 * ((j * 4 / h_5) % 4); + } + for (j = 3 * h_5; j < 4 * h_5; j++) + for (i = 0; i < w * bpp; i += bpp) + {/* Making color gradient */ + red = cos(2 * M_PI / (double)w * i / bpp) / 2.0 + 0.5; + green = cos(2 * M_PI / (double)w * i / bpp + M_PI * 1.0 / 3.0) / 2.0 + 0.5; + blue = cos(2 * M_PI / (double)w * i / bpp + M_PI * 2.0 / 3.0) / 2.0 + 0.5; + sum = sqrt(red * red + green * green + blue * blue); + j_index = j * w * bpp; + data[j_index + i + RED] = 255 * red / sum; + data[j_index + i + GREEN] = 255 * green / sum; + data[j_index + i + BLUE] = 255 * blue / sum; + if (test_alpha) + data[j_index + i + ALPHA] = 255; + } + for (j = 4 * h_5; j < 5 * h_5; j++) + for (i = 0; i < w * bpp; i += bpp) + {/* Making smooth B&W gradient */ + j_index = j * w * bpp; + data[j_index + i + RED] = (i / bpp * 255) / w; + data[j_index + i + GREEN] = (i / bpp * 255) / w; + data[j_index + i + BLUE] = (i / bpp * 255) / w; + if (test_alpha) + data[j_index + i + ALPHA] = 255; + } +} + +/** Functions saves the test image of given dimensions and given name + * \param name Filename + * \param w, h Image dimensions + * + * The image is defined in the generate_test_image function and this function just calls it... + */ +int save_test_image(const char * name, int w, int h, Parameters params) +{ + /* Set constants so that there are no div rounding errors */ + ILuint handle; + /* Generate the paperwork for our test image... */ + ilGenImages(1, & handle); + ilBindImage(handle); + /* how much memory will we need? */ + int memory_needed = w * h * params.bpp; + ILubyte * data = (ILubyte * )malloc(memory_needed); + if (data == NULL) + { + fprintf(stderr, "Out of memory, %s:%d\n", __FILE__, __LINE__); + return IL_OUT_OF_MEMORY; + } + + generate_test_image(data, w, h, params); + + /* finally set the image data */ + ilTexImage(w, h, 1, params.bpp, ( (params.flags & ACTION_TEST_ALPHA) == 0 ? IL_RGB : IL_RGBA), IL_UNSIGNED_BYTE, data); + /* and dump them to the disc... */ + ILboolean saved = ilSaveImage(name); + int return_value = IL_NO_ERROR; + if (saved == IL_FALSE) + { + return_value = ilGetError(); + ERROR_SAVING_FILE_MACRO(name,return_value); + } + /* Finally, clean the mess! */ + ilDeleteImages(1, & handle); + free(data); + return return_value; +} + +/** Returns the sum value of quantile of absolute differences among subpixels. + * \param reference Left hand side image (LHS == RHS ?) + * \param sample Right hand side image + * \param num_subpixels BPP of image, usually 4 (RGBA) + * \param quantile What quantile value are we interested in + * \return Value of the quantile + * + * First of all, absolute differences are computed. + * Then they are stored in an array and sorted using quicksort. + * Finally, the quantile is determined and returned. + */ +int calculate_median_pixel_distance_abs(ILubyte * reference, ILubyte * sample, int num_subpixels, double quantile) +{ + ILubyte * differences = (ILubyte *)malloc(sizeof(ILubyte) * num_subpixels); + if (differences == NULL) + { + fprintf(stderr, "Out of memory, %s:%d\n", __FILE__, __LINE__); + return IL_OUT_OF_MEMORY; + } + int ii, difference; + for (ii = 0; ii < num_subpixels; ii++) + {/* Going through all pixel components and assigning the absolute difference to differences array */ + difference = (int)sample[ii] - reference[ii]; /* avoiding: overflow + need to have abs() */ + differences[ii] = (difference >= 0) ? difference : - difference; + } + /* We need the quantile, so we have to sort the array */ + qsort (differences, num_subpixels, sizeof(ILubyte), compare_ILubyte); + if (quantile > 1.0 || quantile < 0.0) /* The quantile has totally wrong value... */ + { + fprintf(stderr, "Come on... Quantile should be between 0.0 and 1.0 (you wanted %.3f)\n", quantile); + return -1; + } + int index = (int)(quantile * num_subpixels); /* Which member of the sorted array is the quantile? */ + int result = differences[index]; + free(differences); /* Clean the mess */ + differences = 0; + return result; +} + +/** Returns the sum of squared differences between component color values, normed. + * + */ +double calculate_averaged_distance_sqr_integral(ILubyte * reference, ILubyte * sample, int num_subpixels) +{ + long long differences = 0; + int ii, difference; + for (ii = 0; ii < num_subpixels; ii++) + {/* Going through all pixel components and assigning the absolute difference to differences array */ + difference = sample[ii] - reference[ii]; /* avoiding overflow + need to have abs() */ + differences += difference * difference; + } + return sqrt(differences / (double)num_subpixels); +} + +/** Do the comparison and return results through parameters. + */ +void compare_fields(int w, int h, ILubyte * sample, ILubyte * reference, Parameters params, int * quantile, double * integral) +{ + * quantile = calculate_median_pixel_distance_abs(reference, sample, w * h * params.bpp, params.quantile_spec); + * integral = calculate_averaged_distance_sqr_integral(reference, sample, w * h * params.bpp); +} + +/** We have some results of test of similarity of two images. Are they the same? + * \param filename What filename are we actually testing? (Needed gor report purposes only.) + * \param quantile What is the value of the quantile we have acquired earlier? + * \param integral And what is the value of normed integral distance? + * \return 0 on success or TEST_FAIL or'd with the cause. + */ +int interpret_results(const char * filename, Parameters params, int quantile, double integral) +{ + int return_value = 0; + if (quantile > params.quantile_treshold) + { + printf("Quantile test failed: More than %d%% of subpixels have greater error than %d (should be less than %d)\n", (int)(100 - 100 * params.quantile_spec), quantile, params.quantile_treshold); + return_value |= TEST_FAIL_QUANTIL | TEST_FAIL; + } + + if (integral > params.integral_treshold) + { + printf("Integral test failed: Deviation is %.3f, should be below %.3f\n", integral, params.integral_treshold); + return_value |= TEST_FAIL_INTEGRAL | TEST_FAIL; + } + + if (params.verbose > 0) + printf("Testing file '%s'. \nQuantile[%.3f]: %d (max %d)\nIngegral: %f (max %f)\n", filename, params.quantile_spec, quantile, params.quantile_treshold, integral, params.integral_treshold); + + return return_value; +} + +/** Is the passed params.first_filename a test image? + * Useful for testing whether the various format load functions alre OK + * if we can't save the test image in DevIL. + * So we take some test image, convert it to another format in some exernal editor + * and then we try to load it. Smart, isn't it? :-) + */ +int test_is_testimage(Parameters params) +{ + /* First, we load the generated and saved image */ + ILuint handle; + ilGenImages(1, & handle); + ilBindImage(handle); + int loaded = ilLoadImage(params.first_filename); + if (loaded == IL_FALSE) + {/* something went wrong */ + ERROR_LOADING_FILE_MACRO(params.first_filename, loaded); + return loaded; + } + /* getting image width and height */ + int w, h; + w = ilGetInteger(IL_IMAGE_WIDTH); + h = ilGetInteger(IL_IMAGE_HEIGHT); + /* Then we save image data into arrays that we allocate now */ + ILubyte * reference, * sample; + reference = malloc(w * h * params.bpp * sizeof(ILubyte)); + sample = malloc(w * h * params.bpp * sizeof(ILubyte)); + if (reference == NULL || sample == NULL) + { + if ((params.flags & ACTION_PRESERVE_TESTFILE) == 0) + remove(params.first_filename); + fprintf(stderr, "Out of memory, %s:%d\n", __FILE__, __LINE__); + return IL_OUT_OF_MEMORY; + } + /* Allocation went fine and now we get what SHOULD BE on the loaded image... */ + generate_test_image((ILubyte *)reference, w, h, params); + ilCopyPixels(0, 0, 0, w, h, 1, ((params.flags & ACTION_TEST_ALPHA) == 0 ? IL_RGB : IL_RGBA), IL_UNSIGNED_BYTE, sample); + + int quantile; + double integral; + compare_fields(w, h, sample, reference, params, & quantile, & integral); + int return_value = interpret_results(params.first_filename, params, quantile, integral); + + free(sample); + free(reference); + /* We do not want to keep the saved test image by default... */ + if ((params.flags & ACTION_PRESERVE_TESTFILE) == 0) + remove(params.first_filename); + return return_value; +} + +/** Tests whether we can save and load the test data to a specified extension + * \param params Test options in a nice box + * \return 0 if all is OK, or an error code (see interpret_results) + */ +int test_format(Parameters params) +{ + /* First, let's generate and save a test image */ + const char * base_name = "test."; + char filename [64]; + if (strlen(params.extension) + strlen(base_name) >= sizeof(filename)) + return -1; /* buffer overflow */ + sprintf(filename, "%s%s", base_name, params.extension); + int saved = save_test_image(filename, params.resolution[0], params.resolution[1], params); + if (saved != 0) /* something went wrong, no point in continuing, the user already knows */ + return saved; + strncpy(params.first_filename, filename, sizeof(params.first_filename)); + /* Will we be able to load that very test image? */ + return test_is_testimage(params); +} + +int test_are_same(Parameters params) +{ + const int images_count = 2; + ILuint handle[images_count]; + int i; + ILubyte * image_data[images_count]; + for (i = 0; i < images_count; i++) + image_data[i] = NULL; + ilGenImages(images_count, & handle[0]); + const char * filenames [] = {params.first_filename, params.second_filename}; + int w, h; + for (i = 0; i < images_count; i++) + { + ilBindImage(handle[i]); + int loaded = ilLoadImage(filenames[i]); + if (loaded == IL_FALSE) + {/* something went wrong */ + ERROR_LOADING_FILE_MACRO(filenames[i], loaded); + for (i--; i >= 0; i--) + {/* We might allocated something, so let's clean it up :)) */ + free(image_data[i]); + image_data[i] = NULL; + } + return loaded; + } + /* getting image width and height */ + if (i == 0) + { + w = ilGetInteger(IL_IMAGE_WIDTH); + h = ilGetInteger(IL_IMAGE_HEIGHT); + } + else + { + if (w != ilGetInteger(IL_IMAGE_WIDTH) + || h != ilGetInteger(IL_IMAGE_HEIGHT)) + { + printf("Of course that images '%s' and '%s' are not the same. How could they be as they have different dimensions?\n", filenames[0], filenames[i]); + return -1; + } + } + /* Then we save image data into arrays that we allocate now */ + image_data[i] = malloc(w * h * params.bpp * sizeof(ILubyte)); + if (image_data[i] == NULL) + { + fprintf(stderr, "Out of memory, %s:%d\n", __FILE__, __LINE__); + return IL_OUT_OF_MEMORY; + } + ilCopyPixels(0, 0, 0, w, h, 1, ((params.flags & ACTION_TEST_ALPHA) == 0 ? IL_RGB : IL_RGBA), IL_UNSIGNED_BYTE, image_data[i]); + } + int return_value = 0, result; + int quantile; + double integral; + if (params.verbose > 0) + printf("Testing against '%s'\n", filenames[0]); + for (i = 1; i < images_count; i++) + { + compare_fields(w, h, image_data[0], image_data[i], params, & quantile, & integral); + result = interpret_results(filenames[i], params, quantile, integral); + return_value = (result > return_value) ? result : return_value; + free(image_data[i]); + image_data[i] = 0; + } + free(image_data[0]); + image_data[0] = 0; + ilDeleteImages(images_count, & handle[0]); + return return_value; +} + +/** Examines the command line like no tomorrow :-) + * + * Huge code, I am sorry for that. + * On the other hand, cross-platformness of popt is catastrophical + * and usage of boost is also too much for this simple purpose. + */ +int parse_commandline(int argc, char ** argv, Parameters * params) +{ + int actions = 0, expectations = 0; + const int long_str = 63; + int return_value = TEST_NOTHING; + + int i; + for (i = 1; i < argc; i++) + { + actions = 0; + /* Find out what to do and what to expect */ + if (argv[i][0] == '-') + {/* Ho, an option was passed... */ + if (argv[i][1] == '-') + {/* Deal with long options */ + if(strncmp(argv[i], "--extension", long_str)) + { + expectations |= EXPECT_EXTENSION; + } + else if (strncmp(argv[i], "--quantile", long_str)) + { + expectations |= EXPECT_QUANTILE; + } + else if (strncmp(argv[i], "--help", long_str)) + { + actions |= ACTION_HELP; + } + else if (strncmp(argv[i], "--verbose", long_str)) + { + actions |= ACTION_VERBOSE; + } + else if (strncmp(argv[i], "--test-alpha", long_str)) + { + actions |= ACTION_TEST_ALPHA; + } + else if (strncmp(argv[i], "--preserve", long_str)) + { + actions |= ACTION_PRESERVE_TESTFILE; + } + else if (strncmp(argv[i], "--use-resolution", long_str)) + { + expectations |= EXPECT_RESOLUTION; + } + else if (strncmp(argv[i], "--are-same", long_str)) + { + expectations |= EXPECT_IMAGES; + } + else if (strncmp(argv[i], "--image-complies", long_str)) + { + expectations |= EXPECT_FILENAME; + } + + } + else /* if not (argv[i][1] == '-') */ + {/* Deal with short options */ + int j; + for (j = 1; j < strlen(argv[i]); j++) + switch(argv[i][j]) + { + case 'h': + case '?': + actions |= ACTION_HELP; + break; + case 'v': + actions |= ACTION_VERBOSE; + break; + case 'a': + actions |= ACTION_TEST_ALPHA; + break; + case 'e': + expectations |= EXPECT_EXTENSION; + break; + case 'q': + expectations |= EXPECT_QUANTILE; + break; + case 'p': + actions |= ACTION_PRESERVE_TESTFILE; + break; + case 'r': + expectations |= EXPECT_RESOLUTION; + break; + case 's': + expectations |= EXPECT_IMAGES; + break; + case 'c': + expectations |= EXPECT_FILENAME; + break; + }/* end switch(argv[i][j]) */ + }/* if not (argv[i][1] == '-') */ + } + else /* (! argv[i][0] == '-') */ + {/* Now handle expectations... */ + if (expectations & EXPECT_EXTENSION) + {/* point extension to the extension string so we will be able to read it afterwards */ + params->extension = argv[i]; + return_value = TEST_EXTENSION; + } + else if (expectations & EXPECT_QUANTILE) + {/* This parameter SHOULD BE the quantile we wanted... */ + sscanf(argv[i], "%lf", & params->quantile_spec); + } + else if (expectations & EXPECT_RESOLUTION) + {/* This parameter SHOULD specify the geometry... */ + sscanf(argv[i], "%dx%d", & params->resolution[0], & params->resolution[1]); + } + else if (expectations & EXPECT_FILENAME) + {/* This parameter SHOULD specify one filename... */ + strncpy(params->first_filename, argv[i], sizeof(params->first_filename)); + if ((params->flags & ACTION_PRESERVE_TESTFILE) == 0) + { + params->flags |= ACTION_PRESERVE_TESTFILE; + printf("Issued a command to preserve the input file :-)\n"); + } + return_value = TEST_IS_TEST_IMAGE; + } + else if (expectations & EXPECT_IMAGES) + {/* Masterpiece, this parameter SHOULD specify two comma separated filenames... */ + sscanf(argv[i], "%30[^,],%30s", params->first_filename, params->second_filename); + if ((params->flags & ACTION_PRESERVE_TESTFILE) == 0) + { + params->flags |= ACTION_PRESERVE_TESTFILE; + printf("Issued a command to preserve the input file :-)\n"); + } + return_value = TEST_IMAGES_ARE_SAME; + /* just debug: * printf ("Acquired strings: %s %s\n", params->first_filename, params->second_filename); **/ + } + expectations = 0; + }/* (! argv[i][0] == '-') */ + /* now handle actions... */ + if (actions & ACTION_VERBOSE) + { + params->verbose++; + } + if (actions & ACTION_HELP) + { + printf(" *** Beware, manually generated help (=> may not be 100%% up-to-date :-) ***\n"); + printf(" If you miss something, examine the source code\n"); + printf("Run %s with this arguments:\n", argv[0]); + printf("\t-h, -? | --help: This help message\n"); + printf("\t-v | --verbose: Verbose run\n"); + printf("\t-a | --test-alpha: Make and test image alpha channel as well\n"); + printf("\t-e | --extension : Test saving and loading of this extension\n"); + printf("\t-p | --preserve: Don't remove any generated files\n"); + printf("\t-c | --image-complies : Test whether the filename is the image of our test pattern (useful for testing opening capabilities)\n"); + printf("\t-r | --use-resolution : If this makes sense, use this resolution), default 603x300\n"); + printf("\t-s | --are-same : Tests whether the first and second images are the same. Pass two filenames separated by comma.\n"); + + printf("This will be helpful one day...\n"); + } + if (actions & ACTION_PRESERVE_TESTFILE) + { + params->flags |= ACTION_PRESERVE_TESTFILE; + } + if (actions & ACTION_TEST_ALPHA) + { + params->flags |= ACTION_TEST_ALPHA; + params->bpp = 4; + } + }/* endfor */ + return return_value; +} + +int main(int argc, char ** argv) +{ + /* has to be done */ + ilInit(); +#ifdef ILU_ENABLED + iluInit(); +#endif + /* Consistent loading stuff... */ + ilEnable(IL_ORIGIN_SET); + + Parameters params = { /* ***SHOULD BE*** first_filename*/ "", + /* second filename */ "", + /* extension */ (char *)NULL, + /* verbose */ (int)0, + /* flags */(int)0, + /* bpp */(int)3, + /* resolution */ {603, 300}, + /* quantile spec */ (double)0.80, + /* quantile tresh */ (int)5, + /* integral tresh */ (double)5}; + + int to_do = parse_commandline(argc, argv, & params); + int return_value = 0; + if (to_do & TEST_EXTENSION && params.extension != NULL) + { + return_value = test_format(params); + if (return_value != 0) + fprintf(stderr, "Format test: FAIL (.%s)\n", params.extension); + } + else if (to_do & TEST_IS_TEST_IMAGE + && strlen(params.first_filename) > 0 + && strlen(params.second_filename) == 0) + { + if (params.verbose > 0) + printf ("Testing whether %s is the test image\n", params.first_filename); + return_value = test_is_testimage(params); + if (return_value != 0) + fprintf(stderr, "Is test image test: FAIL (%s)\n", params.first_filename); + } + else if (to_do & TEST_IMAGES_ARE_SAME + && strlen(params.first_filename) > 0 + && strlen(params.second_filename) > 0 ) + { + if (params.verbose > 0) + printf ("Testing whether %s and %s are +- the same\n", params.first_filename, params.second_filename); + return_value = test_are_same(params); + if (return_value != 0) + fprintf(stderr, "Images are the same test: FAIL ('%s' != '%s')\n", params.first_filename, params.second_filename); + } + + return return_value; +} +