Initial revision
authorSam Lantinga <slouken@lokigames.com>
Thu, 10 Aug 2000 06:05:39 +0000
changeset 076be7dab668c
child 1 f40c95f0b795
Initial revision
CHANGES
COPYING
IMG.c
IMG_bmp.c
IMG_gif.c
IMG_jpg.c
IMG_pcx.c
IMG_png.c
IMG_ppm.c
IMG_tga.c
IMG_tif.c
IMG_xxx.c
MPWmake.sea.hqx
Makefile.am
Makefile.in
README
SDL_image.h
SDL_image.spec.in
acinclude.m4
aclocal.m4
autogen.sh
config.guess
config.sub
configure
configure.in
install-sh
ltconfig
ltmain.sh
missing
mkinstalldirs
showimage.c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CHANGES	Thu Aug 10 06:05:39 2000 +0000
     1.3 @@ -0,0 +1,41 @@
     1.4 +
     1.5 +1.0.9:
     1.6 +Mattias Engdegård - Sat Jul  1 17:57:37 PDT 2000
     1.7 + * PNG loader properly sets the colorkey on 8-bit transparent images
     1.8 +Mattias Engdegård - Sat Jul  1 13:24:47 PDT 2000
     1.9 + * Fixed a bug in PCX detection
    1.10 + * Added support for TGA files
    1.11 + * showimage shows a checker background for transparent images
    1.12 +
    1.13 +1.0.8:
    1.14 +Mark Baker - Tue May 30 12:20:00 PDT 2000
    1.15 + * Added TIFF format loading support
    1.16 +
    1.17 +1.0.7:
    1.18 +Mattias Engdegård - Sat May 27 14:18:33 PDT 2000
    1.19 + * Added fixes for loading images on big-endian systems
    1.20 +
    1.21 +1.0.6:
    1.22 +Sam Lantinga - Sat Apr 29 10:18:32 PDT 2000
    1.23 + * showimage puts the name of the image in the title bar caption
    1.24 +Sam Lantinga - Sat Apr 29 10:05:58 PDT 2000
    1.25 + * Removed pitch check, since PNG already loads to a list of row pointers
    1.26 +
    1.27 +1.0.5:
    1.28 +Sam Lantinga - Sun Apr 23 14:41:32 PDT 2000
    1.29 + * Added support for GIF transparency
    1.30 +Sam Lantinga - Wed Apr 12 14:39:20 PDT 2000
    1.31 + * Fixed memory heap crash on NT using PNG images
    1.32 +Matt Campbell - Thu, 13 Apr 2000 13:29:17 -0700
    1.33 + * Fixed PNG detection on some Linux systems
    1.34 +
    1.35 +1.0.4:
    1.36 +Sam Lantinga - Tue Feb  1 13:33:53 PST 2000
    1.37 + * Cleaned up for Visual C++
    1.38 + * Added Visual C++ project file
    1.39 +
    1.40 +1.0.3:
    1.41 +Sam Lantinga - Wed Jan 19 22:10:52 PST 2000
    1.42 + * Added CHANGES
    1.43 + * Added rpm spec file contributed by Hakan Tandogan
    1.44 + * Changed the name of the example program from "show" to "showimage"
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/COPYING	Thu Aug 10 06:05:39 2000 +0000
     2.3 @@ -0,0 +1,437 @@
     2.4 +		  GNU LIBRARY GENERAL PUBLIC LICENSE
     2.5 +		       Version 2, June 1991
     2.6 +
     2.7 + Copyright (C) 1991 Free Software Foundation, Inc.
     2.8 +    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     2.9 + Everyone is permitted to copy and distribute verbatim copies
    2.10 + of this license document, but changing it is not allowed.
    2.11 +
    2.12 +[This is the first released version of the library GPL.  It is
    2.13 + numbered 2 because it goes with version 2 of the ordinary GPL.]
    2.14 +
    2.15 +			    Preamble
    2.16 +
    2.17 +  The licenses for most software are designed to take away your
    2.18 +freedom to share and change it.  By contrast, the GNU General Public
    2.19 +Licenses are intended to guarantee your freedom to share and change
    2.20 +free software--to make sure the software is free for all its users.
    2.21 +
    2.22 +  This license, the Library General Public License, applies to some
    2.23 +specially designated Free Software Foundation software, and to any
    2.24 +other libraries whose authors decide to use it.  You can use it for
    2.25 +your libraries, too.
    2.26 +
    2.27 +  When we speak of free software, we are referring to freedom, not
    2.28 +price.  Our General Public Licenses are designed to make sure that you
    2.29 +have the freedom to distribute copies of free software (and charge for
    2.30 +this service if you wish), that you receive source code or can get it
    2.31 +if you want it, that you can change the software or use pieces of it
    2.32 +in new free programs; and that you know you can do these things.
    2.33 +
    2.34 +  To protect your rights, we need to make restrictions that forbid
    2.35 +anyone to deny you these rights or to ask you to surrender the rights.
    2.36 +These restrictions translate to certain responsibilities for you if
    2.37 +you distribute copies of the library, or if you modify it.
    2.38 +
    2.39 +  For example, if you distribute copies of the library, whether gratis
    2.40 +or for a fee, you must give the recipients all the rights that we gave
    2.41 +you.  You must make sure that they, too, receive or can get the source
    2.42 +code.  If you link a program with the library, you must provide
    2.43 +complete object files to the recipients so that they can relink them
    2.44 +with the library, after making changes to the library and recompiling
    2.45 +it.  And you must show them these terms so they know their rights.
    2.46 +
    2.47 +  Our method of protecting your rights has two steps: (1) copyright
    2.48 +the library, and (2) offer you this license which gives you legal
    2.49 +permission to copy, distribute and/or modify the library.
    2.50 +
    2.51 +  Also, for each distributor's protection, we want to make certain
    2.52 +that everyone understands that there is no warranty for this free
    2.53 +library.  If the library is modified by someone else and passed on, we
    2.54 +want its recipients to know that what they have is not the original
    2.55 +version, so that any problems introduced by others will not reflect on
    2.56 +the original authors' reputations.
    2.57 +
    2.58 +  Finally, any free program is threatened constantly by software
    2.59 +patents.  We wish to avoid the danger that companies distributing free
    2.60 +software will individually obtain patent licenses, thus in effect
    2.61 +transforming the program into proprietary software.  To prevent this,
    2.62 +we have made it clear that any patent must be licensed for everyone's
    2.63 +free use or not licensed at all.
    2.64 +
    2.65 +  Most GNU software, including some libraries, is covered by the ordinary
    2.66 +GNU General Public License, which was designed for utility programs.  This
    2.67 +license, the GNU Library General Public License, applies to certain
    2.68 +designated libraries.  This license is quite different from the ordinary
    2.69 +one; be sure to read it in full, and don't assume that anything in it is
    2.70 +the same as in the ordinary license.
    2.71 +
    2.72 +  The reason we have a separate public license for some libraries is that
    2.73 +they blur the distinction we usually make between modifying or adding to a
    2.74 +program and simply using it.  Linking a program with a library, without
    2.75 +changing the library, is in some sense simply using the library, and is
    2.76 +analogous to running a utility program or application program.  However, in
    2.77 +a textual and legal sense, the linked executable is a combined work, a
    2.78 +derivative of the original library, and the ordinary General Public License
    2.79 +treats it as such.
    2.80 +
    2.81 +  Because of this blurred distinction, using the ordinary General
    2.82 +Public License for libraries did not effectively promote software
    2.83 +sharing, because most developers did not use the libraries.  We
    2.84 +concluded that weaker conditions might promote sharing better.
    2.85 +
    2.86 +  However, unrestricted linking of non-free programs would deprive the
    2.87 +users of those programs of all benefit from the free status of the
    2.88 +libraries themselves.  This Library General Public License is intended to
    2.89 +permit developers of non-free programs to use free libraries, while
    2.90 +preserving your freedom as a user of such programs to change the free
    2.91 +libraries that are incorporated in them.  (We have not seen how to achieve
    2.92 +this as regards changes in header files, but we have achieved it as regards
    2.93 +changes in the actual functions of the Library.)  The hope is that this
    2.94 +will lead to faster development of free libraries.
    2.95 +
    2.96 +  The precise terms and conditions for copying, distribution and
    2.97 +modification follow.  Pay close attention to the difference between a
    2.98 +"work based on the library" and a "work that uses the library".  The
    2.99 +former contains code derived from the library, while the latter only
   2.100 +works together with the library.
   2.101 +
   2.102 +  Note that it is possible for a library to be covered by the ordinary
   2.103 +General Public License rather than by this special one.
   2.104 +
   2.105 +		  GNU LIBRARY GENERAL PUBLIC LICENSE
   2.106 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
   2.107 +
   2.108 +  0. This License Agreement applies to any software library which
   2.109 +contains a notice placed by the copyright holder or other authorized
   2.110 +party saying it may be distributed under the terms of this Library
   2.111 +General Public License (also called "this License").  Each licensee is
   2.112 +addressed as "you".
   2.113 +
   2.114 +  A "library" means a collection of software functions and/or data
   2.115 +prepared so as to be conveniently linked with application programs
   2.116 +(which use some of those functions and data) to form executables.
   2.117 +
   2.118 +  The "Library", below, refers to any such software library or work
   2.119 +which has been distributed under these terms.  A "work based on the
   2.120 +Library" means either the Library or any derivative work under
   2.121 +copyright law: that is to say, a work containing the Library or a
   2.122 +portion of it, either verbatim or with modifications and/or translated
   2.123 +straightforwardly into another language.  (Hereinafter, translation is
   2.124 +included without limitation in the term "modification".)
   2.125 +
   2.126 +  "Source code" for a work means the preferred form of the work for
   2.127 +making modifications to it.  For a library, complete source code means
   2.128 +all the source code for all modules it contains, plus any associated
   2.129 +interface definition files, plus the scripts used to control compilation
   2.130 +and installation of the library.
   2.131 +
   2.132 +  Activities other than copying, distribution and modification are not
   2.133 +covered by this License; they are outside its scope.  The act of
   2.134 +running a program using the Library is not restricted, and output from
   2.135 +such a program is covered only if its contents constitute a work based
   2.136 +on the Library (independent of the use of the Library in a tool for
   2.137 +writing it).  Whether that is true depends on what the Library does
   2.138 +and what the program that uses the Library does.
   2.139 +  
   2.140 +  1. You may copy and distribute verbatim copies of the Library's
   2.141 +complete source code as you receive it, in any medium, provided that
   2.142 +you conspicuously and appropriately publish on each copy an
   2.143 +appropriate copyright notice and disclaimer of warranty; keep intact
   2.144 +all the notices that refer to this License and to the absence of any
   2.145 +warranty; and distribute a copy of this License along with the
   2.146 +Library.
   2.147 +
   2.148 +  You may charge a fee for the physical act of transferring a copy,
   2.149 +and you may at your option offer warranty protection in exchange for a
   2.150 +fee.
   2.151 +
   2.152 +  2. You may modify your copy or copies of the Library or any portion
   2.153 +of it, thus forming a work based on the Library, and copy and
   2.154 +distribute such modifications or work under the terms of Section 1
   2.155 +above, provided that you also meet all of these conditions:
   2.156 +
   2.157 +    a) The modified work must itself be a software library.
   2.158 +
   2.159 +    b) You must cause the files modified to carry prominent notices
   2.160 +    stating that you changed the files and the date of any change.
   2.161 +
   2.162 +    c) You must cause the whole of the work to be licensed at no
   2.163 +    charge to all third parties under the terms of this License.
   2.164 +
   2.165 +    d) If a facility in the modified Library refers to a function or a
   2.166 +    table of data to be supplied by an application program that uses
   2.167 +    the facility, other than as an argument passed when the facility
   2.168 +    is invoked, then you must make a good faith effort to ensure that,
   2.169 +    in the event an application does not supply such function or
   2.170 +    table, the facility still operates, and performs whatever part of
   2.171 +    its purpose remains meaningful.
   2.172 +
   2.173 +    (For example, a function in a library to compute square roots has
   2.174 +    a purpose that is entirely well-defined independent of the
   2.175 +    application.  Therefore, Subsection 2d requires that any
   2.176 +    application-supplied function or table used by this function must
   2.177 +    be optional: if the application does not supply it, the square
   2.178 +    root function must still compute square roots.)
   2.179 +
   2.180 +These requirements apply to the modified work as a whole.  If
   2.181 +identifiable sections of that work are not derived from the Library,
   2.182 +and can be reasonably considered independent and separate works in
   2.183 +themselves, then this License, and its terms, do not apply to those
   2.184 +sections when you distribute them as separate works.  But when you
   2.185 +distribute the same sections as part of a whole which is a work based
   2.186 +on the Library, the distribution of the whole must be on the terms of
   2.187 +this License, whose permissions for other licensees extend to the
   2.188 +entire whole, and thus to each and every part regardless of who wrote
   2.189 +it.
   2.190 +
   2.191 +Thus, it is not the intent of this section to claim rights or contest
   2.192 +your rights to work written entirely by you; rather, the intent is to
   2.193 +exercise the right to control the distribution of derivative or
   2.194 +collective works based on the Library.
   2.195 +
   2.196 +In addition, mere aggregation of another work not based on the Library
   2.197 +with the Library (or with a work based on the Library) on a volume of
   2.198 +a storage or distribution medium does not bring the other work under
   2.199 +the scope of this License.
   2.200 +
   2.201 +  3. You may opt to apply the terms of the ordinary GNU General Public
   2.202 +License instead of this License to a given copy of the Library.  To do
   2.203 +this, you must alter all the notices that refer to this License, so
   2.204 +that they refer to the ordinary GNU General Public License, version 2,
   2.205 +instead of to this License.  (If a newer version than version 2 of the
   2.206 +ordinary GNU General Public License has appeared, then you can specify
   2.207 +that version instead if you wish.)  Do not make any other change in
   2.208 +these notices.
   2.209 +
   2.210 +  Once this change is made in a given copy, it is irreversible for
   2.211 +that copy, so the ordinary GNU General Public License applies to all
   2.212 +subsequent copies and derivative works made from that copy.
   2.213 +
   2.214 +  This option is useful when you wish to copy part of the code of
   2.215 +the Library into a program that is not a library.
   2.216 +
   2.217 +  4. You may copy and distribute the Library (or a portion or
   2.218 +derivative of it, under Section 2) in object code or executable form
   2.219 +under the terms of Sections 1 and 2 above provided that you accompany
   2.220 +it with the complete corresponding machine-readable source code, which
   2.221 +must be distributed under the terms of Sections 1 and 2 above on a
   2.222 +medium customarily used for software interchange.
   2.223 +
   2.224 +  If distribution of object code is made by offering access to copy
   2.225 +from a designated place, then offering equivalent access to copy the
   2.226 +source code from the same place satisfies the requirement to
   2.227 +distribute the source code, even though third parties are not
   2.228 +compelled to copy the source along with the object code.
   2.229 +
   2.230 +  5. A program that contains no derivative of any portion of the
   2.231 +Library, but is designed to work with the Library by being compiled or
   2.232 +linked with it, is called a "work that uses the Library".  Such a
   2.233 +work, in isolation, is not a derivative work of the Library, and
   2.234 +therefore falls outside the scope of this License.
   2.235 +
   2.236 +  However, linking a "work that uses the Library" with the Library
   2.237 +creates an executable that is a derivative of the Library (because it
   2.238 +contains portions of the Library), rather than a "work that uses the
   2.239 +library".  The executable is therefore covered by this License.
   2.240 +Section 6 states terms for distribution of such executables.
   2.241 +
   2.242 +  When a "work that uses the Library" uses material from a header file
   2.243 +that is part of the Library, the object code for the work may be a
   2.244 +derivative work of the Library even though the source code is not.
   2.245 +Whether this is true is especially significant if the work can be
   2.246 +linked without the Library, or if the work is itself a library.  The
   2.247 +threshold for this to be true is not precisely defined by law.
   2.248 +
   2.249 +  If such an object file uses only numerical parameters, data
   2.250 +structure layouts and accessors, and small macros and small inline
   2.251 +functions (ten lines or less in length), then the use of the object
   2.252 +file is unrestricted, regardless of whether it is legally a derivative
   2.253 +work.  (Executables containing this object code plus portions of the
   2.254 +Library will still fall under Section 6.)
   2.255 +
   2.256 +  Otherwise, if the work is a derivative of the Library, you may
   2.257 +distribute the object code for the work under the terms of Section 6.
   2.258 +Any executables containing that work also fall under Section 6,
   2.259 +whether or not they are linked directly with the Library itself.
   2.260 +
   2.261 +  6. As an exception to the Sections above, you may also compile or
   2.262 +link a "work that uses the Library" with the Library to produce a
   2.263 +work containing portions of the Library, and distribute that work
   2.264 +under terms of your choice, provided that the terms permit
   2.265 +modification of the work for the customer's own use and reverse
   2.266 +engineering for debugging such modifications.
   2.267 +
   2.268 +  You must give prominent notice with each copy of the work that the
   2.269 +Library is used in it and that the Library and its use are covered by
   2.270 +this License.  You must supply a copy of this License.  If the work
   2.271 +during execution displays copyright notices, you must include the
   2.272 +copyright notice for the Library among them, as well as a reference
   2.273 +directing the user to the copy of this License.  Also, you must do one
   2.274 +of these things:
   2.275 +
   2.276 +    a) Accompany the work with the complete corresponding
   2.277 +    machine-readable source code for the Library including whatever
   2.278 +    changes were used in the work (which must be distributed under
   2.279 +    Sections 1 and 2 above); and, if the work is an executable linked
   2.280 +    with the Library, with the complete machine-readable "work that
   2.281 +    uses the Library", as object code and/or source code, so that the
   2.282 +    user can modify the Library and then relink to produce a modified
   2.283 +    executable containing the modified Library.  (It is understood
   2.284 +    that the user who changes the contents of definitions files in the
   2.285 +    Library will not necessarily be able to recompile the application
   2.286 +    to use the modified definitions.)
   2.287 +
   2.288 +    b) Accompany the work with a written offer, valid for at
   2.289 +    least three years, to give the same user the materials
   2.290 +    specified in Subsection 6a, above, for a charge no more
   2.291 +    than the cost of performing this distribution.
   2.292 +
   2.293 +    c) If distribution of the work is made by offering access to copy
   2.294 +    from a designated place, offer equivalent access to copy the above
   2.295 +    specified materials from the same place.
   2.296 +
   2.297 +    d) Verify that the user has already received a copy of these
   2.298 +    materials or that you have already sent this user a copy.
   2.299 +
   2.300 +  For an executable, the required form of the "work that uses the
   2.301 +Library" must include any data and utility programs needed for
   2.302 +reproducing the executable from it.  However, as a special exception,
   2.303 +the source code distributed need not include anything that is normally
   2.304 +distributed (in either source or binary form) with the major
   2.305 +components (compiler, kernel, and so on) of the operating system on
   2.306 +which the executable runs, unless that component itself accompanies
   2.307 +the executable.
   2.308 +
   2.309 +  It may happen that this requirement contradicts the license
   2.310 +restrictions of other proprietary libraries that do not normally
   2.311 +accompany the operating system.  Such a contradiction means you cannot
   2.312 +use both them and the Library together in an executable that you
   2.313 +distribute.
   2.314 +
   2.315 +  7. You may place library facilities that are a work based on the
   2.316 +Library side-by-side in a single library together with other library
   2.317 +facilities not covered by this License, and distribute such a combined
   2.318 +library, provided that the separate distribution of the work based on
   2.319 +the Library and of the other library facilities is otherwise
   2.320 +permitted, and provided that you do these two things:
   2.321 +
   2.322 +    a) Accompany the combined library with a copy of the same work
   2.323 +    based on the Library, uncombined with any other library
   2.324 +    facilities.  This must be distributed under the terms of the
   2.325 +    Sections above.
   2.326 +
   2.327 +    b) Give prominent notice with the combined library of the fact
   2.328 +    that part of it is a work based on the Library, and explaining
   2.329 +    where to find the accompanying uncombined form of the same work.
   2.330 +
   2.331 +  8. You may not copy, modify, sublicense, link with, or distribute
   2.332 +the Library except as expressly provided under this License.  Any
   2.333 +attempt otherwise to copy, modify, sublicense, link with, or
   2.334 +distribute the Library is void, and will automatically terminate your
   2.335 +rights under this License.  However, parties who have received copies,
   2.336 +or rights, from you under this License will not have their licenses
   2.337 +terminated so long as such parties remain in full compliance.
   2.338 +
   2.339 +  9. You are not required to accept this License, since you have not
   2.340 +signed it.  However, nothing else grants you permission to modify or
   2.341 +distribute the Library or its derivative works.  These actions are
   2.342 +prohibited by law if you do not accept this License.  Therefore, by
   2.343 +modifying or distributing the Library (or any work based on the
   2.344 +Library), you indicate your acceptance of this License to do so, and
   2.345 +all its terms and conditions for copying, distributing or modifying
   2.346 +the Library or works based on it.
   2.347 +
   2.348 +  10. Each time you redistribute the Library (or any work based on the
   2.349 +Library), the recipient automatically receives a license from the
   2.350 +original licensor to copy, distribute, link with or modify the Library
   2.351 +subject to these terms and conditions.  You may not impose any further
   2.352 +restrictions on the recipients' exercise of the rights granted herein.
   2.353 +You are not responsible for enforcing compliance by third parties to
   2.354 +this License.
   2.355 +
   2.356 +  11. If, as a consequence of a court judgment or allegation of patent
   2.357 +infringement or for any other reason (not limited to patent issues),
   2.358 +conditions are imposed on you (whether by court order, agreement or
   2.359 +otherwise) that contradict the conditions of this License, they do not
   2.360 +excuse you from the conditions of this License.  If you cannot
   2.361 +distribute so as to satisfy simultaneously your obligations under this
   2.362 +License and any other pertinent obligations, then as a consequence you
   2.363 +may not distribute the Library at all.  For example, if a patent
   2.364 +license would not permit royalty-free redistribution of the Library by
   2.365 +all those who receive copies directly or indirectly through you, then
   2.366 +the only way you could satisfy both it and this License would be to
   2.367 +refrain entirely from distribution of the Library.
   2.368 +
   2.369 +If any portion of this section is held invalid or unenforceable under any
   2.370 +particular circumstance, the balance of the section is intended to apply,
   2.371 +and the section as a whole is intended to apply in other circumstances.
   2.372 +
   2.373 +It is not the purpose of this section to induce you to infringe any
   2.374 +patents or other property right claims or to contest validity of any
   2.375 +such claims; this section has the sole purpose of protecting the
   2.376 +integrity of the free software distribution system which is
   2.377 +implemented by public license practices.  Many people have made
   2.378 +generous contributions to the wide range of software distributed
   2.379 +through that system in reliance on consistent application of that
   2.380 +system; it is up to the author/donor to decide if he or she is willing
   2.381 +to distribute software through any other system and a licensee cannot
   2.382 +impose that choice.
   2.383 +
   2.384 +This section is intended to make thoroughly clear what is believed to
   2.385 +be a consequence of the rest of this License.
   2.386 +
   2.387 +  12. If the distribution and/or use of the Library is restricted in
   2.388 +certain countries either by patents or by copyrighted interfaces, the
   2.389 +original copyright holder who places the Library under this License may add
   2.390 +an explicit geographical distribution limitation excluding those countries,
   2.391 +so that distribution is permitted only in or among countries not thus
   2.392 +excluded.  In such case, this License incorporates the limitation as if
   2.393 +written in the body of this License.
   2.394 +
   2.395 +  13. The Free Software Foundation may publish revised and/or new
   2.396 +versions of the Library General Public License from time to time.
   2.397 +Such new versions will be similar in spirit to the present version,
   2.398 +but may differ in detail to address new problems or concerns.
   2.399 +
   2.400 +Each version is given a distinguishing version number.  If the Library
   2.401 +specifies a version number of this License which applies to it and
   2.402 +"any later version", you have the option of following the terms and
   2.403 +conditions either of that version or of any later version published by
   2.404 +the Free Software Foundation.  If the Library does not specify a
   2.405 +license version number, you may choose any version ever published by
   2.406 +the Free Software Foundation.
   2.407 +
   2.408 +  14. If you wish to incorporate parts of the Library into other free
   2.409 +programs whose distribution conditions are incompatible with these,
   2.410 +write to the author to ask for permission.  For software which is
   2.411 +copyrighted by the Free Software Foundation, write to the Free
   2.412 +Software Foundation; we sometimes make exceptions for this.  Our
   2.413 +decision will be guided by the two goals of preserving the free status
   2.414 +of all derivatives of our free software and of promoting the sharing
   2.415 +and reuse of software generally.
   2.416 +
   2.417 +			    NO WARRANTY
   2.418 +
   2.419 +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
   2.420 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
   2.421 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
   2.422 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
   2.423 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
   2.424 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   2.425 +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
   2.426 +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
   2.427 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
   2.428 +
   2.429 +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
   2.430 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
   2.431 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
   2.432 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
   2.433 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
   2.434 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   2.435 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   2.436 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
   2.437 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
   2.438 +DAMAGES.
   2.439 +
   2.440 +		     END OF TERMS AND CONDITIONS
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/IMG.c	Thu Aug 10 06:05:39 2000 +0000
     3.3 @@ -0,0 +1,145 @@
     3.4 +/*
     3.5 +    IMGLIB:  An example image loading library for use with SDL
     3.6 +    Copyright (C) 1999  Sam Lantinga
     3.7 +
     3.8 +    This library is free software; you can redistribute it and/or
     3.9 +    modify it under the terms of the GNU Library General Public
    3.10 +    License as published by the Free Software Foundation; either
    3.11 +    version 2 of the License, or (at your option) any later version.
    3.12 +
    3.13 +    This library is distributed in the hope that it will be useful,
    3.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.16 +    Library General Public License for more details.
    3.17 +
    3.18 +    You should have received a copy of the GNU Library General Public
    3.19 +    License along with this library; if not, write to the Free
    3.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.21 +
    3.22 +    Sam Lantinga
    3.23 +    5635-34 Springhouse Dr.
    3.24 +    Pleasanton, CA 94588 (USA)
    3.25 +    slouken@devolution.com
    3.26 +*/
    3.27 +
    3.28 +/* A simple library to load images of various formats as SDL surfaces */
    3.29 +
    3.30 +#include <stdio.h>
    3.31 +#include <string.h>
    3.32 +#include <ctype.h>
    3.33 +
    3.34 +#include "SDL_image.h"
    3.35 +
    3.36 +/* Table of image detection and loading functions */
    3.37 +static struct {
    3.38 +	char *type;
    3.39 +	int (*is)(SDL_RWops *src);
    3.40 +	SDL_Surface *(*load)(SDL_RWops *src);
    3.41 +} supported[] = {
    3.42 +        /* keep magicless formats first (denoted by is==NULL) */
    3.43 +	{ "TGA", NULL,      IMG_LoadTGA_RW },
    3.44 +	{ "BMP", IMG_isBMP, IMG_LoadBMP_RW },
    3.45 +	{ "PPM", IMG_isPPM, IMG_LoadPPM_RW },
    3.46 +	{ "PCX", IMG_isPCX, IMG_LoadPCX_RW },
    3.47 +	{ "GIF", IMG_isGIF, IMG_LoadGIF_RW },
    3.48 +	{ "JPG", IMG_isJPG, IMG_LoadJPG_RW },
    3.49 +	{ "TIF", IMG_isTIF, IMG_LoadTIF_RW },
    3.50 +	{ "PNG", IMG_isPNG, IMG_LoadPNG_RW },
    3.51 +};
    3.52 +
    3.53 +/* Does the alpha value correspond to transparency or opacity?
    3.54 +   Default: transparency
    3.55 +*/
    3.56 +int IMG_invert_alpha = 0;
    3.57 +
    3.58 +/* Load an image from a file */
    3.59 +SDL_Surface *IMG_Load(const char *file)
    3.60 +{
    3.61 +    SDL_RWops *src = SDL_RWFromFile(file, "rb");
    3.62 +    char *ext = strrchr(file, '.');
    3.63 +    if(ext)
    3.64 +	ext++;
    3.65 +    return IMG_LoadTyped_RW(src, 1, ext);
    3.66 +}
    3.67 +
    3.68 +/* Load an image from an SDL datasource (for compatibility) */
    3.69 +SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc)
    3.70 +{
    3.71 +    return IMG_LoadTyped_RW(src, freesrc, NULL);
    3.72 +}
    3.73 +
    3.74 +/* Portable case-insensitive string compare function */
    3.75 +static int string_equals(const char *str1, const char *str2)
    3.76 +{
    3.77 +	while ( *str1 && *str2 ) {
    3.78 +		if ( toupper((unsigned char)*str1) !=
    3.79 +		     toupper((unsigned char)*str2) )
    3.80 +			break;
    3.81 +		++str1;
    3.82 +		++str2;
    3.83 +	}
    3.84 +	return (!*str1 && !*str2);
    3.85 +}
    3.86 +
    3.87 +/* Load an image from an SDL datasource, optionally specifying the type */
    3.88 +SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type)
    3.89 +{
    3.90 +	int i, start;
    3.91 +	SDL_Surface *image;
    3.92 +
    3.93 +	/* Make sure there is something to do.. */
    3.94 +	if ( src == NULL ) {
    3.95 +		return(NULL);
    3.96 +	}
    3.97 +
    3.98 +	/* See whether or not this data source can handle seeking */
    3.99 +	if ( SDL_RWseek(src, 0, SEEK_CUR) < 0 ) {
   3.100 +		IMG_SetError("Can't seek in this data source");
   3.101 +		return(NULL);
   3.102 +	}
   3.103 +
   3.104 +	/* Detect the type of image being loaded */
   3.105 +	start = SDL_RWtell(src);
   3.106 +	image = NULL;
   3.107 +	for ( i=0; supported[i].type && !image; ++i ) {
   3.108 +	        if( (supported[i].is
   3.109 +		     && (SDL_RWseek(src, start, SEEK_SET),
   3.110 +			 supported[i].is(src)))
   3.111 +		    || (type && string_equals(type, supported[i].type))) {
   3.112 +#ifdef DEBUG_IMGLIB
   3.113 +			fprintf(stderr, "IMGLIB: Loading image as %s\n",
   3.114 +							supported[i].type);
   3.115 +#endif
   3.116 +			SDL_RWseek(src, start, SEEK_SET);
   3.117 +			image = supported[i].load(src);
   3.118 +			break;
   3.119 +		}
   3.120 +	}
   3.121 +
   3.122 +	/* Clean up, check for errors, and return */
   3.123 +	if ( freesrc ) {
   3.124 +		SDL_RWclose(src);
   3.125 +	}
   3.126 +	if ( image == NULL ) {
   3.127 +		IMG_SetError("Unsupported image format");
   3.128 +	}
   3.129 +	return(image);
   3.130 +}
   3.131 +
   3.132 +/* Invert the alpha of a surface for use with OpenGL
   3.133 +   If you want to use a surface loaded with this library as an OpenGL texture,
   3.134 +   set invart_alpha to 1.  If you want to use it with SDL alpha blit routines,
   3.135 +   set it to 0.
   3.136 +   This function returns the old alpha inversion value.
   3.137 +
   3.138 +   Currently this is is only used by the PNG and TGA loaders.
   3.139 + */
   3.140 +int IMG_InvertAlpha(int on)
   3.141 +{
   3.142 +	int old_alpha_value;
   3.143 +
   3.144 +	old_alpha_value = IMG_invert_alpha;
   3.145 +	IMG_invert_alpha = on;
   3.146 +	return(old_alpha_value);
   3.147 +}
   3.148 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/IMG_bmp.c	Thu Aug 10 06:05:39 2000 +0000
     4.3 @@ -0,0 +1,69 @@
     4.4 +/*
     4.5 +    IMGLIB:  An example image loading library for use with SDL
     4.6 +    Copyright (C) 1999  Sam Lantinga
     4.7 +
     4.8 +    This library is free software; you can redistribute it and/or
     4.9 +    modify it under the terms of the GNU Library General Public
    4.10 +    License as published by the Free Software Foundation; either
    4.11 +    version 2 of the License, or (at your option) any later version.
    4.12 +
    4.13 +    This library is distributed in the hope that it will be useful,
    4.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    4.16 +    Library General Public License for more details.
    4.17 +
    4.18 +    You should have received a copy of the GNU Library General Public
    4.19 +    License along with this library; if not, write to the Free
    4.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    4.21 +
    4.22 +    Sam Lantinga
    4.23 +    5635-34 Springhouse Dr.
    4.24 +    Pleasanton, CA 94588 (USA)
    4.25 +    slouken@devolution.com
    4.26 +*/
    4.27 +
    4.28 +/* This is a BMP image file loading framework */
    4.29 +
    4.30 +#include <stdio.h>
    4.31 +#include <string.h>
    4.32 +
    4.33 +#include "SDL_image.h"
    4.34 +
    4.35 +#ifdef LOAD_BMP
    4.36 +
    4.37 +/* See if an image is contained in a data source */
    4.38 +int IMG_isBMP(SDL_RWops *src)
    4.39 +{
    4.40 +	int is_BMP;
    4.41 +	char magic[2];
    4.42 +
    4.43 +	is_BMP = 0;
    4.44 +	if ( SDL_RWread(src, magic, 2, 1) ) {
    4.45 +		if ( strncmp(magic, "BM", 2) == 0 ) {
    4.46 +			is_BMP = 1;
    4.47 +		}
    4.48 +	}
    4.49 +	return(is_BMP);
    4.50 +}
    4.51 +
    4.52 +/* Load a BMP type image from an SDL datasource */
    4.53 +SDL_Surface *IMG_LoadBMP_RW(SDL_RWops *src)
    4.54 +{
    4.55 +	return(SDL_LoadBMP_RW(src, 0));
    4.56 +}
    4.57 +
    4.58 +#else
    4.59 +
    4.60 +/* See if an image is contained in a data source */
    4.61 +int IMG_isBMP(SDL_RWops *src)
    4.62 +{
    4.63 +	return(0);
    4.64 +}
    4.65 +
    4.66 +/* Load a BMP type image from an SDL datasource */
    4.67 +SDL_Surface *IMG_LoadBMP_RW(SDL_RWops *src)
    4.68 +{
    4.69 +	return(NULL);
    4.70 +}
    4.71 +
    4.72 +#endif /* LOAD_BMP */
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/IMG_gif.c	Thu Aug 10 06:05:39 2000 +0000
     5.3 @@ -0,0 +1,604 @@
     5.4 +/*
     5.5 +    IMGLIB:  An example image loading library for use with SDL
     5.6 +    Copyright (C) 1999  Sam Lantinga
     5.7 +
     5.8 +    This library is free software; you can redistribute it and/or
     5.9 +    modify it under the terms of the GNU Library General Public
    5.10 +    License as published by the Free Software Foundation; either
    5.11 +    version 2 of the License, or (at your option) any later version.
    5.12 +
    5.13 +    This library is distributed in the hope that it will be useful,
    5.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    5.16 +    Library General Public License for more details.
    5.17 +
    5.18 +    You should have received a copy of the GNU Library General Public
    5.19 +    License along with this library; if not, write to the Free
    5.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    5.21 +
    5.22 +    Sam Lantinga
    5.23 +    5635-34 Springhouse Dr.
    5.24 +    Pleasanton, CA 94588 (USA)
    5.25 +    slouken@devolution.com
    5.26 +*/
    5.27 +
    5.28 +/* This is a GIF image file loading framework */
    5.29 +
    5.30 +#include <stdio.h>
    5.31 +#include <string.h>
    5.32 +
    5.33 +#include "SDL_image.h"
    5.34 +
    5.35 +#ifdef LOAD_GIF
    5.36 +
    5.37 +/* See if an image is contained in a data source */
    5.38 +int IMG_isGIF(SDL_RWops *src)
    5.39 +{
    5.40 +	int is_GIF;
    5.41 +	char magic[6];
    5.42 +
    5.43 +	is_GIF = 0;
    5.44 +	if ( SDL_RWread(src, magic, 6, 1) ) {
    5.45 +		if ( (strncmp(magic, "GIF", 3) == 0) &&
    5.46 +		     ((memcmp(magic + 3, "87a", 3) == 0) ||
    5.47 +		      (memcmp(magic + 3, "89a", 3) == 0)) ) {
    5.48 +			is_GIF = 1;
    5.49 +		}
    5.50 +	}
    5.51 +	return(is_GIF);
    5.52 +}
    5.53 +
    5.54 +/* Code from here to end of file has been adapted from XPaint:           */
    5.55 +/* +-------------------------------------------------------------------+ */
    5.56 +/* | Copyright 1990, 1991, 1993 David Koblas.			       | */
    5.57 +/* | Copyright 1996 Torsten Martinsen.				       | */
    5.58 +/* |   Permission to use, copy, modify, and distribute this software   | */
    5.59 +/* |   and its documentation for any purpose and without fee is hereby | */
    5.60 +/* |   granted, provided that the above copyright notice appear in all | */
    5.61 +/* |   copies and that both that copyright notice and this permission  | */
    5.62 +/* |   notice appear in supporting documentation.  This software is    | */
    5.63 +/* |   provided "as is" without express or implied warranty.	       | */
    5.64 +/* +-------------------------------------------------------------------+ */
    5.65 +
    5.66 +/* Adapted for use in SDL by Sam Lantinga -- 7/20/98 */
    5.67 +#define USED_BY_SDL
    5.68 +
    5.69 +#include <stdio.h>
    5.70 +#include <string.h>
    5.71 +
    5.72 +#ifdef USED_BY_SDL
    5.73 +/* Changes to work with SDL:
    5.74 +
    5.75 +   Include SDL header file
    5.76 +   Use SDL_Surface rather than xpaint Image structure
    5.77 +   Define SDL versions of RWSetMsg(), ImageNewCmap() and ImageSetCmap()
    5.78 +*/
    5.79 +#include "SDL.h"
    5.80 +
    5.81 +#define Image			SDL_Surface
    5.82 +#define RWSetMsg		IMG_SetError
    5.83 +#define ImageNewCmap(w, h, s)	SDL_AllocSurface(SDL_SWSURFACE,w,h,8,0,0,0,0)
    5.84 +#define ImageSetCmap(s, i, R, G, B) do { \
    5.85 +				s->format->palette->colors[i].r = R; \
    5.86 +				s->format->palette->colors[i].g = G; \
    5.87 +				s->format->palette->colors[i].b = B; \
    5.88 +			} while (0)
    5.89 +/* * * * * */
    5.90 +
    5.91 +#else
    5.92 +
    5.93 +/* Original XPaint sources */
    5.94 +
    5.95 +#include "image.h"
    5.96 +#include "rwTable.h"
    5.97 +
    5.98 +#define SDL_RWops	FILE
    5.99 +#define SDL_RWclose	fclose
   5.100 +
   5.101 +#endif /* USED_BY_SDL */
   5.102 +
   5.103 +
   5.104 +#define	MAXCOLORMAPSIZE		256
   5.105 +
   5.106 +#define	TRUE	1
   5.107 +#define	FALSE	0
   5.108 +
   5.109 +#define CM_RED		0
   5.110 +#define CM_GREEN	1
   5.111 +#define CM_BLUE		2
   5.112 +
   5.113 +#define	MAX_LWZ_BITS		12
   5.114 +
   5.115 +#define INTERLACE		0x40
   5.116 +#define LOCALCOLORMAP	0x80
   5.117 +#define BitSet(byte, bit)	(((byte) & (bit)) == (bit))
   5.118 +
   5.119 +#define	ReadOK(file,buffer,len)	SDL_RWread(file, buffer, len, 1)
   5.120 +
   5.121 +#define LM_to_uint(a,b)			(((b)<<8)|(a))
   5.122 +
   5.123 +struct {
   5.124 +    unsigned int Width;
   5.125 +    unsigned int Height;
   5.126 +    unsigned char ColorMap[3][MAXCOLORMAPSIZE];
   5.127 +    unsigned int BitPixel;
   5.128 +    unsigned int ColorResolution;
   5.129 +    unsigned int Background;
   5.130 +    unsigned int AspectRatio;
   5.131 +    int GrayScale;
   5.132 +} GifScreen;
   5.133 +
   5.134 +static struct {
   5.135 +    int transparent;
   5.136 +    int delayTime;
   5.137 +    int inputFlag;
   5.138 +    int disposal;
   5.139 +} Gif89;
   5.140 +
   5.141 +static int ReadColorMap(SDL_RWops * src, int number,
   5.142 +			unsigned char buffer[3][MAXCOLORMAPSIZE], int *flag);
   5.143 +static int DoExtension(SDL_RWops * src, int label);
   5.144 +static int GetDataBlock(SDL_RWops * src, unsigned char *buf);
   5.145 +static int GetCode(SDL_RWops * src, int code_size, int flag);
   5.146 +static int LWZReadByte(SDL_RWops * src, int flag, int input_code_size);
   5.147 +static Image *ReadImage(SDL_RWops * src, int len, int height, int,
   5.148 +			unsigned char cmap[3][MAXCOLORMAPSIZE],
   5.149 +			int gray, int interlace, int ignore);
   5.150 +
   5.151 +Image *
   5.152 +IMG_LoadGIF_RW(SDL_RWops *src)
   5.153 +{
   5.154 +    unsigned char buf[16];
   5.155 +    unsigned char c;
   5.156 +    unsigned char localColorMap[3][MAXCOLORMAPSIZE];
   5.157 +    int grayScale;
   5.158 +    int useGlobalColormap;
   5.159 +    int bitPixel;
   5.160 +    int imageCount = 0;
   5.161 +    char version[4];
   5.162 +    int imageNumber = 1;
   5.163 +    Image *image = NULL;
   5.164 +
   5.165 +    if ( src == NULL ) {
   5.166 +        goto done;
   5.167 +    }
   5.168 +    if (!ReadOK(src, buf, 6)) {
   5.169 +	RWSetMsg("error reading magic number");
   5.170 +        goto done;
   5.171 +    }
   5.172 +    if (strncmp((char *) buf, "GIF", 3) != 0) {
   5.173 +	RWSetMsg("not a GIF file");
   5.174 +        goto done;
   5.175 +    }
   5.176 +    strncpy(version, (char *) buf + 3, 3);
   5.177 +    version[3] = '\0';
   5.178 +
   5.179 +    if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) {
   5.180 +	RWSetMsg("bad version number, not '87a' or '89a'");
   5.181 +        goto done;
   5.182 +    }
   5.183 +    Gif89.transparent = -1;
   5.184 +    Gif89.delayTime = -1;
   5.185 +    Gif89.inputFlag = -1;
   5.186 +    Gif89.disposal = 0;
   5.187 +
   5.188 +    if (!ReadOK(src, buf, 7)) {
   5.189 +	RWSetMsg("failed to read screen descriptor");
   5.190 +        goto done;
   5.191 +    }
   5.192 +    GifScreen.Width = LM_to_uint(buf[0], buf[1]);
   5.193 +    GifScreen.Height = LM_to_uint(buf[2], buf[3]);
   5.194 +    GifScreen.BitPixel = 2 << (buf[4] & 0x07);
   5.195 +    GifScreen.ColorResolution = (((buf[4] & 0x70) >> 3) + 1);
   5.196 +    GifScreen.Background = buf[5];
   5.197 +    GifScreen.AspectRatio = buf[6];
   5.198 +
   5.199 +    if (BitSet(buf[4], LOCALCOLORMAP)) {	/* Global Colormap */
   5.200 +	if (ReadColorMap(src, GifScreen.BitPixel, GifScreen.ColorMap,
   5.201 +			 &GifScreen.GrayScale)) {
   5.202 +	    RWSetMsg("error reading global colormap");
   5.203 +            goto done;
   5.204 +	}
   5.205 +    }
   5.206 +    do {
   5.207 +	if (!ReadOK(src, &c, 1)) {
   5.208 +	    RWSetMsg("EOF / read error on image data");
   5.209 +            goto done;
   5.210 +	}
   5.211 +	if (c == ';') {		/* GIF terminator */
   5.212 +	    if (imageCount < imageNumber) {
   5.213 +		RWSetMsg("only %d image%s found in file",
   5.214 +			 imageCount, imageCount > 1 ? "s" : "");
   5.215 +                goto done;
   5.216 +	    }
   5.217 +	}
   5.218 +	if (c == '!') {		/* Extension */
   5.219 +	    if (!ReadOK(src, &c, 1)) {
   5.220 +		RWSetMsg("EOF / read error on extention function code");
   5.221 +                goto done;
   5.222 +	    }
   5.223 +	    DoExtension(src, c);
   5.224 +	    continue;
   5.225 +	}
   5.226 +	if (c != ',') {		/* Not a valid start character */
   5.227 +	    continue;
   5.228 +	}
   5.229 +	++imageCount;
   5.230 +
   5.231 +	if (!ReadOK(src, buf, 9)) {
   5.232 +	    RWSetMsg("couldn't read left/top/width/height");
   5.233 +            goto done;
   5.234 +	}
   5.235 +	useGlobalColormap = !BitSet(buf[8], LOCALCOLORMAP);
   5.236 +
   5.237 +	bitPixel = 1 << ((buf[8] & 0x07) + 1);
   5.238 +
   5.239 +	if (!useGlobalColormap) {
   5.240 +	    if (ReadColorMap(src, bitPixel, localColorMap, &grayScale)) {
   5.241 +		RWSetMsg("error reading local colormap");
   5.242 +                goto done;
   5.243 +	    }
   5.244 +	    image = ReadImage(src, LM_to_uint(buf[4], buf[5]),
   5.245 +			      LM_to_uint(buf[6], buf[7]),
   5.246 +			      bitPixel, localColorMap, grayScale,
   5.247 +			      BitSet(buf[8], INTERLACE),
   5.248 +			      imageCount != imageNumber);
   5.249 +	} else {
   5.250 +	    image = ReadImage(src, LM_to_uint(buf[4], buf[5]),
   5.251 +			      LM_to_uint(buf[6], buf[7]),
   5.252 +			      GifScreen.BitPixel, GifScreen.ColorMap,
   5.253 +			      GifScreen.GrayScale, BitSet(buf[8], INTERLACE),
   5.254 +			      imageCount != imageNumber);
   5.255 +	}
   5.256 +    } while (image == NULL);
   5.257 +
   5.258 +#ifdef USED_BY_SDL
   5.259 +    if ( Gif89.transparent > 0 ) {
   5.260 +        SDL_SetColorKey(image, SDL_SRCCOLORKEY, Gif89. transparent);
   5.261 +    }
   5.262 +#endif
   5.263 +
   5.264 +done:
   5.265 +    return image;
   5.266 +}
   5.267 +
   5.268 +static int
   5.269 +ReadColorMap(SDL_RWops *src, int number,
   5.270 +             unsigned char buffer[3][MAXCOLORMAPSIZE], int *gray)
   5.271 +{
   5.272 +    int i;
   5.273 +    unsigned char rgb[3];
   5.274 +    int flag;
   5.275 +
   5.276 +    flag = TRUE;
   5.277 +
   5.278 +    for (i = 0; i < number; ++i) {
   5.279 +	if (!ReadOK(src, rgb, sizeof(rgb))) {
   5.280 +	    RWSetMsg("bad colormap");
   5.281 +	    return 1;
   5.282 +	}
   5.283 +	buffer[CM_RED][i] = rgb[0];
   5.284 +	buffer[CM_GREEN][i] = rgb[1];
   5.285 +	buffer[CM_BLUE][i] = rgb[2];
   5.286 +	flag &= (rgb[0] == rgb[1] && rgb[1] == rgb[2]);
   5.287 +    }
   5.288 +
   5.289 +#if 0
   5.290 +    if (flag)
   5.291 +	*gray = (number == 2) ? PBM_TYPE : PGM_TYPE;
   5.292 +    else
   5.293 +	*gray = PPM_TYPE;
   5.294 +#else
   5.295 +    *gray = 0;
   5.296 +#endif
   5.297 +
   5.298 +    return FALSE;
   5.299 +}
   5.300 +
   5.301 +static int
   5.302 +DoExtension(SDL_RWops *src, int label)
   5.303 +{
   5.304 +    static unsigned char buf[256];
   5.305 +    char *str;
   5.306 +
   5.307 +    switch (label) {
   5.308 +    case 0x01:			/* Plain Text Extension */
   5.309 +	str = "Plain Text Extension";
   5.310 +	break;
   5.311 +    case 0xff:			/* Application Extension */
   5.312 +	str = "Application Extension";
   5.313 +	break;
   5.314 +    case 0xfe:			/* Comment Extension */
   5.315 +	str = "Comment Extension";
   5.316 +	while (GetDataBlock(src, (unsigned char *) buf) != 0);
   5.317 +	return FALSE;
   5.318 +    case 0xf9:			/* Graphic Control Extension */
   5.319 +	str = "Graphic Control Extension";
   5.320 +	(void) GetDataBlock(src, (unsigned char *) buf);
   5.321 +	Gif89.disposal = (buf[0] >> 2) & 0x7;
   5.322 +	Gif89.inputFlag = (buf[0] >> 1) & 0x1;
   5.323 +	Gif89.delayTime = LM_to_uint(buf[1], buf[2]);
   5.324 +	if ((buf[0] & 0x1) != 0)
   5.325 +	    Gif89.transparent = buf[3];
   5.326 +
   5.327 +	while (GetDataBlock(src, (unsigned char *) buf) != 0);
   5.328 +	return FALSE;
   5.329 +    default:
   5.330 +	str = (char *)buf;
   5.331 +	sprintf(str, "UNKNOWN (0x%02x)", label);
   5.332 +	break;
   5.333 +    }
   5.334 +
   5.335 +    while (GetDataBlock(src, (unsigned char *) buf) != 0);
   5.336 +
   5.337 +    return FALSE;
   5.338 +}
   5.339 +
   5.340 +static int ZeroDataBlock = FALSE;
   5.341 +
   5.342 +static int
   5.343 +GetDataBlock(SDL_RWops *src, unsigned char *buf)
   5.344 +{
   5.345 +    unsigned char count;
   5.346 +
   5.347 +    if (!ReadOK(src, &count, 1)) {
   5.348 +	/* pm_message("error in getting DataBlock size" ); */
   5.349 +	return -1;
   5.350 +    }
   5.351 +    ZeroDataBlock = count == 0;
   5.352 +
   5.353 +    if ((count != 0) && (!ReadOK(src, buf, count))) {
   5.354 +	/* pm_message("error in reading DataBlock" ); */
   5.355 +	return -1;
   5.356 +    }
   5.357 +    return count;
   5.358 +}
   5.359 +
   5.360 +static int
   5.361 +GetCode(SDL_RWops *src, int code_size, int flag)
   5.362 +{
   5.363 +    static unsigned char buf[280];
   5.364 +    static int curbit, lastbit, done, last_byte;
   5.365 +    int i, j, ret;
   5.366 +    unsigned char count;
   5.367 +
   5.368 +    if (flag) {
   5.369 +	curbit = 0;
   5.370 +	lastbit = 0;
   5.371 +	done = FALSE;
   5.372 +	return 0;
   5.373 +    }
   5.374 +    if ((curbit + code_size) >= lastbit) {
   5.375 +	if (done) {
   5.376 +	    if (curbit >= lastbit)
   5.377 +		RWSetMsg("ran off the end of my bits");
   5.378 +	    return -1;
   5.379 +	}
   5.380 +	buf[0] = buf[last_byte - 2];
   5.381 +	buf[1] = buf[last_byte - 1];
   5.382 +
   5.383 +	if ((count = GetDataBlock(src, &buf[2])) == 0)
   5.384 +	    done = TRUE;
   5.385 +
   5.386 +	last_byte = 2 + count;
   5.387 +	curbit = (curbit - lastbit) + 16;
   5.388 +	lastbit = (2 + count) * 8;
   5.389 +    }
   5.390 +    ret = 0;
   5.391 +    for (i = curbit, j = 0; j < code_size; ++i, ++j)
   5.392 +	ret |= ((buf[i / 8] & (1 << (i % 8))) != 0) << j;
   5.393 +
   5.394 +    curbit += code_size;
   5.395 +
   5.396 +    return ret;
   5.397 +}
   5.398 +
   5.399 +static int
   5.400 +LWZReadByte(SDL_RWops *src, int flag, int input_code_size)
   5.401 +{
   5.402 +    static int fresh = FALSE;
   5.403 +    int code, incode;
   5.404 +    static int code_size, set_code_size;
   5.405 +    static int max_code, max_code_size;
   5.406 +    static int firstcode, oldcode;
   5.407 +    static int clear_code, end_code;
   5.408 +    static int table[2][(1 << MAX_LWZ_BITS)];
   5.409 +    static int stack[(1 << (MAX_LWZ_BITS)) * 2], *sp;
   5.410 +    register int i;
   5.411 +
   5.412 +    if (flag) {
   5.413 +	set_code_size = input_code_size;
   5.414 +	code_size = set_code_size + 1;
   5.415 +	clear_code = 1 << set_code_size;
   5.416 +	end_code = clear_code + 1;
   5.417 +	max_code_size = 2 * clear_code;
   5.418 +	max_code = clear_code + 2;
   5.419 +
   5.420 +	GetCode(src, 0, TRUE);
   5.421 +
   5.422 +	fresh = TRUE;
   5.423 +
   5.424 +	for (i = 0; i < clear_code; ++i) {
   5.425 +	    table[0][i] = 0;
   5.426 +	    table[1][i] = i;
   5.427 +	}
   5.428 +	for (; i < (1 << MAX_LWZ_BITS); ++i)
   5.429 +	    table[0][i] = table[1][0] = 0;
   5.430 +
   5.431 +	sp = stack;
   5.432 +
   5.433 +	return 0;
   5.434 +    } else if (fresh) {
   5.435 +	fresh = FALSE;
   5.436 +	do {
   5.437 +	    firstcode = oldcode = GetCode(src, code_size, FALSE);
   5.438 +	} while (firstcode == clear_code);
   5.439 +	return firstcode;
   5.440 +    }
   5.441 +    if (sp > stack)
   5.442 +	return *--sp;
   5.443 +
   5.444 +    while ((code = GetCode(src, code_size, FALSE)) >= 0) {
   5.445 +	if (code == clear_code) {
   5.446 +	    for (i = 0; i < clear_code; ++i) {
   5.447 +		table[0][i] = 0;
   5.448 +		table[1][i] = i;
   5.449 +	    }
   5.450 +	    for (; i < (1 << MAX_LWZ_BITS); ++i)
   5.451 +		table[0][i] = table[1][i] = 0;
   5.452 +	    code_size = set_code_size + 1;
   5.453 +	    max_code_size = 2 * clear_code;
   5.454 +	    max_code = clear_code + 2;
   5.455 +	    sp = stack;
   5.456 +	    firstcode = oldcode = GetCode(src, code_size, FALSE);
   5.457 +	    return firstcode;
   5.458 +	} else if (code == end_code) {
   5.459 +	    int count;
   5.460 +	    unsigned char buf[260];
   5.461 +
   5.462 +	    if (ZeroDataBlock)
   5.463 +		return -2;
   5.464 +
   5.465 +	    while ((count = GetDataBlock(src, buf)) > 0);
   5.466 +
   5.467 +	    if (count != 0) {
   5.468 +		/*
   5.469 +		 * pm_message("missing EOD in data stream (common occurence)");
   5.470 +		 */
   5.471 +	    }
   5.472 +	    return -2;
   5.473 +	}
   5.474 +	incode = code;
   5.475 +
   5.476 +	if (code >= max_code) {
   5.477 +	    *sp++ = firstcode;
   5.478 +	    code = oldcode;
   5.479 +	}
   5.480 +	while (code >= clear_code) {
   5.481 +	    *sp++ = table[1][code];
   5.482 +	    if (code == table[0][code])
   5.483 +		RWSetMsg("circular table entry BIG ERROR");
   5.484 +	    code = table[0][code];
   5.485 +	}
   5.486 +
   5.487 +	*sp++ = firstcode = table[1][code];
   5.488 +
   5.489 +	if ((code = max_code) < (1 << MAX_LWZ_BITS)) {
   5.490 +	    table[0][code] = oldcode;
   5.491 +	    table[1][code] = firstcode;
   5.492 +	    ++max_code;
   5.493 +	    if ((max_code >= max_code_size) &&
   5.494 +		(max_code_size < (1 << MAX_LWZ_BITS))) {
   5.495 +		max_code_size *= 2;
   5.496 +		++code_size;
   5.497 +	    }
   5.498 +	}
   5.499 +	oldcode = incode;
   5.500 +
   5.501 +	if (sp > stack)
   5.502 +	    return *--sp;
   5.503 +    }
   5.504 +    return code;
   5.505 +}
   5.506 +
   5.507 +static Image *
   5.508 +ReadImage(SDL_RWops * src, int len, int height, int cmapSize,
   5.509 +	  unsigned char cmap[3][MAXCOLORMAPSIZE],
   5.510 +	  int gray, int interlace, int ignore)
   5.511 +{
   5.512 +    Image *image;
   5.513 +    unsigned char c;
   5.514 +    int i, v;
   5.515 +    int xpos = 0, ypos = 0, pass = 0;
   5.516 +
   5.517 +    /*
   5.518 +    **	Initialize the compression routines
   5.519 +     */
   5.520 +    if (!ReadOK(src, &c, 1)) {
   5.521 +	RWSetMsg("EOF / read error on image data");
   5.522 +	return NULL;
   5.523 +    }
   5.524 +    if (LWZReadByte(src, TRUE, c) < 0) {
   5.525 +	RWSetMsg("error reading image");
   5.526 +	return NULL;
   5.527 +    }
   5.528 +    /*
   5.529 +    **	If this is an "uninteresting picture" ignore it.
   5.530 +     */
   5.531 +    if (ignore) {
   5.532 +	while (LWZReadByte(src, FALSE, c) >= 0);
   5.533 +	return NULL;
   5.534 +    }
   5.535 +    image = ImageNewCmap(len, height, cmapSize);
   5.536 +
   5.537 +    for (i = 0; i < cmapSize; i++)
   5.538 +	ImageSetCmap(image, i, cmap[CM_RED][i],
   5.539 +		     cmap[CM_GREEN][i], cmap[CM_BLUE][i]);
   5.540 +
   5.541 +    while ((v = LWZReadByte(src, FALSE, c)) >= 0) {
   5.542 +#ifdef USED_BY_SDL
   5.543 +	((Uint8 *)image->pixels)[xpos + ypos * image->pitch] = v;
   5.544 +#else
   5.545 +	image->data[xpos + ypos * len] = v;
   5.546 +#endif
   5.547 +	++xpos;
   5.548 +	if (xpos == len) {
   5.549 +	    xpos = 0;
   5.550 +	    if (interlace) {
   5.551 +		switch (pass) {
   5.552 +		case 0:
   5.553 +		case 1:
   5.554 +		    ypos += 8;
   5.555 +		    break;
   5.556 +		case 2:
   5.557 +		    ypos += 4;
   5.558 +		    break;
   5.559 +		case 3:
   5.560 +		    ypos += 2;
   5.561 +		    break;
   5.562 +		}
   5.563 +
   5.564 +		if (ypos >= height) {
   5.565 +		    ++pass;
   5.566 +		    switch (pass) {
   5.567 +		    case 1:
   5.568 +			ypos = 4;
   5.569 +			break;
   5.570 +		    case 2:
   5.571 +			ypos = 2;
   5.572 +			break;
   5.573 +		    case 3:
   5.574 +			ypos = 1;
   5.575 +			break;
   5.576 +		    default:
   5.577 +			goto fini;
   5.578 +		    }
   5.579 +		}
   5.580 +	    } else {
   5.581 +		++ypos;
   5.582 +	    }
   5.583 +	}
   5.584 +	if (ypos >= height)
   5.585 +	    break;
   5.586 +    }
   5.587 +
   5.588 +  fini:
   5.589 +
   5.590 +    return image;
   5.591 +}
   5.592 +
   5.593 +#else
   5.594 +
   5.595 +/* See if an image is contained in a data source */
   5.596 +int IMG_isGIF(SDL_RWops *src)
   5.597 +{
   5.598 +	return(0);
   5.599 +}
   5.600 +
   5.601 +/* Load a GIF type image from an SDL datasource */
   5.602 +SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src)
   5.603 +{
   5.604 +	return(NULL);
   5.605 +}
   5.606 +
   5.607 +#endif /* LOAD_GIF */
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/IMG_jpg.c	Thu Aug 10 06:05:39 2000 +0000
     6.3 @@ -0,0 +1,241 @@
     6.4 +/*
     6.5 +    IMGLIB:  An example image loading library for use with SDL
     6.6 +    Copyright (C) 1999  Sam Lantinga
     6.7 +
     6.8 +    This library is free software; you can redistribute it and/or
     6.9 +    modify it under the terms of the GNU Library General Public
    6.10 +    License as published by the Free Software Foundation; either
    6.11 +    version 2 of the License, or (at your option) any later version.
    6.12 +
    6.13 +    This library is distributed in the hope that it will be useful,
    6.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 +    Library General Public License for more details.
    6.17 +
    6.18 +    You should have received a copy of the GNU Library General Public
    6.19 +    License along with this library; if not, write to the Free
    6.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    6.21 +
    6.22 +    Sam Lantinga
    6.23 +    5635-34 Springhouse Dr.
    6.24 +    Pleasanton, CA 94588 (USA)
    6.25 +    slouken@devolution.com
    6.26 +*/
    6.27 +
    6.28 +/* This is a JPEG image file loading framework */
    6.29 +
    6.30 +#include <stdio.h>
    6.31 +
    6.32 +#include "SDL_image.h"
    6.33 +
    6.34 +#ifdef LOAD_JPG
    6.35 +
    6.36 +#include <jpeglib.h>
    6.37 +
    6.38 +/* Define this for fast loading and not as good image quality */
    6.39 +/*#define FAST_JPEG*/
    6.40 +
    6.41 +/* See if an image is contained in a data source */
    6.42 +int IMG_isJPG(SDL_RWops *src)
    6.43 +{
    6.44 +	int is_JPG;
    6.45 +	Uint8 magic[4];
    6.46 +
    6.47 +	is_JPG = 0;
    6.48 +	if ( SDL_RWread(src, magic, 2, 1) ) {
    6.49 +		if ( (magic[0] == 0xFF) && (magic[1] == 0xD8) ) {
    6.50 +			SDL_RWread(src, magic, 4, 1);
    6.51 +			SDL_RWread(src, magic, 4, 1);
    6.52 +			if ( strncmp(magic, "JFIF", 4) == 0 ) {
    6.53 +				is_JPG = 1;
    6.54 +			}
    6.55 +		}
    6.56 +	}
    6.57 +	return(is_JPG);
    6.58 +}
    6.59 +
    6.60 +#define INPUT_BUFFER_SIZE	4096
    6.61 +typedef struct {
    6.62 +	struct jpeg_source_mgr pub;
    6.63 +
    6.64 +	SDL_RWops *ctx;
    6.65 +	Uint8 buffer[INPUT_BUFFER_SIZE];
    6.66 +} my_source_mgr;
    6.67 +
    6.68 +/*
    6.69 + * Initialize source --- called by jpeg_read_header
    6.70 + * before any data is actually read.
    6.71 + */
    6.72 +void _init_source (j_decompress_ptr cinfo)
    6.73 +{
    6.74 +	/* We don't actually need to do anything */
    6.75 +	return;
    6.76 +}
    6.77 +
    6.78 +/*
    6.79 + * Fill the input buffer --- called whenever buffer is emptied.
    6.80 + */
    6.81 +int _fill_input_buffer (j_decompress_ptr cinfo)
    6.82 +{
    6.83 +	my_source_mgr * src = (my_source_mgr *) cinfo->src;
    6.84 +	int nbytes;
    6.85 +
    6.86 +	nbytes = SDL_RWread(src->ctx, src->buffer, 1, INPUT_BUFFER_SIZE);
    6.87 +	if (nbytes <= 0) {
    6.88 +		/* Insert a fake EOI marker */
    6.89 +		src->buffer[0] = (Uint8) 0xFF;
    6.90 +		src->buffer[1] = (Uint8) JPEG_EOI;
    6.91 +		nbytes = 2;
    6.92 +	}
    6.93 +	src->pub.next_input_byte = src->buffer;
    6.94 +	src->pub.bytes_in_buffer = nbytes;
    6.95 +
    6.96 +	return TRUE;
    6.97 +}
    6.98 +
    6.99 +
   6.100 +/*
   6.101 + * Skip data --- used to skip over a potentially large amount of
   6.102 + * uninteresting data (such as an APPn marker).
   6.103 + *
   6.104 + * Writers of suspendable-input applications must note that skip_input_data
   6.105 + * is not granted the right to give a suspension return.  If the skip extends
   6.106 + * beyond the data currently in the buffer, the buffer can be marked empty so
   6.107 + * that the next read will cause a fill_input_buffer call that can suspend.
   6.108 + * Arranging for additional bytes to be discarded before reloading the input
   6.109 + * buffer is the application writer's problem.
   6.110 + */
   6.111 +void _skip_input_data (j_decompress_ptr cinfo, long num_bytes)
   6.112 +{
   6.113 +	my_source_mgr * src = (my_source_mgr *) cinfo->src;
   6.114 +
   6.115 +	/* Just a dumb implementation for now.	Could use fseek() except
   6.116 +	 * it doesn't work on pipes.  Not clear that being smart is worth
   6.117 +	 * any trouble anyway --- large skips are infrequent.
   6.118 +	 */
   6.119 +	if (num_bytes > 0) {
   6.120 +		while (num_bytes > (long) src->pub.bytes_in_buffer) {
   6.121 +			num_bytes -= (long) src->pub.bytes_in_buffer;
   6.122 +			(void) src->pub.fill_input_buffer(cinfo);
   6.123 +			/* note we assume that fill_input_buffer will never
   6.124 +			 * return FALSE, so suspension need not be handled.
   6.125 +			 */
   6.126 +		}
   6.127 +		src->pub.next_input_byte += (size_t) num_bytes;
   6.128 +		src->pub.bytes_in_buffer -= (size_t) num_bytes;
   6.129 +	}
   6.130 +}
   6.131 +
   6.132 +/*
   6.133 + * Terminate source --- called by jpeg_finish_decompress
   6.134 + * after all data has been read.
   6.135 + */
   6.136 +void _term_source (j_decompress_ptr cinfo)
   6.137 +{
   6.138 +	/* We don't actually need to do anything */
   6.139 +	return;
   6.140 +}
   6.141 +
   6.142 +/*
   6.143 + * Prepare for input from a stdio stream.
   6.144 + * The caller must have already opened the stream, and is responsible
   6.145 + * for closing it after finishing decompression.
   6.146 + */
   6.147 +void jpeg_SDL_RW_src (j_decompress_ptr cinfo, SDL_RWops *ctx)
   6.148 +{
   6.149 +  my_source_mgr *src;
   6.150 +
   6.151 +  /* The source object and input buffer are made permanent so that a series
   6.152 +   * of JPEG images can be read from the same file by calling jpeg_stdio_src
   6.153 +   * only before the first one.  (If we discarded the buffer at the end of
   6.154 +   * one image, we'd likely lose the start of the next one.)
   6.155 +   * This makes it unsafe to use this manager and a different source
   6.156 +   * manager serially with the same JPEG object.  Caveat programmer.
   6.157 +   */
   6.158 +  if (cinfo->src == NULL) {	/* first time for this JPEG object? */
   6.159 +    cinfo->src = (struct jpeg_source_mgr *)
   6.160 +      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
   6.161 +				  sizeof(my_source_mgr));
   6.162 +    src = (my_source_mgr *) cinfo->src;
   6.163 +  }
   6.164 +
   6.165 +  src = (my_source_mgr *) cinfo->src;
   6.166 +  src->pub.init_source = _init_source;
   6.167 +  src->pub.fill_input_buffer = _fill_input_buffer;
   6.168 +  src->pub.skip_input_data = _skip_input_data;
   6.169 +  src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
   6.170 +  src->pub.term_source = _term_source;
   6.171 +  src->ctx = ctx;
   6.172 +  src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
   6.173 +  src->pub.next_input_byte = NULL; /* until buffer loaded */
   6.174 +}
   6.175 +
   6.176 +/* Load a JPEG type image from an SDL datasource */
   6.177 +SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src)
   6.178 +{
   6.179 +	struct jpeg_error_mgr errmgr;
   6.180 +	struct jpeg_decompress_struct cinfo;
   6.181 +	JSAMPROW rowptr[1];
   6.182 +	SDL_Surface *surface;
   6.183 +
   6.184 +	/* Create a decompression structure and load the JPEG header */
   6.185 +	cinfo.err = jpeg_std_error(&errmgr);
   6.186 +	jpeg_create_decompress(&cinfo);
   6.187 +	jpeg_SDL_RW_src(&cinfo, src);
   6.188 +	jpeg_read_header(&cinfo, TRUE);
   6.189 +
   6.190 +	/* Set 24-bit RGB output */
   6.191 +	cinfo.out_color_space = JCS_RGB;
   6.192 +	cinfo.quantize_colors = FALSE;
   6.193 +#ifdef FAST_JPEG
   6.194 +	cinfo.scale_num   = 1;
   6.195 +	cinfo.scale_denom = 1;
   6.196 +	cinfo.dct_method = JDCT_FASTEST;
   6.197 +	cinfo.do_fancy_upsampling = FALSE;
   6.198 +#endif
   6.199 +	jpeg_calc_output_dimensions(&cinfo);
   6.200 +
   6.201 +	/* Allocate an output surface to hold the image */
   6.202 +	surface = SDL_AllocSurface(SDL_SWSURFACE,
   6.203 +	               cinfo.output_width, cinfo.output_height, 24,
   6.204 +#if SDL_BYTEORDER == SDL_LIL_ENDIAN
   6.205 +	                           0x0000FF, 0x00FF00, 0xFF0000,
   6.206 +#else
   6.207 +	                           0xFF0000, 0x00FF00, 0x0000FF,
   6.208 +#endif
   6.209 +				   0);
   6.210 +	if ( surface == NULL ) {
   6.211 +		IMG_SetError("Out of memory");
   6.212 +		goto done;
   6.213 +	}
   6.214 +
   6.215 +	/* Decompress the image */
   6.216 +	jpeg_start_decompress(&cinfo);
   6.217 +	while ( cinfo.output_scanline < cinfo.output_height ) {
   6.218 +		rowptr[0] = (JSAMPROW)(Uint8 *)surface->pixels +
   6.219 +		                    cinfo.output_scanline * surface->pitch;
   6.220 +		jpeg_read_scanlines(&cinfo, rowptr, (JDIMENSION) 1);
   6.221 +	}
   6.222 +	jpeg_finish_decompress(&cinfo);
   6.223 +
   6.224 +	/* Clean up and return */
   6.225 +done:
   6.226 +	jpeg_destroy_decompress(&cinfo);
   6.227 +	return(surface);
   6.228 +}
   6.229 +
   6.230 +#else
   6.231 +
   6.232 +/* See if an image is contained in a data source */
   6.233 +int IMG_isJPG(SDL_RWops *src)
   6.234 +{
   6.235 +	return(0);
   6.236 +}
   6.237 +
   6.238 +/* Load a JPEG type image from an SDL datasource */
   6.239 +SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src)
   6.240 +{
   6.241 +	return(NULL);
   6.242 +}
   6.243 +
   6.244 +#endif /* LOAD_JPG */
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/IMG_pcx.c	Thu Aug 10 06:05:39 2000 +0000
     7.3 @@ -0,0 +1,219 @@
     7.4 +/*
     7.5 +    IMGLIB:  An example image loading library for use with SDL
     7.6 +    Copyright (C) 1999  Sam Lantinga
     7.7 +
     7.8 +    This library is free software; you can redistribute it and/or
     7.9 +    modify it under the terms of the GNU Library General Public
    7.10 +    License as published by the Free Software Foundation; either
    7.11 +    version 2 of the License, or (at your option) any later version.
    7.12 +
    7.13 +    This library is distributed in the hope that it will be useful,
    7.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    7.16 +    Library General Public License for more details.
    7.17 +
    7.18 +    You should have received a copy of the GNU Library General Public
    7.19 +    License along with this library; if not, write to the Free
    7.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    7.21 +
    7.22 +    Sam Lantinga
    7.23 +    5635-34 Springhouse Dr.
    7.24 +    Pleasanton, CA 94588 (USA)
    7.25 +    slouken@devolution.com
    7.26 +*/
    7.27 +
    7.28 +/* This is a PCX image file loading framework */
    7.29 +
    7.30 +#include <stdio.h>
    7.31 +
    7.32 +#include "SDL_endian.h"
    7.33 +
    7.34 +#include "SDL_image.h"
    7.35 +
    7.36 +#ifdef LOAD_PCX
    7.37 +
    7.38 +struct PCXheader {
    7.39 +	Uint8 Manufacturer;
    7.40 +	Uint8 Version;
    7.41 +	Uint8 Encoding;
    7.42 +	Uint8 BitsPerPixel;
    7.43 +	Sint16 Xmin, Ymin, Xmax, Ymax;
    7.44 +	Sint16 HDpi, VDpi;
    7.45 +	Uint8 Colormap[48];
    7.46 +	Uint8 Reserved;
    7.47 +	Uint8 NPlanes;
    7.48 +	Sint16 BytesPerLine;
    7.49 +	Sint16 PaletteInfo;
    7.50 +	Sint16 HscreenSize;
    7.51 +	Sint16 VscreenSize;
    7.52 +	Uint8 Filler[54];
    7.53 +};
    7.54 +
    7.55 +/* See if an image is contained in a data source */
    7.56 +int IMG_isPCX(SDL_RWops *src)
    7.57 +{
    7.58 +	int is_PCX;
    7.59 +	const int ZSoft_Manufacturer = 10;
    7.60 +	const int PC_Paintbrush_Version = 5;
    7.61 +	const int PCX_RunLength_Encoding = 1;
    7.62 +	struct PCXheader pcxh;
    7.63 +
    7.64 +	is_PCX = 0;
    7.65 +	if ( SDL_RWread(src, &pcxh, sizeof(pcxh), 1) == 1 ) {
    7.66 +		if ( (pcxh.Manufacturer == ZSoft_Manufacturer) &&
    7.67 +		     (pcxh.Version == PC_Paintbrush_Version) &&
    7.68 +		     (pcxh.Encoding == PCX_RunLength_Encoding) ) {
    7.69 +			is_PCX = 1;
    7.70 +		}
    7.71 +	}
    7.72 +	return(is_PCX);
    7.73 +}
    7.74 +
    7.75 +/* Load a PCX type image from an SDL datasource */
    7.76 +SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
    7.77 +{
    7.78 +	struct PCXheader pcxh;
    7.79 +	Uint32 Rmask;
    7.80 +	Uint32 Gmask;
    7.81 +	Uint32 Bmask;
    7.82 +	Uint32 Amask;
    7.83 +	SDL_Surface *surface;
    7.84 +	int width, height;
    7.85 +	int i, index, x, y;
    7.86 +	int count;
    7.87 +	Uint8 *row, ch;
    7.88 +	int read_error;
    7.89 +
    7.90 +	/* Initialize the data we will clean up when we're done */
    7.91 +	surface = NULL;
    7.92 +	read_error = 0;
    7.93 +
    7.94 +	/* Check to make sure we have something to do */
    7.95 +	if ( ! src ) {
    7.96 +		goto done;
    7.97 +	}
    7.98 +
    7.99 +	/* Read and convert the header */
   7.100 +	if ( ! SDL_RWread(src, &pcxh, sizeof(pcxh), 1) ) {
   7.101 +		goto done;
   7.102 +	}
   7.103 +	pcxh.Xmin = SDL_SwapLE16(pcxh.Xmin);
   7.104 +	pcxh.Ymin = SDL_SwapLE16(pcxh.Ymin);
   7.105 +	pcxh.Xmax = SDL_SwapLE16(pcxh.Xmax);
   7.106 +	pcxh.Ymax = SDL_SwapLE16(pcxh.Ymax);
   7.107 +	pcxh.BytesPerLine = SDL_SwapLE16(pcxh.BytesPerLine);
   7.108 +
   7.109 +	/* Create the surface of the appropriate type */
   7.110 +	width = (pcxh.Xmax - pcxh.Xmin) + 1;
   7.111 +	height = (pcxh.Ymax - pcxh.Ymin) + 1;
   7.112 +	Rmask = Gmask = Bmask = Amask = 0 ; 
   7.113 +	if ( pcxh.BitsPerPixel * pcxh.NPlanes > 16 ) {
   7.114 +		if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) {
   7.115 +			Rmask = 0x000000FF;
   7.116 +			Gmask = 0x0000FF00;
   7.117 +			Bmask = 0x00FF0000;
   7.118 +			Amask = 0xFF000000;
   7.119 +		} else {
   7.120 +		        int s = (pcxh.NPlanes == 4) ? 0 : 8;
   7.121 +			Rmask = 0xFF000000 >> s;
   7.122 +			Gmask = 0x00FF0000 >> s;
   7.123 +			Bmask = 0x0000FF00 >> s;
   7.124 +			Amask = 0x000000FF >> s;
   7.125 +		}
   7.126 +	}
   7.127 +	surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
   7.128 +			pcxh.BitsPerPixel*pcxh.NPlanes,Rmask,Gmask,Bmask,Amask);
   7.129 +	if ( surface == NULL ) {
   7.130 +		IMG_SetError("Out of memory");
   7.131 +		goto done;
   7.132 +	}
   7.133 +
   7.134 +	/* Decode the image to the surface */
   7.135 +	for ( y=0; y<surface->h; ++y ) {
   7.136 +		for ( i=0; i<pcxh.NPlanes; ++i ) {
   7.137 +			row = (Uint8 *)surface->pixels + y*surface->pitch;
   7.138 +			index = i;
   7.139 +			for ( x=0; x<pcxh.BytesPerLine; ) {
   7.140 +				if ( ! SDL_RWread(src, &ch, 1, 1) ) {
   7.141 +					read_error = 1;
   7.142 +					goto done;
   7.143 +				}
   7.144 +				if ( (ch & 0xC0) == 0xC0 ) {
   7.145 +					count = ch & 0x3F;
   7.146 +					SDL_RWread(src, &ch, 1, 1);
   7.147 +				} else {
   7.148 +					count = 1;
   7.149 +				}
   7.150 +				while ( count-- ) {
   7.151 +					row[index] = ch;
   7.152 +					++x;
   7.153 +					index += pcxh.NPlanes;
   7.154 +				}
   7.155 +			}
   7.156 +		}
   7.157 +	}
   7.158 +
   7.159 +	/* Look for the palette, if necessary */
   7.160 +	switch (surface->format->BitsPerPixel) {
   7.161 +	    case 1: {
   7.162 +		SDL_Color *colors = surface->format->palette->colors;
   7.163 +
   7.164 +		colors[0].r = 0x00;
   7.165 +		colors[0].g = 0x00;
   7.166 +		colors[0].b = 0x00;
   7.167 +		colors[1].r = 0xFF;
   7.168 +		colors[1].g = 0xFF;
   7.169 +		colors[1].b = 0xFF;
   7.170 +	    }
   7.171 +	    break;
   7.172 +
   7.173 +	    case 8: {
   7.174 +		SDL_Color *colors = surface->format->palette->colors;
   7.175 +
   7.176 +		/* Look for the palette */
   7.177 +		do {
   7.178 +			if ( ! SDL_RWread(src, &ch, 1, 1) ) {
   7.179 +				read_error = 1;
   7.180 +				goto done;
   7.181 +			}
   7.182 +		} while ( ch != 12 );
   7.183 +
   7.184 +		/* Set the image surface palette */
   7.185 +		for ( i=0; i<256; ++i ) {
   7.186 +			SDL_RWread(src, &colors[i].r, 1, 1);
   7.187 +			SDL_RWread(src, &colors[i].g, 1, 1);
   7.188 +			SDL_RWread(src, &colors[i].b, 1, 1);
   7.189 +		}
   7.190 +	    }
   7.191 +	    break;
   7.192 +
   7.193 +	    default: {
   7.194 +		/* Don't do anything... */;
   7.195 +	    }
   7.196 +	    break;
   7.197 +	}
   7.198 +
   7.199 +done:
   7.200 +	if ( read_error ) {
   7.201 +		SDL_FreeSurface(surface);
   7.202 +		IMG_SetError("Error reading PCX data");
   7.203 +		surface = NULL;
   7.204 +	}
   7.205 +	return(surface);
   7.206 +}
   7.207 +
   7.208 +#else
   7.209 +
   7.210 +/* See if an image is contained in a data source */
   7.211 +int IMG_isPCX(SDL_RWops *src)
   7.212 +{
   7.213 +	return(0);
   7.214 +}
   7.215 +
   7.216 +/* Load a PCX type image from an SDL datasource */
   7.217 +SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
   7.218 +{
   7.219 +	return(NULL);
   7.220 +}
   7.221 +
   7.222 +#endif /* LOAD_PCX */
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/IMG_png.c	Thu Aug 10 06:05:39 2000 +0000
     8.3 @@ -0,0 +1,275 @@
     8.4 +/*
     8.5 +    IMGLIB:  An example image loading library for use with SDL
     8.6 +    Copyright (C) 1999  Sam Lantinga
     8.7 +
     8.8 +    This library is free software; you can redistribute it and/or
     8.9 +    modify it under the terms of the GNU Library General Public
    8.10 +    License as published by the Free Software Foundation; either
    8.11 +    version 2 of the License, or (at your option) any later version.
    8.12 +
    8.13 +    This library is distributed in the hope that it will be useful,
    8.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    8.16 +    Library General Public License for more details.
    8.17 +
    8.18 +    You should have received a copy of the GNU Library General Public
    8.19 +    License along with this library; if not, write to the Free
    8.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    8.21 +
    8.22 +    Sam Lantinga
    8.23 +    5635-34 Springhouse Dr.
    8.24 +    Pleasanton, CA 94588 (USA)
    8.25 +    slouken@devolution.com
    8.26 +*/
    8.27 +
    8.28 +/* This is a PNG image file loading framework */
    8.29 +
    8.30 +#include <stdlib.h>
    8.31 +#include <stdio.h>
    8.32 +
    8.33 +#include "SDL_image.h"
    8.34 +
    8.35 +#ifdef LOAD_PNG
    8.36 +
    8.37 +extern int IMG_invert_alpha;
    8.38 +
    8.39 +/*=============================================================================
    8.40 +        File: SDL_png.c
    8.41 +     Purpose: A PNG loader and saver for the SDL library      
    8.42 +    Revision: 
    8.43 +  Created by: Philippe Lavoie          (2 November 1998)
    8.44 +              lavoie@zeus.genie.uottawa.ca
    8.45 + Modified by: 
    8.46 +
    8.47 + Copyright notice:
    8.48 +          Copyright (C) 1998 Philippe Lavoie
    8.49 + 
    8.50 +          This library is free software; you can redistribute it and/or
    8.51 +          modify it under the terms of the GNU Library General Public
    8.52 +          License as published by the Free Software Foundation; either
    8.53 +          version 2 of the License, or (at your option) any later version.
    8.54 + 
    8.55 +          This library is distributed in the hope that it will be useful,
    8.56 +          but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.57 +          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    8.58 +          Library General Public License for more details.
    8.59 + 
    8.60 +          You should have received a copy of the GNU Library General Public
    8.61 +          License along with this library; if not, write to the Free
    8.62 +          Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    8.63 +
    8.64 +    Comments: The load and save routine are basically the ones you can find
    8.65 +             in the example.c file from the libpng distribution.
    8.66 +
    8.67 +  Changes:
    8.68 +    5/17/99 - Modified to use the new SDL data sources - Sam Lantinga
    8.69 +
    8.70 +=============================================================================*/
    8.71 +
    8.72 +#include "SDL_endian.h"
    8.73 +
    8.74 +#include <png.h>
    8.75 +
    8.76 +#define PNG_BYTES_TO_CHECK 4
    8.77 +
    8.78 +/* See if an image is contained in a data source */
    8.79 +int IMG_isPNG(SDL_RWops *src)
    8.80 +{
    8.81 +   char buf[PNG_BYTES_TO_CHECK];
    8.82 +
    8.83 +   /* Read in the signature bytes */
    8.84 +   if (SDL_RWread(src, buf, 1, PNG_BYTES_TO_CHECK) != PNG_BYTES_TO_CHECK)
    8.85 +      return 0;
    8.86 +
    8.87 +   /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. */
    8.88 +   return( !png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK));
    8.89 +}
    8.90 +
    8.91 +/* Load a PNG type image from an SDL datasource */
    8.92 +static void png_read_data(png_structp ctx, png_bytep area, png_size_t size)
    8.93 +{
    8.94 +	SDL_RWops *src;
    8.95 +
    8.96 +	src = (SDL_RWops *)png_get_io_ptr(ctx);
    8.97 +	SDL_RWread(src, area, size, 1);
    8.98 +}
    8.99 +SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
   8.100 +{
   8.101 +	SDL_Surface *surface;
   8.102 +	png_structp png_ptr;
   8.103 +	png_infop info_ptr;
   8.104 +	png_uint_32 width, height;
   8.105 +	int bit_depth, color_type, interlace_type;
   8.106 +	Uint32 Rmask;
   8.107 +	Uint32 Gmask;
   8.108 +	Uint32 Bmask;
   8.109 +	Uint32 Amask;
   8.110 +	SDL_Palette *palette;
   8.111 +	png_bytep *row_pointers;
   8.112 +	int row, i;
   8.113 +	int ckey = -1;
   8.114 +	png_color_16 *transv;
   8.115 +
   8.116 +	/* Initialize the data we will clean up when we're done */
   8.117 +	png_ptr = NULL; info_ptr = NULL; row_pointers = NULL; surface = NULL;
   8.118 +
   8.119 +	/* Check to make sure we have something to do */
   8.120 +	if ( ! src ) {
   8.121 +		goto done;
   8.122 +	}
   8.123 +
   8.124 +	/* Create the PNG loading context structure */
   8.125 +	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
   8.126 +					  NULL,NULL,NULL);
   8.127 +	if (png_ptr == NULL){
   8.128 +		IMG_SetError("Couldn't allocate memory for PNG file");
   8.129 +		goto done;
   8.130 +	}
   8.131 +
   8.132 +	 /* Allocate/initialize the memory for image information.  REQUIRED. */
   8.133 +	info_ptr = png_create_info_struct(png_ptr);
   8.134 +	if (info_ptr == NULL) {
   8.135 +		IMG_SetError("Couldn't create image information for PNG file");
   8.136 +		goto done;
   8.137 +	}
   8.138 +
   8.139 +	/* Set error handling if you are using setjmp/longjmp method (this is
   8.140 +	 * the normal method of doing things with libpng).  REQUIRED unless you
   8.141 +	 * set up your own error handlers in png_create_read_struct() earlier.
   8.142 +	 */
   8.143 +	if ( setjmp(png_ptr->jmpbuf) ) {
   8.144 +		IMG_SetError("Error reading the PNG file.");
   8.145 +		goto done;
   8.146 +	}
   8.147 +
   8.148 +	/* Set up the input control */
   8.149 +	png_set_read_fn(png_ptr, src, png_read_data);
   8.150 +
   8.151 +	/* Read PNG header info */
   8.152 +	png_read_info(png_ptr, info_ptr);
   8.153 +	png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth,
   8.154 +			&color_type, &interlace_type, NULL, NULL);
   8.155 +
   8.156 +	/* tell libpng to strip 16 bit/color files down to 8 bits/color */
   8.157 +	png_set_strip_16(png_ptr) ;
   8.158 +
   8.159 +	/* Extract multiple pixels with bit depths of 1, 2, and 4 from a single
   8.160 +	 * byte into separate bytes (useful for paletted and grayscale images).
   8.161 +	 */
   8.162 +	png_set_packing(png_ptr);
   8.163 +
   8.164 +	/* SDL and PNG have inverted ideas of alpha */
   8.165 +	if ( ! IMG_invert_alpha ) {
   8.166 +		png_set_invert_alpha(png_ptr);
   8.167 +	}
   8.168 +
   8.169 +	/* For images with a single "transparent colour", set colour key;
   8.170 +	   if more than one index has transparency, use full alpha channel */
   8.171 +	if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
   8.172 +	        int num_trans;
   8.173 +		Uint8 *trans;
   8.174 +		png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
   8.175 +			     &transv);
   8.176 +		if(color_type == PNG_COLOR_TYPE_PALETTE) {
   8.177 +		    if(num_trans == 1) {
   8.178 +			/* exactly one transparent value: set colour key */
   8.179 +			ckey = trans[0];
   8.180 +		    } else
   8.181 +			png_set_expand(png_ptr);
   8.182 +		} else
   8.183 +		    ckey = 0; /* actual value will be set later */
   8.184 +	}
   8.185 +
   8.186 +	if ( (color_type == PNG_COLOR_TYPE_GRAY) ||
   8.187 +		  (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) )
   8.188 +		png_set_gray_to_rgb(png_ptr);
   8.189 +
   8.190 +	png_read_update_info(png_ptr, info_ptr);
   8.191 +
   8.192 +	png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth,
   8.193 +			&color_type, &interlace_type, NULL, NULL);
   8.194 +
   8.195 +	/* Allocate the SDL surface to hold the image */
   8.196 +	Rmask = Gmask = Bmask = Amask = 0 ; 
   8.197 +	if ( color_type != PNG_COLOR_TYPE_PALETTE ) {
   8.198 +		if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) {
   8.199 +			Rmask = 0x000000FF;
   8.200 +			Gmask = 0x0000FF00;
   8.201 +			Bmask = 0x00FF0000;
   8.202 +			Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
   8.203 +		} else {
   8.204 +		        int s = (info_ptr->channels == 4) ? 0 : 8;
   8.205 +			Rmask = 0xFF000000 >> s;
   8.206 +			Gmask = 0x00FF0000 >> s;
   8.207 +			Bmask = 0x0000FF00 >> s;
   8.208 +			Amask = 0x000000FF >> s;
   8.209 +		}
   8.210 +	}
   8.211 +	surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
   8.212 +			bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask);
   8.213 +	if ( surface == NULL ) {
   8.214 +		IMG_SetError("Out of memory");
   8.215 +		goto done;
   8.216 +	}
   8.217 +
   8.218 +	if(ckey != -1) {
   8.219 +	        if(color_type != PNG_COLOR_TYPE_PALETTE)
   8.220 +		        ckey = SDL_MapRGB(surface->format, transv->red,
   8.221 +					  transv->green, transv->blue);
   8.222 +	        SDL_SetColorKey(surface, SDL_SRCCOLORKEY, ckey);
   8.223 +	}
   8.224 +
   8.225 +	/* Create the array of pointers to image data */
   8.226 +	row_pointers = (png_bytep*) malloc(sizeof(png_bytep)*height);
   8.227 +	if ( (row_pointers == NULL) ) {
   8.228 +		IMG_SetError("Out of memory");
   8.229 +		SDL_FreeSurface(surface);
   8.230 +		surface = NULL;
   8.231 +		goto done;
   8.232 +	}
   8.233 +	for (row = 0; row < height; row++) {
   8.234 +		row_pointers[row] = (png_bytep)
   8.235 +				(Uint8 *)surface->pixels + row*surface->pitch;
   8.236 +	}
   8.237 +
   8.238 +	/* Read the entire image in one go */
   8.239 +	png_read_image(png_ptr, row_pointers);
   8.240 +
   8.241 +	/* read rest of file, get additional chunks in info_ptr - REQUIRED */
   8.242 +	png_read_end(png_ptr, info_ptr);
   8.243 +
   8.244 +	/* Load the palette, if any */
   8.245 +	palette = surface->format->palette;
   8.246 +	if ( palette && (info_ptr->num_palette > 0) ) {
   8.247 +		palette->ncolors = info_ptr->num_palette; 
   8.248 +		for( i=0; i<info_ptr->num_palette; ++i ) {
   8.249 +			palette->colors[i].b =(Uint8)info_ptr->palette[i].blue;
   8.250 +			palette->colors[i].g =(Uint8)info_ptr->palette[i].green;
   8.251 +			palette->colors[i].r =(Uint8)info_ptr->palette[i].red;
   8.252 +		}
   8.253 +	}
   8.254 +
   8.255 +done:	/* Clean up and return */
   8.256 +	png_destroy_read_struct(&png_ptr, info_ptr ? &info_ptr : (png_infopp)0,
   8.257 +								(png_infopp)0);
   8.258 +	if ( row_pointers ) {
   8.259 +		free(row_pointers);
   8.260 +	}
   8.261 +	return(surface); 
   8.262 +}
   8.263 +
   8.264 +#else
   8.265 +
   8.266 +/* See if an image is contained in a data source */
   8.267 +int IMG_isPNG(SDL_RWops *src)
   8.268 +{
   8.269 +	return(0);
   8.270 +}
   8.271 +
   8.272 +/* Load a PNG type image from an SDL datasource */
   8.273 +SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
   8.274 +{
   8.275 +	return(NULL);
   8.276 +}
   8.277 +
   8.278 +#endif /* LOAD_PNG */
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/IMG_ppm.c	Thu Aug 10 06:05:39 2000 +0000
     9.3 @@ -0,0 +1,175 @@
     9.4 +/*
     9.5 +    IMGLIB:  An example image loading library for use with SDL
     9.6 +    Copyright (C) 1999  Sam Lantinga
     9.7 +
     9.8 +    This library is free software; you can redistribute it and/or
     9.9 +    modify it under the terms of the GNU Library General Public
    9.10 +    License as published by the Free Software Foundation; either
    9.11 +    version 2 of the License, or (at your option) any later version.
    9.12 +
    9.13 +    This library is distributed in the hope that it will be useful,
    9.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    9.16 +    Library General Public License for more details.
    9.17 +
    9.18 +    You should have received a copy of the GNU Library General Public
    9.19 +    License along with this library; if not, write to the Free
    9.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    9.21 +
    9.22 +    Sam Lantinga
    9.23 +    5635-34 Springhouse Dr.
    9.24 +    Pleasanton, CA 94588 (USA)
    9.25 +    slouken@devolution.com
    9.26 +*/
    9.27 +
    9.28 +/* This is a PPM image file loading framework */
    9.29 +
    9.30 +#include <stdio.h>
    9.31 +#include <ctype.h>
    9.32 +#include <string.h>
    9.33 +
    9.34 +#include "SDL_image.h"
    9.35 +
    9.36 +#ifdef LOAD_PPM
    9.37 +
    9.38 +/* See if an image is contained in a data source */
    9.39 +int IMG_isPPM(SDL_RWops *src)
    9.40 +{
    9.41 +	int is_PPM;
    9.42 +	char magic[2];
    9.43 +
    9.44 +	is_PPM = 0;
    9.45 +	if ( SDL_RWread(src, magic, 2, 1) ) {
    9.46 +		if ( (strncmp(magic, "P6", 2) == 0) ||
    9.47 +		     (strncmp(magic, "P3", 2) == 0) ) {
    9.48 +			is_PPM = 1;
    9.49 +		}
    9.50 +		/* P3 is the ASCII PPM format, which is not yet supported */
    9.51 +		if ( strncmp(magic, "P3", 2) == 0 ) {
    9.52 +			is_PPM = 0;
    9.53 +		}
    9.54 +	}
    9.55 +	return(is_PPM);
    9.56 +}
    9.57 +
    9.58 +/* Load a PPM type image from an SDL datasource */
    9.59 +static int ReadNumber(SDL_RWops *src)
    9.60 +{
    9.61 +	int number;
    9.62 +	unsigned char ch;
    9.63 +
    9.64 +	/* Initialize return value */
    9.65 +	number = 0;
    9.66 +
    9.67 +	/* Skip leading whitespace */
    9.68 +	do {
    9.69 +		if ( ! SDL_RWread(src, &ch, 1, 1) ) {
    9.70 +			return(0);
    9.71 +		}
    9.72 +		/* Eat comments as whitespace */
    9.73 +		if ( ch == '#' ) {  /* Comment is '#' to end of line */
    9.74 +			do {
    9.75 +				if ( ! SDL_RWread(src, &ch, 1, 1) ) {
    9.76 +					return(0);
    9.77 +				}
    9.78 +			} while ( (ch != '\r') && (ch != '\n') );
    9.79 +		}
    9.80 +	} while ( isspace(ch) );
    9.81 +
    9.82 +	/* Add up the number */
    9.83 +	do {
    9.84 +		number *= 10;
    9.85 +		number += ch-'0';
    9.86 +
    9.87 +		if ( ! SDL_RWread(src, &ch, 1, 1) ) {
    9.88 +			return(0);
    9.89 +		}
    9.90 +	} while ( isdigit(ch) );
    9.91 +
    9.92 +	return(number);
    9.93 +}
    9.94 +SDL_Surface *IMG_LoadPPM_RW(SDL_RWops *src)
    9.95 +{
    9.96 +	SDL_Surface *surface;
    9.97 +	int width, height;
    9.98 +	int maxval, x, y;
    9.99 +	Uint32 *row;
   9.100 +	Uint8 rgb[3];
   9.101 +	int read_error;
   9.102 +
   9.103 +	/* Initialize the data we will clean up when we're done */
   9.104 +	surface = NULL;
   9.105 +	read_error = 0;
   9.106 +
   9.107 +	/* Check to make sure we have something to do */
   9.108 +	if ( ! src ) {
   9.109 +		goto done;
   9.110 +	}
   9.111 +
   9.112 +	/* Read the magic header */
   9.113 +	SDL_RWread(src, rgb, 2, 1);
   9.114 +
   9.115 +	/* Read the width and height */
   9.116 +	width = ReadNumber(src);
   9.117 +	height = ReadNumber(src);
   9.118 +	if ( ! width || ! height ) {
   9.119 +		IMG_SetError("Unable to read image width and height");
   9.120 +		goto done;
   9.121 +	}
   9.122 +
   9.123 +	/* Read the maximum color component value, and skip to image data */
   9.124 +	maxval = ReadNumber(src);
   9.125 +	do {
   9.126 +		if ( ! SDL_RWread(src, rgb, 1, 1) ) {
   9.127 +			IMG_SetError("Unable to read max color component");
   9.128 +			goto done;
   9.129 +		}
   9.130 +	} while ( isspace(rgb[0]) );
   9.131 +	SDL_RWseek(src, -1, SEEK_CUR);
   9.132 +
   9.133 +	/* Create the surface of the appropriate type */
   9.134 +	surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, 32,
   9.135 +				0x00FF0000,0x0000FF00,0x000000FF,0);
   9.136 +	if ( surface == NULL ) {
   9.137 +		IMG_SetError("Out of memory");
   9.138 +		goto done;
   9.139 +	}
   9.140 +
   9.141 +	/* Read the image into the surface */
   9.142 +	for ( y=0; y<surface->h; ++y ) {
   9.143 +		row = (Uint32 *)((Uint8 *)surface->pixels + y*surface->pitch);
   9.144 +		for ( x=0; x<surface->w; ++x ) {
   9.145 +			if ( ! SDL_RWread(src, rgb, 3, 1) ) {
   9.146 +				read_error = 1;
   9.147 +				goto done;
   9.148 +			}
   9.149 +			*row++ = ((((Uint32)rgb[0])<<16)|
   9.150 +			          (((Uint32)rgb[1])<< 8)|
   9.151 +			          (((Uint32)rgb[2])    ));
   9.152 +		}
   9.153 +	}
   9.154 +
   9.155 +done:
   9.156 +	if ( read_error ) {
   9.157 +		SDL_FreeSurface(surface);
   9.158 +		IMG_SetError("Error reading PPM data");
   9.159 +		surface = NULL;
   9.160 +	}
   9.161 +	return(surface);
   9.162 +}
   9.163 +
   9.164 +#else
   9.165 +
   9.166 +/* See if an image is contained in a data source */
   9.167 +int IMG_isPPM(SDL_RWops *src)
   9.168 +{
   9.169 +	return(0);
   9.170 +}
   9.171 +
   9.172 +/* Load a PPM type image from an SDL datasource */
   9.173 +SDL_Surface *IMG_LoadPPM_RW(SDL_RWops *src)
   9.174 +{
   9.175 +	return(NULL);
   9.176 +}
   9.177 +
   9.178 +#endif /* LOAD_PPM */
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/IMG_tga.c	Thu Aug 10 06:05:39 2000 +0000
    10.3 @@ -0,0 +1,330 @@
    10.4 +/*
    10.5 +    IMGLIB:  An example image loading library for use with SDL
    10.6 +    Copyright (C) 1999  Sam Lantinga
    10.7 +
    10.8 +    This library is free software; you can redistribute it and/or
    10.9 +    modify it under the terms of the GNU Library General Public
   10.10 +    License as published by the Free Software Foundation; either
   10.11 +    version 2 of the License, or (at your option) any later version.
   10.12 +
   10.13 +    This library is distributed in the hope that it will be useful,
   10.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   10.16 +    Library General Public License for more details.
   10.17 +
   10.18 +    You should have received a copy of the GNU Library General Public
   10.19 +    License along with this library; if not, write to the Free
   10.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   10.21 +
   10.22 +    Sam Lantinga
   10.23 +    5635-34 Springhouse Dr.
   10.24 +    Pleasanton, CA 94588 (USA)
   10.25 +    slouken@devolution.com
   10.26 +*/
   10.27 +
   10.28 +#include <stdio.h>
   10.29 +#include <stdlib.h>
   10.30 +
   10.31 +#include "SDL_endian.h"
   10.32 +
   10.33 +#include "SDL_image.h"
   10.34 +
   10.35 +#ifdef LOAD_TGA
   10.36 +
   10.37 +/*
   10.38 + * A TGA loader for the SDL library
   10.39 + * Supports: Reading 8, 15, 16, 24 and 32bpp images, with alpha or colourkey,
   10.40 + *           uncompressed or RLE encoded.
   10.41 + *
   10.42 + * 2000-06-10 Mattias Engdegård <f91-men@nada.kth.se>: initial version
   10.43 + * 2000-06-26 Mattias Engdegård <f91-men@nada.kth.se>: read greyscale TGAs
   10.44 + */
   10.45 +
   10.46 +extern int IMG_invert_alpha;
   10.47 +
   10.48 +struct TGAheader {
   10.49 +    Uint8 infolen;		/* length of info field */
   10.50 +    Uint8 has_cmap;		/* 1 if image has colormap, 0 otherwise */
   10.51 +    Uint8 type;
   10.52 +
   10.53 +    Uint8 cmap_start[2];	/* index of first colormap entry */
   10.54 +    Uint8 cmap_len[2];		/* number of entries in colormap */
   10.55 +    Uint8 cmap_bits;		/* bits per colormap entry */
   10.56 +
   10.57 +    Uint8 yorigin[2];		/* image origin (ignored here) */
   10.58 +    Uint8 xorigin[2];
   10.59 +    Uint8 width[2];		/* image size */
   10.60 +    Uint8 height[2];
   10.61 +    Uint8 pixel_bits;		/* bits/pixel */
   10.62 +    Uint8 flags;
   10.63 +};
   10.64 +
   10.65 +enum tga_type {
   10.66 +    TGA_TYPE_INDEXED = 1,
   10.67 +    TGA_TYPE_RGB = 2,
   10.68 +    TGA_TYPE_BW = 3,
   10.69 +    TGA_TYPE_RLE_INDEXED = 9,
   10.70 +    TGA_TYPE_RLE_RGB = 10,
   10.71 +    TGA_TYPE_RLE_BW = 11
   10.72 +};
   10.73 +
   10.74 +#define TGA_INTERLEAVE_MASK	0xc0
   10.75 +#define TGA_INTERLEAVE_NONE	0x00
   10.76 +#define TGA_INTERLEAVE_2WAY	0x40
   10.77 +#define TGA_INTERLEAVE_4WAY	0x80
   10.78 +
   10.79 +#define TGA_ORIGIN_MASK		0x30
   10.80 +#define TGA_ORIGIN_LEFT		0x00
   10.81 +#define TGA_ORIGIN_RIGHT	0x10
   10.82 +#define TGA_ORIGIN_LOWER	0x00
   10.83 +#define TGA_ORIGIN_UPPER	0x20
   10.84 +
   10.85 +/* read/write unaligned little-endian 16-bit ints */
   10.86 +#define LE16(p) ((p)[0] + ((p)[1] << 8))
   10.87 +#define SETLE16(p, v) ((p)[0] = (v), (p)[1] = (v) >> 8)
   10.88 +
   10.89 +static void unsupported(void)
   10.90 +{
   10.91 +    IMG_SetError("unsupported TGA format");
   10.92 +}
   10.93 +
   10.94 +/* Load a TGA type image from an SDL datasource */
   10.95 +SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src)
   10.96 +{
   10.97 +    struct TGAheader hdr;
   10.98 +    int rle = 0;
   10.99 +    int alpha = 0;
  10.100 +    int indexed = 0;
  10.101 +    int grey = 0;
  10.102 +    int ckey = -1;
  10.103 +    int ncols, w, h;
  10.104 +    SDL_Surface *img;
  10.105 +    Uint32 rmask, gmask, bmask, amask;
  10.106 +    Uint8 *dst;
  10.107 +    int i;
  10.108 +    int bpp;
  10.109 +    int lstep;
  10.110 +    Uint32 pixel;
  10.111 +    int count, rep;
  10.112 +
  10.113 +    if(!SDL_RWread(src, &hdr, sizeof(hdr), 1))
  10.114 +	goto error;
  10.115 +    ncols = LE16(hdr.cmap_len);
  10.116 +    switch(hdr.type) {
  10.117 +    case TGA_TYPE_RLE_INDEXED:
  10.118 +	rle = 1;
  10.119 +	/* fallthrough */
  10.120 +    case TGA_TYPE_INDEXED:
  10.121 +	if(!hdr.has_cmap || hdr.pixel_bits != 8 || ncols > 256)
  10.122 +	    goto error;
  10.123 +	indexed = 1;
  10.124 +	break;
  10.125 +
  10.126 +    case TGA_TYPE_RLE_RGB:
  10.127 +	rle = 1;
  10.128 +	/* fallthrough */
  10.129 +    case TGA_TYPE_RGB:
  10.130 +	indexed = 0;
  10.131 +	break;
  10.132 +
  10.133 +    case TGA_TYPE_RLE_BW:
  10.134 +	rle = 1;
  10.135 +	/* fallthrough */
  10.136 +    case TGA_TYPE_BW:
  10.137 +	if(hdr.pixel_bits != 8)
  10.138 +	    goto error;
  10.139 +	/* Treat greyscale as 8bpp indexed images */
  10.140 +	indexed = grey = 1;
  10.141 +	break;
  10.142 +
  10.143 +    default:
  10.144 +        unsupported();
  10.145 +	return NULL;
  10.146 +    }
  10.147 +
  10.148 +    bpp = (hdr.pixel_bits + 7) >> 3;
  10.149 +    switch(hdr.pixel_bits) {
  10.150 +    case 8:
  10.151 +	if(!indexed) {
  10.152 +	    unsupported();
  10.153 +	    return NULL;
  10.154 +	}
  10.155 +	rmask = gmask = bmask = amask = 0;
  10.156 +	break;
  10.157 +
  10.158 +    case 15:
  10.159 +    case 16:
  10.160 +	/* 15 and 16bpp both seem to use 5 bits/plane. The extra alpha bit
  10.161 +	   is ignored for now. */
  10.162 +	amask = 0;
  10.163 +	rmask = 0x7c00;
  10.164 +	gmask = 0x03e0;
  10.165 +	bmask = 0x001f;
  10.166 +	break;
  10.167 +
  10.168 +    case 32:
  10.169 +	alpha = 1;
  10.170 +	/* fallthrough */
  10.171 +    case 24:
  10.172 +	if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
  10.173 +	    int s = alpha ? 0 : 8;
  10.174 +	    amask = 0x000000ff >> s;
  10.175 +	    rmask = 0x0000ff00 >> s;
  10.176 +	    gmask = 0x00ff0000 >> s;
  10.177 +	    bmask = 0xff000000 >> s;
  10.178 +	} else {
  10.179 +	    amask = alpha ? 0xff000000 : 0;
  10.180 +	    rmask = 0x00ff0000;
  10.181 +	    gmask = 0x0000ff00;
  10.182 +	    bmask = 0x000000ff;
  10.183 +	}
  10.184 +	break;
  10.185 +
  10.186 +    default:
  10.187 +	unsupported();
  10.188 +	return NULL;
  10.189 +    }
  10.190 +
  10.191 +    if((hdr.flags & TGA_INTERLEAVE_MASK) != TGA_INTERLEAVE_NONE
  10.192 +       || hdr.flags & TGA_ORIGIN_RIGHT) {
  10.193 +	unsupported();
  10.194 +	return NULL;
  10.195 +    }
  10.196 +    
  10.197 +    SDL_RWseek(src, hdr.infolen, SEEK_CUR); /* skip info field */
  10.198 +
  10.199 +    w = LE16(hdr.width);
  10.200 +    h = LE16(hdr.height);
  10.201 +    img = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h,
  10.202 +			       bpp * 8,
  10.203 +			       rmask, gmask, bmask, amask);
  10.204 +
  10.205 +    if(hdr.has_cmap) {
  10.206 +	int palsiz = ncols * ((hdr.cmap_bits + 7) >> 3);
  10.207 +	if(indexed && !grey) {
  10.208 +	    Uint8 *pal = malloc(palsiz), *p = pal;
  10.209 +	    SDL_Color *colors = img->format->palette->colors;
  10.210 +	    img->format->palette->ncolors = ncols;
  10.211 +	    SDL_RWread(src, pal, palsiz, 1);
  10.212 +	    for(i = 0; i < ncols; i++) {
  10.213 +		switch(hdr.cmap_bits) {
  10.214 +		case 15:
  10.215 +		case 16:
  10.216 +		    {
  10.217 +			Uint16 c = p[0] + (p[1] << 8);
  10.218 +			p += 2;
  10.219 +			colors[i].r = (c >> 7) & 0xf8;
  10.220 +			colors[i].g = (c >> 2) & 0xf8;
  10.221 +			colors[i].b = c << 3;
  10.222 +		    }
  10.223 +		    break;
  10.224 +		case 24:
  10.225 +		case 32:
  10.226 +		    colors[i].b = *p++;
  10.227 +		    colors[i].g = *p++;
  10.228 +		    colors[i].r = *p++;
  10.229 +		    if(hdr.cmap_bits == 32 && *p++ < 128)
  10.230 +			ckey = i;
  10.231 +		    break;
  10.232 +		}
  10.233 +	    }
  10.234 +	    free(pal);
  10.235 +	    if(ckey >= 0)
  10.236 +		SDL_SetColorKey(img, SDL_SRCCOLORKEY, ckey);
  10.237 +	} else {
  10.238 +	    /* skip unneeded colormap */
  10.239 +	    SDL_RWseek(src, palsiz, SEEK_CUR);
  10.240 +	}
  10.241 +    }
  10.242 +
  10.243 +    if(grey) {
  10.244 +	SDL_Color *colors = img->format->palette->colors;
  10.245 +	for(i = 0; i < 256; i++)
  10.246 +	    colors[i].r = colors[i].g = colors[i].b = i;
  10.247 +	img->format->palette->ncolors = 256;
  10.248 +    }
  10.249 +
  10.250 +    if(hdr.flags & TGA_ORIGIN_UPPER) {
  10.251 +	lstep = img->pitch;
  10.252 +	dst = (Uint8 *)img->pixels;
  10.253 +    } else {
  10.254 +	lstep = -img->pitch;
  10.255 +	dst = (Uint8 *)img->pixels + (h - 1) * img->pitch;
  10.256 +    }
  10.257 +
  10.258 +    /* The RLE decoding code is slightly convoluted since we can't rely on
  10.259 +       spans not to wrap across scan lines */
  10.260 +    count = rep = 0;
  10.261 +    for(i = 0; i < h; i++) {
  10.262 +	if(rle) {
  10.263 +	    int x = 0;
  10.264 +	    for(;;) {
  10.265 +		Uint8 c;
  10.266 +
  10.267 +		if(count) {
  10.268 +		    int n = count;
  10.269 +		    if(n > w - x)
  10.270 +			n = w - x;
  10.271 +		    SDL_RWread(src, dst + x * bpp, n * bpp, 1);
  10.272 +		    count -= n;
  10.273 +		    x += n;
  10.274 +		    if(x == w)
  10.275 +			break;
  10.276 +		} else if(rep) {
  10.277 +		    int n = rep;
  10.278 +		    if(n > w - x)
  10.279 +			n = w - x;
  10.280 +		    rep -= n;
  10.281 +		    while(n--) {
  10.282 +			memcpy(dst + x * bpp, &pixel, bpp);
  10.283 +			x++;
  10.284 +		    }
  10.285 +		    if(x == w)
  10.286 +			break;
  10.287 +		}
  10.288 +
  10.289 +		SDL_RWread(src, &c, 1, 1);
  10.290 +		if(c & 0x80) {
  10.291 +		    SDL_RWread(src, &pixel, bpp, 1);
  10.292 +		    rep = (c & 0x7f) + 1;
  10.293 +		} else {
  10.294 +		    count = c + 1;
  10.295 +		}
  10.296 +	    }
  10.297 +
  10.298 +	} else {
  10.299 +	    SDL_RWread(src, dst, w * bpp, 1);
  10.300 +	}
  10.301 +	if(SDL_BYTEORDER == SDL_BIG_ENDIAN && bpp == 2) {
  10.302 +	    /* swap byte order */
  10.303 +	    int x;
  10.304 +	    Uint16 *p = (Uint16 *)dst;
  10.305 +	    for(x = 0; x < w; x++)
  10.306 +		p[x] = SDL_Swap16(p[x]);
  10.307 +	}
  10.308 +	if(alpha && !IMG_invert_alpha) {
  10.309 +	    /* TGA stores alpha traditionally (0 transparent, 0xff opaque) */
  10.310 +	    int x;
  10.311 +	    for(x = 0; x < w; x++)
  10.312 +		dst[x * 4 + 3] ^= 0xff;
  10.313 +	}
  10.314 +	dst += lstep;
  10.315 +    }
  10.316 +    if(alpha)
  10.317 +	SDL_SetAlpha(img, SDL_SRCALPHA, 0);
  10.318 +    return img;
  10.319 +
  10.320 +error:
  10.321 +    IMG_SetError("Error reading TGA data");
  10.322 +    return NULL;
  10.323 +}
  10.324 +
  10.325 +#else
  10.326 +
  10.327 +/* dummy TGA load routine */
  10.328 +SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src)
  10.329 +{
  10.330 +	return(NULL);
  10.331 +}
  10.332 +
  10.333 +#endif /* LOAD_TGA */
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/IMG_tif.c	Thu Aug 10 06:05:39 2000 +0000
    11.3 @@ -0,0 +1,203 @@
    11.4 +/*
    11.5 +    IMGLIB:  An example image loading library for use with SDL
    11.6 +    Copyright (C) 1999  Sam Lantinga
    11.7 +
    11.8 +    This library is free software; you can redistribute it and/or
    11.9 +    modify it under the terms of the GNU Library General Public
   11.10 +    License as published by the Free Software Foundation; either
   11.11 +    version 2 of the License, or (at your option) any later version.
   11.12 +
   11.13 +    This library is distributed in the hope that it will be useful,
   11.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11.16 +    Library General Public License for more details.
   11.17 +
   11.18 +    You should have received a copy of the GNU Library General Public
   11.19 +    License along with this library; if not, write to the Free
   11.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   11.21 +
   11.22 +    Sam Lantinga
   11.23 +    5635-34 Springhouse Dr.
   11.24 +    Pleasanton, CA 94588 (USA)
   11.25 +    slouken@devolution.com
   11.26 +
   11.27 +    5/29/2000: TIFF loader written. Mark Baker (mbaker@0x7a69.net)
   11.28 +*/
   11.29 +
   11.30 +
   11.31 +
   11.32 +/* This is a TIFF image file loading framework */
   11.33 +
   11.34 +#include <stdio.h>
   11.35 +
   11.36 +#include "SDL_image.h"
   11.37 +
   11.38 +#ifdef LOAD_TIF
   11.39 +
   11.40 +#include <tiffio.h>
   11.41 +
   11.42 +
   11.43 +/*
   11.44 + * These are the thunking routine to use the SDL_RWops* routines from
   11.45 + * libtiff's internals.
   11.46 +*/
   11.47 +
   11.48 +static tsize_t tiff_read(thandle_t fd, tdata_t buf, tsize_t size)
   11.49 +{
   11.50 +	return SDL_RWread((SDL_RWops*)fd, buf, 1, size);
   11.51 +}
   11.52 +
   11.53 +static toff_t tiff_seek(thandle_t fd, toff_t offset, int origin)
   11.54 +{
   11.55 +	return SDL_RWseek((SDL_RWops*)fd, offset, origin);
   11.56 +}
   11.57 +
   11.58 +static tsize_t tiff_write(thandle_t fd, tdata_t buf, tsize_t size)
   11.59 +{
   11.60 +	return SDL_RWwrite((SDL_RWops*)fd, buf, 1, size);
   11.61 +}
   11.62 +
   11.63 +static int tiff_close(thandle_t fd)
   11.64 +{
   11.65 +	/*
   11.66 +	 * We don't want libtiff closing our SDL_RWops*, but if it's not given
   11.67 +         * a routine to try, and if the image isn't a TIFF, it'll segfault.
   11.68 +	 */
   11.69 +	return 0;
   11.70 +}
   11.71 +
   11.72 +static toff_t tiff_size(thandle_t fd)
   11.73 +{
   11.74 +	Uint32 save_pos;
   11.75 +	toff_t size;
   11.76 +
   11.77 +	save_pos = SDL_RWtell((SDL_RWops*)fd);
   11.78 +	SDL_RWseek((SDL_RWops*)fd, 0, SEEK_END);
   11.79 +        size = SDL_RWtell((SDL_RWops*)fd);
   11.80 +	SDL_RWseek((SDL_RWops*)fd, save_pos, SEEK_SET);
   11.81 +	return size;
   11.82 +}
   11.83 +
   11.84 +int IMG_isTIF(SDL_RWops* src)
   11.85 +{
   11.86 +	TIFF* tiff;
   11.87 +	TIFFErrorHandler prev_handler;
   11.88 +
   11.89 +	/* Suppress output from libtiff */
   11.90 +	prev_handler = TIFFSetErrorHandler(NULL);
   11.91 +	
   11.92 +	/* Attempt to process the given file data */
   11.93 +	/* turn off memory mapped access with the m flag */
   11.94 +	tiff = TIFFClientOpen("SDL_image", "rm", (thandle_t)src, 
   11.95 +		tiff_read, tiff_write, tiff_seek, tiff_close, tiff_size, NULL, NULL);
   11.96 +
   11.97 +	/* Reset the default error handler, since it can be useful for info */
   11.98 +	TIFFSetErrorHandler(prev_handler);
   11.99 +
  11.100 +	/* If it's not a TIFF, then tiff will be NULL. */
  11.101 +	if(!tiff)
  11.102 +		return 0;
  11.103 +
  11.104 +	/* Free up any dynamically allocated memory libtiff uses */
  11.105 +	TIFFClose(tiff);
  11.106 +	
  11.107 +	return 1;
  11.108 +}
  11.109 +
  11.110 +SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
  11.111 +{
  11.112 +	TIFF* tiff;
  11.113 +	SDL_Surface* surface = NULL;
  11.114 +	Uint32 img_width, img_height;
  11.115 +	Uint32 Rmask, Gmask, Bmask, Amask;
  11.116 +	Uint32 x, y;
  11.117 +	Uint32 half;
  11.118 +	Uint32 tl_coord, bl_coord;
  11.119 +	Uint32 tl_pixel, bl_pixel;
  11.120 +
  11.121 +
  11.122 +	/* turn off memory mapped access with the m flag */
  11.123 +	tiff = TIFFClientOpen("SDL_image", "rm", (thandle_t)src, 
  11.124 +		tiff_read, tiff_write, tiff_seek, tiff_close, tiff_size, NULL, NULL);
  11.125 +	if(!tiff)
  11.126 +		return NULL;
  11.127 +
  11.128 +	/* Retrieve the dimensions of the image from the TIFF tags */
  11.129 +	TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &img_width);
  11.130 +	TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &img_height);
  11.131 +
  11.132 +	if (SDL_BYTEORDER == SDL_LIL_ENDIAN)
  11.133 +	{
  11.134 +		Rmask = 0x000000FF;
  11.135 +		Gmask = 0x0000FF00;
  11.136 +		Bmask = 0x00FF0000;
  11.137 +		Amask = 0xFF000000;
  11.138 +	}
  11.139 +	else
  11.140 +	{
  11.141 +		Rmask = 0xFF000000;
  11.142 +		Gmask = 0x00FF0000;
  11.143 +		Bmask = 0x0000FF00;
  11.144 +		Amask = 0x000000FF;
  11.145 +	}              
  11.146 +
  11.147 +	surface = SDL_AllocSurface(SDL_SWSURFACE, img_width, img_height, 32,
  11.148 +		Rmask, Gmask, Bmask, Amask);
  11.149 +	if(!surface)
  11.150 +		return NULL;
  11.151 +	
  11.152 +	if(!TIFFReadRGBAImage(tiff, img_width, img_height, surface->pixels, 0))
  11.153 +		return NULL;
  11.154 +
  11.155 +	/* 
  11.156 +	 * For this to make any sense, a little information is needed.
  11.157 +	 * Firstly, SDL uses more or less the opposite value for alpha as
  11.158 +	 * libtiff, so we need to invert the alpha channel of each pixel.
  11.159 +	 * To do this, I'm just xor it with the alpha mask.
  11.160 +	 *
  11.161 +	 * Secondly, libtiff loads the image more or less inverted.
  11.162 +	 * So the top left of the image ends up being the bottom left.
  11.163 +	 * To correct for this, we swap the pixels as we're inverting the 
  11.164 +	 * alpha channel
  11.165 +	*/
  11.166 +
  11.167 +	// We only need to loop 1/2 the height, because we're swapping values.
  11.168 +	half = img_height / 2;
  11.169 +
  11.170 +	for(y = 0; y <= half; y++)
  11.171 +	{
  11.172 +		for(x = 0; x < img_width; x++)
  11.173 +		{
  11.174 +			tl_coord = y * img_width + x;
  11.175 +			bl_coord = (img_height - y - 1) * img_width + x;
  11.176 +
  11.177 +			/* Invert the value of the alpha channel, while copying the pixel */
  11.178 +			tl_pixel = *((Uint32*)surface->pixels + tl_coord) ^ Amask;
  11.179 +			bl_pixel = *((Uint32*)surface->pixels + bl_coord) ^ Amask;
  11.180 +
  11.181 +			/* Now invert the location of the pixel relative to the image */
  11.182 +			*((Uint32*)surface->pixels + bl_coord) = tl_pixel;
  11.183 +			*((Uint32*)surface->pixels + tl_coord) = bl_pixel;
  11.184 +
  11.185 +		}
  11.186 +	}
  11.187 +	TIFFClose(tiff);
  11.188 +	
  11.189 +	return surface;
  11.190 +}
  11.191 +
  11.192 +#else
  11.193 +
  11.194 +/* See if an image is contained in a data source */
  11.195 +int IMG_isTIF(SDL_RWops *src)
  11.196 +{
  11.197 +	return(0);
  11.198 +}
  11.199 +
  11.200 +/* Load a TIFF type image from an SDL datasource */
  11.201 +SDL_Surface *IMG_LoadTIF_RW(SDL_RWops *src)
  11.202 +{
  11.203 +	return(NULL);
  11.204 +}
  11.205 +
  11.206 +#endif /* LOAD_TIF */
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/IMG_xxx.c	Thu Aug 10 06:05:39 2000 +0000
    12.3 @@ -0,0 +1,63 @@
    12.4 +/*
    12.5 +    IMGLIB:  An example image loading library for use with SDL
    12.6 +    Copyright (C) 1999  Sam Lantinga
    12.7 +
    12.8 +    This library is free software; you can redistribute it and/or
    12.9 +    modify it under the terms of the GNU Library General Public
   12.10 +    License as published by the Free Software Foundation; either
   12.11 +    version 2 of the License, or (at your option) any later version.
   12.12 +
   12.13 +    This library is distributed in the hope that it will be useful,
   12.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12.16 +    Library General Public License for more details.
   12.17 +
   12.18 +    You should have received a copy of the GNU Library General Public
   12.19 +    License along with this library; if not, write to the Free
   12.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   12.21 +
   12.22 +    Sam Lantinga
   12.23 +    5635-34 Springhouse Dr.
   12.24 +    Pleasanton, CA 94588 (USA)
   12.25 +    slouken@devolution.com
   12.26 +*/
   12.27 +
   12.28 +/* This is a generic "format not supported" image framework */
   12.29 +
   12.30 +#include <stdio.h>
   12.31 +
   12.32 +#include "SDL_image.h"
   12.33 +
   12.34 +#ifdef LOAD_XXX
   12.35 +
   12.36 +/* See if an image is contained in a data source */
   12.37 +int IMG_isXXX(SDL_RWops *src)
   12.38 +{
   12.39 +	int is_XXX;
   12.40 +
   12.41 +	is_XXX = 0;
   12.42 +
   12.43 +	return(is_XXX);
   12.44 +}
   12.45 +
   12.46 +/* Load a XXX type image from an SDL datasource */
   12.47 +SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
   12.48 +{
   12.49 +	return(NULL);
   12.50 +}
   12.51 +
   12.52 +#else
   12.53 +
   12.54 +/* See if an image is contained in a data source */
   12.55 +int IMG_isXXX(SDL_RWops *src)
   12.56 +{
   12.57 +	return(0);
   12.58 +}
   12.59 +
   12.60 +/* Load a XXX type image from an SDL datasource */
   12.61 +SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
   12.62 +{
   12.63 +	return(NULL);
   12.64 +}
   12.65 +
   12.66 +#endif /* LOAD_XXX */
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/MPWmake.sea.hqx	Thu Aug 10 06:05:39 2000 +0000
    13.3 @@ -0,0 +1,428 @@
    13.4 +(This file must be converted with BinHex 4.0)
    13.5 +
    13.6 +:#de39feKDf8ZFf9K!%&38%aKGA0d)!!!!!HL!!"(I[d98dP8)3!#!!!(SR*-BA8
    13.7 +#Q!!!!"B&S!d0$P0%6&pTE@&RC5jYB@YP,R"ZC`!!!!!!!!!!!!!!!!![M3!!!!!
    13.8 +!!!!!!!!!!!!!!!!!!!!!"&J!!!!!rrrrre4&@&4dG(Kd!3#cY9IjYB6qm!!!!GS
    13.9 +!!!J9!!!"&3!!!Vf)'%GK!!!!!!!!93-4!!JF[-BKL#'H3A&kT*mJ)N)cUq0)*Nl
   13.10 +KJkLJBGa[+*CT&(-4MM!LKZC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rm
  13.427 +J!$Em!!!!!!#&rrmN!$H#"C!!'fJ!Krrr!!!hf!!!!!!$k2rr)!!i+J!!!!!!K[r
  13.428 +r*!!i9J@3!"[F!)$rr`!!10J!!!!!!,Arrb!!16B!!!!!!),rr`!!1DJ!!!!!!!$
  13.429 +rrb!!1JB!!!!!!)$rr`!!1K)!!!!!!!$rr`!!1M)!!!!!!)$rr`!!1Q8!!!!!!)$
  13.430 +rrb!!1R!!!!!!!)$rr`!!3'S!!!!!!!$rr`!!3p3&N!!Dl!C`FQpYF(3)a#"cG@C
  13.431 +QDAMre!:
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/Makefile.am	Thu Aug 10 06:05:39 2000 +0000
    14.3 @@ -0,0 +1,43 @@
    14.4 +# Makefile.am for the SDL sample image loading library and viewer
    14.5 +
    14.6 +lib_LTLIBRARIES = libSDL_image.la
    14.7 +
    14.8 +libSDL_imageincludedir = $(includedir)/SDL
    14.9 +libSDL_imageinclude_HEADERS =	\
   14.10 +	SDL_image.h
   14.11 +
   14.12 +libSDL_image_la_SOURCES =		\
   14.13 +	IMG.c			\
   14.14 +	IMG_bmp.c		\
   14.15 +	IMG_gif.c		\
   14.16 +	IMG_jpg.c		\
   14.17 +	IMG_pcx.c		\
   14.18 +	IMG_png.c		\
   14.19 +	IMG_ppm.c		\
   14.20 +	IMG_tga.c		\
   14.21 +	IMG_tif.c
   14.22 +
   14.23 +EXTRA_DIST =			\
   14.24 +	CHANGES			\
   14.25 +	VisualC.zip		\
   14.26 +	MPWmake.sea.hqx		\
   14.27 +	IMG_xxx.c		\
   14.28 +	autogen.sh
   14.29 +
   14.30 +libSDL_image_la_LDFLAGS = 		\
   14.31 +        -release $(LT_RELEASE)	\
   14.32 +	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
   14.33 +libSDL_image_la_LIBADD = @IMG_LIBS@
   14.34 +
   14.35 +bin_PROGRAMS = showimage
   14.36 +
   14.37 +showimage_LDADD = libSDL_image.la
   14.38 +
   14.39 +# Rule to build tar-gzipped distribution package
   14.40 +$(PACKAGE)-$(VERSION).tar.gz: dist
   14.41 +
   14.42 +# Rule to build RPM distribution package
   14.43 +rpm: $(PACKAGE)-$(VERSION).tar.gz
   14.44 +	cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES
   14.45 +	rpm -ba $(PACKAGE).spec
   14.46 +
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/Makefile.in	Thu Aug 10 06:05:39 2000 +0000
    15.3 @@ -0,0 +1,460 @@
    15.4 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
    15.5 +
    15.6 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
    15.7 +# This Makefile.in is free software; the Free Software Foundation
    15.8 +# gives unlimited permission to copy and/or distribute it,
    15.9 +# with or without modifications, as long as this notice is preserved.
   15.10 +
   15.11 +# This program is distributed in the hope that it will be useful,
   15.12 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
   15.13 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   15.14 +# PARTICULAR PURPOSE.
   15.15 +
   15.16 +# Makefile.am for the SDL sample image loading library and viewer
   15.17 +
   15.18 +
   15.19 +SHELL = @SHELL@
   15.20 +
   15.21 +srcdir = @srcdir@
   15.22 +top_srcdir = @top_srcdir@
   15.23 +VPATH = @srcdir@
   15.24 +prefix = @prefix@
   15.25 +exec_prefix = @exec_prefix@
   15.26 +
   15.27 +bindir = @bindir@
   15.28 +sbindir = @sbindir@
   15.29 +libexecdir = @libexecdir@
   15.30 +datadir = @datadir@
   15.31 +sysconfdir = @sysconfdir@
   15.32 +sharedstatedir = @sharedstatedir@
   15.33 +localstatedir = @localstatedir@
   15.34 +libdir = @libdir@
   15.35 +infodir = @infodir@
   15.36 +mandir = @mandir@
   15.37 +includedir = @includedir@
   15.38 +oldincludedir = /usr/include
   15.39 +
   15.40 +DESTDIR =
   15.41 +
   15.42 +pkgdatadir = $(datadir)/@PACKAGE@
   15.43 +pkglibdir = $(libdir)/@PACKAGE@
   15.44 +pkgincludedir = $(includedir)/@PACKAGE@
   15.45 +
   15.46 +top_builddir = .
   15.47 +
   15.48 +ACLOCAL = @ACLOCAL@
   15.49 +AUTOCONF = @AUTOCONF@
   15.50 +AUTOMAKE = @AUTOMAKE@
   15.51 +AUTOHEADER = @AUTOHEADER@
   15.52 +
   15.53 +INSTALL = @INSTALL@
   15.54 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   15.55 +INSTALL_DATA = @INSTALL_DATA@
   15.56 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
   15.57 +transform = @program_transform_name@
   15.58 +
   15.59 +NORMAL_INSTALL = :
   15.60 +PRE_INSTALL = :
   15.61 +POST_INSTALL = :
   15.62 +NORMAL_UNINSTALL = :
   15.63 +PRE_UNINSTALL = :
   15.64 +POST_UNINSTALL = :
   15.65 +host_alias = @host_alias@
   15.66 +host_triplet = @host@
   15.67 +AS = @AS@
   15.68 +BINARY_AGE = @BINARY_AGE@
   15.69 +CC = @CC@
   15.70 +DLLTOOL = @DLLTOOL@
   15.71 +IMG_LIBS = @IMG_LIBS@
   15.72 +INTERFACE_AGE = @INTERFACE_AGE@
   15.73 +LD = @LD@
   15.74 +LIBTOOL = @LIBTOOL@
   15.75 +LN_S = @LN_S@
   15.76 +LT_AGE = @LT_AGE@
   15.77 +LT_CURRENT = @LT_CURRENT@
   15.78 +LT_RELEASE = @LT_RELEASE@
   15.79 +LT_REVISION = @LT_REVISION@
   15.80 +MAJOR_VERSION = @MAJOR_VERSION@
   15.81 +MAKEINFO = @MAKEINFO@
   15.82 +MICRO_VERSION = @MICRO_VERSION@
   15.83 +MINOR_VERSION = @MINOR_VERSION@
   15.84 +NM = @NM@
   15.85 +OBJDUMP = @OBJDUMP@
   15.86 +PACKAGE = @PACKAGE@
   15.87 +RANLIB = @RANLIB@
   15.88 +SDL_CFLAGS = @SDL_CFLAGS@
   15.89 +SDL_CONFIG = @SDL_CONFIG@
   15.90 +SDL_LIBS = @SDL_LIBS@
   15.91 +VERSION = @VERSION@
   15.92 +
   15.93 +lib_LTLIBRARIES = libSDL_image.la
   15.94 +
   15.95 +libSDL_imageincludedir = $(includedir)/SDL
   15.96 +libSDL_imageinclude_HEADERS =  	SDL_image.h
   15.97 +
   15.98 +
   15.99 +libSDL_image_la_SOURCES =  	IMG.c				IMG_bmp.c			IMG_gif.c			IMG_jpg.c			IMG_pcx.c			IMG_png.c			IMG_ppm.c			IMG_tga.c			IMG_tif.c
  15.100 +
  15.101 +
  15.102 +EXTRA_DIST =  	CHANGES				VisualC.zip			MPWmake.sea.hqx			IMG_xxx.c			autogen.sh
  15.103 +
  15.104 +
  15.105 +libSDL_image_la_LDFLAGS =          -release $(LT_RELEASE)		-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
  15.106 +
  15.107 +libSDL_image_la_LIBADD = @IMG_LIBS@
  15.108 +
  15.109 +bin_PROGRAMS = showimage
  15.110 +
  15.111 +showimage_LDADD = libSDL_image.la
  15.112 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  15.113 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
  15.114 +CONFIG_CLEAN_FILES =  SDL_image.spec
  15.115 +LTLIBRARIES =  $(lib_LTLIBRARIES)
  15.116 +
  15.117 +
  15.118 +DEFS = @DEFS@ -I. -I$(srcdir) 
  15.119 +CPPFLAGS = @CPPFLAGS@
  15.120 +LDFLAGS = @LDFLAGS@
  15.121 +LIBS = @LIBS@
  15.122 +libSDL_image_la_DEPENDENCIES = 
  15.123 +libSDL_image_la_OBJECTS =  IMG.lo IMG_bmp.lo IMG_gif.lo IMG_jpg.lo \
  15.124 +IMG_pcx.lo IMG_png.lo IMG_ppm.lo IMG_tga.lo IMG_tif.lo
  15.125 +PROGRAMS =  $(bin_PROGRAMS)
  15.126 +
  15.127 +showimage_SOURCES = showimage.c
  15.128 +showimage_OBJECTS =  showimage.o
  15.129 +showimage_DEPENDENCIES =  libSDL_image.la
  15.130 +showimage_LDFLAGS = 
  15.131 +CFLAGS = @CFLAGS@
  15.132 +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  15.133 +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  15.134 +CCLD = $(CC)
  15.135 +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  15.136 +HEADERS =  $(libSDL_imageinclude_HEADERS)
  15.137 +
  15.138 +DIST_COMMON =  README COPYING Makefile.am Makefile.in SDL_image.spec.in \
  15.139 +acinclude.m4 aclocal.m4 config.guess config.sub configure configure.in \
  15.140 +install-sh ltconfig ltmain.sh missing mkinstalldirs
  15.141 +
  15.142 +
  15.143 +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  15.144 +
  15.145 +TAR = gtar
  15.146 +GZIP_ENV = --best
  15.147 +SOURCES = $(libSDL_image_la_SOURCES) showimage.c
  15.148 +OBJECTS = $(libSDL_image_la_OBJECTS) showimage.o
  15.149 +
  15.150 +all: all-redirect
  15.151 +.SUFFIXES:
  15.152 +.SUFFIXES: .S .c .lo .o .s
  15.153 +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  15.154 +	cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
  15.155 +
  15.156 +Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  15.157 +	cd $(top_builddir) \
  15.158 +	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  15.159 +
  15.160 +$(ACLOCAL_M4):  configure.in  acinclude.m4
  15.161 +	cd $(srcdir) && $(ACLOCAL)
  15.162 +
  15.163 +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  15.164 +	$(SHELL) ./config.status --recheck
  15.165 +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
  15.166 +	cd $(srcdir) && $(AUTOCONF)
  15.167 +SDL_image.spec: $(top_builddir)/config.status SDL_image.spec.in
  15.168 +	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  15.169 +
  15.170 +mostlyclean-libLTLIBRARIES:
  15.171 +
  15.172 +clean-libLTLIBRARIES:
  15.173 +	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
  15.174 +
  15.175 +distclean-libLTLIBRARIES:
  15.176 +
  15.177 +maintainer-clean-libLTLIBRARIES:
  15.178 +
  15.179 +install-libLTLIBRARIES: $(lib_LTLIBRARIES)
  15.180 +	@$(NORMAL_INSTALL)
  15.181 +	$(mkinstalldirs) $(DESTDIR)$(libdir)
  15.182 +	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
  15.183 +	  if test -f $$p; then \
  15.184 +	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
  15.185 +	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
  15.186 +	  else :; fi; \
  15.187 +	done
  15.188 +
  15.189 +uninstall-libLTLIBRARIES:
  15.190 +	@$(NORMAL_UNINSTALL)
  15.191 +	list='$(lib_LTLIBRARIES)'; for p in $$list; do \
  15.192 +	  $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
  15.193 +	done
  15.194 +
  15.195 +.c.o:
  15.196 +	$(COMPILE) -c $<
  15.197 +
  15.198 +.s.o:
  15.199 +	$(COMPILE) -c $<
  15.200 +
  15.201 +.S.o:
  15.202 +	$(COMPILE) -c $<
  15.203 +
  15.204 +mostlyclean-compile:
  15.205 +	-rm -f *.o core *.core
  15.206 +
  15.207 +clean-compile:
  15.208 +
  15.209 +distclean-compile:
  15.210 +	-rm -f *.tab.c
  15.211 +
  15.212 +maintainer-clean-compile:
  15.213 +
  15.214 +.c.lo:
  15.215 +	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
  15.216 +
  15.217 +.s.lo:
  15.218 +	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
  15.219 +
  15.220 +.S.lo:
  15.221 +	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
  15.222 +
  15.223 +mostlyclean-libtool:
  15.224 +	-rm -f *.lo
  15.225 +
  15.226 +clean-libtool:
  15.227 +	-rm -rf .libs _libs
  15.228 +
  15.229 +distclean-libtool:
  15.230 +
  15.231 +maintainer-clean-libtool:
  15.232 +
  15.233 +libSDL_image.la: $(libSDL_image_la_OBJECTS) $(libSDL_image_la_DEPENDENCIES)
  15.234 +	$(LINK) -rpath $(libdir) $(libSDL_image_la_LDFLAGS) $(libSDL_image_la_OBJECTS) $(libSDL_image_la_LIBADD) $(LIBS)
  15.235 +
  15.236 +mostlyclean-binPROGRAMS:
  15.237 +
  15.238 +clean-binPROGRAMS:
  15.239 +	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
  15.240 +
  15.241 +distclean-binPROGRAMS:
  15.242 +
  15.243 +maintainer-clean-binPROGRAMS:
  15.244 +
  15.245 +install-binPROGRAMS: $(bin_PROGRAMS)
  15.246 +	@$(NORMAL_INSTALL)
  15.247 +	$(mkinstalldirs) $(DESTDIR)$(bindir)
  15.248 +	@list='$(bin_PROGRAMS)'; for p in $$list; do \
  15.249 +	  if test -f $$p; then \
  15.250 +	    echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
  15.251 +	    $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
  15.252 +	  else :; fi; \
  15.253 +	done
  15.254 +
  15.255 +uninstall-binPROGRAMS:
  15.256 +	@$(NORMAL_UNINSTALL)
  15.257 +	list='$(bin_PROGRAMS)'; for p in $$list; do \
  15.258 +	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
  15.259 +	done
  15.260 +
  15.261 +showimage: $(showimage_OBJECTS) $(showimage_DEPENDENCIES)
  15.262 +	@rm -f showimage
  15.263 +	$(LINK) $(showimage_LDFLAGS) $(showimage_OBJECTS) $(showimage_LDADD) $(LIBS)
  15.264 +
  15.265 +install-libSDL_imageincludeHEADERS: $(libSDL_imageinclude_HEADERS)
  15.266 +	@$(NORMAL_INSTALL)
  15.267 +	$(mkinstalldirs) $(DESTDIR)$(libSDL_imageincludedir)
  15.268 +	@list='$(libSDL_imageinclude_HEADERS)'; for p in $$list; do \
  15.269 +	  if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
  15.270 +	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libSDL_imageincludedir)/$$p"; \
  15.271 +	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libSDL_imageincludedir)/$$p; \
  15.272 +	done
  15.273 +
  15.274 +uninstall-libSDL_imageincludeHEADERS:
  15.275 +	@$(NORMAL_UNINSTALL)
  15.276 +	list='$(libSDL_imageinclude_HEADERS)'; for p in $$list; do \
  15.277 +	  rm -f $(DESTDIR)$(libSDL_imageincludedir)/$$p; \
  15.278 +	done
  15.279 +
  15.280 +tags: TAGS
  15.281 +
  15.282 +ID: $(HEADERS) $(SOURCES) $(LISP)
  15.283 +	list='$(SOURCES) $(HEADERS)'; \
  15.284 +	unique=`for i in $$list; do echo $$i; done | \
  15.285 +	  awk '    { files[$$0] = 1; } \
  15.286 +	       END { for (i in files) print i; }'`; \
  15.287 +	here=`pwd` && cd $(srcdir) \
  15.288 +	  && mkid -f$$here/ID $$unique $(LISP)
  15.289 +
  15.290 +TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  15.291 +	tags=; \
  15.292 +	here=`pwd`; \
  15.293 +	list='$(SOURCES) $(HEADERS)'; \
  15.294 +	unique=`for i in $$list; do echo $$i; done | \
  15.295 +	  awk '    { files[$$0] = 1; } \
  15.296 +	       END { for (i in files) print i; }'`; \
  15.297 +	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
  15.298 +	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
  15.299 +
  15.300 +mostlyclean-tags:
  15.301 +
  15.302 +clean-tags:
  15.303 +
  15.304 +distclean-tags:
  15.305 +	-rm -f TAGS ID
  15.306 +
  15.307 +maintainer-clean-tags:
  15.308 +
  15.309 +distdir = $(PACKAGE)-$(VERSION)
  15.310 +top_distdir = $(distdir)
  15.311 +
  15.312 +# This target untars the dist file and tries a VPATH configuration.  Then
  15.313 +# it guarantees that the distribution is self-contained by making another
  15.314 +# tarfile.
  15.315 +distcheck: dist
  15.316 +	-rm -rf $(distdir)
  15.317 +	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
  15.318 +	mkdir $(distdir)/=build
  15.319 +	mkdir $(distdir)/=inst
  15.320 +	dc_install_base=`cd $(distdir)/=inst && pwd`; \
  15.321 +	cd $(distdir)/=build \
  15.322 +	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
  15.323 +	  && $(MAKE) $(AM_MAKEFLAGS) \
  15.324 +	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
  15.325 +	  && $(MAKE) $(AM_MAKEFLAGS) check \
  15.326 +	  && $(MAKE) $(AM_MAKEFLAGS) install \
  15.327 +	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
  15.328 +	  && $(MAKE) $(AM_MAKEFLAGS) dist
  15.329 +	-rm -rf $(distdir)
  15.330 +	@banner="$(distdir).tar.gz is ready for distribution"; \
  15.331 +	dashes=`echo "$$banner" | sed s/./=/g`; \
  15.332 +	echo "$$dashes"; \
  15.333 +	echo "$$banner"; \
  15.334 +	echo "$$dashes"
  15.335 +dist: distdir
  15.336 +	-chmod -R a+r $(distdir)
  15.337 +	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
  15.338 +	-rm -rf $(distdir)
  15.339 +dist-all: distdir
  15.340 +	-chmod -R a+r $(distdir)
  15.341 +	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
  15.342 +	-rm -rf $(distdir)
  15.343 +distdir: $(DISTFILES)
  15.344 +	-rm -rf $(distdir)
  15.345 +	mkdir $(distdir)
  15.346 +	-chmod 777 $(distdir)
  15.347 +	@for file in $(DISTFILES); do \
  15.348 +	  d=$(srcdir); \
  15.349 +	  if test -d $$d/$$file; then \
  15.350 +	    cp -pr $$/$$file $(distdir)/$$file; \
  15.351 +	  else \
  15.352 +	    test -f $(distdir)/$$file \
  15.353 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  15.354 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  15.355 +	  fi; \
  15.356 +	done
  15.357 +IMG_bmp.lo IMG_bmp.o : IMG_bmp.c SDL_image.h
  15.358 +IMG_gif.lo IMG_gif.o : IMG_gif.c SDL_image.h
  15.359 +IMG_jpg.lo IMG_jpg.o : IMG_jpg.c SDL_image.h
  15.360 +IMG.lo IMG.o : IMG.c SDL_image.h
  15.361 +IMG_pcx.lo IMG_pcx.o : IMG_pcx.c SDL_image.h
  15.362 +IMG_png.lo IMG_png.o : IMG_png.c SDL_image.h
  15.363 +IMG_ppm.lo IMG_ppm.o : IMG_ppm.c SDL_image.h
  15.364 +IMG_tga.lo IMG_tga.o : IMG_tga.c SDL_image.h
  15.365 +IMG_tif.lo IMG_tif.o : IMG_tif.c SDL_image.h
  15.366 +showimage.o: showimage.c SDL_image.h
  15.367 +
  15.368 +info-am:
  15.369 +info: info-am
  15.370 +dvi-am:
  15.371 +dvi: dvi-am
  15.372 +check-am: all-am
  15.373 +check: check-am
  15.374 +installcheck-am:
  15.375 +installcheck: installcheck-am
  15.376 +install-exec-am: install-libLTLIBRARIES install-binPROGRAMS
  15.377 +install-exec: install-exec-am
  15.378 +
  15.379 +install-data-am: install-libSDL_imageincludeHEADERS
  15.380 +install-data: install-data-am
  15.381 +
  15.382 +install-am: all-am
  15.383 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  15.384 +install: install-am
  15.385 +uninstall-am: uninstall-libLTLIBRARIES uninstall-binPROGRAMS \
  15.386 +		uninstall-libSDL_imageincludeHEADERS
  15.387 +uninstall: uninstall-am
  15.388 +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
  15.389 +all-redirect: all-am
  15.390 +install-strip:
  15.391 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  15.392 +installdirs:
  15.393 +	$(mkinstalldirs)  $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \
  15.394 +		$(DESTDIR)$(libSDL_imageincludedir)
  15.395 +
  15.396 +
  15.397 +mostlyclean-generic:
  15.398 +
  15.399 +clean-generic:
  15.400 +
  15.401 +distclean-generic:
  15.402 +	-rm -f Makefile $(CONFIG_CLEAN_FILES)
  15.403 +	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  15.404 +
  15.405 +maintainer-clean-generic:
  15.406 +mostlyclean-am:  mostlyclean-libLTLIBRARIES mostlyclean-compile \
  15.407 +		mostlyclean-libtool mostlyclean-binPROGRAMS \
  15.408 +		mostlyclean-tags mostlyclean-generic
  15.409 +
  15.410 +mostlyclean: mostlyclean-am
  15.411 +
  15.412 +clean-am:  clean-libLTLIBRARIES clean-compile clean-libtool \
  15.413 +		clean-binPROGRAMS clean-tags clean-generic \
  15.414 +		mostlyclean-am
  15.415 +
  15.416 +clean: clean-am
  15.417 +
  15.418 +distclean-am:  distclean-libLTLIBRARIES distclean-compile \
  15.419 +		distclean-libtool distclean-binPROGRAMS distclean-tags \
  15.420 +		distclean-generic clean-am
  15.421 +	-rm -f libtool
  15.422 +
  15.423 +distclean: distclean-am
  15.424 +	-rm -f config.status
  15.425 +
  15.426 +maintainer-clean-am:  maintainer-clean-libLTLIBRARIES \
  15.427 +		maintainer-clean-compile maintainer-clean-libtool \
  15.428 +		maintainer-clean-binPROGRAMS maintainer-clean-tags \
  15.429 +		maintainer-clean-generic distclean-am
  15.430 +	@echo "This command is intended for maintainers to use;"
  15.431 +	@echo "it deletes files that may require special tools to rebuild."
  15.432 +
  15.433 +maintainer-clean: maintainer-clean-am
  15.434 +	-rm -f config.status
  15.435 +
  15.436 +.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
  15.437 +clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
  15.438 +uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
  15.439 +distclean-compile clean-compile maintainer-clean-compile \
  15.440 +mostlyclean-libtool distclean-libtool clean-libtool \
  15.441 +maintainer-clean-libtool mostlyclean-binPROGRAMS distclean-binPROGRAMS \
  15.442 +clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
  15.443 +install-binPROGRAMS uninstall-libSDL_imageincludeHEADERS \
  15.444 +install-libSDL_imageincludeHEADERS tags mostlyclean-tags distclean-tags \
  15.445 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  15.446 +check-am installcheck-am installcheck install-exec-am install-exec \
  15.447 +install-data-am install-data install-am install uninstall-am uninstall \
  15.448 +all-redirect all-am all installdirs mostlyclean-generic \
  15.449 +distclean-generic clean-generic maintainer-clean-generic clean \
  15.450 +mostlyclean distclean maintainer-clean
  15.451 +
  15.452 +
  15.453 +# Rule to build tar-gzipped distribution package
  15.454 +$(PACKAGE)-$(VERSION).tar.gz: dist
  15.455 +
  15.456 +# Rule to build RPM distribution package
  15.457 +rpm: $(PACKAGE)-$(VERSION).tar.gz
  15.458 +	cp $(PACKAGE)-$(VERSION).tar.gz /usr/src/redhat/SOURCES
  15.459 +	rpm -ba $(PACKAGE).spec
  15.460 +
  15.461 +# Tell versions [3.59,3.63) of GNU make to not export all variables.
  15.462 +# Otherwise a system limit (for SysV at least) may be exceeded.
  15.463 +.NOEXPORT:
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/README	Thu Aug 10 06:05:39 2000 +0000
    16.3 @@ -0,0 +1,31 @@
    16.4 +
    16.5 +SDL_image 1.0
    16.6 +
    16.7 +The latest version of this library is available from:
    16.8 +http://www.devolution.com/~slouken/SDL/projects/SDL_image/
    16.9 +
   16.10 +This is a simple library to load images of various formats as SDL surfaces.
   16.11 +This library supports BMP, PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.
   16.12 +
   16.13 +API:
   16.14 +#include "SDL_image.h"
   16.15 +
   16.16 +	SDL_Surface *IMG_Load(const char *file);
   16.17 +or
   16.18 +	SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
   16.19 +or
   16.20 +	SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc, char *type);
   16.21 +
   16.22 +where type is a string specifying the format (i.e. "PNG" or "pcx").
   16.23 +Note that IMG_Load_RW cannot load TGA images.
   16.24 +
   16.25 +An example program 'showimage' is included, with source in showimage.c
   16.26 +
   16.27 +JPEG support requires the JPEG library: http://www.ijg.org/
   16.28 +PNG support requires the PNG library: http://www.cdrom.com/pub/png/
   16.29 +    and the Zlib library: http://www.cdrom.com/pub/infozip/zlib/
   16.30 +TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/
   16.31 +
   16.32 +This library is under the GNU Library General Public License, see the file
   16.33 +"COPYING" for details.  Certain image loaders may be under a different
   16.34 +license, see the individual image loader source files for details.
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/SDL_image.h	Thu Aug 10 06:05:39 2000 +0000
    17.3 @@ -0,0 +1,91 @@
    17.4 +/*
    17.5 +    IMGLIB:  An example image loading library for use with SDL
    17.6 +    Copyright (C) 1999  Sam Lantinga
    17.7 +
    17.8 +    This program is free software; you can redistribute it and/or modify
    17.9 +    it under the terms of the GNU General Public License as published by
   17.10 +    the Free Software Foundation; either version 2 of the License, or
   17.11 +    (at your option) any later version.
   17.12 +
   17.13 +    This program is distributed in the hope that it will be useful,
   17.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
   17.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17.16 +    GNU General Public License for more details.
   17.17 +
   17.18 +    You should have received a copy of the GNU General Public License
   17.19 +    along with this program; if not, write to the Free Software
   17.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   17.21 +
   17.22 +    Sam Lantinga
   17.23 +    5635-34 Springhouse Dr.
   17.24 +    Pleasanton, CA 94588 (USA)
   17.25 +    slouken@devolution.com
   17.26 +*/
   17.27 +
   17.28 +/* A simple library to load images of various formats as SDL surfaces */
   17.29 +
   17.30 +#ifndef _IMG_h
   17.31 +#define _IMG_h
   17.32 +
   17.33 +#include "SDL.h"
   17.34 +#include "begin_code.h"
   17.35 +
   17.36 +/* Set up for C function definitions, even when using C++ */
   17.37 +#ifdef __cplusplus
   17.38 +extern "C" {
   17.39 +#endif
   17.40 +
   17.41 +/* Load an image from an SDL data source.
   17.42 +   The 'type' may be one of: "BMP", "GIF", "PNG", etc.
   17.43 +
   17.44 +   If the image format supports a transparent pixel, SDL will set the
   17.45 +   colorkey for the surface.  You can enable RLE acceleration on the
   17.46 +   surface afterwards by calling:
   17.47 +	SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
   17.48 + */
   17.49 +extern DECLSPEC SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc,
   17.50 +					      char *type);
   17.51 +/* Convenience functions */
   17.52 +extern DECLSPEC SDL_Surface *IMG_Load(const char *file);
   17.53 +extern DECLSPEC SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
   17.54 +
   17.55 +/* Invert the alpha of a surface for use with OpenGL
   17.56 +   If you want to use a surface loaded with this library as an OpenGL texture,
   17.57 +   set invart_alpha to 1.  If you want to use it with SDL alpha blit routines,
   17.58 +   set it to 0.
   17.59 +   This function returns the old alpha inversion value.
   17.60 +
   17.61 +   Currently this is is only used by the PNG and TGA loaders.
   17.62 + */
   17.63 +extern DECLSPEC int IMG_InvertAlpha(int on);
   17.64 +
   17.65 +/* Functions to detect a file type, given a seekable source */
   17.66 +extern DECLSPEC int IMG_isBMP(SDL_RWops *src);
   17.67 +extern DECLSPEC int IMG_isPPM(SDL_RWops *src);
   17.68 +extern DECLSPEC int IMG_isPCX(SDL_RWops *src);
   17.69 +extern DECLSPEC int IMG_isGIF(SDL_RWops *src);
   17.70 +extern DECLSPEC int IMG_isJPG(SDL_RWops *src);
   17.71 +extern DECLSPEC int IMG_isTIF(SDL_RWops *src);
   17.72 +extern DECLSPEC int IMG_isPNG(SDL_RWops *src);
   17.73 +
   17.74 +/* Individual loading functions */
   17.75 +extern DECLSPEC SDL_Surface *IMG_LoadBMP_RW(SDL_RWops *src);
   17.76 +extern DECLSPEC SDL_Surface *IMG_LoadPPM_RW(SDL_RWops *src);
   17.77 +extern DECLSPEC SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src);
   17.78 +extern DECLSPEC SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src);
   17.79 +extern DECLSPEC SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src);
   17.80 +extern DECLSPEC SDL_Surface *IMG_LoadTIF_RW(SDL_RWops *src);
   17.81 +extern DECLSPEC SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src);
   17.82 +extern DECLSPEC SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src);
   17.83 +
   17.84 +/* We'll use SDL for reporting errors */
   17.85 +#define IMG_SetError	SDL_SetError
   17.86 +#define IMG_GetError	SDL_GetError
   17.87 +
   17.88 +/* Ends C function definitions when using C++ */
   17.89 +#ifdef __cplusplus
   17.90 +};
   17.91 +#endif
   17.92 +#include "close_code.h"
   17.93 +
   17.94 +#endif /* _IMG_h */
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/SDL_image.spec.in	Thu Aug 10 06:05:39 2000 +0000
    18.3 @@ -0,0 +1,68 @@
    18.4 +%define name @PACKAGE@
    18.5 +%define version @VERSION@
    18.6 +%define release 1
    18.7 +
    18.8 +Summary: Simple DirectMedia Layer - Sample Image Loading Library
    18.9 +Name: %{name}
   18.10 +Version: %{version}
   18.11 +Release: %{release}
   18.12 +Source0: %{name}-%{version}.tar.gz
   18.13 +Copyright: LGPL
   18.14 +Group: System Environment/Libraries
   18.15 +BuildRoot: /var/tmp/%{name}-buildroot
   18.16 +Prefix: %{_prefix}
   18.17 +Packager: Hakan Tandogan <hakan@iconsult.com>
   18.18 +BuildRequires: SDL-devel
   18.19 +BuildRequires: libjpeg-devel
   18.20 +BuildRequires: libpng-devel
   18.21 +#BuildRequires: libtiff-devel
   18.22 +
   18.23 +%description
   18.24 +This is a simple library to load images of various formats as SDL surfaces.
   18.25 +This library supports BMP, PPM, PCX, GIF, JPEG, PNG, and TIFF formats.
   18.26 +
   18.27 +%package devel
   18.28 +Summary: Libraries, includes and more to develop SDL applications.
   18.29 +Group: Development/Libraries
   18.30 +Requires: %{name}
   18.31 +Requires: SDL-devel
   18.32 +
   18.33 +%description devel
   18.34 +This is a simple library to load images of various formats as SDL surfaces.
   18.35 +This library supports BMP, PPM, PCX, GIF, JPEG, PNG, and TIFF formats.
   18.36 +
   18.37 +%prep
   18.38 +rm -rf ${RPM_BUILD_ROOT}
   18.39 +
   18.40 +%setup 
   18.41 +
   18.42 +%build
   18.43 +CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
   18.44 +make
   18.45 +
   18.46 +%install
   18.47 +rm -rf $RPM_BUILD_ROOT
   18.48 +make install prefix=$RPM_BUILD_ROOT/%{prefix}
   18.49 +
   18.50 +%clean
   18.51 +rm -rf $RPM_BUILD_ROOT
   18.52 +
   18.53 +%files
   18.54 +%defattr(-,root,root)
   18.55 +%doc README CHANGES COPYING
   18.56 +%{prefix}/bin/showimage
   18.57 +%{prefix}/lib/lib*.so.*
   18.58 +%{prefix}/lib/lib*.so
   18.59 +
   18.60 +%files devel
   18.61 +%defattr(-,root,root)
   18.62 +%{prefix}/lib/*a
   18.63 +%{prefix}/include/SDL/
   18.64 +
   18.65 +%changelog
   18.66 +* Wed Jan 19 2000 Sam Lantinga 
   18.67 +- converted to get package information from configure
   18.68 +* Tue Jan 18 2000 Hakan Tandogan <hakan@iconsult.com>
   18.69 +- initial spec file
   18.70 +
   18.71 +
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/acinclude.m4	Thu Aug 10 06:05:39 2000 +0000
    19.3 @@ -0,0 +1,627 @@
    19.4 +# Configure paths for SDL
    19.5 +# Sam Lantinga 9/21/99
    19.6 +# stolen from Manish Singh
    19.7 +# stolen back from Frank Belew
    19.8 +# stolen from Manish Singh
    19.9 +# Shamelessly stolen from Owen Taylor
   19.10 +
   19.11 +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
   19.12 +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
   19.13 +dnl
   19.14 +AC_DEFUN(AM_PATH_SDL,
   19.15 +[dnl 
   19.16 +dnl Get the cflags and libraries from the sdl-config script
   19.17 +dnl
   19.18 +AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
   19.19 +            sdl_prefix="$withval", sdl_prefix="")
   19.20 +AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
   19.21 +            sdl_exec_prefix="$withval", sdl_exec_prefix="")
   19.22 +AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
   19.23 +		    , enable_sdltest=yes)
   19.24 +
   19.25 +  if test x$sdl_exec_prefix != x ; then
   19.26 +     sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
   19.27 +     if test x${SDL_CONFIG+set} != xset ; then
   19.28 +        SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
   19.29 +     fi
   19.30 +  fi
   19.31 +  if test x$sdl_prefix != x ; then
   19.32 +     sdl_args="$sdl_args --prefix=$sdl_prefix"
   19.33 +     if test x${SDL_CONFIG+set} != xset ; then
   19.34 +        SDL_CONFIG=$sdl_prefix/bin/sdl-config
   19.35 +     fi
   19.36 +  fi
   19.37 +
   19.38 +  AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
   19.39 +  min_sdl_version=ifelse([$1], ,0.11.0,$1)
   19.40 +  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
   19.41 +  no_sdl=""
   19.42 +  if test "$SDL_CONFIG" = "no" ; then
   19.43 +    no_sdl=yes
   19.44 +  else
   19.45 +    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
   19.46 +    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
   19.47 +
   19.48 +    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
   19.49 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
   19.50 +    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
   19.51 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
   19.52 +    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
   19.53 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
   19.54 +    if test "x$enable_sdltest" = "xyes" ; then
   19.55 +      ac_save_CFLAGS="$CFLAGS"
   19.56 +      ac_save_LIBS="$LIBS"
   19.57 +      CFLAGS="$CFLAGS $SDL_CFLAGS"
   19.58 +      LIBS="$LIBS $SDL_LIBS"
   19.59 +dnl
   19.60 +dnl Now check if the installed SDL is sufficiently new. (Also sanity
   19.61 +dnl checks the results of sdl-config to some extent
   19.62 +dnl
   19.63 +      rm -f conf.sdltest
   19.64 +      AC_TRY_RUN([
   19.65 +#include <stdio.h>
   19.66 +#include <stdlib.h>
   19.67 +#include <string.h>
   19.68 +#include <SDL/SDL.h>
   19.69 +
   19.70 +char*
   19.71 +my_strdup (char *str)
   19.72 +{
   19.73 +  char *new_str;
   19.74 +  
   19.75 +  if (str)
   19.76 +    {
   19.77 +      new_str = malloc ((strlen (str) + 1) * sizeof(char));
   19.78 +      strcpy (new_str, str);
   19.79 +    }
   19.80 +  else
   19.81 +    new_str = NULL;
   19.82 +  
   19.83 +  return new_str;
   19.84 +}
   19.85 +
   19.86 +int main ()
   19.87 +{
   19.88 +  int major, minor, micro;
   19.89 +  char *tmp_version;
   19.90 +
   19.91 +  system ("touch conf.sdltest");
   19.92 +
   19.93 +  /* HP/UX 9 (%@#!) writes to sscanf strings */
   19.94 +  tmp_version = my_strdup("$min_sdl_version");
   19.95 +  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
   19.96 +     printf("%s, bad version string\n", "$min_sdl_version");
   19.97 +     exit(1);
   19.98 +   }
   19.99 +
  19.100 +   if (($sdl_major_version > major) ||
  19.101 +      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
  19.102 +      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
  19.103 +    {
  19.104 +      return 0;
  19.105 +    }
  19.106 +  else
  19.107 +    {
  19.108 +      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
  19.109 +      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
  19.110 +      printf("*** best to upgrade to the required version.\n");
  19.111 +      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
  19.112 +      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
  19.113 +      printf("*** config.cache before re-running configure\n");
  19.114 +      return 1;
  19.115 +    }
  19.116 +}
  19.117 +
  19.118 +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  19.119 +       CFLAGS="$ac_save_CFLAGS"
  19.120 +       LIBS="$ac_save_LIBS"
  19.121 +     fi
  19.122 +  fi
  19.123 +  if test "x$no_sdl" = x ; then
  19.124 +     AC_MSG_RESULT(yes)
  19.125 +     ifelse([$2], , :, [$2])     
  19.126 +  else
  19.127 +     AC_MSG_RESULT(no)
  19.128 +     if test "$SDL_CONFIG" = "no" ; then
  19.129 +       echo "*** The sdl-config script installed by SDL could not be found"
  19.130 +       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
  19.131 +       echo "*** your path, or set the SDL_CONFIG environment variable to the"
  19.132 +       echo "*** full path to sdl-config."
  19.133 +     else
  19.134 +       if test -f conf.sdltest ; then
  19.135 +        :
  19.136 +       else
  19.137 +          echo "*** Could not run SDL test program, checking why..."
  19.138 +          CFLAGS="$CFLAGS $SDL_CFLAGS"
  19.139 +          LIBS="$LIBS $SDL_LIBS"
  19.140 +          AC_TRY_LINK([
  19.141 +#include <stdio.h>
  19.142 +#include <SDL/SDL.h>
  19.143 +],      [ return 0; ],
  19.144 +        [ echo "*** The test program compiled, but did not run. This usually means"
  19.145 +          echo "*** that the run-time linker is not finding SDL or finding the wrong"
  19.146 +          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
  19.147 +          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  19.148 +          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  19.149 +          echo "*** is required on your system"
  19.150 +	  echo "***"
  19.151 +          echo "*** If you have an old version installed, it is best to remove it, although"
  19.152 +          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
  19.153 +        [ echo "*** The test program failed to compile or link. See the file config.log for the"
  19.154 +          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
  19.155 +          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
  19.156 +          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
  19.157 +          CFLAGS="$ac_save_CFLAGS"
  19.158 +          LIBS="$ac_save_LIBS"
  19.159 +       fi
  19.160 +     fi
  19.161 +     SDL_CFLAGS=""
  19.162 +     SDL_LIBS=""
  19.163 +     ifelse([$3], , :, [$3])
  19.164 +  fi
  19.165 +  AC_SUBST(SDL_CFLAGS)
  19.166 +  AC_SUBST(SDL_LIBS)
  19.167 +  rm -f conf.sdltest
  19.168 +])
  19.169 +## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
  19.170 +## Copyright (C) 1996-1999 Free Software Foundation, Inc.
  19.171 +## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  19.172 +##
  19.173 +## This program is free software; you can redistribute it and/or modify
  19.174 +## it under the terms of the GNU General Public License as published by
  19.175 +## the Free Software Foundation; either version 2 of the License, or
  19.176 +## (at your option) any later version.
  19.177 +##
  19.178 +## This program is distributed in the hope that it will be useful, but
  19.179 +## WITHOUT ANY WARRANTY; without even the implied warranty of
  19.180 +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  19.181 +## General Public License for more details.
  19.182 +##
  19.183 +## You should have received a copy of the GNU General Public License
  19.184 +## along with this program; if not, write to the Free Software
  19.185 +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.186 +##
  19.187 +## As a special exception to the GNU General Public License, if you
  19.188 +## distribute this file as part of a program that contains a
  19.189 +## configuration script generated by Autoconf, you may include it under
  19.190 +## the same distribution terms that you use for the rest of that program.
  19.191 +
  19.192 +# serial 41 AC_PROG_LIBTOOL
  19.193 +AC_DEFUN(AC_PROG_LIBTOOL,
  19.194 +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  19.195 +
  19.196 +# Save cache, so that ltconfig can load it
  19.197 +AC_CACHE_SAVE
  19.198 +
  19.199 +# Actually configure libtool.  ac_aux_dir is where install-sh is found.
  19.200 +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
  19.201 +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
  19.202 +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
  19.203 +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
  19.204 +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
  19.205 +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
  19.206 +|| AC_MSG_ERROR([libtool configure failed])
  19.207 +
  19.208 +# Reload cache, that may have been modified by ltconfig
  19.209 +AC_CACHE_LOAD
  19.210 +
  19.211 +# This can be used to rebuild libtool when needed
  19.212 +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
  19.213 +
  19.214 +# Always use our own libtool.
  19.215 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  19.216 +AC_SUBST(LIBTOOL)dnl
  19.217 +
  19.218 +# Redirect the config.log output again, so that the ltconfig log is not
  19.219 +# clobbered by the next message.
  19.220 +exec 5>>./config.log
  19.221 +])
  19.222 +
  19.223 +AC_DEFUN(AC_LIBTOOL_SETUP,
  19.224 +[AC_PREREQ(2.13)dnl
  19.225 +AC_REQUIRE([AC_ENABLE_SHARED])dnl
  19.226 +AC_REQUIRE([AC_ENABLE_STATIC])dnl
  19.227 +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  19.228 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
  19.229 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  19.230 +AC_REQUIRE([AC_PROG_CC])dnl
  19.231 +AC_REQUIRE([AC_PROG_LD])dnl
  19.232 +AC_REQUIRE([AC_PROG_NM])dnl
  19.233 +AC_REQUIRE([AC_PROG_LN_S])dnl
  19.234 +dnl
  19.235 +
  19.236 +AC_CHECK_TOOL(RANLIB, ranlib, :)
  19.237 +
  19.238 +# Check for any special flags to pass to ltconfig.
  19.239 +libtool_flags="--cache-file=$cache_file"
  19.240 +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
  19.241 +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
  19.242 +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
  19.243 +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
  19.244 +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
  19.245 +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
  19.246 +[libtool_flags="$libtool_flags --enable-dlopen"])
  19.247 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  19.248 +[libtool_flags="$libtool_flags --enable-win32-dll"])
  19.249 +AC_ARG_ENABLE(libtool-lock,
  19.250 +  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
  19.251 +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
  19.252 +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
  19.253 +
  19.254 +AC_ARG_WITH(pic,
  19.255 +  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
  19.256 +     pic_mode="$withval", pic_mode=default)
  19.257 +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
  19.258 +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
  19.259 +
  19.260 +# Some flags need to be propagated to the compiler or linker for good
  19.261 +# libtool support.
  19.262 +case "$host" in
  19.263 +*-*-irix6*)
  19.264 +  # Find out which ABI we are using.
  19.265 +  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  19.266 +  if AC_TRY_EVAL(ac_compile); then
  19.267 +    case "`/usr/bin/file conftest.o`" in
  19.268 +    *32-bit*)
  19.269 +      LD="${LD-ld} -32"
  19.270 +      ;;
  19.271 +    *N32*)
  19.272 +      LD="${LD-ld} -n32"
  19.273 +      ;;
  19.274 +    *64-bit*)
  19.275 +      LD="${LD-ld} -64"
  19.276 +      ;;
  19.277 +    esac
  19.278 +  fi
  19.279 +  rm -rf conftest*
  19.280 +  ;;
  19.281 +
  19.282 +*-*-sco3.2v5*)
  19.283 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  19.284 +  SAVE_CFLAGS="$CFLAGS"
  19.285 +  CFLAGS="$CFLAGS -belf"
  19.286 +  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  19.287 +    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
  19.288 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  19.289 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  19.290 +    CFLAGS="$SAVE_CFLAGS"
  19.291 +  fi
  19.292 +  ;;
  19.293 +
  19.294 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  19.295 +[*-*-cygwin* | *-*-mingw*)
  19.296 +  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  19.297 +  AC_CHECK_TOOL(AS, as, false)
  19.298 +  AC_CHECK_TOOL(OBJDUMP, objdump, false)
  19.299 +
  19.300 +  # recent cygwin and mingw systems supply a stub DllMain which the user
  19.301 +  # can override, but on older systems we have to supply one
  19.302 +  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  19.303 +    [AC_TRY_LINK([DllMain (0, 0, 0);],
  19.304 +      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
  19.305 +      [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
  19.306 +
  19.307 +  case $host in
  19.308 +  *-*-cygwin*)
  19.309 +    # cygwin systems need to pass --dll to the linker, and not link
  19.310 +    # crt.o which will require a WinMain@16 definition.
  19.311 +    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  19.312 +  *-*-mingw*)
  19.313 +    # old mingw systems require "-dll" to link a DLL, while more recent ones
  19.314 +    # require "-mdll"
  19.315 +    SAVE_CFLAGS="$CFLAGS"
  19.316 +    CFLAGS="$CFLAGS -mdll"
  19.317 +    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  19.318 +      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  19.319 +    CFLAGS="$SAVE_CFLAGS" ;;
  19.320 +  esac
  19.321 +  ;;
  19.322 +  ])
  19.323 +esac
  19.324 +])
  19.325 +
  19.326 +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
  19.327 +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
  19.328 +
  19.329 +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
  19.330 +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
  19.331 +
  19.332 +# AC_ENABLE_SHARED - implement the --enable-shared flag
  19.333 +# Usage: AC_ENABLE_SHARED[(DEFAULT)]
  19.334 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  19.335 +#   `yes'.
  19.336 +AC_DEFUN(AC_ENABLE_SHARED, [dnl
  19.337 +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  19.338 +AC_ARG_ENABLE(shared,
  19.339 +changequote(<<, >>)dnl
  19.340 +<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  19.341 +changequote([, ])dnl
  19.342 +[p=${PACKAGE-default}
  19.343 +case "$enableval" in
  19.344 +yes) enable_shared=yes ;;
  19.345 +no) enable_shared=no ;;
  19.346 +*)
  19.347 +  enable_shared=no
  19.348 +  # Look at the argument we got.  We use all the common list separators.
  19.349 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  19.350 +  for pkg in $enableval; do
  19.351 +    if test "X$pkg" = "X$p"; then
  19.352 +      enable_shared=yes
  19.353 +    fi
  19.354 +  done
  19.355 +  IFS="$ac_save_ifs"
  19.356 +  ;;
  19.357 +esac],
  19.358 +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
  19.359 +])
  19.360 +
  19.361 +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
  19.362 +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  19.363 +AC_ENABLE_SHARED(no)])
  19.364 +
  19.365 +# AC_ENABLE_STATIC - implement the --enable-static flag
  19.366 +# Usage: AC_ENABLE_STATIC[(DEFAULT)]
  19.367 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  19.368 +#   `yes'.
  19.369 +AC_DEFUN(AC_ENABLE_STATIC, [dnl
  19.370 +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  19.371 +AC_ARG_ENABLE(static,
  19.372 +changequote(<<, >>)dnl
  19.373 +<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  19.374 +changequote([, ])dnl
  19.375 +[p=${PACKAGE-default}
  19.376 +case "$enableval" in
  19.377 +yes) enable_static=yes ;;
  19.378 +no) enable_static=no ;;
  19.379 +*)
  19.380 +  enable_static=no
  19.381 +  # Look at the argument we got.  We use all the common list separators.
  19.382 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  19.383 +  for pkg in $enableval; do
  19.384 +    if test "X$pkg" = "X$p"; then
  19.385 +      enable_static=yes
  19.386 +    fi
  19.387 +  done
  19.388 +  IFS="$ac_save_ifs"
  19.389 +  ;;
  19.390 +esac],
  19.391 +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
  19.392 +])
  19.393 +
  19.394 +# AC_DISABLE_STATIC - set the default static flag to --disable-static
  19.395 +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  19.396 +AC_ENABLE_STATIC(no)])
  19.397 +
  19.398 +
  19.399 +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
  19.400 +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
  19.401 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  19.402 +#   `yes'.
  19.403 +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
  19.404 +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  19.405 +AC_ARG_ENABLE(fast-install,
  19.406 +changequote(<<, >>)dnl
  19.407 +<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  19.408 +changequote([, ])dnl
  19.409 +[p=${PACKAGE-default}
  19.410 +case "$enableval" in
  19.411 +yes) enable_fast_install=yes ;;
  19.412 +no) enable_fast_install=no ;;
  19.413 +*)
  19.414 +  enable_fast_install=no
  19.415 +  # Look at the argument we got.  We use all the common list separators.
  19.416 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  19.417 +  for pkg in $enableval; do
  19.418 +    if test "X$pkg" = "X$p"; then
  19.419 +      enable_fast_install=yes
  19.420 +    fi
  19.421 +  done
  19.422 +  IFS="$ac_save_ifs"
  19.423 +  ;;
  19.424 +esac],
  19.425 +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
  19.426 +])
  19.427 +
  19.428 +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
  19.429 +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  19.430 +AC_ENABLE_FAST_INSTALL(no)])
  19.431 +
  19.432 +# AC_PROG_LD - find the path to the GNU or non-GNU linker
  19.433 +AC_DEFUN(AC_PROG_LD,
  19.434 +[AC_ARG_WITH(gnu-ld,
  19.435 +[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  19.436 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  19.437 +AC_REQUIRE([AC_PROG_CC])dnl
  19.438 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
  19.439 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  19.440 +ac_prog=ld
  19.441 +if test "$ac_cv_prog_gcc" = yes; then
  19.442 +  # Check if gcc -print-prog-name=ld gives a path.
  19.443 +  AC_MSG_CHECKING([for ld used by GCC])
  19.444 +  case $host in
  19.445 +  *-*-mingw*)
  19.446 +    # gcc leaves a trailing carriage return which upsets mingw
  19.447 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  19.448 +  *)
  19.449 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  19.450 +  esac
  19.451 +  case "$ac_prog" in
  19.452 +    # Accept absolute paths.
  19.453 +changequote(,)dnl
  19.454 +    [\\/]* | [A-Za-z]:[\\/]*)
  19.455 +      re_direlt='/[^/][^/]*/\.\./'
  19.456 +changequote([,])dnl
  19.457 +      # Canonicalize the path of ld
  19.458 +      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  19.459 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  19.460 +	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  19.461 +      done
  19.462 +      test -z "$LD" && LD="$ac_prog"
  19.463 +      ;;
  19.464 +  "")
  19.465 +    # If it fails, then pretend we aren't using GCC.
  19.466 +    ac_prog=ld
  19.467 +    ;;
  19.468 +  *)
  19.469 +    # If it is relative, then search for the first ld in PATH.
  19.470 +    with_gnu_ld=unknown
  19.471 +    ;;
  19.472 +  esac
  19.473 +elif test "$with_gnu_ld" = yes; then
  19.474 +  AC_MSG_CHECKING([for GNU ld])
  19.475 +else
  19.476 +  AC_MSG_CHECKING([for non-GNU ld])
  19.477 +fi
  19.478 +AC_CACHE_VAL(ac_cv_path_LD,
  19.479 +[if test -z "$LD"; then
  19.480 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  19.481 +  for ac_dir in $PATH; do
  19.482 +    test -z "$ac_dir" && ac_dir=.
  19.483 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  19.484 +      ac_cv_path_LD="$ac_dir/$ac_prog"
  19.485 +      # Check to see if the program is GNU ld.  I'd rather use --version,
  19.486 +      # but apparently some GNU ld's only accept -v.
  19.487 +      # Break only if it was the GNU/non-GNU ld that we prefer.
  19.488 +      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  19.489 +	test "$with_gnu_ld" != no && break
  19.490 +      else
  19.491 +	test "$with_gnu_ld" != yes && break
  19.492 +      fi
  19.493 +    fi
  19.494 +  done
  19.495 +  IFS="$ac_save_ifs"
  19.496 +else
  19.497 +  ac_cv_path_LD="$LD" # Let the user override the test with a path.
  19.498 +fi])
  19.499 +LD="$ac_cv_path_LD"
  19.500 +if test -n "$LD"; then
  19.501 +  AC_MSG_RESULT($LD)
  19.502 +else
  19.503 +  AC_MSG_RESULT(no)
  19.504 +fi
  19.505 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  19.506 +AC_SUBST(LD)
  19.507 +AC_PROG_LD_GNU
  19.508 +])
  19.509 +
  19.510 +AC_DEFUN(AC_PROG_LD_GNU,
  19.511 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
  19.512 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  19.513 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  19.514 +  ac_cv_prog_gnu_ld=yes
  19.515 +else
  19.516 +  ac_cv_prog_gnu_ld=no
  19.517 +fi])
  19.518 +])
  19.519 +
  19.520 +# AC_PROG_NM - find the path to a BSD-compatible name lister
  19.521 +AC_DEFUN(AC_PROG_NM,
  19.522 +[AC_MSG_CHECKING([for BSD-compatible nm])
  19.523 +AC_CACHE_VAL(ac_cv_path_NM,
  19.524 +[if test -n "$NM"; then
  19.525 +  # Let the user override the test.
  19.526 +  ac_cv_path_NM="$NM"
  19.527 +else
  19.528 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  19.529 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  19.530 +    test -z "$ac_dir" && ac_dir=.
  19.531 +    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
  19.532 +      # Check to see if the nm accepts a BSD-compat flag.
  19.533 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  19.534 +      #   nm: unknown option "B" ignored
  19.535 +      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  19.536 +	ac_cv_path_NM="$ac_dir/nm -B"
  19.537 +	break
  19.538 +      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  19.539 +	ac_cv_path_NM="$ac_dir/nm -p"
  19.540 +	break
  19.541 +      else
  19.542 +	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
  19.543 +	continue # so that we can try to find one that supports BSD flags
  19.544 +      fi
  19.545 +    fi
  19.546 +  done
  19.547 +  IFS="$ac_save_ifs"
  19.548 +  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
  19.549 +fi])
  19.550 +NM="$ac_cv_path_NM"
  19.551 +AC_MSG_RESULT([$NM])
  19.552 +AC_SUBST(NM)
  19.553 +])
  19.554 +
  19.555 +# AC_CHECK_LIBM - check for math library
  19.556 +AC_DEFUN(AC_CHECK_LIBM,
  19.557 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
  19.558 +LIBM=
  19.559 +case "$host" in
  19.560 +*-*-beos* | *-*-cygwin*)
  19.561 +  # These system don't have libm
  19.562 +  ;;
  19.563 +*-ncr-sysv4.3*)
  19.564 +  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  19.565 +  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
  19.566 +  ;;
  19.567 +*)
  19.568 +  AC_CHECK_LIB(m, main, LIBM="-lm")
  19.569 +  ;;
  19.570 +esac
  19.571 +])
  19.572 +
  19.573 +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
  19.574 +# the libltdl convenience library, adds --enable-ltdl-convenience to
  19.575 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
  19.576 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
  19.577 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
  19.578 +# '${top_builddir}/' (note the single quotes!) if your package is not
  19.579 +# flat, and, if you're not using automake, define top_builddir as
  19.580 +# appropriate in the Makefiles.
  19.581 +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  19.582 +  case "$enable_ltdl_convenience" in
  19.583 +  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  19.584 +  "") enable_ltdl_convenience=yes
  19.585 +      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  19.586 +  esac
  19.587 +  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
  19.588 +  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
  19.589 +])
  19.590 +
  19.591 +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
  19.592 +# the libltdl installable library, and adds --enable-ltdl-install to
  19.593 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
  19.594 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
  19.595 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
  19.596 +# '${top_builddir}/' (note the single quotes!) if your package is not
  19.597 +# flat, and, if you're not using automake, define top_builddir as
  19.598 +# appropriate in the Makefiles.
  19.599 +# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  19.600 +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  19.601 +  AC_CHECK_LIB(ltdl, main,
  19.602 +  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  19.603 +  [if test x"$enable_ltdl_install" = xno; then
  19.604 +     AC_MSG_WARN([libltdl not installed, but installation disabled])
  19.605 +   else
  19.606 +     enable_ltdl_install=yes
  19.607 +   fi
  19.608 +  ])
  19.609 +  if test x"$enable_ltdl_install" = x"yes"; then
  19.610 +    ac_configure_args="$ac_configure_args --enable-ltdl-install"
  19.611 +    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
  19.612 +    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
  19.613 +  else
  19.614 +    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  19.615 +    LIBLTDL="-lltdl"
  19.616 +    INCLTDL=
  19.617 +  fi
  19.618 +])
  19.619 +
  19.620 +dnl old names
  19.621 +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
  19.622 +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
  19.623 +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
  19.624 +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
  19.625 +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
  19.626 +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
  19.627 +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
  19.628 +
  19.629 +dnl This is just to silence aclocal about the macro not being used
  19.630 +ifelse([AC_DISABLE_FAST_INSTALL])dnl
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/aclocal.m4	Thu Aug 10 06:05:39 2000 +0000
    20.3 @@ -0,0 +1,710 @@
    20.4 +dnl aclocal.m4 generated automatically by aclocal 1.4
    20.5 +
    20.6 +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
    20.7 +dnl This file is free software; the Free Software Foundation
    20.8 +dnl gives unlimited permission to copy and/or distribute it,
    20.9 +dnl with or without modifications, as long as this notice is preserved.
   20.10 +
   20.11 +dnl This program is distributed in the hope that it will be useful,
   20.12 +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
   20.13 +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   20.14 +dnl PARTICULAR PURPOSE.
   20.15 +
   20.16 +# Configure paths for SDL
   20.17 +# Sam Lantinga 9/21/99
   20.18 +# stolen from Manish Singh
   20.19 +# stolen back from Frank Belew
   20.20 +# stolen from Manish Singh
   20.21 +# Shamelessly stolen from Owen Taylor
   20.22 +
   20.23 +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
   20.24 +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
   20.25 +dnl
   20.26 +AC_DEFUN(AM_PATH_SDL,
   20.27 +[dnl 
   20.28 +dnl Get the cflags and libraries from the sdl-config script
   20.29 +dnl
   20.30 +AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
   20.31 +            sdl_prefix="$withval", sdl_prefix="")
   20.32 +AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
   20.33 +            sdl_exec_prefix="$withval", sdl_exec_prefix="")
   20.34 +AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
   20.35 +		    , enable_sdltest=yes)
   20.36 +
   20.37 +  if test x$sdl_exec_prefix != x ; then
   20.38 +     sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
   20.39 +     if test x${SDL_CONFIG+set} != xset ; then
   20.40 +        SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
   20.41 +     fi
   20.42 +  fi
   20.43 +  if test x$sdl_prefix != x ; then
   20.44 +     sdl_args="$sdl_args --prefix=$sdl_prefix"
   20.45 +     if test x${SDL_CONFIG+set} != xset ; then
   20.46 +        SDL_CONFIG=$sdl_prefix/bin/sdl-config
   20.47 +     fi
   20.48 +  fi
   20.49 +
   20.50 +  AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
   20.51 +  min_sdl_version=ifelse([$1], ,0.11.0,$1)
   20.52 +  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
   20.53 +  no_sdl=""
   20.54 +  if test "$SDL_CONFIG" = "no" ; then
   20.55 +    no_sdl=yes
   20.56 +  else
   20.57 +    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
   20.58 +    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
   20.59 +
   20.60 +    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
   20.61 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
   20.62 +    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
   20.63 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
   20.64 +    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
   20.65 +           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
   20.66 +    if test "x$enable_sdltest" = "xyes" ; then
   20.67 +      ac_save_CFLAGS="$CFLAGS"
   20.68 +      ac_save_LIBS="$LIBS"
   20.69 +      CFLAGS="$CFLAGS $SDL_CFLAGS"
   20.70 +      LIBS="$LIBS $SDL_LIBS"
   20.71 +dnl
   20.72 +dnl Now check if the installed SDL is sufficiently new. (Also sanity
   20.73 +dnl checks the results of sdl-config to some extent
   20.74 +dnl
   20.75 +      rm -f conf.sdltest
   20.76 +      AC_TRY_RUN([
   20.77 +#include <stdio.h>
   20.78 +#include <stdlib.h>
   20.79 +#include <string.h>
   20.80 +#include <SDL/SDL.h>
   20.81 +
   20.82 +char*
   20.83 +my_strdup (char *str)
   20.84 +{
   20.85 +  char *new_str;
   20.86 +  
   20.87 +  if (str)
   20.88 +    {
   20.89 +      new_str = malloc ((strlen (str) + 1) * sizeof(char));
   20.90 +      strcpy (new_str, str);
   20.91 +    }
   20.92 +  else
   20.93 +    new_str = NULL;
   20.94 +  
   20.95 +  return new_str;
   20.96 +}
   20.97 +
   20.98 +int main ()
   20.99 +{
  20.100 +  int major, minor, micro;
  20.101 +  char *tmp_version;
  20.102 +
  20.103 +  system ("touch conf.sdltest");
  20.104 +
  20.105 +  /* HP/UX 9 (%@#!) writes to sscanf strings */
  20.106 +  tmp_version = my_strdup("$min_sdl_version");
  20.107 +  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  20.108 +     printf("%s, bad version string\n", "$min_sdl_version");
  20.109 +     exit(1);
  20.110 +   }
  20.111 +
  20.112 +   if (($sdl_major_version > major) ||
  20.113 +      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
  20.114 +      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
  20.115 +    {
  20.116 +      return 0;
  20.117 +    }
  20.118 +  else
  20.119 +    {
  20.120 +      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
  20.121 +      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
  20.122 +      printf("*** best to upgrade to the required version.\n");
  20.123 +      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
  20.124 +      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
  20.125 +      printf("*** config.cache before re-running configure\n");
  20.126 +      return 1;
  20.127 +    }
  20.128 +}
  20.129 +
  20.130 +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  20.131 +       CFLAGS="$ac_save_CFLAGS"
  20.132 +       LIBS="$ac_save_LIBS"
  20.133 +     fi
  20.134 +  fi
  20.135 +  if test "x$no_sdl" = x ; then
  20.136 +     AC_MSG_RESULT(yes)
  20.137 +     ifelse([$2], , :, [$2])     
  20.138 +  else
  20.139 +     AC_MSG_RESULT(no)
  20.140 +     if test "$SDL_CONFIG" = "no" ; then
  20.141 +       echo "*** The sdl-config script installed by SDL could not be found"
  20.142 +       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
  20.143 +       echo "*** your path, or set the SDL_CONFIG environment variable to the"
  20.144 +       echo "*** full path to sdl-config."
  20.145 +     else
  20.146 +       if test -f conf.sdltest ; then
  20.147 +        :
  20.148 +       else
  20.149 +          echo "*** Could not run SDL test program, checking why..."
  20.150 +          CFLAGS="$CFLAGS $SDL_CFLAGS"
  20.151 +          LIBS="$LIBS $SDL_LIBS"
  20.152 +          AC_TRY_LINK([
  20.153 +#include <stdio.h>
  20.154 +#include <SDL/SDL.h>
  20.155 +],      [ return 0; ],
  20.156 +        [ echo "*** The test program compiled, but did not run. This usually means"
  20.157 +          echo "*** that the run-time linker is not finding SDL or finding the wrong"
  20.158 +          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
  20.159 +          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  20.160 +          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  20.161 +          echo "*** is required on your system"
  20.162 +	  echo "***"
  20.163 +          echo "*** If you have an old version installed, it is best to remove it, although"
  20.164 +          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
  20.165 +        [ echo "*** The test program failed to compile or link. See the file config.log for the"
  20.166 +          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
  20.167 +          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
  20.168 +          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
  20.169 +          CFLAGS="$ac_save_CFLAGS"
  20.170 +          LIBS="$ac_save_LIBS"
  20.171 +       fi
  20.172 +     fi
  20.173 +     SDL_CFLAGS=""
  20.174 +     SDL_LIBS=""
  20.175 +     ifelse([$3], , :, [$3])
  20.176 +  fi
  20.177 +  AC_SUBST(SDL_CFLAGS)
  20.178 +  AC_SUBST(SDL_LIBS)
  20.179 +  rm -f conf.sdltest
  20.180 +])
  20.181 +
  20.182 +# serial 41 AC_PROG_LIBTOOL
  20.183 +AC_DEFUN(AC_PROG_LIBTOOL,
  20.184 +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  20.185 +
  20.186 +# Save cache, so that ltconfig can load it
  20.187 +AC_CACHE_SAVE
  20.188 +
  20.189 +# Actually configure libtool.  ac_aux_dir is where install-sh is found.
  20.190 +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
  20.191 +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
  20.192 +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
  20.193 +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
  20.194 +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
  20.195 +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
  20.196 +|| AC_MSG_ERROR([libtool configure failed])
  20.197 +
  20.198 +# Reload cache, that may have been modified by ltconfig
  20.199 +AC_CACHE_LOAD
  20.200 +
  20.201 +# This can be used to rebuild libtool when needed
  20.202 +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
  20.203 +
  20.204 +# Always use our own libtool.
  20.205 +LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  20.206 +AC_SUBST(LIBTOOL)dnl
  20.207 +
  20.208 +# Redirect the config.log output again, so that the ltconfig log is not
  20.209 +# clobbered by the next message.
  20.210 +exec 5>>./config.log
  20.211 +])
  20.212 +
  20.213 +AC_DEFUN(AC_LIBTOOL_SETUP,
  20.214 +[AC_PREREQ(2.13)dnl
  20.215 +AC_REQUIRE([AC_ENABLE_SHARED])dnl
  20.216 +AC_REQUIRE([AC_ENABLE_STATIC])dnl
  20.217 +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  20.218 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
  20.219 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  20.220 +AC_REQUIRE([AC_PROG_CC])dnl
  20.221 +AC_REQUIRE([AC_PROG_LD])dnl
  20.222 +AC_REQUIRE([AC_PROG_NM])dnl
  20.223 +AC_REQUIRE([AC_PROG_LN_S])dnl
  20.224 +dnl
  20.225 +
  20.226 +AC_CHECK_TOOL(RANLIB, ranlib, :)
  20.227 +
  20.228 +# Check for any special flags to pass to ltconfig.
  20.229 +libtool_flags="--cache-file=$cache_file"
  20.230 +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
  20.231 +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
  20.232 +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
  20.233 +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
  20.234 +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
  20.235 +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
  20.236 +[libtool_flags="$libtool_flags --enable-dlopen"])
  20.237 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  20.238 +[libtool_flags="$libtool_flags --enable-win32-dll"])
  20.239 +AC_ARG_ENABLE(libtool-lock,
  20.240 +  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
  20.241 +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
  20.242 +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
  20.243 +
  20.244 +AC_ARG_WITH(pic,
  20.245 +  [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
  20.246 +     pic_mode="$withval", pic_mode=default)
  20.247 +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
  20.248 +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
  20.249 +
  20.250 +# Some flags need to be propagated to the compiler or linker for good
  20.251 +# libtool support.
  20.252 +case "$host" in
  20.253 +*-*-irix6*)
  20.254 +  # Find out which ABI we are using.
  20.255 +  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  20.256 +  if AC_TRY_EVAL(ac_compile); then
  20.257 +    case "`/usr/bin/file conftest.o`" in
  20.258 +    *32-bit*)
  20.259 +      LD="${LD-ld} -32"
  20.260 +      ;;
  20.261 +    *N32*)
  20.262 +      LD="${LD-ld} -n32"
  20.263 +      ;;
  20.264 +    *64-bit*)
  20.265 +      LD="${LD-ld} -64"
  20.266 +      ;;
  20.267 +    esac
  20.268 +  fi
  20.269 +  rm -rf conftest*
  20.270 +  ;;
  20.271 +
  20.272 +*-*-sco3.2v5*)
  20.273 +  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  20.274 +  SAVE_CFLAGS="$CFLAGS"
  20.275 +  CFLAGS="$CFLAGS -belf"
  20.276 +  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  20.277 +    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
  20.278 +  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  20.279 +    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  20.280 +    CFLAGS="$SAVE_CFLAGS"
  20.281 +  fi
  20.282 +  ;;
  20.283 +
  20.284 +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  20.285 +[*-*-cygwin* | *-*-mingw*)
  20.286 +  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  20.287 +  AC_CHECK_TOOL(AS, as, false)
  20.288 +  AC_CHECK_TOOL(OBJDUMP, objdump, false)
  20.289 +
  20.290 +  # recent cygwin and mingw systems supply a stub DllMain which the user
  20.291 +  # can override, but on older systems we have to supply one
  20.292 +  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  20.293 +    [AC_TRY_LINK([DllMain (0, 0, 0);],
  20.294 +      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
  20.295 +      [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
  20.296 +
  20.297 +  case $host in
  20.298 +  *-*-cygwin*)
  20.299 +    # cygwin systems need to pass --dll to the linker, and not link
  20.300 +    # crt.o which will require a WinMain@16 definition.
  20.301 +    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  20.302 +  *-*-mingw*)
  20.303 +    # old mingw systems require "-dll" to link a DLL, while more recent ones
  20.304 +    # require "-mdll"
  20.305 +    SAVE_CFLAGS="$CFLAGS"
  20.306 +    CFLAGS="$CFLAGS -mdll"
  20.307 +    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  20.308 +      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  20.309 +    CFLAGS="$SAVE_CFLAGS" ;;
  20.310 +  esac
  20.311 +  ;;
  20.312 +  ])
  20.313 +esac
  20.314 +])
  20.315 +
  20.316 +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
  20.317 +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
  20.318 +
  20.319 +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
  20.320 +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
  20.321 +
  20.322 +# AC_ENABLE_SHARED - implement the --enable-shared flag
  20.323 +# Usage: AC_ENABLE_SHARED[(DEFAULT)]
  20.324 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  20.325 +#   `yes'.
  20.326 +AC_DEFUN(AC_ENABLE_SHARED, [dnl
  20.327 +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  20.328 +AC_ARG_ENABLE(shared,
  20.329 +changequote(<<, >>)dnl
  20.330 +<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  20.331 +changequote([, ])dnl
  20.332 +[p=${PACKAGE-default}
  20.333 +case "$enableval" in
  20.334 +yes) enable_shared=yes ;;
  20.335 +no) enable_shared=no ;;
  20.336 +*)
  20.337 +  enable_shared=no
  20.338 +  # Look at the argument we got.  We use all the common list separators.
  20.339 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  20.340 +  for pkg in $enableval; do
  20.341 +    if test "X$pkg" = "X$p"; then
  20.342 +      enable_shared=yes
  20.343 +    fi
  20.344 +  done
  20.345 +  IFS="$ac_save_ifs"
  20.346 +  ;;
  20.347 +esac],
  20.348 +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
  20.349 +])
  20.350 +
  20.351 +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
  20.352 +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  20.353 +AC_ENABLE_SHARED(no)])
  20.354 +
  20.355 +# AC_ENABLE_STATIC - implement the --enable-static flag
  20.356 +# Usage: AC_ENABLE_STATIC[(DEFAULT)]
  20.357 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  20.358 +#   `yes'.
  20.359 +AC_DEFUN(AC_ENABLE_STATIC, [dnl
  20.360 +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  20.361 +AC_ARG_ENABLE(static,
  20.362 +changequote(<<, >>)dnl
  20.363 +<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  20.364 +changequote([, ])dnl
  20.365 +[p=${PACKAGE-default}
  20.366 +case "$enableval" in
  20.367 +yes) enable_static=yes ;;
  20.368 +no) enable_static=no ;;
  20.369 +*)
  20.370 +  enable_static=no
  20.371 +  # Look at the argument we got.  We use all the common list separators.
  20.372 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  20.373 +  for pkg in $enableval; do
  20.374 +    if test "X$pkg" = "X$p"; then
  20.375 +      enable_static=yes
  20.376 +    fi
  20.377 +  done
  20.378 +  IFS="$ac_save_ifs"
  20.379 +  ;;
  20.380 +esac],
  20.381 +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
  20.382 +])
  20.383 +
  20.384 +# AC_DISABLE_STATIC - set the default static flag to --disable-static
  20.385 +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  20.386 +AC_ENABLE_STATIC(no)])
  20.387 +
  20.388 +
  20.389 +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
  20.390 +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
  20.391 +#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
  20.392 +#   `yes'.
  20.393 +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
  20.394 +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  20.395 +AC_ARG_ENABLE(fast-install,
  20.396 +changequote(<<, >>)dnl
  20.397 +<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  20.398 +changequote([, ])dnl
  20.399 +[p=${PACKAGE-default}
  20.400 +case "$enableval" in
  20.401 +yes) enable_fast_install=yes ;;
  20.402 +no) enable_fast_install=no ;;
  20.403 +*)
  20.404 +  enable_fast_install=no
  20.405 +  # Look at the argument we got.  We use all the common list separators.
  20.406 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  20.407 +  for pkg in $enableval; do
  20.408 +    if test "X$pkg" = "X$p"; then
  20.409 +      enable_fast_install=yes
  20.410 +    fi
  20.411 +  done
  20.412 +  IFS="$ac_save_ifs"
  20.413 +  ;;
  20.414 +esac],
  20.415 +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
  20.416 +])
  20.417 +
  20.418 +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
  20.419 +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  20.420 +AC_ENABLE_FAST_INSTALL(no)])
  20.421 +
  20.422 +# AC_PROG_LD - find the path to the GNU or non-GNU linker
  20.423 +AC_DEFUN(AC_PROG_LD,
  20.424 +[AC_ARG_WITH(gnu-ld,
  20.425 +[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  20.426 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  20.427 +AC_REQUIRE([AC_PROG_CC])dnl
  20.428 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
  20.429 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  20.430 +ac_prog=ld
  20.431 +if test "$ac_cv_prog_gcc" = yes; then
  20.432 +  # Check if gcc -print-prog-name=ld gives a path.
  20.433 +  AC_MSG_CHECKING([for ld used by GCC])
  20.434 +  case $host in
  20.435 +  *-*-mingw*)
  20.436 +    # gcc leaves a trailing carriage return which upsets mingw
  20.437 +    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  20.438 +  *)
  20.439 +    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  20.440 +  esac
  20.441 +  case "$ac_prog" in
  20.442 +    # Accept absolute paths.
  20.443 +changequote(,)dnl
  20.444 +    [\\/]* | [A-Za-z]:[\\/]*)
  20.445 +      re_direlt='/[^/][^/]*/\.\./'
  20.446 +changequote([,])dnl
  20.447 +      # Canonicalize the path of ld
  20.448 +      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  20.449 +      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  20.450 +	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  20.451 +      done
  20.452 +      test -z "$LD" && LD="$ac_prog"
  20.453 +      ;;
  20.454 +  "")
  20.455 +    # If it fails, then pretend we aren't using GCC.
  20.456 +    ac_prog=ld
  20.457 +    ;;
  20.458 +  *)
  20.459 +    # If it is relative, then search for the first ld in PATH.
  20.460 +    with_gnu_ld=unknown
  20.461 +    ;;
  20.462 +  esac
  20.463 +elif test "$with_gnu_ld" = yes; then
  20.464 +  AC_MSG_CHECKING([for GNU ld])
  20.465 +else
  20.466 +  AC_MSG_CHECKING([for non-GNU ld])
  20.467 +fi
  20.468 +AC_CACHE_VAL(ac_cv_path_LD,
  20.469 +[if test -z "$LD"; then
  20.470 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  20.471 +  for ac_dir in $PATH; do
  20.472 +    test -z "$ac_dir" && ac_dir=.
  20.473 +    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  20.474 +      ac_cv_path_LD="$ac_dir/$ac_prog"
  20.475 +      # Check to see if the program is GNU ld.  I'd rather use --version,
  20.476 +      # but apparently some GNU ld's only accept -v.
  20.477 +      # Break only if it was the GNU/non-GNU ld that we prefer.
  20.478 +      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  20.479 +	test "$with_gnu_ld" != no && break
  20.480 +      else
  20.481 +	test "$with_gnu_ld" != yes && break
  20.482 +      fi
  20.483 +    fi
  20.484 +  done
  20.485 +  IFS="$ac_save_ifs"
  20.486 +else
  20.487 +  ac_cv_path_LD="$LD" # Let the user override the test with a path.
  20.488 +fi])
  20.489 +LD="$ac_cv_path_LD"
  20.490 +if test -n "$LD"; then
  20.491 +  AC_MSG_RESULT($LD)
  20.492 +else
  20.493 +  AC_MSG_RESULT(no)
  20.494 +fi
  20.495 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  20.496 +AC_SUBST(LD)
  20.497 +AC_PROG_LD_GNU
  20.498 +])
  20.499 +
  20.500 +AC_DEFUN(AC_PROG_LD_GNU,
  20.501 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
  20.502 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  20.503 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  20.504 +  ac_cv_prog_gnu_ld=yes
  20.505 +else
  20.506 +  ac_cv_prog_gnu_ld=no
  20.507 +fi])
  20.508 +])
  20.509 +
  20.510 +# AC_PROG_NM - find the path to a BSD-compatible name lister
  20.511 +AC_DEFUN(AC_PROG_NM,
  20.512 +[AC_MSG_CHECKING([for BSD-compatible nm])
  20.513 +AC_CACHE_VAL(ac_cv_path_NM,
  20.514 +[if test -n "$NM"; then
  20.515 +  # Let the user override the test.
  20.516 +  ac_cv_path_NM="$NM"
  20.517 +else
  20.518 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  20.519 +  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  20.520 +    test -z "$ac_dir" && ac_dir=.
  20.521 +    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
  20.522 +      # Check to see if the nm accepts a BSD-compat flag.
  20.523 +      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  20.524 +      #   nm: unknown option "B" ignored
  20.525 +      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  20.526 +	ac_cv_path_NM="$ac_dir/nm -B"
  20.527 +	break
  20.528 +      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  20.529 +	ac_cv_path_NM="$ac_dir/nm -p"
  20.530 +	break
  20.531 +      else
  20.532 +	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
  20.533 +	continue # so that we can try to find one that supports BSD flags
  20.534 +      fi
  20.535 +    fi
  20.536 +  done
  20.537 +  IFS="$ac_save_ifs"
  20.538 +  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
  20.539 +fi])
  20.540 +NM="$ac_cv_path_NM"
  20.541 +AC_MSG_RESULT([$NM])
  20.542 +AC_SUBST(NM)
  20.543 +])
  20.544 +
  20.545 +# AC_CHECK_LIBM - check for math library
  20.546 +AC_DEFUN(AC_CHECK_LIBM,
  20.547 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
  20.548 +LIBM=
  20.549 +case "$host" in
  20.550 +*-*-beos* | *-*-cygwin*)
  20.551 +  # These system don't have libm
  20.552 +  ;;
  20.553 +*-ncr-sysv4.3*)
  20.554 +  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  20.555 +  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
  20.556 +  ;;
  20.557 +*)
  20.558 +  AC_CHECK_LIB(m, main, LIBM="-lm")
  20.559 +  ;;
  20.560 +esac
  20.561 +])
  20.562 +
  20.563 +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
  20.564 +# the libltdl convenience library, adds --enable-ltdl-convenience to
  20.565 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
  20.566 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
  20.567 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
  20.568 +# '${top_builddir}/' (note the single quotes!) if your package is not
  20.569 +# flat, and, if you're not using automake, define top_builddir as
  20.570 +# appropriate in the Makefiles.
  20.571 +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  20.572 +  case "$enable_ltdl_convenience" in
  20.573 +  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  20.574 +  "") enable_ltdl_convenience=yes
  20.575 +      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  20.576 +  esac
  20.577 +  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
  20.578 +  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
  20.579 +])
  20.580 +
  20.581 +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
  20.582 +# the libltdl installable library, and adds --enable-ltdl-install to
  20.583 +# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
  20.584 +# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
  20.585 +# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
  20.586 +# '${top_builddir}/' (note the single quotes!) if your package is not
  20.587 +# flat, and, if you're not using automake, define top_builddir as
  20.588 +# appropriate in the Makefiles.
  20.589 +# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  20.590 +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  20.591 +  AC_CHECK_LIB(ltdl, main,
  20.592 +  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  20.593 +  [if test x"$enable_ltdl_install" = xno; then
  20.594 +     AC_MSG_WARN([libltdl not installed, but installation disabled])
  20.595 +   else
  20.596 +     enable_ltdl_install=yes
  20.597 +   fi
  20.598 +  ])
  20.599 +  if test x"$enable_ltdl_install" = x"yes"; then
  20.600 +    ac_configure_args="$ac_configure_args --enable-ltdl-install"
  20.601 +    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
  20.602 +    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
  20.603 +  else
  20.604 +    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  20.605 +    LIBLTDL="-lltdl"
  20.606 +    INCLTDL=
  20.607 +  fi
  20.608 +])
  20.609 +
  20.610 +dnl old names
  20.611 +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
  20.612 +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
  20.613 +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
  20.614 +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
  20.615 +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
  20.616 +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
  20.617 +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
  20.618 +
  20.619 +dnl This is just to silence aclocal about the macro not being used
  20.620 +ifelse([AC_DISABLE_FAST_INSTALL])dnl
  20.621 +
  20.622 +# Do all the work for Automake.  This macro actually does too much --
  20.623 +# some checks are only needed if your package does certain things.
  20.624 +# But this isn't really a big deal.
  20.625 +
  20.626 +# serial 1
  20.627 +
  20.628 +dnl Usage:
  20.629 +dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  20.630 +
  20.631 +AC_DEFUN(AM_INIT_AUTOMAKE,
  20.632 +[AC_REQUIRE([AC_PROG_INSTALL])
  20.633 +PACKAGE=[$1]
  20.634 +AC_SUBST(PACKAGE)
  20.635 +VERSION=[$2]
  20.636 +AC_SUBST(VERSION)
  20.637 +dnl test to see if srcdir already configured
  20.638 +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  20.639 +  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  20.640 +fi
  20.641 +ifelse([$3],,
  20.642 +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  20.643 +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
  20.644 +AC_REQUIRE([AM_SANITY_CHECK])
  20.645 +AC_REQUIRE([AC_ARG_PROGRAM])
  20.646 +dnl FIXME This is truly gross.
  20.647 +missing_dir=`cd $ac_aux_dir && pwd`
  20.648 +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  20.649 +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  20.650 +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  20.651 +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  20.652 +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  20.653 +AC_REQUIRE([AC_PROG_MAKE_SET])])
  20.654 +
  20.655 +#
  20.656 +# Check to make sure that the build environment is sane.
  20.657 +#
  20.658 +
  20.659 +AC_DEFUN(AM_SANITY_CHECK,
  20.660 +[AC_MSG_CHECKING([whether build environment is sane])
  20.661 +# Just in case
  20.662 +sleep 1
  20.663 +echo timestamp > conftestfile
  20.664 +# Do `set' in a subshell so we don't clobber the current shell's
  20.665 +# arguments.  Must try -L first in case configure is actually a
  20.666 +# symlink; some systems play weird games with the mod time of symlinks
  20.667 +# (eg FreeBSD returns the mod time of the symlink's containing
  20.668 +# directory).
  20.669 +if (
  20.670 +   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  20.671 +   if test "[$]*" = "X"; then
  20.672 +      # -L didn't work.
  20.673 +      set X `ls -t $srcdir/configure conftestfile`
  20.674 +   fi
  20.675 +   if test "[$]*" != "X $srcdir/configure conftestfile" \
  20.676 +      && test "[$]*" != "X conftestfile $srcdir/configure"; then
  20.677 +
  20.678 +      # If neither matched, then we have a broken ls.  This can happen
  20.679 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
  20.680 +      # broken ls alias from the environment.  This has actually
  20.681 +      # happened.  Such a system could not be considered "sane".
  20.682 +      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  20.683 +alias in your environment])
  20.684 +   fi
  20.685 +
  20.686 +   test "[$]2" = conftestfile
  20.687 +   )
  20.688 +then
  20.689 +   # Ok.
  20.690 +   :
  20.691 +else
  20.692 +   AC_MSG_ERROR([newly created file is older than distributed files!
  20.693 +Check your system clock])
  20.694 +fi
  20.695 +rm -f conftest*
  20.696 +AC_MSG_RESULT(yes)])
  20.697 +
  20.698 +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  20.699 +dnl The program must properly implement --version.
  20.700 +AC_DEFUN(AM_MISSING_PROG,
  20.701 +[AC_MSG_CHECKING(for working $2)
  20.702 +# Run test in a subshell; some versions of sh will print an error if
  20.703 +# an executable is not found, even if stderr is redirected.
  20.704 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  20.705 +if ($2 --version) < /dev/null > /dev/null 2>&1; then
  20.706 +   $1=$2
  20.707 +   AC_MSG_RESULT(found)
  20.708 +else
  20.709 +   $1="$3/missing $2"
  20.710 +   AC_MSG_RESULT(missing)
  20.711 +fi
  20.712 +AC_SUBST($1)])
  20.713 +
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/autogen.sh	Thu Aug 10 06:05:39 2000 +0000
    21.3 @@ -0,0 +1,8 @@
    21.4 +#!/bin/sh
    21.5 +#
    21.6 +aclocal
    21.7 +automake --foreign
    21.8 +autoconf
    21.9 +
   21.10 +#./configure $*
   21.11 +echo "Now you are ready to run ./configure"
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/config.guess	Thu Aug 10 06:05:39 2000 +0000
    22.3 @@ -0,0 +1,1087 @@
    22.4 +#! /bin/sh
    22.5 +# Attempt to guess a canonical system name.
    22.6 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
    22.7 +#   Free Software Foundation, Inc.
    22.8 +#
    22.9 +# This file is free software; you can redistribute it and/or modify it
   22.10 +# under the terms of the GNU General Public License as published by
   22.11 +# the Free Software Foundation; either version 2 of the License, or
   22.12 +# (at your option) any later version.
   22.13 +#
   22.14 +# This program is distributed in the hope that it will be useful, but
   22.15 +# WITHOUT ANY WARRANTY; without even the implied warranty of
   22.16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   22.17 +# General Public License for more details.
   22.18 +#
   22.19 +# You should have received a copy of the GNU General Public License
   22.20 +# along with this program; if not, write to the Free Software
   22.21 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   22.22 +#
   22.23 +# As a special exception to the GNU General Public License, if you
   22.24 +# distribute this file as part of a program that contains a
   22.25 +# configuration script generated by Autoconf, you may include it under
   22.26 +# the same distribution terms that you use for the rest of that program.
   22.27 +
   22.28 +# Written by Per Bothner <bothner@cygnus.com>.
   22.29 +# The master version of this file is at the FSF in /home/gd/gnu/lib.
   22.30 +# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
   22.31 +#
   22.32 +# This script attempts to guess a canonical system name similar to
   22.33 +# config.sub.  If it succeeds, it prints the system name on stdout, and
   22.34 +# exits with 0.  Otherwise, it exits with 1.
   22.35 +#
   22.36 +# The plan is that this can be called by configure scripts if you
   22.37 +# don't specify an explicit system type (host/target name).
   22.38 +#
   22.39 +# Only a few systems have been added to this list; please add others
   22.40 +# (but try to keep the structure clean).
   22.41 +#
   22.42 +
   22.43 +# Use $HOST_CC if defined. $CC may point to a cross-compiler
   22.44 +if test x"$CC_FOR_BUILD" = x; then
   22.45 +  if test x"$HOST_CC" != x; then
   22.46 +    CC_FOR_BUILD="$HOST_CC"
   22.47 +  else
   22.48 +    if test x"$CC" != x; then
   22.49 +      CC_FOR_BUILD="$CC"
   22.50 +    else
   22.51 +      CC_FOR_BUILD=cc
   22.52 +    fi
   22.53 +  fi
   22.54 +fi
   22.55 +
   22.56 +
   22.57 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
   22.58 +# (ghazi@noc.rutgers.edu 8/24/94.)
   22.59 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
   22.60 +	PATH=$PATH:/.attbin ; export PATH
   22.61 +fi
   22.62 +
   22.63 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
   22.64 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
   22.65 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
   22.66 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
   22.67 +
   22.68 +dummy=dummy-$$
   22.69 +trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
   22.70 +
   22.71 +# Note: order is significant - the case branches are not exclusive.
   22.72 +
   22.73 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   22.74 +    alpha:OSF1:*:*)
   22.75 +	if test $UNAME_RELEASE = "V4.0"; then
   22.76 +		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   22.77 +	fi
   22.78 +	# A Vn.n version is a released version.
   22.79 +	# A Tn.n version is a released field test version.
   22.80 +	# A Xn.n version is an unreleased experimental baselevel.
   22.81 +	# 1.2 uses "1.2" for uname -r.
   22.82 +	cat <<EOF >$dummy.s
   22.83 +	.globl main
   22.84 +	.ent main
   22.85 +main:
   22.86 +	.frame \$30,0,\$26,0
   22.87 +	.prologue 0
   22.88 +	.long 0x47e03d80 # implver $0
   22.89 +	lda \$2,259
   22.90 +	.long 0x47e20c21 # amask $2,$1
   22.91 +	srl \$1,8,\$2
   22.92 +	sll \$2,2,\$2
   22.93 +	sll \$0,3,\$0
   22.94 +	addl \$1,\$0,\$0
   22.95 +	addl \$2,\$0,\$0
   22.96 +	ret \$31,(\$26),1
   22.97 +	.end main
   22.98 +EOF
   22.99 +	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
  22.100 +	if test "$?" = 0 ; then
  22.101 +		./$dummy
  22.102 +		case "$?" in
  22.103 +			7)
  22.104 +				UNAME_MACHINE="alpha"
  22.105 +				;;
  22.106 +			15)
  22.107 +				UNAME_MACHINE="alphaev5"
  22.108 +				;;
  22.109 +			14)
  22.110 +				UNAME_MACHINE="alphaev56"
  22.111 +				;;
  22.112 +			10)
  22.113 +				UNAME_MACHINE="alphapca56"
  22.114 +				;;
  22.115 +			16)
  22.116 +				UNAME_MACHINE="alphaev6"
  22.117 +				;;
  22.118 +		esac
  22.119 +	fi
  22.120 +	rm -f $dummy.s $dummy
  22.121 +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  22.122 +	exit 0 ;;
  22.123 +    Alpha\ *:Windows_NT*:*)
  22.124 +	# How do we know it's Interix rather than the generic POSIX subsystem?
  22.125 +	# Should we change UNAME_MACHINE based on the output of uname instead
  22.126 +	# of the specific Alpha model?
  22.127 +	echo alpha-pc-interix
  22.128 +	exit 0 ;;
  22.129 +    21064:Windows_NT:50:3)
  22.130 +	echo alpha-dec-winnt3.5
  22.131 +	exit 0 ;;
  22.132 +    Amiga*:UNIX_System_V:4.0:*)
  22.133 +	echo m68k-cbm-sysv4
  22.134 +	exit 0;;
  22.135 +    amiga:NetBSD:*:*)
  22.136 +      echo m68k-cbm-netbsd${UNAME_RELEASE}
  22.137 +      exit 0 ;;
  22.138 +    amiga:OpenBSD:*:*)
  22.139 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.140 +	exit 0 ;;
  22.141 +    *:[Aa]miga[Oo][Ss]:*:*)
  22.142 +	echo ${UNAME_MACHINE}-unknown-amigaos
  22.143 +	exit 0 ;;
  22.144 +    arc64:OpenBSD:*:*)
  22.145 +	echo mips64el-unknown-openbsd${UNAME_RELEASE}
  22.146 +	exit 0 ;;
  22.147 +    arc:OpenBSD:*:*)
  22.148 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
  22.149 +	exit 0 ;;
  22.150 +    hkmips:OpenBSD:*:*)
  22.151 +	echo mips-unknown-openbsd${UNAME_RELEASE}
  22.152 +	exit 0 ;;
  22.153 +    pmax:OpenBSD:*:*)
  22.154 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
  22.155 +	exit 0 ;;
  22.156 +    sgi:OpenBSD:*:*)
  22.157 +	echo mips-unknown-openbsd${UNAME_RELEASE}
  22.158 +	exit 0 ;;
  22.159 +    wgrisc:OpenBSD:*:*)
  22.160 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
  22.161 +	exit 0 ;;
  22.162 +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  22.163 +	echo arm-acorn-riscix${UNAME_RELEASE}
  22.164 +	exit 0;;
  22.165 +    arm32:NetBSD:*:*)
  22.166 +	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  22.167 +	exit 0 ;;
  22.168 +    SR2?01:HI-UX/MPP:*:*)
  22.169 +	echo hppa1.1-hitachi-hiuxmpp
  22.170 +	exit 0;;
  22.171 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  22.172 +	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  22.173 +	if test "`(/bin/universe) 2>/dev/null`" = att ; then
  22.174 +		echo pyramid-pyramid-sysv3
  22.175 +	else
  22.176 +		echo pyramid-pyramid-bsd
  22.177 +	fi
  22.178 +	exit 0 ;;
  22.179 +    NILE*:*:*:dcosx)
  22.180 +	echo pyramid-pyramid-svr4
  22.181 +	exit 0 ;;
  22.182 +    sun4H:SunOS:5.*:*)
  22.183 +	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  22.184 +	exit 0 ;;
  22.185 +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  22.186 +	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  22.187 +	exit 0 ;;
  22.188 +    i86pc:SunOS:5.*:*)
  22.189 +	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  22.190 +	exit 0 ;;
  22.191 +    sun4*:SunOS:6*:*)
  22.192 +	# According to config.sub, this is the proper way to canonicalize
  22.193 +	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
  22.194 +	# it's likely to be more like Solaris than SunOS4.
  22.195 +	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  22.196 +	exit 0 ;;
  22.197 +    sun4*:SunOS:*:*)
  22.198 +	case "`/usr/bin/arch -k`" in
  22.199 +	    Series*|S4*)
  22.200 +		UNAME_RELEASE=`uname -v`
  22.201 +		;;
  22.202 +	esac
  22.203 +	# Japanese Language versions have a version number like `4.1.3-JL'.
  22.204 +	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  22.205 +	exit 0 ;;
  22.206 +    sun3*:SunOS:*:*)
  22.207 +	echo m68k-sun-sunos${UNAME_RELEASE}
  22.208 +	exit 0 ;;
  22.209 +    sun*:*:4.2BSD:*)
  22.210 +	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  22.211 +	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  22.212 +	case "`/bin/arch`" in
  22.213 +	    sun3)
  22.214 +		echo m68k-sun-sunos${UNAME_RELEASE}
  22.215 +		;;
  22.216 +	    sun4)
  22.217 +		echo sparc-sun-sunos${UNAME_RELEASE}
  22.218 +		;;
  22.219 +	esac
  22.220 +	exit 0 ;;
  22.221 +    aushp:SunOS:*:*)
  22.222 +	echo sparc-auspex-sunos${UNAME_RELEASE}
  22.223 +	exit 0 ;;
  22.224 +    atari*:NetBSD:*:*)
  22.225 +	echo m68k-atari-netbsd${UNAME_RELEASE}
  22.226 +	exit 0 ;;
  22.227 +    atari*:OpenBSD:*:*)
  22.228 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.229 +	exit 0 ;;
  22.230 +    # The situation for MiNT is a little confusing.  The machine name
  22.231 +    # can be virtually everything (everything which is not
  22.232 +    # "atarist" or "atariste" at least should have a processor 
  22.233 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
  22.234 +    # to the lowercase version "mint" (or "freemint").  Finally
  22.235 +    # the system name "TOS" denotes a system which is actually not
  22.236 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
  22.237 +    # be no problem.
  22.238 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  22.239 +        echo m68k-atari-mint${UNAME_RELEASE}
  22.240 +	exit 0 ;;
  22.241 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  22.242 +	echo m68k-atari-mint${UNAME_RELEASE}
  22.243 +        exit 0 ;;
  22.244 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  22.245 +        echo m68k-atari-mint${UNAME_RELEASE}
  22.246 +	exit 0 ;;
  22.247 +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  22.248 +        echo m68k-milan-mint${UNAME_RELEASE}
  22.249 +        exit 0 ;;
  22.250 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  22.251 +        echo m68k-hades-mint${UNAME_RELEASE}
  22.252 +        exit 0 ;;
  22.253 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  22.254 +        echo m68k-unknown-mint${UNAME_RELEASE}
  22.255 +        exit 0 ;;
  22.256 +    sun3*:NetBSD:*:*)
  22.257 +	echo m68k-sun-netbsd${UNAME_RELEASE}
  22.258 +	exit 0 ;;
  22.259 +    sun3*:OpenBSD:*:*)
  22.260 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.261 +	exit 0 ;;
  22.262 +    mac68k:NetBSD:*:*)
  22.263 +	echo m68k-apple-netbsd${UNAME_RELEASE}
  22.264 +	exit 0 ;;
  22.265 +    mac68k:OpenBSD:*:*)
  22.266 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.267 +	exit 0 ;;
  22.268 +    mvme68k:OpenBSD:*:*)
  22.269 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.270 +	exit 0 ;;
  22.271 +    mvme88k:OpenBSD:*:*)
  22.272 +	echo m88k-unknown-openbsd${UNAME_RELEASE}
  22.273 +	exit 0 ;;
  22.274 +    powerpc:machten:*:*)
  22.275 +	echo powerpc-apple-machten${UNAME_RELEASE}
  22.276 +	exit 0 ;;
  22.277 +    macppc:NetBSD:*:*)
  22.278 +        echo powerpc-apple-netbsd${UNAME_RELEASE}
  22.279 +        exit 0 ;;
  22.280 +    RISC*:Mach:*:*)
  22.281 +	echo mips-dec-mach_bsd4.3
  22.282 +	exit 0 ;;
  22.283 +    RISC*:ULTRIX:*:*)
  22.284 +	echo mips-dec-ultrix${UNAME_RELEASE}
  22.285 +	exit 0 ;;
  22.286 +    VAX*:ULTRIX*:*:*)
  22.287 +	echo vax-dec-ultrix${UNAME_RELEASE}
  22.288 +	exit 0 ;;
  22.289 +    2020:CLIX:*:* | 2430:CLIX:*:*)
  22.290 +	echo clipper-intergraph-clix${UNAME_RELEASE}
  22.291 +	exit 0 ;;
  22.292 +    mips:*:*:UMIPS | mips:*:*:RISCos)
  22.293 +	sed 's/^	//' << EOF >$dummy.c
  22.294 +#ifdef __cplusplus
  22.295 +	int main (int argc, char *argv[]) {
  22.296 +#else
  22.297 +	int main (argc, argv) int argc; char *argv[]; {
  22.298 +#endif
  22.299 +	#if defined (host_mips) && defined (MIPSEB)
  22.300 +	#if defined (SYSTYPE_SYSV)
  22.301 +	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  22.302 +	#endif
  22.303 +	#if defined (SYSTYPE_SVR4)
  22.304 +	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  22.305 +	#endif
  22.306 +	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  22.307 +	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  22.308 +	#endif
  22.309 +	#endif
  22.310 +	  exit (-1);
  22.311 +	}
  22.312 +EOF
  22.313 +	$CC_FOR_BUILD $dummy.c -o $dummy \
  22.314 +	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
  22.315 +	  && rm $dummy.c $dummy && exit 0
  22.316 +	rm -f $dummy.c $dummy
  22.317 +	echo mips-mips-riscos${UNAME_RELEASE}
  22.318 +	exit 0 ;;
  22.319 +    Night_Hawk:Power_UNIX:*:*)
  22.320 +	echo powerpc-harris-powerunix
  22.321 +	exit 0 ;;
  22.322 +    m88k:CX/UX:7*:*)
  22.323 +	echo m88k-harris-cxux7
  22.324 +	exit 0 ;;
  22.325 +    m88k:*:4*:R4*)
  22.326 +	echo m88k-motorola-sysv4
  22.327 +	exit 0 ;;
  22.328 +    m88k:*:3*:R3*)
  22.329 +	echo m88k-motorola-sysv3
  22.330 +	exit 0 ;;
  22.331 +    AViiON:dgux:*:*)
  22.332 +        # DG/UX returns AViiON for all architectures
  22.333 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
  22.334 +        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
  22.335 +	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
  22.336 +	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
  22.337 +		echo m88k-dg-dgux${UNAME_RELEASE}
  22.338 +	else
  22.339 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
  22.340 +	fi
  22.341 +        else echo i586-dg-dgux${UNAME_RELEASE}
  22.342 +        fi
  22.343 + 	exit 0 ;;
  22.344 +    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
  22.345 +	echo m88k-dolphin-sysv3
  22.346 +	exit 0 ;;
  22.347 +    M88*:*:R3*:*)
  22.348 +	# Delta 88k system running SVR3
  22.349 +	echo m88k-motorola-sysv3
  22.350 +	exit 0 ;;
  22.351 +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  22.352 +	echo m88k-tektronix-sysv3
  22.353 +	exit 0 ;;
  22.354 +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  22.355 +	echo m68k-tektronix-bsd
  22.356 +	exit 0 ;;
  22.357 +    *:IRIX*:*:*)
  22.358 +	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  22.359 +	exit 0 ;;
  22.360 +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  22.361 +	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
  22.362 +	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
  22.363 +    i?86:AIX:*:*)
  22.364 +	echo i386-ibm-aix
  22.365 +	exit 0 ;;
  22.366 +    *:AIX:2:3)
  22.367 +	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  22.368 +		sed 's/^		//' << EOF >$dummy.c
  22.369 +		#include <sys/systemcfg.h>
  22.370 +
  22.371 +		main()
  22.372 +			{
  22.373 +			if (!__power_pc())
  22.374 +				exit(1);
  22.375 +			puts("powerpc-ibm-aix3.2.5");
  22.376 +			exit(0);
  22.377 +			}
  22.378 +EOF
  22.379 +		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
  22.380 +		rm -f $dummy.c $dummy
  22.381 +		echo rs6000-ibm-aix3.2.5
  22.382 +	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  22.383 +		echo rs6000-ibm-aix3.2.4
  22.384 +	else
  22.385 +		echo rs6000-ibm-aix3.2
  22.386 +	fi
  22.387 +	exit 0 ;;
  22.388 +    *:AIX:*:4)
  22.389 +	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
  22.390 +	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
  22.391 +		IBM_ARCH=rs6000
  22.392 +	else
  22.393 +		IBM_ARCH=powerpc
  22.394 +	fi
  22.395 +	if [ -x /usr/bin/oslevel ] ; then
  22.396 +		IBM_REV=`/usr/bin/oslevel`
  22.397 +	else
  22.398 +		IBM_REV=4.${UNAME_RELEASE}
  22.399 +	fi
  22.400 +	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  22.401 +	exit 0 ;;
  22.402 +    *:AIX:*:*)
  22.403 +	echo rs6000-ibm-aix
  22.404 +	exit 0 ;;
  22.405 +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  22.406 +	echo romp-ibm-bsd4.4
  22.407 +	exit 0 ;;
  22.408 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
  22.409 +	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
  22.410 +	exit 0 ;;                           # report: romp-ibm BSD 4.3
  22.411 +    *:BOSX:*:*)
  22.412 +	echo rs6000-bull-bosx
  22.413 +	exit 0 ;;
  22.414 +    DPX/2?00:B.O.S.:*:*)
  22.415 +	echo m68k-bull-sysv3
  22.416 +	exit 0 ;;
  22.417 +    9000/[34]??:4.3bsd:1.*:*)
  22.418 +	echo m68k-hp-bsd
  22.419 +	exit 0 ;;
  22.420 +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  22.421 +	echo m68k-hp-bsd4.4
  22.422 +	exit 0 ;;
  22.423 +    9000/[34678]??:HP-UX:*:*)
  22.424 +	case "${UNAME_MACHINE}" in
  22.425 +	    9000/31? )            HP_ARCH=m68000 ;;
  22.426 +	    9000/[34]?? )         HP_ARCH=m68k ;;
  22.427 +	    9000/[678][0-9][0-9])
  22.428 +              sed 's/^              //' << EOF >$dummy.c
  22.429 +              #include <stdlib.h>
  22.430 +              #include <unistd.h>
  22.431 +
  22.432 +              int main ()
  22.433 +              {
  22.434 +              #if defined(_SC_KERNEL_BITS)
  22.435 +                  long bits = sysconf(_SC_KERNEL_BITS);
  22.436 +              #endif
  22.437 +                  long cpu  = sysconf (_SC_CPU_VERSION);
  22.438 +
  22.439 +                  switch (cpu)
  22.440 +              	{
  22.441 +              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  22.442 +              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  22.443 +              	case CPU_PA_RISC2_0:
  22.444 +              #if defined(_SC_KERNEL_BITS)
  22.445 +              	    switch (bits)
  22.446 +              		{
  22.447 +              		case 64: puts ("hppa2.0w"); break;
  22.448 +              		case 32: puts ("hppa2.0n"); break;
  22.449 +              		default: puts ("hppa2.0"); break;
  22.450 +              		} break;
  22.451 +              #else  /* !defined(_SC_KERNEL_BITS) */
  22.452 +              	    puts ("hppa2.0"); break;
  22.453 +              #endif
  22.454 +              	default: puts ("hppa1.0"); break;
  22.455 +              	}
  22.456 +                  exit (0);
  22.457 +              }
  22.458 +EOF
  22.459 +	($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
  22.460 +	rm -f $dummy.c $dummy
  22.461 +	esac
  22.462 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  22.463 +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  22.464 +	exit 0 ;;
  22.465 +    3050*:HI-UX:*:*)
  22.466 +	sed 's/^	//' << EOF >$dummy.c
  22.467 +	#include <unistd.h>
  22.468 +	int
  22.469 +	main ()
  22.470 +	{
  22.471 +	  long cpu = sysconf (_SC_CPU_VERSION);
  22.472 +	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  22.473 +	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
  22.474 +	     results, however.  */
  22.475 +	  if (CPU_IS_PA_RISC (cpu))
  22.476 +	    {
  22.477 +	      switch (cpu)
  22.478 +		{
  22.479 +		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  22.480 +		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  22.481 +		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  22.482 +		  default: puts ("hppa-hitachi-hiuxwe2"); break;
  22.483 +		}
  22.484 +	    }
  22.485 +	  else if (CPU_IS_HP_MC68K (cpu))
  22.486 +	    puts ("m68k-hitachi-hiuxwe2");
  22.487 +	  else puts ("unknown-hitachi-hiuxwe2");
  22.488 +	  exit (0);
  22.489 +	}
  22.490 +EOF
  22.491 +	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
  22.492 +	rm -f $dummy.c $dummy
  22.493 +	echo unknown-hitachi-hiuxwe2
  22.494 +	exit 0 ;;
  22.495 +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  22.496 +	echo hppa1.1-hp-bsd
  22.497 +	exit 0 ;;
  22.498 +    9000/8??:4.3bsd:*:*)
  22.499 +	echo hppa1.0-hp-bsd
  22.500 +	exit 0 ;;
  22.501 +    *9??*:MPE/iX:*:*)
  22.502 +	echo hppa1.0-hp-mpeix
  22.503 +	exit 0 ;;
  22.504 +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  22.505 +	echo hppa1.1-hp-osf
  22.506 +	exit 0 ;;
  22.507 +    hp8??:OSF1:*:*)
  22.508 +	echo hppa1.0-hp-osf
  22.509 +	exit 0 ;;
  22.510 +    i?86:OSF1:*:*)
  22.511 +	if [ -x /usr/sbin/sysversion ] ; then
  22.512 +	    echo ${UNAME_MACHINE}-unknown-osf1mk
  22.513 +	else
  22.514 +	    echo ${UNAME_MACHINE}-unknown-osf1
  22.515 +	fi
  22.516 +	exit 0 ;;
  22.517 +    parisc*:Lites*:*:*)
  22.518 +	echo hppa1.1-hp-lites
  22.519 +	exit 0 ;;
  22.520 +    hppa*:OpenBSD:*:*)
  22.521 +	echo hppa-unknown-openbsd
  22.522 +	exit 0 ;;
  22.523 +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  22.524 +	echo c1-convex-bsd
  22.525 +        exit 0 ;;
  22.526 +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  22.527 +	if getsysinfo -f scalar_acc
  22.528 +	then echo c32-convex-bsd
  22.529 +	else echo c2-convex-bsd
  22.530 +	fi
  22.531 +        exit 0 ;;
  22.532 +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  22.533 +	echo c34-convex-bsd
  22.534 +        exit 0 ;;
  22.535 +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  22.536 +	echo c38-convex-bsd
  22.537 +        exit 0 ;;
  22.538 +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  22.539 +	echo c4-convex-bsd
  22.540 +        exit 0 ;;
  22.541 +    CRAY*X-MP:*:*:*)
  22.542 +	echo xmp-cray-unicos
  22.543 +        exit 0 ;;
  22.544 +    CRAY*Y-MP:*:*:*)
  22.545 +	echo ymp-cray-unicos${UNAME_RELEASE}
  22.546 +	exit 0 ;;
  22.547 +    CRAY*[A-Z]90:*:*:*)
  22.548 +	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  22.549 +	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  22.550 +	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
  22.551 +	exit 0 ;;
  22.552 +    CRAY*TS:*:*:*)
  22.553 +	echo t90-cray-unicos${UNAME_RELEASE}
  22.554 +	exit 0 ;;
  22.555 +    CRAY*T3E:*:*:*)
  22.556 +	echo t3e-cray-unicosmk${UNAME_RELEASE}
  22.557 +	exit 0 ;;
  22.558 +    CRAY-2:*:*:*)
  22.559 +	echo cray2-cray-unicos
  22.560 +        exit 0 ;;
  22.561 +    F300:UNIX_System_V:*:*)
  22.562 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  22.563 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  22.564 +        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  22.565 +        exit 0 ;;
  22.566 +    F301:UNIX_System_V:*:*)
  22.567 +       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
  22.568 +       exit 0 ;;
  22.569 +    hp3[0-9][05]:NetBSD:*:*)
  22.570 +	echo m68k-hp-netbsd${UNAME_RELEASE}
  22.571 +	exit 0 ;;
  22.572 +    hp300:OpenBSD:*:*)
  22.573 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
  22.574 +	exit 0 ;;
  22.575 +    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
  22.576 +	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  22.577 +	exit 0 ;;
  22.578 +    sparc*:BSD/OS:*:*)
  22.579 +	echo sparc-unknown-bsdi${UNAME_RELEASE}
  22.580 +	exit 0 ;;
  22.581 +    *:BSD/OS:*:*)
  22.582 +	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  22.583 +	exit 0 ;;
  22.584 +    *:FreeBSD:*:*)
  22.585 +	if test -x /usr/bin/objformat; then
  22.586 +	    if test "elf" = "`/usr/bin/objformat`"; then
  22.587 +		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
  22.588 +		exit 0
  22.589 +	    fi
  22.590 +	fi
  22.591 +	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  22.592 +	exit 0 ;;
  22.593 +    *:NetBSD:*:*)
  22.594 +	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  22.595 +	exit 0 ;;
  22.596 +    *:OpenBSD:*:*)
  22.597 +	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  22.598 +	exit 0 ;;
  22.599 +    i*:CYGWIN*:*)
  22.600 +	echo ${UNAME_MACHINE}-pc-cygwin
  22.601 +	exit 0 ;;
  22.602 +    i*:MINGW*:*)
  22.603 +	echo ${UNAME_MACHINE}-pc-mingw32
  22.604 +	exit 0 ;;
  22.605 +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  22.606 +	# How do we know it's Interix rather than the generic POSIX subsystem?
  22.607 +	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  22.608 +	# UNAME_MACHINE based on the output of uname instead of i386?
  22.609 +	echo i386-pc-interix
  22.610 +	exit 0 ;;
  22.611 +    i*:UWIN*:*)
  22.612 +	echo ${UNAME_MACHINE}-pc-uwin
  22.613 +	exit 0 ;;
  22.614 +    p*:CYGWIN*:*)
  22.615 +	echo powerpcle-unknown-cygwin
  22.616 +	exit 0 ;;
  22.617 +    prep*:SunOS:5.*:*)
  22.618 +	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  22.619 +	exit 0 ;;
  22.620 +    *:GNU:*:*)
  22.621 +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  22.622 +	exit 0 ;;
  22.623 +    *:Linux:*:*)
  22.624 +	# uname on the ARM produces all sorts of strangeness, and we need to
  22.625 +	# filter it out.
  22.626 +	case "$UNAME_MACHINE" in
  22.627 +	  armv*)		      UNAME_MACHINE=$UNAME_MACHINE ;;
  22.628 +	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
  22.629 +	esac
  22.630 +
  22.631 +	# The BFD linker knows what the default object file format is, so
  22.632 +	# first see if it will tell us. cd to the root directory to prevent
  22.633 +	# problems with other programs or directories called `ld' in the path.
  22.634 +	ld_help_string=`cd /; ld --help 2>&1`
  22.635 +	ld_supported_emulations=`echo $ld_help_string \
  22.636 +			 | sed -ne '/supported emulations:/!d
  22.637 +				    s/[ 	][ 	]*/ /g
  22.638 +				    s/.*supported emulations: *//
  22.639 +				    s/ .*//
  22.640 +				    p'`
  22.641 +        case "$ld_supported_emulations" in
  22.642 +	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
  22.643 +	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
  22.644 +	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
  22.645 +	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
  22.646 +	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
  22.647 +	  elf32ppc)
  22.648 +		# Determine Lib Version
  22.649 +		cat >$dummy.c <<EOF
  22.650 +#include <features.h>
  22.651 +#if defined(__GLIBC__)
  22.652 +extern char __libc_version[];
  22.653 +extern char __libc_release[];
  22.654 +#endif
  22.655 +main(argc, argv)
  22.656 +     int argc;
  22.657 +     char *argv[];
  22.658 +{
  22.659 +#if defined(__GLIBC__)
  22.660 +  printf("%s %s\n", __libc_version, __libc_release);
  22.661 +#else
  22.662 +  printf("unkown\n");
  22.663 +#endif
  22.664 +  return 0;
  22.665 +}
  22.666 +EOF
  22.667 +		LIBC=""
  22.668 +		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
  22.669 +		if test "$?" = 0 ; then
  22.670 +			./$dummy | grep 1\.99 > /dev/null
  22.671 +			if test "$?" = 0 ; then
  22.672 +				LIBC="libc1"
  22.673 +			fi
  22.674 +		fi	
  22.675 +		rm -f $dummy.c $dummy
  22.676 +		echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
  22.677 +	esac
  22.678 +
  22.679 +	if test "${UNAME_MACHINE}" = "alpha" ; then
  22.680 +		sed 's/^	//'  <<EOF >$dummy.s
  22.681 +		.globl main
  22.682 +		.ent main
  22.683 +	main:
  22.684 +		.frame \$30,0,\$26,0
  22.685 +		.prologue 0
  22.686 +		.long 0x47e03d80 # implver $0
  22.687 +		lda \$2,259
  22.688 +		.long 0x47e20c21 # amask $2,$1
  22.689 +		srl \$1,8,\$2
  22.690 +		sll \$2,2,\$2
  22.691 +		sll \$0,3,\$0
  22.692 +		addl \$1,\$0,\$0
  22.693 +		addl \$2,\$0,\$0
  22.694 +		ret \$31,(\$26),1
  22.695 +		.end main
  22.696 +EOF
  22.697 +		LIBC=""
  22.698 +		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
  22.699 +		if test "$?" = 0 ; then
  22.700 +			./$dummy
  22.701 +			case "$?" in
  22.702 +			7)
  22.703 +				UNAME_MACHINE="alpha"
  22.704 +				;;
  22.705 +			15)
  22.706 +				UNAME_MACHINE="alphaev5"
  22.707 +				;;
  22.708 +			14)
  22.709 +				UNAME_MACHINE="alphaev56"
  22.710 +				;;
  22.711 +			10)
  22.712 +				UNAME_MACHINE="alphapca56"
  22.713 +				;;
  22.714 +			16)
  22.715 +				UNAME_MACHINE="alphaev6"
  22.716 +				;;
  22.717 +			esac
  22.718 +
  22.719 +			objdump --private-headers $dummy | \
  22.720 +			  grep ld.so.1 > /dev/null
  22.721 +			if test "$?" = 0 ; then
  22.722 +				LIBC="libc1"
  22.723 +			fi
  22.724 +		fi
  22.725 +		rm -f $dummy.s $dummy
  22.726 +		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
  22.727 +	elif test "${UNAME_MACHINE}" = "mips" ; then
  22.728 +	  cat >$dummy.c <<EOF
  22.729 +#ifdef __cplusplus
  22.730 +	int main (int argc, char *argv[]) {
  22.731 +#else
  22.732 +	int main (argc, argv) int argc; char *argv[]; {
  22.733 +#endif
  22.734 +#ifdef __MIPSEB__
  22.735 +  printf ("%s-unknown-linux-gnu\n", argv[1]);
  22.736 +#endif
  22.737 +#ifdef __MIPSEL__
  22.738 +  printf ("%sel-unknown-linux-gnu\n", argv[1]);
  22.739 +#endif
  22.740 +  return 0;
  22.741 +}
  22.742 +EOF
  22.743 +	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
  22.744 +	  rm -f $dummy.c $dummy
  22.745 +	else
  22.746 +	  # Either a pre-BFD a.out linker (linux-gnuoldld)
  22.747 +	  # or one that does not give us useful --help.
  22.748 +	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
  22.749 +	  # If ld does not provide *any* "supported emulations:"
  22.750 +	  # that means it is gnuoldld.
  22.751 +	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
  22.752 +	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
  22.753 +
  22.754 +	  case "${UNAME_MACHINE}" in
  22.755 +	  i?86)
  22.756 +	    VENDOR=pc;
  22.757 +	    ;;
  22.758 +	  *)
  22.759 +	    VENDOR=unknown;
  22.760 +	    ;;
  22.761 +	  esac
  22.762 +	  # Determine whether the default compiler is a.out or elf
  22.763 +	  cat >$dummy.c <<EOF
  22.764 +#include <features.h>
  22.765 +#ifdef __cplusplus
  22.766 +	int main (int argc, char *argv[]) {
  22.767 +#else
  22.768 +	int main (argc, argv) int argc; char *argv[]; {
  22.769 +#endif
  22.770 +#ifdef __ELF__
  22.771 +# ifdef __GLIBC__
  22.772 +#  if __GLIBC__ >= 2
  22.773 +    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
  22.774 +#  else
  22.775 +    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
  22.776 +#  endif
  22.777 +# else
  22.778 +   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
  22.779 +# endif
  22.780 +#else
  22.781 +  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
  22.782 +#endif
  22.783 +  return 0;
  22.784 +}
  22.785 +EOF
  22.786 +	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
  22.787 +	  rm -f $dummy.c $dummy
  22.788 +	fi ;;
  22.789 +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
  22.790 +# are messed up and put the nodename in both sysname and nodename.
  22.791 +    i?86:DYNIX/ptx:4*:*)
  22.792 +	echo i386-sequent-sysv4
  22.793 +	exit 0 ;;
  22.794 +    i?86:UNIX_SV:4.2MP:2.*)
  22.795 +        # Unixware is an offshoot of SVR4, but it has its own version
  22.796 +        # number series starting with 2...
  22.797 +        # I am not positive that other SVR4 systems won't match this,
  22.798 +	# I just have to hope.  -- rms.
  22.799 +        # Use sysv4.2uw... so that sysv4* matches it.
  22.800 +	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  22.801 +	exit 0 ;;
  22.802 +    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
  22.803 +	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  22.804 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
  22.805 +	else
  22.806 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
  22.807 +	fi
  22.808 +	exit 0 ;;
  22.809 +    i?86:*:5:7*)
  22.810 +	UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  22.811 +	(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  22.812 +	(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
  22.813 +	(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
  22.814 +	(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
  22.815 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
  22.816 +	exit 0 ;;
  22.817 +    i?86:*:3.2:*)
  22.818 +	if test -f /usr/options/cb.name; then
  22.819 +		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  22.820 +		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  22.821 +	elif /bin/uname -X 2>/dev/null >/dev/null ; then
  22.822 +		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  22.823 +		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  22.824 +		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
  22.825 +			&& UNAME_MACHINE=i586
  22.826 +		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
  22.827 +			&& UNAME_MACHINE=i686
  22.828 +		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
  22.829 +			&& UNAME_MACHINE=i686
  22.830 +		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  22.831 +	else
  22.832 +		echo ${UNAME_MACHINE}-pc-sysv32
  22.833 +	fi
  22.834 +	exit 0 ;;
  22.835 +    pc:*:*:*)
  22.836 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
  22.837 +        # the processor, so we play safe by assuming i386.
  22.838 +	echo i386-pc-msdosdjgpp
  22.839 +        exit 0 ;;
  22.840 +    Intel:Mach:3*:*)
  22.841 +	echo i386-pc-mach3
  22.842 +	exit 0 ;;
  22.843 +    paragon:*:*:*)
  22.844 +	echo i860-intel-osf1
  22.845 +	exit 0 ;;
  22.846 +    i860:*:4.*:*) # i860-SVR4
  22.847 +	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  22.848 +	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  22.849 +	else # Add other i860-SVR4 vendors below as they are discovered.
  22.850 +	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
  22.851 +	fi
  22.852 +	exit 0 ;;
  22.853 +    mini*:CTIX:SYS*5:*)
  22.854 +	# "miniframe"
  22.855 +	echo m68010-convergent-sysv
  22.856 +	exit 0 ;;
  22.857 +    M68*:*:R3V[567]*:*)
  22.858 +	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  22.859 +    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
  22.860 +	OS_REL=''
  22.861 +	test -r /etc/.relid \
  22.862 +	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  22.863 +	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  22.864 +	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
  22.865 +	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  22.866 +	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
  22.867 +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  22.868 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  22.869 +          && echo i486-ncr-sysv4 && exit 0 ;;
  22.870 +    m68*:LynxOS:2.*:*)
  22.871 +	echo m68k-unknown-lynxos${UNAME_RELEASE}
  22.872 +	exit 0 ;;
  22.873 +    mc68030:UNIX_System_V:4.*:*)
  22.874 +	echo m68k-atari-sysv4
  22.875 +	exit 0 ;;
  22.876 +    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
  22.877 +	echo i386-unknown-lynxos${UNAME_RELEASE}
  22.878 +	exit 0 ;;
  22.879 +    TSUNAMI:LynxOS:2.*:*)
  22.880 +	echo sparc-unknown-lynxos${UNAME_RELEASE}
  22.881 +	exit 0 ;;
  22.882 +    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
  22.883 +	echo rs6000-unknown-lynxos${UNAME_RELEASE}
  22.884 +	exit 0 ;;
  22.885 +    SM[BE]S:UNIX_SV:*:*)
  22.886 +	echo mips-dde-sysv${UNAME_RELEASE}
  22.887 +	exit 0 ;;
  22.888 +    RM*:ReliantUNIX-*:*:*)
  22.889 +	echo mips-sni-sysv4
  22.890 +	exit 0 ;;
  22.891 +    RM*:SINIX-*:*:*)
  22.892 +	echo mips-sni-sysv4
  22.893 +	exit 0 ;;
  22.894 +    *:SINIX-*:*:*)
  22.895 +	if uname -p 2>/dev/null >/dev/null ; then
  22.896 +		UNAME_MACHINE=`(uname -p) 2>/dev/null`
  22.897 +		echo ${UNAME_MACHINE}-sni-sysv4
  22.898 +	else
  22.899 +		echo ns32k-sni-sysv
  22.900 +	fi
  22.901 +	exit 0 ;;
  22.902 +    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  22.903 +                           # says <Richard.M.Bartel@ccMail.Census.GOV>
  22.904 +        echo i586-unisys-sysv4
  22.905 +        exit 0 ;;
  22.906 +    *:UNIX_System_V:4*:FTX*)
  22.907 +	# From Gerald Hewes <hewes@openmarket.com>.
  22.908 +	# How about differentiating between stratus architectures? -djm
  22.909 +	echo hppa1.1-stratus-sysv4
  22.910 +	exit 0 ;;
  22.911 +    *:*:*:FTX*)
  22.912 +	# From seanf@swdc.stratus.com.
  22.913 +	echo i860-stratus-sysv4
  22.914 +	exit 0 ;;
  22.915 +    mc68*:A/UX:*:*)
  22.916 +	echo m68k-apple-aux${UNAME_RELEASE}
  22.917 +	exit 0 ;;
  22.918 +    news*:NEWS-OS:*:6*)
  22.919 +	echo mips-sony-newsos6
  22.920 +	exit 0 ;;
  22.921 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  22.922 +	if [ -d /usr/nec ]; then
  22.923 +	        echo mips-nec-sysv${UNAME_RELEASE}
  22.924 +	else
  22.925 +	        echo mips-unknown-sysv${UNAME_RELEASE}
  22.926 +	fi
  22.927 +        exit 0 ;;
  22.928 +    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
  22.929 +	echo powerpc-be-beos
  22.930 +	exit 0 ;;
  22.931 +    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
  22.932 +	echo powerpc-apple-beos
  22.933 +	exit 0 ;;
  22.934 +    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
  22.935 +	echo i586-pc-beos
  22.936 +	exit 0 ;;
  22.937 +    SX-4:SUPER-UX:*:*)
  22.938 +	echo sx4-nec-superux${UNAME_RELEASE}
  22.939 +	exit 0 ;;
  22.940 +    SX-5:SUPER-UX:*:*)
  22.941 +	echo sx5-nec-superux${UNAME_RELEASE}
  22.942 +	exit 0 ;;
  22.943 +    Power*:Rhapsody:*:*)
  22.944 +	echo powerpc-apple-rhapsody${UNAME_RELEASE}
  22.945 +	exit 0 ;;
  22.946 +    *:Rhapsody:*:*)
  22.947 +	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  22.948 +	exit 0 ;;
  22.949 +esac
  22.950 +
  22.951 +#echo '(No uname command or uname output not recognized.)' 1>&2
  22.952 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  22.953 +
  22.954 +cat >$dummy.c <<EOF
  22.955 +#ifdef _SEQUENT_
  22.956 +# include <sys/types.h>
  22.957 +# include <sys/utsname.h>
  22.958 +#endif
  22.959 +main ()
  22.960 +{
  22.961 +#if defined (sony)
  22.962 +#if defined (MIPSEB)
  22.963 +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
  22.964 +     I don't know....  */
  22.965 +  printf ("mips-sony-bsd\n"); exit (0);
  22.966 +#else
  22.967 +#include <sys/param.h>
  22.968 +  printf ("m68k-sony-newsos%s\n",
  22.969 +#ifdef NEWSOS4
  22.970 +          "4"
  22.971 +#else
  22.972 +	  ""
  22.973 +#endif
  22.974 +         ); exit (0);
  22.975 +#endif
  22.976 +#endif
  22.977 +
  22.978 +#if defined (__arm) && defined (__acorn) && defined (__unix)
  22.979 +  printf ("arm-acorn-riscix"); exit (0);
  22.980 +#endif
  22.981 +
  22.982 +#if defined (hp300) && !defined (hpux)
  22.983 +  printf ("m68k-hp-bsd\n"); exit (0);
  22.984 +#endif
  22.985 +
  22.986 +#if defined (NeXT)
  22.987 +#if !defined (__ARCHITECTURE__)
  22.988 +#define __ARCHITECTURE__ "m68k"
  22.989 +#endif
  22.990 +  int version;
  22.991 +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  22.992 +  if (version < 4)
  22.993 +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  22.994 +  else
  22.995 +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  22.996 +  exit (0);
  22.997 +#endif
  22.998 +
  22.999 +#if defined (MULTIMAX) || defined (n16)
 22.1000 +#if defined (UMAXV)
 22.1001 +  printf ("ns32k-encore-sysv\n"); exit (0);
 22.1002 +#else
 22.1003 +#if defined (CMU)
 22.1004 +  printf ("ns32k-encore-mach\n"); exit (0);
 22.1005 +#else
 22.1006 +  printf ("ns32k-encore-bsd\n"); exit (0);
 22.1007 +#endif
 22.1008 +#endif
 22.1009 +#endif
 22.1010 +
 22.1011 +#if defined (__386BSD__)
 22.1012 +  printf ("i386-pc-bsd\n"); exit (0);
 22.1013 +#endif
 22.1014 +
 22.1015 +#if defined (sequent)
 22.1016 +#if defined (i386)
 22.1017 +  printf ("i386-sequent-dynix\n"); exit (0);
 22.1018 +#endif
 22.1019 +#if defined (ns32000)
 22.1020 +  printf ("ns32k-sequent-dynix\n"); exit (0);
 22.1021 +#endif
 22.1022 +#endif
 22.1023 +
 22.1024 +#if defined (_SEQUENT_)
 22.1025 +    struct utsname un;
 22.1026 +
 22.1027 +    uname(&un);
 22.1028 +
 22.1029 +    if (strncmp(un.version, "V2", 2) == 0) {
 22.1030 +	printf ("i386-sequent-ptx2\n"); exit (0);
 22.1031 +    }
 22.1032 +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
 22.1033 +	printf ("i386-sequent-ptx1\n"); exit (0);
 22.1034 +    }
 22.1035 +    printf ("i386-sequent-ptx\n"); exit (0);
 22.1036 +
 22.1037 +#endif
 22.1038 +
 22.1039 +#if defined (vax)
 22.1040 +#if !defined (ultrix)
 22.1041 +  printf ("vax-dec-bsd\n"); exit (0);
 22.1042 +#else
 22.1043 +  printf ("vax-dec-ultrix\n"); exit (0);
 22.1044 +#endif
 22.1045 +#endif
 22.1046 +
 22.1047 +#if defined (alliant) && defined (i860)
 22.1048 +  printf ("i860-alliant-bsd\n"); exit (0);
 22.1049 +#endif
 22.1050 +
 22.1051 +  exit (1);
 22.1052 +}
 22.1053 +EOF
 22.1054 +
 22.1055 +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
 22.1056 +rm -f $dummy.c $dummy
 22.1057 +
 22.1058 +# Apollos put the system type in the environment.
 22.1059 +
 22.1060 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
 22.1061 +
 22.1062 +# Convex versions that predate uname can use getsysinfo(1)
 22.1063 +
 22.1064 +if [ -x /usr/convex/getsysinfo ]
 22.1065 +then
 22.1066 +    case `getsysinfo -f cpu_type` in
 22.1067 +    c1*)
 22.1068 +	echo c1-convex-bsd
 22.1069 +	exit 0 ;;
 22.1070 +    c2*)
 22.1071 +	if getsysinfo -f scalar_acc
 22.1072 +	then echo c32-convex-bsd
 22.1073 +	else echo c2-convex-bsd
 22.1074 +	fi
 22.1075 +	exit 0 ;;
 22.1076 +    c34*)
 22.1077 +	echo c34-convex-bsd
 22.1078 +	exit 0 ;;
 22.1079 +    c38*)
 22.1080 +	echo c38-convex-bsd
 22.1081 +	exit 0 ;;
 22.1082 +    c4*)
 22.1083 +	echo c4-convex-bsd
 22.1084 +	exit 0 ;;
 22.1085 +    esac
 22.1086 +fi
 22.1087 +
 22.1088 +#echo '(Unable to guess system type)' 1>&2
 22.1089 +
 22.1090 +exit 1
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/config.sub	Thu Aug 10 06:05:39 2000 +0000
    23.3 @@ -0,0 +1,1215 @@
    23.4 +#! /bin/sh
    23.5 +# Configuration validation subroutine script, version 1.1.
    23.6 +#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
    23.7 +# This file is (in principle) common to ALL GNU software.
    23.8 +# The presence of a machine in this file suggests that SOME GNU software
    23.9 +# can handle that machine.  It does not imply ALL GNU software can.
   23.10 +#
   23.11 +# This file is free software; you can redistribute it and/or modify
   23.12 +# it under the terms of the GNU General Public License as published by
   23.13 +# the Free Software Foundation; either version 2 of the License, or
   23.14 +# (at your option) any later version.
   23.15 +#
   23.16 +# This program is distributed in the hope that it will be useful,
   23.17 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
   23.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   23.19 +# GNU General Public License for more details.
   23.20 +#
   23.21 +# You should have received a copy of the GNU General Public License
   23.22 +# along with this program; if not, write to the Free Software
   23.23 +# Foundation, Inc., 59 Temple Place - Suite 330,
   23.24 +# Boston, MA 02111-1307, USA.
   23.25 +
   23.26 +# As a special exception to the GNU General Public License, if you
   23.27 +# distribute this file as part of a program that contains a
   23.28 +# configuration script generated by Autoconf, you may include it under
   23.29 +# the same distribution terms that you use for the rest of that program.
   23.30 +
   23.31 +# Configuration subroutine to validate and canonicalize a configuration type.
   23.32 +# Supply the specified configuration type as an argument.
   23.33 +# If it is invalid, we print an error message on stderr and exit with code 1.
   23.34 +# Otherwise, we print the canonical config type on stdout and succeed.
   23.35 +
   23.36 +# This file is supposed to be the same for all GNU packages
   23.37 +# and recognize all the CPU types, system types and aliases
   23.38 +# that are meaningful with *any* GNU software.
   23.39 +# Each package is responsible for reporting which valid configurations
   23.40 +# it does not support.  The user should be able to distinguish
   23.41 +# a failure to support a valid configuration from a meaningless
   23.42 +# configuration.
   23.43 +
   23.44 +# The goal of this file is to map all the various variations of a given
   23.45 +# machine specification into a single specification in the form:
   23.46 +#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
   23.47 +# or in some cases, the newer four-part form:
   23.48 +#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
   23.49 +# It is wrong to echo any other type of specification.
   23.50 +
   23.51 +if [ x$1 = x ]
   23.52 +then
   23.53 +	echo Configuration name missing. 1>&2
   23.54 +	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
   23.55 +	echo "or     $0 ALIAS" 1>&2
   23.56 +	echo where ALIAS is a recognized configuration type. 1>&2
   23.57 +	exit 1
   23.58 +fi
   23.59 +
   23.60 +# First pass through any local machine types.
   23.61 +case $1 in
   23.62 +	*local*)
   23.63 +		echo $1
   23.64 +		exit 0
   23.65 +		;;
   23.66 +	*)
   23.67 +	;;
   23.68 +esac
   23.69 +
   23.70 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
   23.71 +# Here we must recognize all the valid KERNEL-OS combinations.
   23.72 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   23.73 +case $maybe_os in
   23.74 +  linux-gnu*)
   23.75 +    os=-$maybe_os
   23.76 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   23.77 +    ;;
   23.78 +  *)
   23.79 +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
   23.80 +    if [ $basic_machine != $1 ]
   23.81 +    then os=`echo $1 | sed 's/.*-/-/'`
   23.82 +    else os=; fi
   23.83 +    ;;
   23.84 +esac
   23.85 +
   23.86 +### Let's recognize common machines as not being operating systems so
   23.87 +### that things like config.sub decstation-3100 work.  We also
   23.88 +### recognize some manufacturers as not being operating systems, so we
   23.89 +### can provide default operating systems below.
   23.90 +case $os in
   23.91 +	-sun*os*)
   23.92 +		# Prevent following clause from handling this invalid input.
   23.93 +		;;
   23.94 +	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
   23.95 +	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
   23.96 +	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
   23.97 +	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   23.98 +	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   23.99 +	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  23.100 +	-apple)
  23.101 +		os=
  23.102 +		basic_machine=$1
  23.103 +		;;
  23.104 +	-sim | -cisco | -oki | -wec | -winbond)
  23.105 +		os=
  23.106 +		basic_machine=$1
  23.107 +		;;
  23.108 +	-scout)
  23.109 +		;;
  23.110 +	-wrs)
  23.111 +		os=vxworks
  23.112 +		basic_machine=$1
  23.113 +		;;
  23.114 +	-hiux*)
  23.115 +		os=-hiuxwe2
  23.116 +		;;
  23.117 +	-sco5)
  23.118 +		os=-sco3.2v5
  23.119 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.120 +		;;
  23.121 +	-sco4)
  23.122 +		os=-sco3.2v4
  23.123 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.124 +		;;
  23.125 +	-sco3.2.[4-9]*)
  23.126 +		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  23.127 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.128 +		;;
  23.129 +	-sco3.2v[4-9]*)
  23.130 +		# Don't forget version if it is 3.2v4 or newer.
  23.131 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.132 +		;;
  23.133 +	-sco*)
  23.134 +		os=-sco3.2v2
  23.135 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.136 +		;;
  23.137 +	-udk*)
  23.138 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.139 +		;;
  23.140 +	-isc)
  23.141 +		os=-isc2.2
  23.142 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.143 +		;;
  23.144 +	-clix*)
  23.145 +		basic_machine=clipper-intergraph
  23.146 +		;;
  23.147 +	-isc*)
  23.148 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  23.149 +		;;
  23.150 +	-lynx*)
  23.151 +		os=-lynxos
  23.152 +		;;
  23.153 +	-ptx*)
  23.154 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  23.155 +		;;
  23.156 +	-windowsnt*)
  23.157 +		os=`echo $os | sed -e 's/windowsnt/winnt/'`
  23.158 +		;;
  23.159 +	-psos*)
  23.160 +		os=-psos
  23.161 +		;;
  23.162 +esac
  23.163 +
  23.164 +# Decode aliases for certain CPU-COMPANY combinations.
  23.165 +case $basic_machine in
  23.166 +	# Recognize the basic CPU types without company name.
  23.167 +	# Some are omitted here because they have special meanings below.
  23.168 +	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
  23.169 +		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
  23.170 +		| 580 | i960 | h8300 \
  23.171 +		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
  23.172 +		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
  23.173 +		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
  23.174 +		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
  23.175 +		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
  23.176 +		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
  23.177 +		| mips64vr5000 | miprs64vr5000el \
  23.178 +		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  23.179 +		| thumb | d10v)
  23.180 +		basic_machine=$basic_machine-unknown
  23.181 +		;;
  23.182 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
  23.183 +		;;
  23.184 +
  23.185 +	# We use `pc' rather than `unknown'
  23.186 +	# because (1) that's what they normally are, and
  23.187 +	# (2) the word "unknown" tends to confuse beginning users.
  23.188 +	i[34567]86)
  23.189 +	  basic_machine=$basic_machine-pc
  23.190 +	  ;;
  23.191 +	# Object if more than one company name word.
  23.192 +	*-*-*)
  23.193 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  23.194 +		exit 1
  23.195 +		;;
  23.196 +	# Recognize the basic CPU types with company name.
  23.197 +	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
  23.198 +	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
  23.199 +	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  23.200 +	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
  23.201 +	      | xmp-* | ymp-* \
  23.202 +	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
  23.203 +	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
  23.204 +	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
  23.205 +	      | clipper-* | orion-* \
  23.206 +	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  23.207 +	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
  23.208 +	      | mips64el-* | mips64orion-* | mips64orionel-* \
  23.209 +	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
  23.210 +	      | mipstx39-* | mipstx39el-* \
  23.211 +	      | f301-* | armv*-* | t3e-* \
  23.212 +	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
  23.213 +	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
  23.214 +		;;
  23.215 +	# Recognize the various machine names and aliases which stand
  23.216 +	# for a CPU type and a company and sometimes even an OS.
  23.217 +	386bsd)
  23.218 +		basic_machine=i386-unknown
  23.219 +		os=-bsd
  23.220 +		;;
  23.221 +	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  23.222 +		basic_machine=m68000-att
  23.223 +		;;
  23.224 +	3b*)
  23.225 +		basic_machine=we32k-att
  23.226 +		;;
  23.227 +	a29khif)
  23.228 +		basic_machine=a29k-amd
  23.229 +		os=-udi
  23.230 +		;;
  23.231 +	adobe68k)
  23.232 +		basic_machine=m68010-adobe
  23.233 +		os=-scout
  23.234 +		;;
  23.235 +	alliant | fx80)
  23.236 +		basic_machine=fx80-alliant
  23.237 +		;;
  23.238 +	altos | altos3068)
  23.239 +		basic_machine=m68k-altos
  23.240 +		;;
  23.241 +	am29k)
  23.242 +		basic_machine=a29k-none
  23.243 +		os=-bsd
  23.244 +		;;
  23.245 +	amdahl)
  23.246 +		basic_machine=580-amdahl
  23.247 +		os=-sysv
  23.248 +		;;
  23.249 +	amiga | amiga-*)
  23.250 +		basic_machine=m68k-cbm
  23.251 +		;;
  23.252 +	amigaos | amigados)
  23.253 +		basic_machine=m68k-cbm
  23.254 +		os=-amigaos
  23.255 +		;;
  23.256 +	amigaunix | amix)
  23.257 +		basic_machine=m68k-cbm
  23.258 +		os=-sysv4
  23.259 +		;;
  23.260 +	apollo68)
  23.261 +		basic_machine=m68k-apollo
  23.262 +		os=-sysv
  23.263 +		;;
  23.264 +	apollo68bsd)
  23.265 +		basic_machine=m68k-apollo
  23.266 +		os=-bsd
  23.267 +		;;
  23.268 +	aux)
  23.269 +		basic_machine=m68k-apple
  23.270 +		os=-aux
  23.271 +		;;
  23.272 +	balance)
  23.273 +		basic_machine=ns32k-sequent
  23.274 +		os=-dynix
  23.275 +		;;
  23.276 +	convex-c1)
  23.277 +		basic_machine=c1-convex
  23.278 +		os=-bsd
  23.279 +		;;
  23.280 +	convex-c2)
  23.281 +		basic_machine=c2-convex
  23.282 +		os=-bsd
  23.283 +		;;
  23.284 +	convex-c32)
  23.285 +		basic_machine=c32-convex
  23.286 +		os=-bsd
  23.287 +		;;
  23.288 +	convex-c34)
  23.289 +		basic_machine=c34-convex
  23.290 +		os=-bsd
  23.291 +		;;
  23.292 +	convex-c38)
  23.293 +		basic_machine=c38-convex
  23.294 +		os=-bsd
  23.295 +		;;
  23.296 +	cray | ymp)
  23.297 +		basic_machine=ymp-cray
  23.298 +		os=-unicos
  23.299 +		;;
  23.300 +	cray2)
  23.301 +		basic_machine=cray2-cray
  23.302 +		os=-unicos
  23.303 +		;;
  23.304 +	[ctj]90-cray)
  23.305 +		basic_machine=c90-cray
  23.306 +		os=-unicos
  23.307 +		;;
  23.308 +	crds | unos)
  23.309 +		basic_machine=m68k-crds
  23.310 +		;;
  23.311 +	da30 | da30-*)
  23.312 +		basic_machine=m68k-da30
  23.313 +		;;
  23.314 +	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  23.315 +		basic_machine=mips-dec
  23.316 +		;;
  23.317 +	delta | 3300 | motorola-3300 | motorola-delta \
  23.318 +	      | 3300-motorola | delta-motorola)
  23.319 +		basic_machine=m68k-motorola
  23.320 +		;;
  23.321 +	delta88)
  23.322 +		basic_machine=m88k-motorola
  23.323 +		os=-sysv3
  23.324 +		;;
  23.325 +	dpx20 | dpx20-*)
  23.326 +		basic_machine=rs6000-bull
  23.327 +		os=-bosx
  23.328 +		;;
  23.329 +	dpx2* | dpx2*-bull)
  23.330 +		basic_machine=m68k-bull
  23.331 +		os=-sysv3
  23.332 +		;;
  23.333 +	ebmon29k)
  23.334 +		basic_machine=a29k-amd
  23.335 +		os=-ebmon
  23.336 +		;;
  23.337 +	elxsi)
  23.338 +		basic_machine=elxsi-elxsi
  23.339 +		os=-bsd
  23.340 +		;;
  23.341 +	encore | umax | mmax)
  23.342 +		basic_machine=ns32k-encore
  23.343 +		;;
  23.344 +	es1800 | OSE68k | ose68k | ose | OSE)
  23.345 +		basic_machine=m68k-ericsson
  23.346 +		os=-ose
  23.347 +		;;
  23.348 +	fx2800)
  23.349 +		basic_machine=i860-alliant
  23.350 +		;;
  23.351 +	genix)
  23.352 +		basic_machine=ns32k-ns
  23.353 +		;;
  23.354 +	gmicro)
  23.355 +		basic_machine=tron-gmicro
  23.356 +		os=-sysv
  23.357 +		;;
  23.358 +	h3050r* | hiux*)
  23.359 +		basic_machine=hppa1.1-hitachi
  23.360 +		os=-hiuxwe2
  23.361 +		;;
  23.362 +	h8300hms)
  23.363 +		basic_machine=h8300-hitachi
  23.364 +		os=-hms
  23.365 +		;;
  23.366 +	h8300xray)
  23.367 +		basic_machine=h8300-hitachi
  23.368 +		os=-xray
  23.369 +		;;
  23.370 +	h8500hms)
  23.371 +		basic_machine=h8500-hitachi
  23.372 +		os=-hms
  23.373 +		;;
  23.374 +	harris)
  23.375 +		basic_machine=m88k-harris
  23.376 +		os=-sysv3
  23.377 +		;;
  23.378 +	hp300-*)
  23.379 +		basic_machine=m68k-hp
  23.380 +		;;
  23.381 +	hp300bsd)
  23.382 +		basic_machine=m68k-hp
  23.383 +		os=-bsd
  23.384 +		;;
  23.385 +	hp300hpux)
  23.386 +		basic_machine=m68k-hp
  23.387 +		os=-hpux
  23.388 +		;;
  23.389 +	hp3k9[0-9][0-9] | hp9[0-9][0-9])
  23.390 +		basic_machine=hppa1.0-hp
  23.391 +		;;
  23.392 +	hp9k2[0-9][0-9] | hp9k31[0-9])
  23.393 +		basic_machine=m68000-hp
  23.394 +		;;
  23.395 +	hp9k3[2-9][0-9])
  23.396 +		basic_machine=m68k-hp
  23.397 +		;;
  23.398 +	hp9k6[0-9][0-9] | hp6[0-9][0-9])
  23.399 +		basic_machine=hppa1.0-hp
  23.400 +		;;
  23.401 +	hp9k7[0-79][0-9] | hp7[0-79][0-9])
  23.402 +		basic_machine=hppa1.1-hp
  23.403 +		;;
  23.404 +	hp9k78[0-9] | hp78[0-9])
  23.405 +		# FIXME: really hppa2.0-hp
  23.406 +		basic_machine=hppa1.1-hp
  23.407 +		;;
  23.408 +	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  23.409 +		# FIXME: really hppa2.0-hp
  23.410 +		basic_machine=hppa1.1-hp
  23.411 +		;;
  23.412 +	hp9k8[0-9][13679] | hp8[0-9][13679])
  23.413 +		basic_machine=hppa1.1-hp
  23.414 +		;;
  23.415 +	hp9k8[0-9][0-9] | hp8[0-9][0-9])
  23.416 +		basic_machine=hppa1.0-hp
  23.417 +		;;
  23.418 +	hppa-next)
  23.419 +		os=-nextstep3
  23.420 +		;;
  23.421 +	hppaosf)
  23.422 +		basic_machine=hppa1.1-hp
  23.423 +		os=-osf
  23.424 +		;;
  23.425 +	hppro)
  23.426 +		basic_machine=hppa1.1-hp
  23.427 +		os=-proelf
  23.428 +		;;
  23.429 +	i370-ibm* | ibm*)
  23.430 +		basic_machine=i370-ibm
  23.431 +		os=-mvs
  23.432 +		;;
  23.433 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  23.434 +	i[34567]86v32)
  23.435 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  23.436 +		os=-sysv32
  23.437 +		;;
  23.438 +	i[34567]86v4*)
  23.439 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  23.440 +		os=-sysv4
  23.441 +		;;
  23.442 +	i[34567]86v)
  23.443 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  23.444 +		os=-sysv
  23.445 +		;;
  23.446 +	i[34567]86sol2)
  23.447 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  23.448 +		os=-solaris2
  23.449 +		;;
  23.450 +	i386mach)
  23.451 +		basic_machine=i386-mach
  23.452 +		os=-mach
  23.453 +		;;
  23.454 +	i386-vsta | vsta)
  23.455 +		basic_machine=i386-unknown
  23.456 +		os=-vsta
  23.457 +		;;
  23.458 +	i386-go32 | go32)
  23.459 +		basic_machine=i386-unknown
  23.460 +		os=-go32
  23.461 +		;;
  23.462 +	i386-mingw32 | mingw32)
  23.463 +		basic_machine=i386-unknown
  23.464 +		os=-mingw32
  23.465 +		;;
  23.466 +	iris | iris4d)
  23.467 +		basic_machine=mips-sgi
  23.468 +		case $os in
  23.469 +		    -irix*)
  23.470 +			;;
  23.471 +		    *)
  23.472 +			os=-irix4
  23.473 +			;;
  23.474 +		esac
  23.475 +		;;
  23.476 +	isi68 | isi)
  23.477 +		basic_machine=m68k-isi
  23.478 +		os=-sysv
  23.479 +		;;
  23.480 +	m88k-omron*)
  23.481 +		basic_machine=m88k-omron
  23.482 +		;;
  23.483 +	magnum | m3230)
  23.484 +		basic_machine=mips-mips
  23.485 +		os=-sysv
  23.486 +		;;
  23.487 +	merlin)
  23.488 +		basic_machine=ns32k-utek
  23.489 +		os=-sysv
  23.490 +		;;
  23.491 +	miniframe)
  23.492 +		basic_machine=m68000-convergent
  23.493 +		;;
  23.494 +	*mint | *MiNT)
  23.495 +		basic_machine=m68k-atari
  23.496 +		os=-mint
  23.497 +		;;
  23.498 +	mipsel*-linux*)
  23.499 +		basic_machine=mipsel-unknown
  23.500 +		os=-linux-gnu
  23.501 +		;;
  23.502 +	mips*-linux*)
  23.503 +		basic_machine=mips-unknown
  23.504 +		os=-linux-gnu
  23.505 +		;;
  23.506 +	mips3*-*)
  23.507 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  23.508 +		;;
  23.509 +	mips3*)
  23.510 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  23.511 +		;;
  23.512 +	monitor)
  23.513 +		basic_machine=m68k-rom68k
  23.514 +		os=-coff
  23.515 +		;;
  23.516 +	msdos)
  23.517 +		basic_machine=i386-unknown
  23.518 +		os=-msdos
  23.519 +		;;
  23.520 +	ncr3000)
  23.521 +		basic_machine=i486-ncr
  23.522 +		os=-sysv4
  23.523 +		;;
  23.524 +	netbsd386)
  23.525 +		basic_machine=i386-unknown
  23.526 +		os=-netbsd
  23.527 +		;;
  23.528 +	netwinder)
  23.529 +		basic_machine=armv4l-corel
  23.530 +		os=-linux
  23.531 +		;;
  23.532 +	news | news700 | news800 | news900)
  23.533 +		basic_machine=m68k-sony
  23.534 +		os=-newsos
  23.535 +		;;
  23.536 +	news1000)
  23.537 +		basic_machine=m68030-sony
  23.538 +		os=-newsos
  23.539 +		;;
  23.540 +	news-3600 | risc-news)
  23.541 +		basic_machine=mips-sony
  23.542 +		os=-newsos
  23.543 +		;;
  23.544 +	necv70)
  23.545 +		basic_machine=v70-nec
  23.546 +		os=-sysv
  23.547 +		;;
  23.548 +	next | m*-next )
  23.549 +		basic_machine=m68k-next
  23.550 +		case $os in
  23.551 +		    -nextstep* )
  23.552 +			;;
  23.553 +		    -ns2*)
  23.554 +		      os=-nextstep2
  23.555 +			;;
  23.556 +		    *)
  23.557 +		      os=-nextstep3
  23.558 +			;;
  23.559 +		esac
  23.560 +		;;
  23.561 +	nh3000)
  23.562 +		basic_machine=m68k-harris
  23.563 +		os=-cxux
  23.564 +		;;
  23.565 +	nh[45]000)
  23.566 +		basic_machine=m88k-harris
  23.567 +		os=-cxux
  23.568 +		;;
  23.569 +	nindy960)
  23.570 +		basic_machine=i960-intel
  23.571 +		os=-nindy
  23.572 +		;;
  23.573 +	mon960)
  23.574 +		basic_machine=i960-intel
  23.575 +		os=-mon960
  23.576 +		;;
  23.577 +	np1)
  23.578 +		basic_machine=np1-gould
  23.579 +		;;
  23.580 +	op50n-* | op60c-*)
  23.581 +		basic_machine=hppa1.1-oki
  23.582 +		os=-proelf
  23.583 +		;;
  23.584 +	OSE68000 | ose68000)
  23.585 +		basic_machine=m68000-ericsson
  23.586 +		os=-ose
  23.587 +		;;
  23.588 +	os68k)
  23.589 +		basic_machine=m68k-none
  23.590 +		os=-os68k
  23.591 +		;;
  23.592 +	pa-hitachi)
  23.593 +		basic_machine=hppa1.1-hitachi
  23.594 +		os=-hiuxwe2
  23.595 +		;;
  23.596 +	paragon)
  23.597 +		basic_machine=i860-intel
  23.598 +		os=-osf
  23.599 +		;;
  23.600 +	pbd)
  23.601 +		basic_machine=sparc-tti
  23.602 +		;;
  23.603 +	pbb)
  23.604 +		basic_machine=m68k-tti
  23.605 +		;;
  23.606 +        pc532 | pc532-*)
  23.607 +		basic_machine=ns32k-pc532
  23.608 +		;;
  23.609 +	pentium | p5 | k5 | k6 | nexen)
  23.610 +		basic_machine=i586-pc
  23.611 +		;;
  23.612 +	pentiumpro | p6 | 6x86)
  23.613 +		basic_machine=i686-pc
  23.614 +		;;
  23.615 +	pentiumii | pentium2)
  23.616 +		basic_machine=i786-pc
  23.617 +		;;
  23.618 +	pentium-* | p5-* | k5-* | k6-* | nexen-*)
  23.619 +		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  23.620 +		;;
  23.621 +	pentiumpro-* | p6-* | 6x86-*)
  23.622 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  23.623 +		;;
  23.624 +	pentiumii-* | pentium2-*)
  23.625 +		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  23.626 +		;;
  23.627 +	pn)
  23.628 +		basic_machine=pn-gould
  23.629 +		;;
  23.630 +	power)	basic_machine=rs6000-ibm
  23.631 +		;;
  23.632 +	ppc)	basic_machine=powerpc-unknown
  23.633 +	        ;;
  23.634 +	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  23.635 +		;;
  23.636 +	ppcle | powerpclittle | ppc-le | powerpc-little)
  23.637 +		basic_machine=powerpcle-unknown
  23.638 +	        ;;
  23.639 +	ppcle-* | powerpclittle-*)
  23.640 +		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  23.641 +		;;
  23.642 +	ps2)
  23.643 +		basic_machine=i386-ibm
  23.644 +		;;
  23.645 +	rom68k)
  23.646 +		basic_machine=m68k-rom68k
  23.647 +		os=-coff
  23.648 +		;;
  23.649 +	rm[46]00)
  23.650 +		basic_machine=mips-siemens
  23.651 +		;;
  23.652 +	rtpc | rtpc-*)
  23.653 +		basic_machine=romp-ibm
  23.654 +		;;
  23.655 +	sa29200)
  23.656 +		basic_machine=a29k-amd
  23.657 +		os=-udi
  23.658 +		;;
  23.659 +	sequent)
  23.660 +		basic_machine=i386-sequent
  23.661 +		;;
  23.662 +	sh)
  23.663 +		basic_machine=sh-hitachi
  23.664 +		os=-hms
  23.665 +		;;
  23.666 +	sparclite-wrs)
  23.667 +		basic_machine=sparclite-wrs
  23.668 +		os=-vxworks
  23.669 +		;;
  23.670 +	sps7)
  23.671 +		basic_machine=m68k-bull
  23.672 +		os=-sysv2
  23.673 +		;;
  23.674 +	spur)
  23.675 +		basic_machine=spur-unknown
  23.676 +		;;
  23.677 +	st2000)
  23.678 +		basic_machine=m68k-tandem
  23.679 +		;;
  23.680 +	stratus)
  23.681 +		basic_machine=i860-stratus
  23.682 +		os=-sysv4
  23.683 +		;;
  23.684 +	sun2)
  23.685 +		basic_machine=m68000-sun
  23.686 +		;;
  23.687 +	sun2os3)
  23.688 +		basic_machine=m68000-sun
  23.689 +		os=-sunos3
  23.690 +		;;
  23.691 +	sun2os4)
  23.692 +		basic_machine=m68000-sun
  23.693 +		os=-sunos4
  23.694 +		;;
  23.695 +	sun3os3)
  23.696 +		basic_machine=m68k-sun
  23.697 +		os=-sunos3
  23.698 +		;;
  23.699 +	sun3os4)
  23.700 +		basic_machine=m68k-sun
  23.701 +		os=-sunos4
  23.702 +		;;
  23.703 +	sun4os3)
  23.704 +		basic_machine=sparc-sun
  23.705 +		os=-sunos3
  23.706 +		;;
  23.707 +	sun4os4)
  23.708 +		basic_machine=sparc-sun
  23.709 +		os=-sunos4
  23.710 +		;;
  23.711 +	sun4sol2)
  23.712 +		basic_machine=sparc-sun
  23.713 +		os=-solaris2
  23.714 +		;;
  23.715 +	sun3 | sun3-*)
  23.716 +		basic_machine=m68k-sun
  23.717 +		;;
  23.718 +	sun4)
  23.719 +		basic_machine=sparc-sun
  23.720 +		;;
  23.721 +	sun386 | sun386i | roadrunner)
  23.722 +		basic_machine=i386-sun
  23.723 +		;;
  23.724 +	symmetry)
  23.725 +		basic_machine=i386-sequent
  23.726 +		os=-dynix
  23.727 +		;;
  23.728 +	t3e)
  23.729 +		basic_machine=t3e-cray
  23.730 +		os=-unicos
  23.731 +		;;
  23.732 +	tx39)
  23.733 +		basic_machine=mipstx39-unknown
  23.734 +		;;
  23.735 +	tx39el)
  23.736 +		basic_machine=mipstx39el-unknown
  23.737 +		;;
  23.738 +	tower | tower-32)
  23.739 +		basic_machine=m68k-ncr
  23.740 +		;;
  23.741 +	udi29k)
  23.742 +		basic_machine=a29k-amd
  23.743 +		os=-udi
  23.744 +		;;
  23.745 +	ultra3)
  23.746 +		basic_machine=a29k-nyu
  23.747 +		os=-sym1
  23.748 +		;;
  23.749 +	v810 | necv810)
  23.750 +		basic_machine=v810-nec
  23.751 +		os=-none
  23.752 +		;;
  23.753 +	vaxv)
  23.754 +		basic_machine=vax-dec
  23.755 +		os=-sysv
  23.756 +		;;
  23.757 +	vms)
  23.758 +		basic_machine=vax-dec
  23.759 +		os=-vms
  23.760 +		;;
  23.761 +	vpp*|vx|vx-*)
  23.762 +               basic_machine=f301-fujitsu
  23.763 +               ;;
  23.764 +	vxworks960)
  23.765 +		basic_machine=i960-wrs
  23.766 +		os=-vxworks
  23.767 +		;;
  23.768 +	vxworks68)
  23.769 +		basic_machine=m68k-wrs
  23.770 +		os=-vxworks
  23.771 +		;;
  23.772 +	vxworks29k)
  23.773 +		basic_machine=a29k-wrs
  23.774 +		os=-vxworks
  23.775 +		;;
  23.776 +	w65*)
  23.777 +		basic_machine=w65-wdc
  23.778 +		os=-none
  23.779 +		;;
  23.780 +	w89k-*)
  23.781 +		basic_machine=hppa1.1-winbond
  23.782 +		os=-proelf
  23.783 +		;;
  23.784 +	xmp)
  23.785 +		basic_machine=xmp-cray
  23.786 +		os=-unicos
  23.787 +		;;
  23.788 +        xps | xps100)
  23.789 +		basic_machine=xps100-honeywell
  23.790 +		;;
  23.791 +	z8k-*-coff)
  23.792 +		basic_machine=z8k-unknown
  23.793 +		os=-sim
  23.794 +		;;
  23.795 +	none)
  23.796 +		basic_machine=none-none
  23.797 +		os=-none
  23.798 +		;;
  23.799 +
  23.800 +# Here we handle the default manufacturer of certain CPU types.  It is in
  23.801 +# some cases the only manufacturer, in others, it is the most popular.
  23.802 +	w89k)
  23.803 +		basic_machine=hppa1.1-winbond
  23.804 +		;;
  23.805 +	op50n)
  23.806 +		basic_machine=hppa1.1-oki
  23.807 +		;;
  23.808 +	op60c)
  23.809 +		basic_machine=hppa1.1-oki
  23.810 +		;;
  23.811 +	mips)
  23.812 +		if [ x$os = x-linux-gnu ]; then
  23.813 +			basic_machine=mips-unknown
  23.814 +		else
  23.815 +			basic_machine=mips-mips
  23.816 +		fi
  23.817 +		;;
  23.818 +	romp)
  23.819 +		basic_machine=romp-ibm
  23.820 +		;;
  23.821 +	rs6000)
  23.822 +		basic_machine=rs6000-ibm
  23.823 +		;;
  23.824 +	vax)
  23.825 +		basic_machine=vax-dec
  23.826 +		;;
  23.827 +	pdp11)
  23.828 +		basic_machine=pdp11-dec
  23.829 +		;;
  23.830 +	we32k)
  23.831 +		basic_machine=we32k-att
  23.832 +		;;
  23.833 +	sparc | sparcv9)
  23.834 +		basic_machine=sparc-sun
  23.835 +		;;
  23.836 +        cydra)
  23.837 +		basic_machine=cydra-cydrome
  23.838 +		;;
  23.839 +	orion)
  23.840 +		basic_machine=orion-highlevel
  23.841 +		;;
  23.842 +	orion105)
  23.843 +		basic_machine=clipper-highlevel
  23.844 +		;;
  23.845 +	mac | mpw | mac-mpw)
  23.846 +		basic_machine=m68k-apple
  23.847 +		;;
  23.848 +	pmac | pmac-mpw)
  23.849 +		basic_machine=powerpc-apple
  23.850 +		;;
  23.851 +	c4x*)
  23.852 +		basic_machine=c4x-none
  23.853 +		os=-coff
  23.854 +		;;
  23.855 +	*)
  23.856 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  23.857 +		exit 1
  23.858 +		;;
  23.859 +esac
  23.860 +
  23.861 +# Here we canonicalize certain aliases for manufacturers.
  23.862 +case $basic_machine in
  23.863 +	*-digital*)
  23.864 +		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  23.865 +		;;
  23.866 +	*-commodore*)
  23.867 +		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  23.868 +		;;
  23.869 +	*)
  23.870 +		;;
  23.871 +esac
  23.872 +
  23.873 +# Decode manufacturer-specific aliases for certain operating systems.
  23.874 +
  23.875 +if [ x"$os" != x"" ]
  23.876 +then
  23.877 +case $os in
  23.878 +        # First match some system type aliases
  23.879 +        # that might get confused with valid system types.
  23.880 +	# -solaris* is a basic system type, with this one exception.
  23.881 +	-solaris1 | -solaris1.*)
  23.882 +		os=`echo $os | sed -e 's|solaris1|sunos4|'`
  23.883 +		;;
  23.884 +	-solaris)
  23.885 +		os=-solaris2
  23.886 +		;;
  23.887 +	-svr4*)
  23.888 +		os=-sysv4
  23.889 +		;;
  23.890 +	-unixware*)
  23.891 +		os=-sysv4.2uw
  23.892 +		;;
  23.893 +	-gnu/linux*)
  23.894 +		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  23.895 +		;;
  23.896 +	# First accept the basic system types.
  23.897 +	# The portable systems comes first.
  23.898 +	# Each alternative MUST END IN A *, to match a version number.
  23.899 +	# -sysv* is not here because it comes later, after sysvr4.
  23.900 +	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  23.901 +	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  23.902 +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  23.903 +	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  23.904 +	      | -aos* \
  23.905 +	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  23.906 +	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  23.907 +	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  23.908 +	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  23.909 +	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  23.910 +	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  23.911 +	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  23.912 +	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  23.913 +	      | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
  23.914 +	# Remember, each alternative MUST END IN *, to match a version number.
  23.915 +		;;
  23.916 +	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  23.917 +	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  23.918 +	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
  23.919 +		;;
  23.920 +	-mac*)
  23.921 +		os=`echo $os | sed -e 's|mac|macos|'`
  23.922 +		;;
  23.923 +	-linux*)
  23.924 +		os=`echo $os | sed -e 's|linux|linux-gnu|'`
  23.925 +		;;
  23.926 +	-sunos5*)
  23.927 +		os=`echo $os | sed -e 's|sunos5|solaris2|'`
  23.928 +		;;
  23.929 +	-sunos6*)
  23.930 +		os=`echo $os | sed -e 's|sunos6|solaris3|'`
  23.931 +		;;
  23.932 +	-osfrose*)
  23.933 +		os=-osfrose
  23.934 +		;;
  23.935 +	-osf*)
  23.936 +		os=-osf
  23.937 +		;;
  23.938 +	-utek*)
  23.939 +		os=-bsd
  23.940 +		;;
  23.941 +	-dynix*)
  23.942 +		os=-bsd
  23.943 +		;;
  23.944 +	-acis*)
  23.945 +		os=-aos
  23.946 +		;;
  23.947 +	-386bsd)
  23.948 +		os=-bsd
  23.949 +		;;
  23.950 +	-ctix* | -uts*)
  23.951 +		os=-sysv
  23.952 +		;;
  23.953 +	-ns2 )
  23.954 +	        os=-nextstep2
  23.955 +		;;
  23.956 +	# Preserve the version number of sinix5.
  23.957 +	-sinix5.*)
  23.958 +		os=`echo $os | sed -e 's|sinix|sysv|'`
  23.959 +		;;
  23.960 +	-sinix*)
  23.961 +		os=-sysv4
  23.962 +		;;
  23.963 +	-triton*)
  23.964 +		os=-sysv3
  23.965 +		;;
  23.966 +	-oss*)
  23.967 +		os=-sysv3
  23.968 +		;;
  23.969 +	-svr4)
  23.970 +		os=-sysv4
  23.971 +		;;
  23.972 +	-svr3)
  23.973 +		os=-sysv3
  23.974 +		;;
  23.975 +	-sysvr4)
  23.976 +		os=-sysv4
  23.977 +		;;
  23.978 +	# This must come after -sysvr4.
  23.979 +	-sysv*)
  23.980 +		;;
  23.981 +	-ose*)
  23.982 +		os=-ose
  23.983 +		;;
  23.984 +	-es1800*)
  23.985 +		os=-ose
  23.986 +		;;
  23.987 +	-xenix)
  23.988 +		os=-xenix
  23.989 +		;;
  23.990 +        -*mint | -*MiNT)
  23.991 +	        os=-mint
  23.992 +		;;
  23.993 +	-none)
  23.994 +		;;
  23.995 +	*)
  23.996 +		# Get rid of the `-' at the beginning of $os.
  23.997 +		os=`echo $os | sed 's/[^-]*-//'`
  23.998 +		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  23.999 +		exit 1
 23.1000 +		;;
 23.1001 +esac
 23.1002 +else
 23.1003 +
 23.1004 +# Here we handle the default operating systems that come with various machines.
 23.1005 +# The value should be what the vendor currently ships out the door with their
 23.1006 +# machine or put another way, the most popular os provided with the machine.
 23.1007 +
 23.1008 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
 23.1009 +# "-sun"), then you have to tell the case statement up towards the top
 23.1010 +# that MANUFACTURER isn't an operating system.  Otherwise, code above
 23.1011 +# will signal an error saying that MANUFACTURER isn't an operating
 23.1012 +# system, and we'll never get to this point.
 23.1013 +
 23.1014 +case $basic_machine in
 23.1015 +	*-acorn)
 23.1016 +		os=-riscix1.2
 23.1017 +		;;
 23.1018 +	arm*-corel)
 23.1019 +		os=-linux
 23.1020 +		;;
 23.1021 +	arm*-semi)
 23.1022 +		os=-aout
 23.1023 +		;;
 23.1024 +        pdp11-*)
 23.1025 +		os=-none
 23.1026 +		;;
 23.1027 +	*-dec | vax-*)
 23.1028 +		os=-ultrix4.2
 23.1029 +		;;
 23.1030 +	m68*-apollo)
 23.1031 +		os=-domain
 23.1032 +		;;
 23.1033 +	i386-sun)
 23.1034 +		os=-sunos4.0.2
 23.1035 +		;;
 23.1036 +	m68000-sun)
 23.1037 +		os=-sunos3
 23.1038 +		# This also exists in the configure program, but was not the
 23.1039 +		# default.
 23.1040 +		# os=-sunos4
 23.1041 +		;;
 23.1042 +	m68*-cisco)
 23.1043 +		os=-aout
 23.1044 +		;;
 23.1045 +	mips*-cisco)
 23.1046 +		os=-elf
 23.1047 +		;;
 23.1048 +	mips*-*)
 23.1049 +		os=-elf
 23.1050 +		;;
 23.1051 +	*-tti)	# must be before sparc entry or we get the wrong os.
 23.1052 +		os=-sysv3
 23.1053 +		;;
 23.1054 +	sparc-* | *-sun)
 23.1055 +		os=-sunos4.1.1
 23.1056 +		;;
 23.1057 +	*-be)
 23.1058 +		os=-beos
 23.1059 +		;;
 23.1060 +	*-ibm)
 23.1061 +		os=-aix
 23.1062 +		;;
 23.1063 +	*-wec)
 23.1064 +		os=-proelf
 23.1065 +		;;
 23.1066 +	*-winbond)
 23.1067 +		os=-proelf
 23.1068 +		;;
 23.1069 +	*-oki)
 23.1070 +		os=-proelf
 23.1071 +		;;
 23.1072 +	*-hp)
 23.1073 +		os=-hpux
 23.1074 +		;;
 23.1075 +	*-hitachi)
 23.1076 +		os=-hiux
 23.1077 +		;;
 23.1078 +	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
 23.1079 +		os=-sysv
 23.1080 +		;;
 23.1081 +	*-cbm)
 23.1082 +		os=-amigaos
 23.1083 +		;;
 23.1084 +	*-dg)
 23.1085 +		os=-dgux
 23.1086 +		;;
 23.1087 +	*-dolphin)
 23.1088 +		os=-sysv3
 23.1089 +		;;
 23.1090 +	m68k-ccur)
 23.1091 +		os=-rtu
 23.1092 +		;;
 23.1093 +	m88k-omron*)
 23.1094 +		os=-luna
 23.1095 +		;;
 23.1096 +	*-next )
 23.1097 +		os=-nextstep
 23.1098 +		;;
 23.1099 +	*-sequent)
 23.1100 +		os=-ptx
 23.1101 +		;;
 23.1102 +	*-crds)
 23.1103 +		os=-unos
 23.1104 +		;;
 23.1105 +	*-ns)
 23.1106 +		os=-genix
 23.1107 +		;;
 23.1108 +	i370-*)
 23.1109 +		os=-mvs
 23.1110 +		;;
 23.1111 +	*-next)
 23.1112 +		os=-nextstep3
 23.1113 +		;;
 23.1114 +        *-gould)
 23.1115 +		os=-sysv
 23.1116 +		;;
 23.1117 +        *-highlevel)
 23.1118 +		os=-bsd
 23.1119 +		;;
 23.1120 +	*-encore)
 23.1121 +		os=-bsd
 23.1122 +		;;
 23.1123 +        *-sgi)
 23.1124 +		os=-irix
 23.1125 +		;;
 23.1126 +        *-siemens)
 23.1127 +		os=-sysv4
 23.1128 +		;;
 23.1129 +	*-masscomp)
 23.1130 +		os=-rtu
 23.1131 +		;;
 23.1132 +	f301-fujitsu)
 23.1133 +		os=-uxpv
 23.1134 +		;;
 23.1135 +	*-rom68k)
 23.1136 +		os=-coff
 23.1137 +		;;
 23.1138 +	*-*bug)
 23.1139 +		os=-coff
 23.1140 +		;;
 23.1141 +	*-apple)
 23.1142 +		os=-macos
 23.1143 +		;;
 23.1144 +	*-atari*)
 23.1145 +		os=-mint
 23.1146 +		;;
 23.1147 +	*)
 23.1148 +		os=-none
 23.1149 +		;;
 23.1150 +esac
 23.1151 +fi
 23.1152 +
 23.1153 +# Here we handle the case where we know the os, and the CPU type, but not the
 23.1154 +# manufacturer.  We pick the logical manufacturer.
 23.1155 +vendor=unknown
 23.1156 +case $basic_machine in
 23.1157 +	*-unknown)
 23.1158 +		case $os in
 23.1159 +			-riscix*)
 23.1160 +				vendor=acorn
 23.1161 +				;;
 23.1162 +			-sunos*)
 23.1163 +				vendor=sun
 23.1164 +				;;
 23.1165 +			-aix*)
 23.1166 +				vendor=ibm
 23.1167 +				;;
 23.1168 +			-beos*)
 23.1169 +				vendor=be
 23.1170 +				;;
 23.1171 +			-hpux*)
 23.1172 +				vendor=hp
 23.1173 +				;;
 23.1174 +			-mpeix*)
 23.1175 +				vendor=hp
 23.1176 +				;;
 23.1177 +			-hiux*)
 23.1178 +				vendor=hitachi
 23.1179 +				;;
 23.1180 +			-unos*)
 23.1181 +				vendor=crds
 23.1182 +				;;
 23.1183 +			-dgux*)
 23.1184 +				vendor=dg
 23.1185 +				;;
 23.1186 +			-luna*)
 23.1187 +				vendor=omron
 23.1188 +				;;
 23.1189 +			-genix*)
 23.1190 +				vendor=ns
 23.1191 +				;;
 23.1192 +			-mvs*)
 23.1193 +				vendor=ibm
 23.1194 +				;;
 23.1195 +			-ptx*)
 23.1196 +				vendor=sequent
 23.1197 +				;;
 23.1198 +			-vxsim* | -vxworks*)
 23.1199 +				vendor=wrs
 23.1200 +				;;
 23.1201 +			-aux*)
 23.1202 +				vendor=apple
 23.1203 +				;;
 23.1204 +			-hms*)
 23.1205 +				vendor=hitachi
 23.1206 +				;;
 23.1207 +			-mpw* | -macos*)
 23.1208 +				vendor=apple
 23.1209 +				;;
 23.1210 +			-*mint | -*MiNT)
 23.1211 +				vendor=atari
 23.1212 +				;;
 23.1213 +		esac
 23.1214 +		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 23.1215 +		;;
 23.1216 +esac
 23.1217 +
 23.1218 +echo $basic_machine$os
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/configure	Thu Aug 10 06:05:39 2000 +0000
    24.3 @@ -0,0 +1,2523 @@
    24.4 +#! /bin/sh
    24.5 +
    24.6 +# Guess values for system-dependent variables and create Makefiles.
    24.7 +# Generated automatically using autoconf version 2.13 
    24.8 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
    24.9 +#
   24.10 +# This configure script is free software; the Free Software Foundation
   24.11 +# gives unlimited permission to copy, distribute and modify it.
   24.12 +
   24.13 +# Defaults:
   24.14 +ac_help=
   24.15 +ac_default_prefix=/usr/local
   24.16 +# Any additions from configure.in:
   24.17 +ac_help="$ac_help
   24.18 +  --enable-shared[=PKGS]  build shared libraries [default=yes]"
   24.19 +ac_help="$ac_help
   24.20 +  --enable-static[=PKGS]  build static libraries [default=yes]"
   24.21 +ac_help="$ac_help
   24.22 +  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
   24.23 +ac_help="$ac_help
   24.24 +  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
   24.25 +ac_help="$ac_help
   24.26 +  --disable-libtool-lock  avoid locking (might break parallel builds)"
   24.27 +ac_help="$ac_help
   24.28 +  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
   24.29 +ac_help="$ac_help
   24.30 +  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)"
   24.31 +ac_help="$ac_help
   24.32 +  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)"
   24.33 +ac_help="$ac_help
   24.34 +  --disable-sdltest       Do not try to compile and run a test SDL program"
   24.35 +ac_help="$ac_help
   24.36 +  --enable-bmp            support loading BMP images [default=yes]"
   24.37 +ac_help="$ac_help
   24.38 +  --enable-gif            support loading GIF images [default=yes]"
   24.39 +ac_help="$ac_help
   24.40 +  --enable-jpg            support loading JPG images [default=yes]"
   24.41 +ac_help="$ac_help
   24.42 +  --enable-pcx            support loading PCX images [default=yes]"
   24.43 +ac_help="$ac_help
   24.44 +  --enable-png            support loading PNG images [default=yes]"
   24.45 +ac_help="$ac_help
   24.46 +  --enable-ppm            support loading PPM images [default=yes]"
   24.47 +ac_help="$ac_help
   24.48 +  --enable-tga            support loading TGA images [default=yes]"
   24.49 +ac_help="$ac_help
   24.50 +  --enable-tif            support loading TIF images [default=yes]"
   24.51 +
   24.52 +# Initialize some variables set by options.
   24.53 +# The variables have the same names as the options, with
   24.54 +# dashes changed to underlines.
   24.55 +build=NONE
   24.56 +cache_file=./config.cache
   24.57 +exec_prefix=NONE
   24.58 +host=NONE
   24.59 +no_create=
   24.60 +nonopt=NONE
   24.61 +no_recursion=
   24.62 +prefix=NONE
   24.63 +program_prefix=NONE
   24.64 +program_suffix=NONE
   24.65 +program_transform_name=s,x,x,
   24.66 +silent=
   24.67 +site=
   24.68 +srcdir=
   24.69 +target=NONE
   24.70 +verbose=
   24.71 +x_includes=NONE
   24.72 +x_libraries=NONE
   24.73 +bindir='${exec_prefix}/bin'
   24.74 +sbindir='${exec_prefix}/sbin'
   24.75 +libexecdir='${exec_prefix}/libexec'
   24.76 +datadir='${prefix}/share'
   24.77 +sysconfdir='${prefix}/etc'
   24.78 +sharedstatedir='${prefix}/com'
   24.79 +localstatedir='${prefix}/var'
   24.80 +libdir='${exec_prefix}/lib'
   24.81 +includedir='${prefix}/include'
   24.82 +oldincludedir='/usr/include'
   24.83 +infodir='${prefix}/info'
   24.84 +mandir='${prefix}/man'
   24.85 +
   24.86 +# Initialize some other variables.
   24.87 +subdirs=
   24.88 +MFLAGS= MAKEFLAGS=
   24.89 +SHELL=${CONFIG_SHELL-/bin/sh}
   24.90 +# Maximum number of lines to put in a shell here document.
   24.91 +ac_max_here_lines=12
   24.92 +
   24.93 +ac_prev=
   24.94 +for ac_option
   24.95 +do
   24.96 +
   24.97 +  # If the previous option needs an argument, assign it.
   24.98 +  if test -n "$ac_prev"; then
   24.99 +    eval "$ac_prev=\$ac_option"
  24.100 +    ac_prev=
  24.101 +    continue
  24.102 +  fi
  24.103 +
  24.104 +  case "$ac_option" in
  24.105 +  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  24.106 +  *) ac_optarg= ;;
  24.107 +  esac
  24.108 +
  24.109 +  # Accept the important Cygnus configure options, so we can diagnose typos.
  24.110 +
  24.111 +  case "$ac_option" in
  24.112 +
  24.113 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
  24.114 +    ac_prev=bindir ;;
  24.115 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  24.116 +    bindir="$ac_optarg" ;;
  24.117 +
  24.118 +  -build | --build | --buil | --bui | --bu)
  24.119 +    ac_prev=build ;;
  24.120 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  24.121 +    build="$ac_optarg" ;;
  24.122 +
  24.123 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
  24.124 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  24.125 +    ac_prev=cache_file ;;
  24.126 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  24.127 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  24.128 +    cache_file="$ac_optarg" ;;
  24.129 +
  24.130 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  24.131 +    ac_prev=datadir ;;
  24.132 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  24.133 +  | --da=*)
  24.134 +    datadir="$ac_optarg" ;;
  24.135 +
  24.136 +  -disable-* | --disable-*)
  24.137 +    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  24.138 +    # Reject names that are not valid shell variable names.
  24.139 +    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  24.140 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  24.141 +    fi
  24.142 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  24.143 +    eval "enable_${ac_feature}=no" ;;
  24.144 +
  24.145 +  -enable-* | --enable-*)
  24.146 +    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  24.147 +    # Reject names that are not valid shell variable names.
  24.148 +    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  24.149 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  24.150 +    fi
  24.151 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  24.152 +    case "$ac_option" in
  24.153 +      *=*) ;;
  24.154 +      *) ac_optarg=yes ;;
  24.155 +    esac
  24.156 +    eval "enable_${ac_feature}='$ac_optarg'" ;;
  24.157 +
  24.158 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  24.159 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  24.160 +  | --exec | --exe | --ex)
  24.161 +    ac_prev=exec_prefix ;;
  24.162 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  24.163 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  24.164 +  | --exec=* | --exe=* | --ex=*)
  24.165 +    exec_prefix="$ac_optarg" ;;
  24.166 +
  24.167 +  -gas | --gas | --ga | --g)
  24.168 +    # Obsolete; use --with-gas.
  24.169 +    with_gas=yes ;;
  24.170 +
  24.171 +  -help | --help | --hel | --he)
  24.172 +    # Omit some internal or obsolete options to make the list less imposing.
  24.173 +    # This message is too long to be a string in the A/UX 3.1 sh.
  24.174 +    cat << EOF
  24.175 +Usage: configure [options] [host]
  24.176 +Options: [defaults in brackets after descriptions]
  24.177 +Configuration:
  24.178 +  --cache-file=FILE       cache test results in FILE
  24.179 +  --help                  print this message
  24.180 +  --no-create             do not create output files
  24.181 +  --quiet, --silent       do not print \`checking...' messages
  24.182 +  --version               print the version of autoconf that created configure
  24.183 +Directory and file names:
  24.184 +  --prefix=PREFIX         install architecture-independent files in PREFIX
  24.185 +                          [$ac_default_prefix]
  24.186 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  24.187 +                          [same as prefix]
  24.188 +  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  24.189 +  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  24.190 +  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  24.191 +  --datadir=DIR           read-only architecture-independent data in DIR
  24.192 +                          [PREFIX/share]
  24.193 +  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  24.194 +  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  24.195 +                          [PREFIX/com]
  24.196 +  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  24.197 +  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  24.198 +  --includedir=DIR        C header files in DIR [PREFIX/include]
  24.199 +  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  24.200 +  --infodir=DIR           info documentation in DIR [PREFIX/info]
  24.201 +  --mandir=DIR            man documentation in DIR [PREFIX/man]
  24.202 +  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  24.203 +  --program-prefix=PREFIX prepend PREFIX to installed program names
  24.204 +  --program-suffix=SUFFIX append SUFFIX to installed program names
  24.205 +  --program-transform-name=PROGRAM
  24.206 +                          run sed PROGRAM on installed program names
  24.207 +EOF
  24.208 +    cat << EOF
  24.209 +Host type:
  24.210 +  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  24.211 +  --host=HOST             configure for HOST [guessed]
  24.212 +  --target=TARGET         configure for TARGET [TARGET=HOST]
  24.213 +Features and packages:
  24.214 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  24.215 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  24.216 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  24.217 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  24.218 +  --x-includes=DIR        X include files are in DIR
  24.219 +  --x-libraries=DIR       X library files are in DIR
  24.220 +EOF
  24.221 +    if test -n "$ac_help"; then
  24.222 +      echo "--enable and --with options recognized:$ac_help"
  24.223 +    fi
  24.224 +    exit 0 ;;
  24.225 +
  24.226 +  -host | --host | --hos | --ho)
  24.227 +    ac_prev=host ;;
  24.228 +  -host=* | --host=* | --hos=* | --ho=*)
  24.229 +    host="$ac_optarg" ;;
  24.230 +
  24.231 +  -includedir | --includedir | --includedi | --included | --include \
  24.232 +  | --includ | --inclu | --incl | --inc)
  24.233 +    ac_prev=includedir ;;
  24.234 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  24.235 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
  24.236 +    includedir="$ac_optarg" ;;
  24.237 +
  24.238 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
  24.239 +    ac_prev=infodir ;;
  24.240 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  24.241 +    infodir="$ac_optarg" ;;
  24.242 +
  24.243 +  -libdir | --libdir | --libdi | --libd)
  24.244 +    ac_prev=libdir ;;
  24.245 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
  24.246 +    libdir="$ac_optarg" ;;
  24.247 +
  24.248 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  24.249 +  | --libexe | --libex | --libe)
  24.250 +    ac_prev=libexecdir ;;
  24.251 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  24.252 +  | --libexe=* | --libex=* | --libe=*)
  24.253 +    libexecdir="$ac_optarg" ;;
  24.254 +
  24.255 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
  24.256 +  | --localstate | --localstat | --localsta | --localst \
  24.257 +  | --locals | --local | --loca | --loc | --lo)
  24.258 +    ac_prev=localstatedir ;;
  24.259 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  24.260 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  24.261 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  24.262 +    localstatedir="$ac_optarg" ;;
  24.263 +
  24.264 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  24.265 +    ac_prev=mandir ;;
  24.266 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  24.267 +    mandir="$ac_optarg" ;;
  24.268 +
  24.269 +  -nfp | --nfp | --nf)
  24.270 +    # Obsolete; use --without-fp.
  24.271 +    with_fp=no ;;
  24.272 +
  24.273 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  24.274 +  | --no-cr | --no-c)
  24.275 +    no_create=yes ;;
  24.276 +
  24.277 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  24.278 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  24.279 +    no_recursion=yes ;;
  24.280 +
  24.281 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  24.282 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  24.283 +  | --oldin | --oldi | --old | --ol | --o)
  24.284 +    ac_prev=oldincludedir ;;
  24.285 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  24.286 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  24.287 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  24.288 +    oldincludedir="$ac_optarg" ;;
  24.289 +
  24.290 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  24.291 +    ac_prev=prefix ;;
  24.292 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  24.293 +    prefix="$ac_optarg" ;;
  24.294 +
  24.295 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  24.296 +  | --program-pre | --program-pr | --program-p)
  24.297 +    ac_prev=program_prefix ;;
  24.298 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  24.299 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  24.300 +    program_prefix="$ac_optarg" ;;
  24.301 +
  24.302 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  24.303 +  | --program-suf | --program-su | --program-s)
  24.304 +    ac_prev=program_suffix ;;
  24.305 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  24.306 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  24.307 +    program_suffix="$ac_optarg" ;;
  24.308 +
  24.309 +  -program-transform-name | --program-transform-name \
  24.310 +  | --program-transform-nam | --program-transform-na \
  24.311 +  | --program-transform-n | --program-transform- \
  24.312 +  | --program-transform | --program-transfor \
  24.313 +  | --program-transfo | --program-transf \
  24.314 +  | --program-trans | --program-tran \
  24.315 +  | --progr-tra | --program-tr | --program-t)
  24.316 +    ac_prev=program_transform_name ;;
  24.317 +  -program-transform-name=* | --program-transform-name=* \
  24.318 +  | --program-transform-nam=* | --program-transform-na=* \
  24.319 +  | --program-transform-n=* | --program-transform-=* \
  24.320 +  | --program-transform=* | --program-transfor=* \
  24.321 +  | --program-transfo=* | --program-transf=* \
  24.322 +  | --program-trans=* | --program-tran=* \
  24.323 +  | --progr-tra=* | --program-tr=* | --program-t=*)
  24.324 +    program_transform_name="$ac_optarg" ;;
  24.325 +
  24.326 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  24.327 +  | -silent | --silent | --silen | --sile | --sil)
  24.328 +    silent=yes ;;
  24.329 +
  24.330 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  24.331 +    ac_prev=sbindir ;;
  24.332 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  24.333 +  | --sbi=* | --sb=*)
  24.334 +    sbindir="$ac_optarg" ;;