From: notaz
Date: Tue, 9 Nov 2010 21:28:33 +0000 (+0200)
Subject: SDL-1.2.14
X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e14743d15a38081776e29fcc16d2de7e61e3d2b6;p=sdl_omap.git
SDL-1.2.14
---
e14743d15a38081776e29fcc16d2de7e61e3d2b6
diff --git a/BUGS b/BUGS
new file mode 100644
index 0000000..218bf3d
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,18 @@
+
+Bugs are now managed in the SDL bug tracker, here:
+
+ http://bugzilla.libsdl.org/
+
+You may report bugs there, and search to see if a given issue has already
+ been reported, discussed, and maybe even fixed.
+
+
+
+You may also find help at the SDL mailing list. Subscription information:
+
+ http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
+
+Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
+ bugs discussed on the mailing list may be forgotten or missed.
+
+
diff --git a/Borland.html b/Borland.html
new file mode 100644
index 0000000..eaf8209
--- /dev/null
+++ b/Borland.html
@@ -0,0 +1,139 @@
+
+
+
+ Building SDL with Borland's C++ compilers
+
+
+
+
+
+
Unzip the Borland.zip archive into this directory. Do not unzip
+ it into any other directory because the makefiles ( *.mak ) and project
+ files ( *.bpr ) use relative paths to refer to the SDL sources. This should
+ create a directory named "Borland" inside of the top level SDL source directory.
+
+
+
Using Borland C++ Builder 5, 6 for Windows
+
+
+
Inside of the "Borland" directory there is a "bcb6" directory that contains
+ a number of Builder project files. Double-click on the "libSDL.bpg" file
+ icon. Once Builder has started click on the "Projects" menu on
+the menu-bar and go down to "Build All Projects" option.
+ This will proceed to build SDL ( with Borland's calling convention ),
+SDLmain, and all the test programs. Currently, all
+the test programs are dynamically linked to Sam Lantinga's
+SDL.dll.
+
+
NOTE : Borland's "lib" format and Microsoft's "lib" format are incompatible.
+
+ If you wish to dynamically link to the SDL library supplied by Sam Lantinga
+ in each release, I have created the correct *.libs for SDL 1.2.4 and they
+ exist in the "/lib" directory.
+ If you would like to create the *.lib files yourself, you will need to
+make use of Borland's "implib.exe" utility.
+
+
+
IMPLIB works like this:
+
+
IMPLIB (destination lib name) (source dll)
+
+
For example,
+
+
IMPLIB SDL.lib SDL.dll
+
+
This assumes that SDL.dll was compiled with Visual C++ or similar.
+
+
+
To learn more about the difference between Borland's and Microsoft's *.lib
+ format please read the article here.
+
+
+
+ NOTE : The C++ Builder for Windows project format, is not compatible
+ with the Kylix 3 project format, hence the reason why they are in separate
+ directories.
+
+
Using the free Borland C++ command-line compiler
+
+
+
The free Borland compiler can be downloaded at no charge from the Borland website
+ . Make sure that it is installed and properly configured.
+
+
Open an MS-DOS Prompt. Change to the "Borland\freebcc" directory under
+ the SDL source directory. Type "make -f SDL.mak" to build SDL and "make
+ -f SDLmain.mak". There are also makefiles for all of the test programs, if you wish to build them. All .exes and
+DLLs are created in the "test" SDL directory. Ify ou would like to create
+the DLL and all the test applications, I have thrown together a basic batchfile
+called "makeall.bat" which should create everything in the right order.
+
+
Output files
+ No matter which compiler you used, three important files should have
+ been produced:
+
+
SDL.dll ( Borland format )
+
SDL.lib ( Borland format )
+
SDLmain.lib ( Borland format )
+
+
+ Both of the *.lib files will need to be added to all the projects
+that use SDL and SDL.dll must be placed some where the Windows dynamic
+linker can find it (either in your project directory or on the system
+path, C:\WINDOWS\SYSTEM).
+
Using Borland C++ Builder for Linux ( AKA Kylix
+ 3 )
+
+
Inside of the "Borland" directory there is a "k3" directory that contains
+ a number of Builder project files. Double-click on the "libSDL.bpg" file
+ icon. Once Builder has started click on the "Projects" menu on
+the menu-bar and go down to "Build All Projects" option. This will
+proceed to build all the test programs.
+ Linux users do not need *.lib files as the Shared Object is linked right
+ into the project ( very neat actually, Windows should do this sort of thing
+ as it is a lot easier for the developer ).
+ NOTE : The C++ Builder for Windows project format, is not
+ compatible with the Kylix 3 project format, hence the reason why they are
+ in separate directories.
+
+
On Mandrake 8.1 the shared objects for SDL are located in the /usr/lib
+ directory as libSDL_*.so and the Mesa OpenGL shared objects are located
+in /usr/X11R6/lib as libGL*.so
+
+ So if your setup is different you may need to change the project file
+ so that they re-link to the ones on your system.
+
+ On Mandrake 8.1 the headers files are located at /usr/include/SDL/.
+ So if you you have not installed the development RPMs ( usually named libSDL-devel*
+ ) for SDL ( not included ) you may have to change the include directory
+ within some of the projects.
+
+
+
Known Problems
+ The only known problem is that I ( Dominique Louis ), was unable to
+create the projects that rebuilt the SDL shared objects under Linux, due
+to time constraints and my lack of intimate knowledge of Linux.
+
+ Some of the test programs require included media files ( *.wav; *.bmp
+etc ). All the test programs are now created in the "test" directory, where
+the media files are ( usually ) so they should be ready to go.
+
+
+
+
+
diff --git a/Borland.zip b/Borland.zip
new file mode 100644
index 0000000..ed8f45d
Binary files /dev/null and b/Borland.zip differ
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..2cba2ac
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,458 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/CREDITS b/CREDITS
new file mode 100644
index 0000000..efdcfa4
--- /dev/null
+++ b/CREDITS
@@ -0,0 +1,94 @@
+
+Simple DirectMedia Layer CREDITS
+Thanks to everyone who made this possible, including:
+
+* Cliff Matthews, for giving me a reason to start this project. :)
+ -- Executor rocks! *grin*
+
+* Scott Call, for making a home for SDL on the 'Net... Thanks! :)
+
+* The Linux Fund, C Magazine, Educational Technology Resources Inc.,
+ Gareth Noyce, Jesse Pavel, Keith Kitchin, Jeremy Horvath, Thomas Nicholson,
+ Hans-Peter Gygax, the Eternal Lands Development Team, Lars Brubaker,
+ and Phoenix Kokido for financial contributions
+
+* Gaëtan de Menten for writing the PHP and SQL behind the SDL website
+
+* Tim Jones for the new look of the SDL website
+
+* Marco Kraus for setting up SDL merchandise
+
+* Martin Donlon for his work on the SDL Documentation Project
+
+* Ryan Gordon for helping everybody out and keeping the dream alive. :)
+
+* IBM R&D Lab for their PS3 SPE video acceleration code
+
+* Mattias Engdegård, for help with the Solaris port and lots of other help
+
+* Max Watson, Matt Slot, and Kyle for help with the MacOS Classic port
+
+* Stan Shebs, for the initial Mac OS X port
+
+* Eric Wing, Max Horn, and Darrell Walisser for unflagging work on the Mac OS X port
+
+* Patrick Trainor, Jim Boucher, and Mike Gorchak for the QNX Neutrino port
+
+* Carsten Griwodz for the AIX port
+
+* Gabriele Greco, for the Amiga port
+
+* Patrice Mandin, for the Atari port
+
+* Hannu Viitala for the EPOC port
+
+* Marcus Mertama for the S60 port.
+
+* Peter Valchev for nagging me about the OpenBSD port until I got it right. :)
+
+* Kent B Mein, for a place to do the IRIX port
+
+* Ash, for a place to do the OSF/1 Alpha port
+
+* David Sowsy, for help with the BeOS port
+
+* Eugenia Loli, for endless work on porting SDL games to BeOS
+
+* Jon Taylor for the GGI front-end
+
+* Paulus Esterhazy, for the Visual C++ testing and libraries
+
+* Brenda Tantzen, for Metrowerks CodeWarrior on MacOS
+
+* Chris Nentwich, for the Hermes assembly blitters
+
+* Michael Vance and Jim Kutter for the X11 OpenGL support
+
+* Stephane Peter, for the AAlib front-end and multi-threaded timer idea.
+
+* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation
+
+* Peter Wiklund, for the 1998 winning SDL logo,
+ and Arto Hamara, Steven Wong, and Kent Mein for other logo entries.
+
+* Arne Claus, for the 2004 winning SDL logo,
+ and Shandy Brown, Jac, Alex Lyman, Mikkel Gjoel, #Guy, Jonas Hartmann,
+ Daniel Liljeberg, Ronald Sowa, DocD, Pekka Jaervinen, Patrick Avella,
+ Erkki Kontilla, Levon Gavalian, Hal Emerich, David Wiktorsson,
+ S. Schury and F. Hufsky, Ciska de Ruyver, Shredweat, Tyler Montbriand,
+ Martin Andersson, Merlyn Wysard, Fernando Ibanez, David Miller,
+ Andre Bommele, lovesby.com, Francisco Camenforte Torres, and David Igreja
+ for other logo entries.
+
+* Bob Pendleton and David Olofson for being long time contributors to
+ the SDL mailing list.
+
+* Everybody at Loki Software, Inc. for their great contributions!
+
+ And a big hand to everyone else who gave me appreciation, advice,
+ and suggestions, especially the good folks on the SDL mailing list.
+
+THANKS! :)
+
+ -- Sam Lantinga
+
diff --git a/CWprojects.sea.bin b/CWprojects.sea.bin
new file mode 100644
index 0000000..e8a6fdc
Binary files /dev/null and b/CWprojects.sea.bin differ
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..1a30fba
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,23 @@
+
+To compile and install SDL:
+
+ 1. Run './configure; make; make install'
+
+ If you are compiling for Windows using gcc, read the FAQ at:
+ http://www.libsdl.org/faq.php?action=listentries&category=4#42
+
+ If you are compiling using Visual C++ on Win32, you should read
+ the file VisualC.html
+
+ 2. Look at the example programs in ./test, and check out the HTML
+ documentation in ./docs to see how to use the SDL library.
+
+ 3. Join the SDL developer mailing list by sending E-mail to
+ sdl-request@libsdl.org
+ and put "subscribe" in the subject of the message.
+
+ Or alternatively you can use the web interface:
+ http://www.libsdl.org/mailing-list.php
+
+That's it!
+Sam Lantinga
diff --git a/MPWmake.sea.bin b/MPWmake.sea.bin
new file mode 100644
index 0000000..b345e08
Binary files /dev/null and b/MPWmake.sea.bin differ
diff --git a/Makefile.dc b/Makefile.dc
new file mode 100644
index 0000000..58d6e71
--- /dev/null
+++ b/Makefile.dc
@@ -0,0 +1,111 @@
+#GL=1
+
+CC = sh-elf-gcc
+AR = sh-elf-ar
+
+ifdef GL
+DEFS += -DSDL_VIDEO_OPENGL=1
+TARGET = libSDL_gl.a
+else
+TARGET = libSDL.a
+endif
+
+CFLAGS=$(KOS_CFLAGS) $(DEFS) -Iinclude
+
+SRCS = \
+ src/audio/dc/SDL_dcaudio.c \
+ src/audio/dc/aica.c \
+ src/audio/dummy/SDL_dummyaudio.c \
+ src/audio/SDL_audio.c \
+ src/audio/SDL_audiocvt.c \
+ src/audio/SDL_audiodev.c \
+ src/audio/SDL_mixer.c \
+ src/audio/SDL_wave.c \
+ src/cdrom/dc/SDL_syscdrom.c \
+ src/cdrom/SDL_cdrom.c \
+ src/events/SDL_active.c \
+ src/events/SDL_events.c \
+ src/events/SDL_expose.c \
+ src/events/SDL_keyboard.c \
+ src/events/SDL_mouse.c \
+ src/events/SDL_quit.c \
+ src/events/SDL_resize.c \
+ src/file/SDL_rwops.c \
+ src/joystick/dc/SDL_sysjoystick.c \
+ src/joystick/SDL_joystick.c \
+ src/loadso/dummy/SDL_sysloadso.c \
+ src/SDL.c \
+ src/SDL_error.c \
+ src/SDL_fatal.c \
+ src/stdlib/SDL_getenv.c \
+ src/stdlib/SDL_iconv.c \
+ src/stdlib/SDL_malloc.c \
+ src/stdlib/SDL_qsort.c \
+ src/stdlib/SDL_stdlib.c \
+ src/stdlib/SDL_string.c \
+ src/thread/dc/SDL_syscond.c \
+ src/thread/dc/SDL_sysmutex.c \
+ src/thread/dc/SDL_syssem.c \
+ src/thread/dc/SDL_systhread.c \
+ src/thread/SDL_thread.c \
+ src/timer/dc/SDL_systimer.c \
+ src/timer/SDL_timer.c \
+ src/video/dc/SDL_dcevents.c \
+ src/video/dc/SDL_dcvideo.c \
+ src/video/dummy/SDL_nullevents.c \
+ src/video/dummy/SDL_nullmouse.c \
+ src/video/dummy/SDL_nullvideo.c \
+ src/video/SDL_blit.c \
+ src/video/SDL_blit_0.c \
+ src/video/SDL_blit_1.c \
+ src/video/SDL_blit_A.c \
+ src/video/SDL_blit_N.c \
+ src/video/SDL_bmp.c \
+ src/video/SDL_cursor.c \
+ src/video/SDL_gamma.c \
+ src/video/SDL_pixels.c \
+ src/video/SDL_RLEaccel.c \
+ src/video/SDL_stretch.c \
+ src/video/SDL_surface.c \
+ src/video/SDL_video.c \
+ src/video/SDL_yuv.c \
+ src/video/SDL_yuv_sw.c \
+
+OBJS = $(SRCS:.c=.o)
+
+TEST = \
+ test/checkkeys.c \
+ test/graywin.c \
+ test/loopwave.c \
+ test/testalpha.c \
+ test/testbitmap.c \
+ test/testcdrom.c \
+ test/testerror.c \
+ test/testgamma.c \
+ test/testgl.c \
+ test/testhread.c \
+ test/testjoystick.c \
+ test/testkeys.c \
+ test/testlock.c \
+ test/testoverlay.c \
+ test/testpalette.c \
+ test/testsem.c \
+ test/testsprite.c \
+ test/testtimer.c \
+ test/testtypes.c \
+ test/testver.c \
+ test/testvidinfo.c \
+ test/testwin.c \
+ test/testwm.c \
+ test/threadwin.c \
+ test/torturethread.c \
+
+$(TARGET): copy_config \
+ $(OBJS)
+ $(AR) rcs $(TARGET) $(OBJS)
+
+copy_config:
+ @cp include/SDL_config.h.default include/SDL_config.h
+
+clean:
+ rm -f include/SDL_config.h $(OBJS)
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..e29dc6d
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,183 @@
+# Makefile to build and install the SDL library
+
+top_builddir = .
+srcdir = @srcdir@
+objects = build
+depend = build-deps
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+datarootdir = @datarootdir@
+datadir = @datadir@
+mandir = @mandir@
+auxdir = @ac_aux_dir@
+distpath = $(srcdir)/..
+distdir = SDL-@SDL_VERSION@
+distfile = $(distdir).tar.gz
+
+@SET_MAKE@
+SHELL = @SHELL@
+CC = @CC@
+INCLUDE = @INCLUDE@
+CFLAGS = @BUILD_CFLAGS@
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+LDFLAGS = @BUILD_LDFLAGS@
+EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
+LIBTOOL = @LIBTOOL@
+INSTALL = @INSTALL@
+NASM = @NASM@ @NASMFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+WINDRES = @WINDRES@
+
+TARGET = libSDL.la
+SOURCES = @SOURCES@
+OBJECTS = @OBJECTS@
+
+SDLMAIN_TARGET = libSDLmain.a
+SDLMAIN_SOURCES = @SDLMAIN_SOURCES@
+SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@
+
+DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html include INSTALL Makefile.dc Makefile.minimal Makefile.in MPWmake.sea.bin README* sdl-config.in sdl.m4 sdl.pc.in SDL.qpg.in SDL.spec SDL.spec.in src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom-OS2.zip Watcom-Win32.zip symbian.zip WhatsNew Xcode.tar.gz
+
+HDRS = SDL.h SDL_active.h SDL_audio.h SDL_byteorder.h SDL_cdrom.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_getenv.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_platform.h SDL_quit.h SDL_rwops.h SDL_stdinc.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h
+
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
+
+$(srcdir)/configure: $(srcdir)/configure.in
+ @echo "Warning, configure.in is out of date"
+ #(cd $(srcdir) && sh autogen.sh && sh configure)
+ @sleep 3
+
+Makefile: $(srcdir)/Makefile.in
+ $(SHELL) config.status $@
+
+$(objects):
+ $(SHELL) $(auxdir)/mkinstalldirs $@
+
+.PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
+depend:
+ @SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" output="$(depend)" \
+ $(SHELL) $(auxdir)/makedep.sh
+ @for src in $(SDLMAIN_SOURCES); do \
+ obj=`echo $$src | sed -e 's|.*/||' -e 's|\.[^\.]*$$|.o|'`; \
+ echo "\$$(objects)/$$obj: $$src" >>$(depend); \
+ echo " \$$(CC) \$$(CFLAGS) \$$(EXTRA_CFLAGS) -c $$src -o \$$@" >>$(depend); \
+ done
+
+include $(depend)
+
+$(objects)/$(TARGET): $(OBJECTS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+
+$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
+ $(AR) cru $@ $(SDLMAIN_OBJECTS)
+ $(RANLIB) $@
+
+install: all install-bin install-hdrs install-lib install-data install-man
+install-bin:
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
+install-hdrs:
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
+ for file in $(HDRS); do \
+ $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
+ done
+ $(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
+install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
+ $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+ $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+install-data:
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
+ $(INSTALL) -m 644 $(srcdir)/sdl.m4 $(DESTDIR)$(datadir)/aclocal/sdl.m4
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL) -m 644 sdl.pc $(DESTDIR)$(libdir)/pkgconfig
+install-man:
+ $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(mandir)/man3
+ for src in $(srcdir)/docs/man3/*.3; do \
+ file=`echo $$src | sed -e 's|^.*/||'`; \
+ $(INSTALL) -m 644 $$src $(DESTDIR)$(mandir)/man3/$$file; \
+ done
+
+uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man
+uninstall-bin:
+ rm -f $(DESTDIR)$(bindir)/sdl-config
+uninstall-hdrs:
+ for file in $(HDRS); do \
+ rm -f $(DESTDIR)$(includedir)/SDL/$$file; \
+ done
+ rm -f $(DESTDIR)$(includedir)/SDL/SDL_config.h
+ -rmdir $(DESTDIR)$(includedir)/SDL
+uninstall-lib:
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(TARGET)
+ rm -f $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
+uninstall-data:
+ rm -f $(DESTDIR)$(datadir)/aclocal/sdl.m4
+ rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl.pc
+uninstall-man:
+ for src in $(srcdir)/docs/man3/*.3; do \
+ file=`echo $$src | sed -e 's|^.*/||'`; \
+ rm -f $(DESTDIR)$(mandir)/man3/$$file; \
+ done
+
+clean:
+ rm -rf $(objects)
+ if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
+
+distclean: clean
+ rm -f Makefile include/SDL_config.h sdl-config
+ rm -f SDL.qpg
+ rm -f config.status config.cache config.log libtool $(depend)
+ rm -rf $(srcdir)/autom4te*
+ rm -rf $(srcdir)/test/autom4te*
+ find $(srcdir) \( \
+ -name '*~' -o \
+ -name '*.bak' -o \
+ -name '*.old' -o \
+ -name '*.rej' -o \
+ -name '*.orig' -o \
+ -name '.#*' \) \
+ -exec rm -f {} \;
+ cp $(srcdir)/include/SDL_config.h.default $(srcdir)/include/SDL_config.h
+ if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
+
+dist $(distfile):
+ $(SHELL) $(auxdir)/mkinstalldirs $(distdir)
+ tar cf - $(DIST) | (cd $(distdir); tar xf -)
+ cp $(distdir)/include/SDL_config.h.default $(distdir)/include/SDL_config.h
+ rm -rf `find $(distdir) -name .svn`
+ rm -rf $(distdir)/test/autom4te*
+ find $(distdir) \( \
+ -name '*~' -o \
+ -name '*.bak' -o \
+ -name '*.old' -o \
+ -name '*.rej' -o \
+ -name '*.orig' -o \
+ -name '.#*' \) \
+ -exec rm -f {} \;
+ if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
+ tar cvf - $(distdir) | gzip --best >$(distfile)
+ rm -rf $(distdir)
+
+rpm: $(distfile)
+ rpmbuild -ta $?
+
+# Create a SVN snapshot that people can run update on
+snapshot:
+ svn co http://svn.libsdl.org/branches/SDL-1.2
+ (cd SDL-1.2 && ./autogen.sh && rm -rf autom4te.cache)
+ cp SDL-1.2/include/SDL_config.h.default SDL-1.2/include/SDL_config.h
+ tar zcf $(HOME)/SDL-1.2.tar.gz SDL-1.2
+ rm -f $(HOME)/SDL-1.2.zip
+ zip -r $(HOME)/SDL-1.2.zip SDL-1.2
+ rm -rf SDL-1.2
diff --git a/Makefile.minimal b/Makefile.minimal
new file mode 100644
index 0000000..827621c
--- /dev/null
+++ b/Makefile.minimal
@@ -0,0 +1,42 @@
+# Makefile to build the SDL library
+
+INCLUDE = -I./include
+CFLAGS = -g -O2 $(INCLUDE)
+AR = ar
+RANLIB = ranlib
+
+CONFIG_H = include/SDL_config.h
+TARGET = libSDL.a
+SOURCES = \
+ src/*.c \
+ src/audio/*.c \
+ src/cdrom/*.c \
+ src/cpuinfo/*.c \
+ src/events/*.c \
+ src/file/*.c \
+ src/joystick/*.c \
+ src/stdlib/*.c \
+ src/thread/*.c \
+ src/timer/*.c \
+ src/video/*.c \
+ src/audio/dummy/*.c \
+ src/video/dummy/*.c \
+ src/joystick/dummy/*.c \
+ src/cdrom/dummy/*.c \
+ src/thread/generic/*.c \
+ src/timer/dummy/*.c \
+ src/loadso/dummy/*.c \
+
+OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
+
+all: $(TARGET)
+
+$(TARGET): $(CONFIG_H) $(OBJECTS)
+ $(AR) crv $@ $^
+ $(RANLIB) $@
+
+$(CONFIG_H):
+ cp $(CONFIG_H).default $(CONFIG_H)
+
+clean:
+ rm -f $(TARGET) $(OBJECTS)
diff --git a/README b/README
new file mode 100644
index 0000000..7c0dd58
--- /dev/null
+++ b/README
@@ -0,0 +1,49 @@
+
+ Simple DirectMedia Layer
+
+ (SDL)
+
+ Version 1.2
+
+---
+http://www.libsdl.org/
+
+This is the Simple DirectMedia Layer, a general API that provides low
+level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
+and 2D framebuffer across multiple platforms.
+
+The current version supports Linux, Windows CE/95/98/ME/XP/Vista, BeOS,
+MacOS Classic, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX,
+and QNX. The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
+RISC OS, SymbianOS, Nintendo DS, and OS/2, but these are not officially
+supported.
+
+SDL is written in C, but works with C++ natively, and has bindings to
+several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
+Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
+Pike, Pliant, Python, Ruby, and Smalltalk.
+
+This library is distributed under GNU LGPL version 2, which can be
+found in the file "COPYING". This license allows you to use SDL
+freely in commercial programs as long as you link with the dynamic
+library.
+
+The best way to learn how to use SDL is to check out the header files in
+the "include" subdirectory and the programs in the "test" subdirectory.
+The header files and test programs are well commented and always up to date.
+More documentation is available in HTML format in "docs/index.html", and
+a documentation wiki is available online at:
+ http://www.libsdl.org/cgi/docwiki.cgi
+
+The test programs in the "test" subdirectory are in the public domain.
+
+Frequently asked questions are answered online:
+ http://www.libsdl.org/faq.php
+
+If you need help with the library, or just want to discuss SDL related
+issues, you can join the developers mailing list:
+ http://www.libsdl.org/mailing-list.php
+
+Enjoy!
+ Sam Lantinga (slouken@libsdl.org)
+
diff --git a/README-SDL.txt b/README-SDL.txt
new file mode 100644
index 0000000..4d36ca9
--- /dev/null
+++ b/README-SDL.txt
@@ -0,0 +1,13 @@
+
+Please distribute this file with the SDL runtime environment:
+
+The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
+designed to make it easy to write multi-media software, such as games and
+emulators.
+
+The Simple DirectMedia Layer library source code is available from:
+http://www.libsdl.org/
+
+This library is distributed under the terms of the GNU LGPL license:
+http://www.gnu.org/copyleft/lesser.html
+
diff --git a/README.AmigaOS b/README.AmigaOS
new file mode 100644
index 0000000..e0d8906
--- /dev/null
+++ b/README.AmigaOS
@@ -0,0 +1,12 @@
+The AmigaOS code has been removed from SDL, since it had been broken for a
+ long time and had a few bits of fairly invasive code #ifdef'd into the
+ SDL core.
+
+However, there is an OS4 version of SDL here:
+ http://www.rcdrummond.net/amiga/index.html
+
+And a MorphOS version here:
+ http://www.lehtoranta.net/powersdl/
+
+--ryan.
+
diff --git a/README.BeOS b/README.BeOS
new file mode 100644
index 0000000..ccdccf5
--- /dev/null
+++ b/README.BeOS
@@ -0,0 +1,13 @@
+
+SDL on BeOS R5
+==============
+
+You can build SDL on BeOS like any other GNU style package.
+e.g. ./configure && make && make install
+By default it is installed in /boot/develop/tools/gnupro/{bin,lib,etc.}
+
+Once you install SDL, you need to copy libSDL.so to /boot/home/config/lib,
+so it can be found by the dynamic linker.
+
+Enjoy!
+ Sam Lantinga (slouken@libsdl.org)
diff --git a/README.CVS b/README.CVS
new file mode 100644
index 0000000..7664e91
--- /dev/null
+++ b/README.CVS
@@ -0,0 +1,4 @@
+
+SDL is no longer hosted in a CVS repository. Please see README.SVN for
+information on accessing our Subversion repository.
+
diff --git a/README.DC b/README.DC
new file mode 100644
index 0000000..e2fb1d6
--- /dev/null
+++ b/README.DC
@@ -0,0 +1,32 @@
+SDL for Dreamcast (beta2)
+
+ BERO
+ berobero@users.sourceforge.net
+
+ http://www.geocities.co.jp/Playtown/2004/
+
+this work with kos-newlib
+http://sourceforge.net/projects/dcquake/
+
+compile
+- source environ.sh (from the KOS distribution)
+- make -f Makefile.dc
+
+compile with gl support
+- install latest libgl from http://sourceforge.net/projects/dcquake/
+- uncomment GL=1 in Makefile.dc
+- make -f Makefile.dc clean
+- make -f Makefile.dc
+
+install
+- copy include/*.h and libSDL.a or libSDL_gl.a for your enviroment
+
+changelog:
+
+beta2
+- OpenGL support
+- Hardware page flip support
+
+beta
+- thread, timer don't tested so much.
+- not support OpenGL
diff --git a/README.MacOS b/README.MacOS
new file mode 100644
index 0000000..acfd935
--- /dev/null
+++ b/README.MacOS
@@ -0,0 +1,63 @@
+
+==============================================================================
+Using the Simple DirectMedia Layer with MacOS 7,8,9 on PPC
+==============================================================================
+
+These instructions are for people using the Apple MPW environment:
+http://developer.apple.com/tools/mpw-tools/
+
+CodeWarrior projects are available in the CWprojects directory.
+
+==============================================================================
+I. Building the Simple DirectMedia Layer libraries:
+ (This step isn't necessary if you have the SDL binary distribution)
+
+ First, unpack the MPWmake.sea.hqx archive and move SDL.make into the
+ SDL directory.
+
+ Start MPW
+
+ Set the current directory within MPW to the SDL toplevel directory.
+
+ Build "SDL" (Type Command-B and enter "SDL" in the dialog)
+
+ If everything compiles successfully, you now have the PPC libraries
+ "SDL" and "SDLmain.o" in the 'lib' subdirectory.
+
+==============================================================================
+II. Building the Simple DirectMedia Layer test programs:
+
+ First, unpack the MPWmake.sea.hqx archive, move the new rsrc directory to
+ the main SDL directory, and move the makefiles in the new test subdirectory
+ to the SDL 'test' subdirectory.
+
+ Start MPW
+
+ Set the current directory within MPW to the SDL 'test' subdirectory.
+
+ Build the programs that have an associated MPW makefile (file ending
+ with .make), including "testwin", "testalpha", and "graywin".
+
+ Copy the SDL library file into the test directory, and run!
+
+==============================================================================
+III. Building the Simple DirectMedia Layer demo programs:
+
+ Copy one of the test program Makefiles to the demo directory
+ and modify it to match the sources in the demo.
+
+==============================================================================
+IV. Enjoy! :)
+
+ If you have a project you'd like me to know about, or want to ask questions,
+ go ahead and join the SDL developer's mailing list by sending e-mail to:
+
+ sdl-request@libsdl.org
+
+ and put "subscribe" into the subject of the message. Or alternatively you
+ can use the web interface:
+
+ http://www.libsdl.org/mailman/listinfo/sdl
+
+==============================================================================
+
diff --git a/README.MacOSX b/README.MacOSX
new file mode 100644
index 0000000..3bc4213
--- /dev/null
+++ b/README.MacOSX
@@ -0,0 +1,186 @@
+==============================================================================
+Using the Simple DirectMedia Layer with Mac OS X
+==============================================================================
+
+These instructions are for people using Apple's Mac OS X (pronounced
+"ten").
+
+From the developer's point of view, OS X is a sort of hybrid Mac and
+Unix system, and you have the option of using either traditional
+command line tools or Apple's IDE Xcode.
+
+To build SDL using the command line, use the standard configure and make
+process:
+
+ ./configure
+ make
+ sudo make install
+
+You can also build SDL as a Universal library (a single binary for both
+PowerPC and Intel architectures), on Mac OS X 10.4 and newer, by using
+the fatbuild.sh script in build-scripts:
+ sh build-scripts/fatbuild.sh
+ sudo build-scripts/fatbuild.sh install
+This script builds SDL with 10.2 ABI compatibility on PowerPC and 10.4
+ABI compatibility on Intel architectures. For best compatibility you
+should compile your application the same way. A script which wraps
+gcc to make this easy is provided in test/gcc-fat.sh
+
+To use the library once it's built, you essential have two possibilities:
+use the traditional autoconf/automake/make method, or use Xcode.
+
+==============================================================================
+Using the Simple DirectMedia Layer with a traditional Makefile
+==============================================================================
+
+An existing autoconf/automake build system for your SDL app has good chances
+to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary
+that you can distribute to users, you need to put the generated binary into a
+so called "bundle", which basically is a fancy folder with a name like
+"MyCoolGame.app".
+
+To get this build automatically, add something like the following rule to
+your Makefile.am:
+
+bundle_contents = APP_NAME.app/Contents
+APP_NAME_bundle: EXE_NAME
+ mkdir -p $(bundle_contents)/MacOS
+ mkdir -p $(bundle_contents)/Resources
+ echo "APPL????" > $(bundle_contents)/PkgInfo
+ $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
+
+You should replace EXE_NAME with the name of the executable. APP_NAME is what
+will be visible to the user in the Finder. Usually it will be the same
+as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME
+usually is "TestGame". You might also want to use @PACKAGE@ to use the package
+name as specified in your configure.in file.
+
+If your project builds more than one application, you will have to do a bit
+more. For each of your target applications, you need a seperate rule.
+
+If you want the created bundles to be installed, you may want to add this
+rule to your Makefile.am:
+
+install-exec-hook: APP_NAME_bundle
+ rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
+ mkdir -p $(DESTDIR)$(prefix)/Applications/
+ cp -r $< /$(DESTDIR)$(prefix)Applications/
+
+This rule takes the Bundle created by the rule from step 3 and installs them
+into $(DESTDIR)$(prefix)/Applications/.
+
+Again, if you want to install multiple applications, you will have to augment
+the make rule accordingly.
+
+
+But beware! That is only part of the story! With the above, you end up with
+a bare bone .app bundle, which is double clickable from the Finder. But
+there are some more things you should do before shipping yor product...
+
+1) The bundle right now probably is dynamically linked against SDL. That
+ means that when you copy it to another computer, *it will not run*,
+ unless you also install SDL on that other computer. A good solution
+ for this dilemma is to static link against SDL. On OS X, you can
+ achieve that by linkinag against the libraries listed by
+ sdl-config --static-libs
+ instead of those listed by
+ sdl-config --libs
+ Depending on how exactly SDL is integrated into your build systems, the
+ way to achieve that varies, so I won't describe it here in detail
+2) Add an 'Info.plist' to your application. That is a special XML file which
+ contains some meta-information about your application (like some copyright
+ information, the version of your app, the name of an optional icon file,
+ and other things). Part of that information is displayed by the Finder
+ when you click on the .app, or if you look at the "Get Info" window.
+ More information about Info.plist files can be found on Apple's homepage.
+
+
+As a final remark, let me add that I use some of the techniques (and some
+variations of them) in Exult and ScummVM; both are available in source on
+the net, so feel free to take a peek at them for inspiration!
+
+
+==============================================================================
+Using the Simple DirectMedia Layer with Xcode
+==============================================================================
+
+These instructions are for using Apple's Xcode IDE to build SDL applications.
+
+- First steps
+
+The first thing to do is to unpack the Xcode.tar.gz archive in the
+top level SDL directory (where the Xcode.tar.gz archive resides).
+Because Stuffit Expander will unpack the archive into a subdirectory,
+you should unpack the archive manually from the command line:
+ cd [path_to_SDL_source]
+ tar zxf Xcode.tar.gz
+This will create a new folder called Xcode, which you can browse
+normally from the Finder.
+
+- Building the Framework
+
+The SDL Library is packaged as a framework bundle, an organized
+relocatable folder heirarchy of executible code, interface headers,
+and additional resources. For practical purposes, you can think of a
+framework as a more user and system-friendly shared library, whose library
+file behaves more or less like a standard UNIX shared library.
+
+To build the framework, simply open the framework project and build it.
+By default, the framework bundle "SDL.framework" is installed in
+/Library/Frameworks. Therefore, the testers and project stationary expect
+it to be located there. However, it will function the same in any of the
+following locations:
+
+ ~/Library/Frameworks
+ /Local/Library/Frameworks
+ /System/Library/Frameworks
+
+- Build Options
+ There are two "Build Styles" (See the "Targets" tab) for SDL.
+ "Deployment" should be used if you aren't tweaking the SDL library.
+ "Development" should be used to debug SDL apps or the library itself.
+
+- Building the Testers
+ Open the SDLTest project and build away!
+
+- Using the Project Stationary
+ Copy the stationary to the indicated folders to access it from
+ the "New Project" and "Add target" menus. What could be easier?
+
+- Setting up a new project by hand
+ Some of you won't want to use the Stationary so I'll give some tips:
+ * Create a new "Cocoa Application"
+ * Add src/main/macosx/SDLMain.m , .h and .nib to your project
+ * Remove "main.c" from your project
+ * Remove "MainMenu.nib" from your project
+ * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path
+ * Add "$(HOME)/Library/Frameworks" to the frameworks search path
+ * Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS"
+ * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib"
+ * Add your files
+ * Clean and build
+
+- Building from command line
+ Use pbxbuild in the same directory as your .pbproj file
+
+- Running your app
+ You can send command line args to your app by either invoking it from
+ the command line (in *.app/Contents/MacOS) or by entering them in the
+ "Executibles" panel of the target settings.
+
+- Implementation Notes
+ Some things that may be of interest about how it all works...
+ * Working directory
+ As defined in the SDL_main.m file, the working directory of your SDL app
+ is by default set to its parent. You may wish to change this to better
+ suit your needs.
+ * You have a Cocoa App!
+ Your SDL app is essentially a Cocoa application. When your app
+ starts up and the libraries finish loading, a Cocoa procedure is called,
+ which sets up the working directory and calls your main() method.
+ You are free to modify your Cocoa app with generally no consequence
+ to SDL. You cannot, however, easily change the SDL window itself.
+ Functionality may be added in the future to help this.
+
+
+Known bugs are listed in the file "BUGS"
diff --git a/README.MiNT b/README.MiNT
new file mode 100644
index 0000000..eabe3eb
--- /dev/null
+++ b/README.MiNT
@@ -0,0 +1,250 @@
+==============================================================================
+Using the Simple DirectMedia Layer on Atari
+==============================================================================
+
+
+ If you want to build SDL from sources to create SDL programs on Atari:
+ see sections I - II.
+
+ If you want to create SDL programs on Atari using SDL binary build,
+ download it from my web site (URL at end of this file).
+
+ If you want to configure a program using SDL on Atari,
+ see sections IV - VI.
+
+
+==============================================================================
+I. Building the Simple DirectMedia Layer libraries:
+ (This step isn't necessary if you have the SDL binary distribution)
+
+ Do the classic configure, with --disable-shared --enable-static and:
+
+ Tos version (should run everywhere):
+ --disable-threads
+ Tos does not support threads.
+
+ MiNT version (maybe Magic, only for multitasking OS):
+ --disable-pthreads --enable-pth
+ Mint and Magic may supports threads, so audio can be used with current
+ devices, like Sun audio, or disk-writing support. Like Tos, interrupt
+ audio without threads is more suited for Atari machines.
+
+ Then you can make ; make install it.
+
+==============================================================================
+II. Building the Simple DirectMedia Layer test programs:
+
+ Do the classic configure, then make.
+
+ Run them !
+
+==============================================================================
+III. Enjoy! :)
+
+ If you have a project you'd like me to know about, or want to ask questions,
+ go ahead and join the SDL developer's mailing list by sending e-mail to:
+
+ sdl-request@libsdl.org
+
+ and put "subscribe" into the subject of the message. Or alternatively you
+ can use the web interface:
+
+ http://www.libsdl.org/mailman/listinfo/sdl
+
+==============================================================================
+IV. What is supported:
+
+Keyboard (GEMDOS, BIOS, GEM, Ikbd)
+Mouse (XBIOS, GEM, Ikbd, /dev/mouse (non working atm, disabled))
+Video (XBIOS (Fullscreen), GEM (Windowed and Fullscreen))
+Timer (VBL vector, GNU pth library)
+Joysticks and joypads (Ikbd, Hardware)
+Audio (Hardware, XBIOS, GSXB, MCSN, STFA, /dev/audio if threads enabled)
+Threads (Multitasking OS only via GNU pth library)
+Shared object loader (using LDG library from http://ldg.atari.org/)
+Audio CD (MetaDOS)
+OpenGL (using Mesa offscreen rendering driver)
+
+- Dependent driver combinations:
+Video Kbd Mouse Timer Joysticks
+xbios ikbd ikbd vbl(2) ikbd
+xbios gemdos xbios vbl(2) xbios
+xbios bios xbios vbl(2) xbios
+gem gem gem(1) vbl(2) xbios
+
+Audio O/S Misc
+dma8 All Uses MFP Timer A interrupt
+xbios TOS Uses MFP Timer A interrupt
+xbios MiNT Uses MFP Timer A interrupt
+xbios Magic Uses MFP Timer A interrupt
+stfa All Uses MFP interrupt
+mcsn TOS Uses MFP Timer A interrupt
+mcsn MiNT Uses MiNT thread
+mcsn Magic Disabled
+gsxb All Uses GSXB callback
+
+Joypad driver always uses hardware access.
+OpenGL driver always uses OSMesa.
+
+(1) GEM does not report relative mouse motion, so xbios mouse driver is used
+to report this type event.
+A preliminary driver for /dev/mouse device driver is present, but is disabled
+till it can be used with other applications simultaneously.
+
+(2) If you build SDL with threads using the GNU pth library, timers are
+supported via the pth library.
+
+==============================================================================
+V. Environment variables:
+
+SDL_VIDEODRIVER:
+ Set to 'xbios' to force xbios video driver
+ Set to 'gem' to force gem video driver
+
+SDL_VIDEO_GL_DRIVER:
+ Set to filename to load as OpenGL library, if you use SDL_GL_LoadLibrary()
+
+SDL_AUDIODRIVER:
+ Set to 'mint_gsxb' to force Atari GSXB audio driver
+ Set to 'mint_mcsn' to force Atari MCSN audio driver
+ Set to 'mint_stfa' to force Atari STFA audio driver
+ Set to 'mint_xbios' to force Atari Xbios audio driver
+ Set to 'mint_dma8' to force Atari 8 bits DMA audio driver
+ Set to 'audio' to force Sun /dev/audio audio driver
+ Set to 'disk' to force disk-writing audio driver
+
+SDL_ATARI_EVENTSDRIVER
+ Set to 'ikbd' to force IKBD 6301 keyboard driver
+ Set to 'gemdos' to force gemdos keyboard driver
+ Set to 'bios' to force bios keyboard driver
+
+SDL_JOYSTICK_ATARI:
+ Use any of these strings in the environment variable to enable or
+ disable a joystick:
+
+ 'ikbd-joy1-[on|off]' for IKBD joystick on port 1 (hardware access)
+ 'xbios-joy1-[on|off]' for IKBD joystick on port 1 (xbios access)
+ 'porta-pad-[on|off]' for joypad and/or teamtap on port A
+ 'porta-joy0-[on|off]' for joystick 0 on port A
+ 'porta-joy1-[on|off]' for joystick 1 on port A
+ 'porta-lp-[on|off]' for lightpen on port A
+ 'porta-anpad-[on|off]' for analog paddle on port A
+ 'portb-pad-[on|off]' for joypad and/or teamtap on port B
+ 'portb-joy0-[on|off]' for joystick 0 on port B
+ 'portb-joy1-[on|off]' for joystick 1 on port B
+ 'portb-anpad-[on|off]' for analog paddle on port B
+
+ Default configuration is:
+ 'ikbd-joy1-on' (if IKBD events driver enabled)
+ 'xbios-joy1-on' (if gemdos/bios/gem events driver enabled)
+ 'porta-pad-on portb-pad-on' (if available on the machine)
+
+ port[a|b]-[pad|joy?|lp|anpad]-* strings are mutually exclusives.
+ On such a port, you can only use a joypad OR 1 or 2 joysticks OR
+ a lightpen OR an analog paddle. You must disable joypad before
+ setting another controller.
+
+ The second joystick port on IKBD is used by the mouse, so not usable.
+ Another problem with the IKBD: mouse buttons and joystick fire buttons
+ are wired together at the hardware level, it means:
+ port 0 port 0 port 1
+ mouse left button = joystick fire 0 = joystick fire 1
+ mouse right button = joystick fire 1 = joystick fire 0
+
+ Descriptions of joysticks/joypads:
+ - Joypads: 1 hat, 17 buttons (Atari Jaguar console-like).
+ - Joysticks: 1 hat, 1 button.
+ - Lightpen, analog paddles: 2 axis, 2 buttons. The 2 buttons are those
+ affected to 1 button joysticks on the same port.
+
+==============================================================================
+VI. More informations about drivers:
+
+OpenGL:
+ The default is to use the Mesa offscreen driver (osmesa.ldg). If you want
+ to use an older OpenGL implementation, like mesa_gl.ldg or tiny_gl.ldg,
+ your program must use SDL_GL_LoadLibrary() to do so, and retrieve the
+ needed function pointers with SDL_LoadFunction(). In all cases, the OpenGL
+ context is taken care of by SDL itself, you just have to use gl* functions.
+
+ However, there is one OpenGL call that has a different prototype in the old
+ implementations: glOrtho(). In the old implementations, it has 6 float as
+ parameters, in the standard one, it has 6 double parameters. If you want
+ to compile testdyngl, or any other SDL program that loads its OpenGL
+ library, you must change the glOrtho() prototype used in this program. In
+ osmesa.ldg, you can retrieve a glOrtho() with double parameters, by
+ searching for the function "glOrtho6d".
+
+Xbios video:
+ Video chip is detected using the _VDO cookie.
+ Screen enhancers are not supported, but could be if you know how to
+ use them.
+
+ ST, STE, Mega ST, Mega STE:
+ 320x200x4 bits, shades of grey, available only for the purpose
+ of testing SDL.
+ TT:
+ 320x480x8 and 320x240x8 (software double-lined mode).
+ Falcon:
+ All modes supported by the current monitor (RVB or VGA).
+ BlowUp and Centscreen extended modes, ScreenBlaster 3 current mode.
+ Milan:
+ Experimental support
+ Clones and any machine with monochrome monitor:
+ Not supported.
+
+Gem video:
+ Automatically used if xbios not available.
+
+ All machines:
+ Only the current resolution, if 8 bits or higher depth.
+
+IKBD keyboard, mouse and joystick driver:
+ Available if _MCH cookie is ST, Mega ST, STE, Mega STE, TT or Falcon.
+
+ Hades has an IKBD, but xbios is not available for video, so IKBD
+ driver is disabled.
+
+Gemdos and bios keyboard driver:
+ Available on all machines.
+
+Mouse and joystick xbios driver:
+ Available on all machines (I think).
+
+Joypad driver:
+ Available if _MCH cookie is STE or Falcon. Supports teamtap.
+
+PTH timer driver:
+ Available with multitasking OS.
+
+VBL timer driver:
+ Available on all machines (I think).
+
+Audio drivers:
+ Cookies _SND, MCSN, STFA and GSXB used to detect supported audio
+ capabilities.
+
+ STE, Mega STE, TT:
+ 8 bits DMA (hardware access)
+ STFA, MCSN or GSXB driver if installed
+ Falcon:
+ 8 bits DMA (hardware access)
+ Xbios functions
+ STFA, MCSN or GSXB driver if installed
+ Other machines:
+ STFA, MCSN or GSXB driver if installed
+
+ STFA driver:
+ http://removers.free.fr/softs/stfa.html
+ GSXB driver:
+ http://assemsoft.atari.org/gsxb/
+ MacSound driver:
+ http://jf.omnis.ch/software/tos/
+ MagicSound driver (MCSN,GSXB compatible):
+ http://perso.wanadoo.fr/didierm/
+ X-Sound driver (GSXB compatible):
+ http://www.uni-ulm.de/~s_thuth/atari/xsound_e.html
+
+--
+Patrice Mandin
+http://pmandin.atari.org/
diff --git a/README.NDS b/README.NDS
new file mode 100644
index 0000000..e96a9ee
--- /dev/null
+++ b/README.NDS
@@ -0,0 +1,22 @@
+The SDL port to the Nintendo DS
+
+This port uses the devKitPro toolchain, available from:
+http://www.devkitpro.org
+
+Precompiled tools for cross-compiling on Linux are available from:
+http://www.libsdl.org/extras/nds/devkitPro-20070503-linux.tar.gz
+
+todo:
+add ds console specific features/optimizations
+mouse/keyboard support
+dual screen support
+
+build with:
+cp include/SDL_config_nds.h include/SDL_config.h
+make -f Makefile.ds
+
+included is an arm9/arm7 template to allow for sound streaming support.
+
+Enjoy, fix the source and share :)
+Troy Davis(GPF)
+http://gpf.dcemu.co.uk/
diff --git a/README.NanoX b/README.NanoX
new file mode 100644
index 0000000..8418ff3
--- /dev/null
+++ b/README.NanoX
@@ -0,0 +1,97 @@
+ =================================================================
+ Patch version 0.9 of SDL(Simple DirectMedia Layer) for Nano-X API
+ =================================================================
+
+ Authors: Hsieh-Fu Tsai, clare@setabox.com
+ Greg Haerr, greg@censoft.com
+
+ This patch is against SDL version 1.2.4.
+ It enhances previous patch 0.8 by providing direct framebuffer
+ access as well as dynamic hardware pixel type support, not
+ requiring a compile-time option setting for different framebuffer
+ modes.
+ Tested against Microwindows version 0.89pre9.
+
+ Older Microwindows versions
+ ===========================
+ If running on a version older than Microwindows 0.89pre9,
+ the following items might need to be patched in Microwindows.
+
+ 1. Patch src/nanox/client.c::GrClose()
+ It fixes the client side GrClose(). In the original version,
+ GrOpen() can only be called once. When the GrOpen() is called at
+ the second time, the program will terminate. In order to prevent
+ this situation, we need to insert "nxSocket = -1" after
+ "close(nxSocket)" in GrClose(). If you do not have this problem,
+ you may skip this step.
+
+ 2. Patch src/nanox/clientfb.c to return absolute x,y coordinates
+ when using GrGetWindowFBInfo(). Copy the version 0.89pre9
+ of src/nanox/clientfb.c to your system, or configure
+ using --disable-nanox-direct-fb.
+
+ =============
+ Quick Install
+ =============
+
+ 1. ./configure --disable-video-x11 --disable-video-fbcon \
+ --enable-video-nanox \
+ --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]
+ 2. make clean
+ 3. make
+ 4. make install (as root)
+
+ ============
+ Nitty-gritty
+ ============
+
+ --enable-nanox-direct-fb Use direct framebuffer access
+ --enable-nanox-debug Show debug messages
+ --enable-nanox-share-memory Use shared-memory to speed up
+
+ When running multi-threaded applications using SDL, such
+ as SMPEG, set THREADSAFE=Y in Microwindows' config file,
+ to enable GrXXX() system call critical section support.
+
+ =============================================
+ Some programs can be used to test this patch.
+ =============================================
+
+ 1. http://www.cs.berkeley.edu/~weimer/atris (a tetris-like game)
+ 2. http://www.libsdl.org/projects/newvox/
+ 3. http://www.libsdl.org/projects/xflame/
+ 4. http://www.libsdl.org/projects/optimum/
+ 5. http://www.gnugeneration.com/software/loop/
+ 6: http://www.lokigames.com/development/smpeg.php3 (SMPEG version 0.4.4)
+
+ =========
+ Todo List
+ =========
+
+ 1. Create hardware surface
+ 2. Create YUVOverlay on hardware
+ 3. Use OpenGL
+ 4. Gamma correction
+ 5. Hide/Change mouse pointer
+ 6. Better window movement control with direct fb access
+ 7. Palette handling in 8bpp could be improved
+
+ =====================
+ Supporting Institutes
+ =====================
+
+ Many thanks to go to Setabox Co., Ltd. and CML (Communication and
+ Multimedia Laboratory, http://www.cmlab.csie.ntu.edu.tw/) in the
+ Department of Computer Science and Information Engineering of
+ National Taiwan University for supporting this porting project.
+
+ Century Embedded Technologies (http://embedded.censoft.com)
+ for this patch.
+
+ ===================
+ Contact Information
+ ===================
+
+ Welcome to give me any suggestion and to report bugs.
+ My e-mail address : clare@setabox.com or niky@cmlab.csie.ntu.edu.tw
+ or greg@censoft.com
diff --git a/README.OS2 b/README.OS2
new file mode 100644
index 0000000..424b373
--- /dev/null
+++ b/README.OS2
@@ -0,0 +1,281 @@
+
+===========
+SDL on OS/2
+===========
+
+Last updated on May. 17, 2006.
+
+
+1. How to compile?
+------------------
+
+To compile this, you'll need the followings installed:
+- The OS/2 Developer's Toolkit
+- The OpenWatcom compiler
+ (http://www.openwatcom.org)
+
+First of all, you have to unzip the Watcom-OS2.zip file. This will result in a
+file called "makefile" and a file called "setvars.cmd" in this folder (and some
+more files...).
+
+Please edit the second, fourth and fifth lines of setvars.cmd file
+to set the folders where the toolkit, the OW compiler and the FSLib are.
+You won't need NASM yet (The Netwide Assembler), you can leave that line.
+Run setvars.cmd, and you should get a shell in which you can
+compile SDL.
+
+Check the "makefile" file. There is a line in there which determines if the
+resulting SDL.DLL will be a 'debug' or a 'release' build. The 'debug' version
+is full of printf()'s, so if something goes wrong, its output can help a lot
+for debugging.
+
+Then run "wmake".
+This should create the SDL12.DLL and the corresponding SDL12.LIB file here.
+
+To test applications, it's a good idea to use the 'debug' build of SDL, and
+redirect the standard output and standard error output to files, to see what
+happens internally in SDL.
+(like: testsprite >stdout.txt 2>stderr.txt)
+
+To rebuild SDL, use the following commands in this folder:
+wmake clean
+wmake
+
+
+
+2. How to compile the testapps?
+-------------------------------
+
+Once you have SDL12.DLL compiled, navigate into the 'test' folder, copy in
+there the newly built SDL12.DLL, and copy in there FSLib.DLL.
+
+Then run "wmake" in there to compile some of the testapps.
+
+
+
+3. What is missing?
+-------------------
+
+The following things are missing from this SDL implementation:
+- MMX, SSE and 3DNOW! optimized video blitters?
+- HW Video surfaces
+- OpenGL support
+
+
+
+4. Special Keys / Full-Screen support
+-------------------------------------
+
+There are two special hot-keys implemented:
+- Alt+Home switches between fullscreen and windowed mode
+- Alt+End simulates closing the window (can be used as a Panic key)
+Only the LEFT Alt key will work.
+
+
+
+5. Joysticks on SDL/2
+---------------------
+
+The Joystick detection only works for standard joysticks (2 buttons, 2 axes
+and the like). Therefore, if you use a non-standard joystick, you should
+specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
+file or CONFIG.SYS, so SDL applications can provide full capability to your
+device. The syntax is:
+
+SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
+
+So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
+the line should be:
+
+SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
+
+If you want to add spaces in your joystick name, just surround it with
+quotes or double-quotes:
+
+SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
+
+or
+
+SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
+
+ Notive However that Balls and Hats are not supported under OS/2, and the
+value will be ignored... but it is wise to define these correctly because
+in the future those can be supported.
+ Also the number of buttons is limited to 2 when using two joysticks,
+4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
+and 8 when using a joystick with 2 axes. Notice however these are limitations
+of the Joystick Port hardware, not OS/2.
+
+
+
+6. Proportional windows
+-----------------------
+
+For some SDL applications it can be handy to have proportional windows, so
+the windows will keep their aspect ratio when resized.
+This can be achieved in two ways:
+
+- Before starting the given SDL application, set the
+ SDL_USE_PROPORTIONAL_WINDOW environment variable to something, e.g.:
+
+ SET SDL_USE_PROPORTIONAL_WINDOW=1
+ dosbox.exe
+
+- If you have a HOME environment variable set, then SDL will look for a file
+ in there called ".sdl.proportionals". If that file contains the name of the
+ currently running SDL executable, then that process will have proportional
+ windows automatically.
+
+ Please note that this file is created automatically with default values
+ at the first run.
+
+
+
+7. Audio in SDL applications
+----------------------------
+
+Audio effects are one of the most important features in games. Creating audio
+effects in sync with the game and without hickups and pauses in the audio are
+very important things.
+
+However there are multithreaded SDL applications that have tight loops as their
+main logic loop. This kills performance in OS/2, and takes too much CPU from
+other threads in the same process, for example from the thread to create the
+sound effects.
+
+For this reason, the OS/2 port of SDL can be instructed to run the audio thread
+in high priority, which makes sure that there will be enough time for the
+processing of the audio data.
+
+At default, SDL/2 runs the audio thread at ForegroundServer+0 priority. Well
+written and well behaving SDL applications should work well in this mode.
+For other applications, you can tell SDL/2 to run the audio thread at
+TimeCritical priority by setting an env.variable before starting the SDL app:
+
+ SET SDL_USE_TIMECRITICAL_AUDIO=1
+
+Please note that this is a bit risky, because if the SDL application runs a
+tight infinite loop in this thread, this will make the whole system
+unresponsive, so use it with care, and only for applications that need it!
+
+
+
+8. Next steps...
+----------------
+
+Things to do:
+- Implement missing stuffs (look for 'TODO' string in source code!)
+- Finish video driver (the 'wincommon' can be a good example for missing
+ things like application icon and so on...)
+- Enable MMX/SSE/SSE2 acceleration functions
+- Rewrite CDROM support using DOS Ioctl for better support.
+
+
+
+9. Contacts
+-----------
+
+ You can contact the developers for bugs:
+
+ Area Developer email
+ General (Audio/Video/System) Doodle doodle@scenergy.dfmk.hu
+ CDROM and Joystick Caetano daniel@caetano.eng.br
+
+ Notice however that SDL/2 is 'in development' stage so ... if you want to help,
+please, be our guest and contact us!
+
+
+
+10. Changelog of the OS/2 port
+------------------------------
+
+Version 1.2.10 - 2006-05-17 - Doodle
+ - Small modifications for v1.2.10 release
+ - Changed DLL name to include version info (currently SDL12.dll)
+
+Version 1.2 - 2006-05-01 - Doodle
+ - Modified makefile system to have only one makefile
+ - Included FSLib headers, DLL and LIB file
+
+Version 1.2 - 2006-02-26 - Doodle
+ - Updated the official SDL version with the OS/2 specific changes.
+ - Added support for real unicode keycode conversion.
+
+Version 1.2.7 - 2006-01-20 - Doodle
+ - Added support for selectively using timecritical priority for
+ audio threads by SDL_USE_TIMECRITICAL_AUDIO environment variable.
+ (e.g.:
+ SET SDL_USE_TIMECRITICAL_AUDIO=1
+ dosbox.exe
+ )
+
+Version 1.2.7 - 2005-12-22 - Doodle
+ - Added support for proportional SDL windows.
+ There are two ways to have proportional (aspect-keeping) windows for
+ a given SDL application: Either set the SDL_USE_PROPORTIONAL_WINDOW
+ environment variable to something before starting the application
+ (e.g.:
+ SET SDL_USE_PROPORTIONAL_WINDOW=1
+ dosbox.exe
+ )
+ or, if you have the HOME environment variable set, then SDL12.DLL will
+ create a file in that directory called .sdl.proportionals, and you can
+ put there the name of executable files that will be automatically made
+ proportional.
+
+Version 1.2.7 - 2005-10-14 - Doodle
+ - Enabled Exception handler code in FSLib to be able to restore original
+ desktop video mode in case the application crashes.
+ - Added the missing FSLib_Uninitialize() call into SDL.
+ (The lack of it did not cause problems, but it's cleaner this way.)
+ - Fixed a mouse problem in Fullscreen mode where any mouse click
+ re-centered the mouse.
+
+Version 1.2.7 - 2005-10-09 - Doodle
+ - Implemented window icon support
+
+Version 1.2.7 - 2005-10-03 - Doodle
+ - Reworked semaphore support again
+ - Tuned thread priorities
+
+Version 1.2.7 - 2005-10-02 - Doodle
+ - Added support for custom mouse pointers
+ - Fixed WM_CLOSE processing: give a chance to SDL app to ask user...
+ - Added support for MMX-accelerated audio mixers
+ - Other small fixes
+
+Version 1.2.7 - 2005-09-12 - Doodle
+ - Small fixes for DosBox incorporated into public release
+ - Fixed semaphore support (SDL_syssem.c)
+ - Fixed FSLib to have good clipping in scaled window mode,
+ and to prevent occasional desktop freezes.
+
+Version 1.2.7 - 2004-09-08a - Caetano
+ - Improved joystick support (general verifications about hardware).
+ - Added support up to 8 buttons in 2 axes joysticks and 6 buttons in 3 axes joysticks.
+ - Added support to environment variable SDL_OS2_JOYSTICK to specify a joystick.
+ - Improved Joystick test to handle every type of joystick and display only relevant information.
+ - Merged with Doodle 2004-09-08
+ - Little tid up in README.OS2
+ - Added explanation about SDL_OS2_JOYSTICK environment variable on README.OS2
+
+Version 1.2.7 - 2004-09-07 - Caetano
+ - Merged with changes in headers for GCC compiling.
+ - Added Joystick support using basic IBM GAME$ support, allowing it to work with all joystick drivers since OS/2 2.1.
+ - Improved joystick detection (hacked!). OS/2 do not allow real joystick detection, so...
+ - Modified makefile in test to compile "testjoystick". Anyway, it's useless, since it seems to cause a lot of trouble in OS/2 (because os video routines, not Joystick support).
+ - Created separated Joystick test program to test only joystick functions.
+ - Improved joystick auto-centering.
+ - Improved the coordinate correction routine to use two scale factors for each axis.
+
+Version 1.2.7 - 2004-07-05 - Caetano
+ - Corrected the time returned by status in CDROM support (it was incorrect)
+ - Added the testcdrom.c and corrected the linking directive (it was causing an error)
+
+Version 1.2.7 - 2004-07-02a - Caetano
+ - Corrected a little problem in a comment at SDL-1.2.7\test\torturethread.c, line 18 (missing */, nested comment)
+ - Added CDROM support to tree (SDL-1.2.7\src\cdrom\os2\SDL_syscdrom.c)
+ - Modified makefile (SDL-1.2.7\src\makefiles.wat and SDL-1.2.7\watcom.mif) to build with CDROM support
+ - Added the "extra" SDL_types.h forgotten in 2004-07-02 version.
+
+
diff --git a/README.PS3 b/README.PS3
new file mode 100644
index 0000000..c66467d
--- /dev/null
+++ b/README.PS3
@@ -0,0 +1,29 @@
+
+SDL on Sony Playstation3
+------------------------
+
+Installation:
+ First, you have to install the Cell SDK
+ - Download the Cell SDK installer RPM and ISO images to
+ a temporary directory such as /tmp/cellsdk.
+ - Mount the image: mount -o loop CellSDK-Devel-Fedora_3.1.0.0.0.iso /tmp/cellsdk
+ - Install the SDK installer: rpm -ivh cell-install-3.1.0-0.0.noarch.rpm
+ - Install the SDK: cd /opt/cell && ./cellsdk --iso /tmp/cellsdkiso install
+
+ You need to install the SPU-libs before installing SDL
+ - Go to SDL-1.2/src/video/ps3/spulibs/
+ - Run make && make install
+
+ Finally, install SDL
+ - Go to SDL-1.2/ and build SDL like any other GNU style package.
+ e.g.
+ - Build the configure-script with ./autogen.sh
+ - Configure SDL for your needs: ./configure --enable-video-ps3 ...
+ - Build and install it: make && make install
+
+
+Todo:
+ - mouse/keyboard/controller support
+
+Have fun!
+ Dirk Herrendoerfer
diff --git a/README.PicoGUI b/README.PicoGUI
new file mode 100644
index 0000000..cdb6bed
--- /dev/null
+++ b/README.PicoGUI
@@ -0,0 +1,50 @@
+ ========================
+ Using SDL with PicoGUI
+ ========================
+
+- Originally contributed by Micah Dowty
+
+PicoGUI is a scalable GUI system with a unique architecture, primarily focused
+on scalability to various embedded systems. You can find more information
+including a FAQ at http://picogui.org
+
+To use the patch:
+
+ 1. When compiling, add the "--enable-video-picogui" switch to ./configure
+
+ 2. When running your program, ensure that the picogui driver for SDL
+ is in use by setting the SDL_VIDEODRIVER environment variable
+ to "picogui".
+
+ 3. The program must also be linked to the C client library for PicoGUI
+ (libpgui.so). If the program is being compiled with a patched SDL
+ installed this should be done automatically. If you want to use an
+ existing binary with PicoGUI, you can set the LD_PRELOAD environment
+ variable to the path of your libpgui.so file.
+
+Capabilities:
+
+ So far only basic functionality is provided on true color (linear16/24/32)
+ devices. Accessing a memory mapped bitmap, updating the display, and handling
+ mouse/keyboard input. This functionality has been tested with several
+ applications, including mplayer, Xine, sldroids, and Abuse.
+
+TODO list:
+
+ - YUV overlays will be helpful for watching video on set top boxes or other
+ embedded devices that have some graphics acceleration hardware
+
+ - Account for rotated bitmap storage in pgserver
+
+ - Support for hiding or changing the cursor
+
+ - The display should be centered when the SDL application is smaller
+ than the PicoGUI panel
+
+ - Fullscreen or any other special modes
+
+ - Support for indexed and grayscale modes
+
+ - Probably much more...
+
+--- The End ---
diff --git a/README.Porting b/README.Porting
new file mode 100644
index 0000000..df61993
--- /dev/null
+++ b/README.Porting
@@ -0,0 +1,56 @@
+
+* Porting To A New Platform
+
+ The first thing you have to do when porting to a new platform, is look at
+include/SDL_platform.h and create an entry there for your operating system.
+The standard format is __PLATFORM__, where PLATFORM is the name of the OS.
+Ideally SDL_platform.h will be able to auto-detect the system it's building
+on based on C preprocessor symbols.
+
+There are two basic ways of building SDL at the moment:
+
+1. The "UNIX" way: ./configure; make; make install
+
+ If you have a GNUish system, then you might try this. Edit configure.in,
+ take a look at the large section labelled:
+ "Set up the configuration based on the target platform!"
+ Add a section for your platform, and then re-run autogen.sh and build!
+
+2. Using an IDE:
+
+ If you're using an IDE or other non-configure build system, you'll probably
+ want to create a custom SDL_config.h for your platform. Edit SDL_config.h,
+ add a section for your platform, and create a custom SDL_config_{platform}.h,
+ based on SDL_config.h.minimal and SDL_config.h.in
+
+ Add the top level include directory to the header search path, and then add
+ the following sources to the project:
+ src/*.c
+ src/audio/*.c
+ src/cdrom/*.c
+ src/cpuinfo/*.c
+ src/events/*.c
+ src/file/*.c
+ src/joystick/*.c
+ src/stdlib/*.c
+ src/thread/*.c
+ src/timer/*.c
+ src/video/*.c
+ src/audio/disk/*.c
+ src/video/dummy/*.c
+ src/joystick/dummy/*.c
+ src/cdrom/dummy/*.c
+ src/thread/generic/*.c
+ src/timer/dummy/*.c
+ src/loadso/dummy/*.c
+
+
+Once you have a working library without any drivers, you can go back to each
+of the major subsystems and start implementing drivers for your platform.
+
+If you have any questions, don't hesitate to ask on the SDL mailing list:
+ http://www.libsdl.org/mailing-list.php
+
+Enjoy!
+ Sam Lantinga (slouken@libsdl.org)
+
diff --git a/README.QNX b/README.QNX
new file mode 100644
index 0000000..995afbe
--- /dev/null
+++ b/README.QNX
@@ -0,0 +1,155 @@
+README.QNX by Mike Gorchak ,
+Last changed at 24 Apr 2004.
+
+======================================================================
+Table of Contents:
+
+1. OpenGL.
+2. Wheel and multi-button mouses.
+3. CDROM handling issues.
+4. Hardware video overlays.
+5. Shared library building.
+6. Some building issues.
+7. Environment variables.
+
+======================================================================
+1. OpenGL:
+
+ OpenGL works well and is stable, but fullscreen mode has not been
+heavily tested yet.
+ If you have QNX RtP version 6.1.0 or above you must download the
+Photon3D runtime from http://developers.qnx.com or install it from the
+public repository or from the public CD, available with QNX. OS versi-
+ons below 6.1.0 are not supported.
+ When creating an OpenGL context, software renderer mode is artifi-
+cially selected (QSSL made acceleration only for Voodoo boards in
+fullscreen mode, sorry but I don't have this board to test OpenGL -
+maybe it works or maybe not :)). If you want acceleration - you can
+remove one line in the source code: find the file SDL_ph_image.c and
+remove the following
+
+ OGLAttrib[OGLargc++]=PHOGL_ATTRIB_FORCE_SW;
+
+line in the ph_SetupOpenGLContext() function or change the argument to
+PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW.
+
+======================================================================
+2. Wheel and multi-button mouses:
+
+ Photon emits keyboard events (key up and down) when the mouse
+wheel is moved. The key_scan field appears valid, and it contains zero.
+That is a basic method of detecting mouse wheel events under Photon.
+It looks like a hack, but it works for me :) on various PC configura-
+tions.
+
+I've tested it on:
+
+1. Genius Optical NetScroll/+ PS/2 (1 wheel)
+2. A4Tech Optical GreatEye WheelMouse PS/2, model: WOP-35. (2 wheels
+ + 2 additional buttons). The wheel for vertical scrolling works as
+ usual, but the second wheel for horizontal scrolling emits two se-
+ quential events up or down, so it can provide faster scrolling than
+ the first wheel. Additional buttons don't emit any events, but it
+ looks like they're handled by photon in an unusual way - like click
+ to front, but works not with any window, looks like a fun bug-o-fe-
+ ature :).
+
+======================================================================
+3. CDROM handling issues:
+
+ Access to CDROM can only be provided with 'root' privileges. I
+can't do anything about that, /dev/cd0 has brw------- permissions and
+root:root rights.
+
+======================================================================
+4. Hardware video overlays:
+
+ Overlays can flicker during window movement, resizing, etc. It
+happens because the photon driver updates the real window contents be-
+hind the overlay, then draws the temporary chroma key color over the
+window contents. It can be done without using the chroma key but that
+causes the overlay to always be on top. So flickering during window
+movement is preferred instead.
+ Double buffering code is temporarily disabled in the photon driver
+code, because on my GF2-MX it can accidentally cause a buffer switch,
+which causes the old frame to show. S3 Savage4 has the same problem,
+but ATI Rage 128 doesn't. I think it can be fixed later. Current code
+works very well, so maybe double buffering is not needed right now.
+ Something strange happens when you try to move the window with the
+overlay beyond the left border of the screen. The overlay tries to
+stay at position x=0, but when attempting to move it a bit more it
+jumps to position x=-60 (on GF2-MX, on ATI Rage128 this value a bit
+smaller). It's really strange, looks like the overlay doesn't like
+negative coordinates.
+
+=======================================================================
+5. Shared library building:
+
+ A shared library can be built, but before running the autogen.sh
+script you must manually delete the libtool.m4 stuff from the acinclu-
+de.m4 file (it comes after the ESD detection code up to the end of the
+file), because the libtool stuff in the acinclude.m4 file was very old
+in SDL distribution before the version 1.2.7 and doesn't knew anything
+about QNX. SDL 1.2.7 distribution contains the new libtool.m4 script,
+but anyway it is broken :), Just remove it, then run "libtoolize
+--force --copy", delete the file aclocal.m4 if it is exists and after
+that run the autogen.sh script. SDL 1.2.8 contains fixed libtool.m4,
+ltmain.sh and config.sub files, so you can just run the autogen.sh
+script.
+
+======================================================================
+6. Some building issues:
+
+ Feel free to not use the --disable-shared configure option if you'
+ve read the above comment about 'Shared library building'. Otherwise
+this option is strongly recommended, as without it the sdl-config
+script will be broken.
+
+ Run the configure script without x11 support, e.g.:
+
+ a) for OpenGL support:
+ ./configure --prefix=/usr \
+ --disable-video-x11 \
+ --disable-shared
+
+ b) without OpenGL support:
+ ./configure --prefix=/usr \
+ --disable-video-x11 \
+ --disable-shared \
+ --disable-video-opengl
+
+ And of course dont forget to specify --disable-debug, which is on
+by default, to disable debug and enable the expensive optimizations.
+
+ In the test directory also run the ./configure script without
+x11 support, e.g.:
+
+ ./configure --with-sdl-prefix=/usr \
+ --with-sdl-exec-prefix=/usr \
+ --prefix=/usr --without-x
+
+======================================================================
+7. Environment variables:
+
+ Please note that the photon driver is sensible to the following
+environmental variables:
+
+ * SDL_PHOTON_FULLSCREEN_REFRESH - this environment variable controls
+the refresh rate in all fullscreen modes. Be carefull !!! Photon
+drivers usually do not checking the maximum refresh rate, which video
+adapter or monitor supports.
+
+ * SDL_VIDEO_WINDOW_POS - can be set in the "X,Y" format. If X and Y
+coordinates are bigger than the current desktop resolution, then win-
+dow positioning across virtual consoles is activated. If X and Y are
+smaller than the desktop resolution then window positioning in the
+current console is activated. The word "center" can be used instead of
+coordinates, it produces the same behavior as SDL_VIDEO_CENTERED
+environmental variable.
+
+ * SDL_VIDEO_CENTERED - if this environmental variable exists then the
+window centering is perfomed in the current virtual console.
+
+Notes: The SDL_VIDEO_CENTERED enviromental variable has greater pri-
+ority than the SDL_VIDEO_WINDOW_POS in case if both variables are sup-
+plied to the application.
diff --git a/README.Qtopia b/README.Qtopia
new file mode 100644
index 0000000..01627d1
--- /dev/null
+++ b/README.Qtopia
@@ -0,0 +1,84 @@
+
+==============================================================================
+Using the Simple DirectMedia Layer with Qtopia/OPIE
+==============================================================================
+
+==============================================================================
+I. Setting up the Qtopia development environment.
+
+ This document will not explain how to setup the Qtopia development
+ environment. That is outside the scope of the document. You can read
+ more on this subject in this excellent howto:
+
+ http://www.zauruszone.com/howtos/linux_compiler_setup_howto.html
+
+==============================================================================
+II. Building the Simple DirectMedia Layer libraries using the arm
+ cross-compiler
+
+ This is somewhat tricky since the name of the compiler binaries
+ differ from the standard. Also you should disable features not
+ needed. The command below works for me. Note that it's all one
+ line. You can also set the NM, LD etc environment variables
+ separately.
+
+ NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --enable-video-qtopia --disable-video-dummy --disable-video-fbcon --disable-video-dga --disable-arts --disable-esd --disable-alsa --disable-cdrom --disable-video-x11 --disable-nasm --prefix=/opt/Qtopia/sharp/ arm-unknown-linux-gnu
+
+ One thing to note is that the above configure will include joystick
+ support, even though you can't have joysticks on the Zaurus. The
+ reason for this is to avoid link / compile / runtime errors with
+ applications that have joystick support.
+
+==============================================================================
+III. Building the Simple DirectMedia Layer test programs:
+
+ After installing, making sure the correct sdl-config is in your
+ path, run configure like this:
+
+ NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ AR=arm-linux-ar ./configure arm-unknown-linux-gnu
+
+==============================================================================
+IV. Application porting notes
+
+ One thing I have noticed is that applications sometimes don't exit
+ correctly. Their icon remains in the taskbar and they tend to
+ relaunch themselves automatically. I believe this problem doesn't
+ occur if you exit your application using the exit() method. However,
+ if you end main() with 'return 0;' or so, this seems to happen.
+
+ Also note that when running in landscape mode - i.e requesting a
+ window that is HEIGHT pixels wide and WIDTH pixels high, where WIDTH
+ and HEIGHT normally is 240 and 320 - the image is blitted so that
+ the hardware buttons are on the left side of the display. This might
+ not always be desirable but such is the code today.
+
+
+==============================================================================
+V. Enjoy! :)
+
+ If you have a project you'd like me to know about, or want to ask questions,
+ go ahead and join the SDL developer's mailing list by sending e-mail to:
+
+ sdl-request@libsdl.org
+
+ and put "subscribe" into the subject of the message. Or alternatively you
+ can use the web interface:
+
+ http://www.libsdl.org/mailman/listinfo/sdl
+
+==============================================================================
+VI. What is supported:
+
+Keyboard (Sharp Zaurus)
+Hardware buttons
+Stylus input (mouse)
+Video. Allows fullscreen both in portrait mode (up to WIDTHxHEIGHT
+size window) and in landscape mode (up to HEIGHTxWIDTH).
+
+All other SDL functionality works like a normal Linux system (threads,
+audio etc).
+
+--
+David Hedbor
+http://david.hedbor.org/ http://eongames.com/
+
diff --git a/README.RISCOS b/README.RISCOS
new file mode 100644
index 0000000..1ab8598
--- /dev/null
+++ b/README.RISCOS
@@ -0,0 +1,130 @@
+Readme for RISC OS port of SDL
+==============================
+
+This document last updated on 2nd Februrary 2006
+
+This is a RISC OS port of the Simple Direct Media Layer (SDL) by Alan Buckley with contributions from Peter Naulls.
+
+Details of the SDL can be found at http://www.libsdl.org.
+
+The source code including the RISC OS version can be obtained from:
+
+http://www.libsdl.org.
+
+Pre built libraries and many games and applications compiled for RISC OS using this library can be downloaded from The Unix Porting Project at http://www.riscos.info/unix/.
+
+This is released under the LGPL see the file COPYING for details.
+
+
+Compiling applications under RISC OS
+====================================
+
+Add -ISDL: for the C compiler flags if you include the files in the SDL directory. e.g. #include "SDL/SDL.h"
+Add -ISDL:SDL for the C compiler flags if you include the files directly. e.g. #include "SDL/SDL.h"
+
+Add -LSDL: -lSDL to the link stage of compilation.
+
+For example, to compile the testbitmap.c sample you could use:
+
+gcc -ISDL:SDL -LSDL: -lSDL testbitmap.c -otestbitmap
+
+
+RISC OS port of SDL runtime information
+=======================================
+
+Runtime requirements
+--------------------
+
+This library currently needs a minimum of RISC OS 3.6. The source code for the library (and a lot of the programs built with it) also need long file names.
+
+To use the audio you also need 16 bit sound and to have installed the DigitalRender module by Andreas Dehmel version 0.51 available from his
+web site: http://home.t-online.de/~zarquon
+This is loaded when needed by UnixLib.
+
+Note: As most programs ported from other OSes use high resolution graphics and a memory back buffer a machine with a StrongARM processor and 1 or 2MB of VRAM (or a better machine) is recomended.
+
+
+RISC OS runtime parameters
+--------------------------
+
+Several environmental variables have been defined to make porting programs easier (i.e. By setting these variable you do not need to have source code differences between OSes).
+
+They are all defined on an application basis.
+
+The used below is found as follows:
+1. Use the name of the program unless it is !RunImage
+2. Check the folder specification for the folder !RunImage is run from. If it is a folder name use that name, otherwise if it is an environmental variable of the form use the value of XXX.
+
+The variables are:
+
+SDL$$TaskName
+
+The name of the task for RISC OS. If omitted then is used for the task name,
+
+SDL$$BackBuffer
+
+Set to 1 to use a system memory back buffer for the screen in full screen mode. Some programs on other systems assume their is always a back buffer even though the SDL specification specifies this is not the case. The current RISC OS implementation uses direct writes to the screen if a hardware fullscreen is requested.
+
+Set to 2 to use an ARM code full word copy. This is faster than the standard back buffer, but uses aligned words only so it is possible (but unlikely) for it to corrupt the screen for 8bpp and 16bpp modes.
+
+Set to 3 to use a RISC OS sprite as the back buffer. This is usually the slowest for most SDL applications, however it may be useful in the future as Sprite acceleration is added to various hardware that runs RISC OS.
+
+SDL$$CloseAction - set the action for the close icon. Again as programs don't match the specification you can set this to 0 to remove the close icon from the main window for applications where this does not affect the program.
+
+
+RISC OS SDL port API notes
+==========================
+
+Current level of implementation
+-------------------------------
+
+The following list is an overview of how much of the SDL is implemented. The areas match the main areas of the SDL.
+
+video - Mostly done. Doesn't cover gamma, YUV-overlay or OpenGL.
+Window Manager - Mostly done. SetIcon/IconifyWindow not implemented.
+Events - Mostly done. Resize and some joystick events missing.
+Joystick - Currently assumes a single joystick with 4 buttons.
+Audio - Done
+CDROM - Not implemented.
+Threads - Done
+Timers - Done
+
+Thread support can be removed by defining DISABLE_THREADS and recompiling the library.
+
+SDL API notes
+-------------
+
+This section contains additional notes on some specific commands.
+
+SDL_SetVideoMode
+ On RISC OS a fullscreen mode directly accesses the screen. This can be modified by the environmental variable (SDL$$BackBuffer) or by using the SDL_SWSURFACE flag to write to an offscreen buffer that is updated using SDL_UpdateRects.
+ Open GL is not supported so SDL_OPENGL and SDL_OPENGLBLIT flags fail.
+ SDL_RESIZEABLE and SDL_NOFRAME flags are not supported.
+
+SDL_SetColors
+ In a wimp mode the screen colours are not changed for a hardware palette instead the RISC OS sprite colour mapping is used to get the best matching colours.
+
+SDL_CreateCursor
+ Inverted colour is not supported.
+
+SDL_WM_ToggleFullScreen
+ Currently this won't work if the application starts up in Fullscreen mode.
+ Toggling to fullscreen will only work if the monitor is set up to support the exact screen size requested.
+
+SDL_EnableUNICODE
+ Unicode translation used here is only really accurate for 7 bit characters.
+
+SDL_NumJoysticks/JoystickName etc.
+ Hardcoded to expect only 1 joystick with 4 buttons if the Joystick module is loaded.
+
+SDL_GetTicks
+ Timer used has only a centisecond accuracy. This applies to other time related functions.
+
+SDL_Delay
+ Modified to poll keyboard/mouse during the delay on the event thread.
+
+
+Notes on current implementation
+-------------------------------
+
+Keyboard and mouse are polled so if too long a time is spent between a call to SDL_PumpEvents, functions that use it, or SDL_Delay events can be missed.
diff --git a/README.SVN b/README.SVN
new file mode 100644
index 0000000..65c5c42
--- /dev/null
+++ b/README.SVN
@@ -0,0 +1,23 @@
+
+The latest development version of SDL is available via Subversion.
+Subversion allows you to get up-to-the-minute fixes and enhancements;
+as a developer works on a source tree, you can use svn to mirror that
+source tree instead of waiting for an official release. Please look
+at the Subversion website ( http://subversion.tigris.org/ ) for more
+information on using svn, where you can also download software for
+MacOS, Windows, and Unix systems.
+
+ svn checkout http://svn.libsdl.org/branches/SDL-1.2
+
+If you are building SDL with an IDE, you will need to copy the file
+include/SDL_config.h.default to include/SDL_config.h before building.
+
+If you are building SDL via configure, you will need to run autogen.sh
+before running configure.
+
+There is a web interface to the subversion repository at:
+ http://www.libsdl.org/cgi/viewvc.cgi
+
+There is an RSS feed available at that URL, for those that want to
+track commits in real time.
+
diff --git a/README.Symbian b/README.Symbian
new file mode 100644
index 0000000..32d925a
--- /dev/null
+++ b/README.Symbian
@@ -0,0 +1,23 @@
+==============================================================================
+Using the Simple DirectMedia Layer with S60 3.x / Symbian 9.x
+==============================================================================
+
+These instuctions are for people developing for S60 3.x. S60 3.x
+uses Symbian OS so you need S60 SDK.
+
+extract "symbian.zip" into this folder.
+
+go to symbian folder
+
+bldmake bldfiles
+abld build
+
+That produces WINSCW and ARMV5 versions of sdl.dll runtime library
+and sdl.lib for development.
+The sdlexe.dll/sdlexe.lib and sdlmain.lib are for easy SDL S60
+integration, please see http://www.mbnet.fi/~mertama/sdl.html
+for further info.
+
+
+
+
diff --git a/README.Watcom b/README.Watcom
new file mode 100644
index 0000000..2849a11
--- /dev/null
+++ b/README.Watcom
@@ -0,0 +1,133 @@
+
+Using SDL under Windows with the OpenWatcom compiler
+====================================================
+
+Prerequisites
+-------------
+
+I have done the port under Windows XP Home with SP2 installed. Windows
+2000 should also be working. I'm not so sure about ancient Windows NT,
+since only DirectX 3 is available there. Building should be possible,
+but running the compiled applications will probalbly fail with
+SDL_VIDEODRIVER=directx. The windib driver should work, though.
+
+To compile and use the SDL with Open Watcom you will need the following:
+- Open Watcom compiler. I used version 1.5. The environment variables
+ PATH, WATCOM and INCLUDE need to be set appropriately - please consult
+ the OpenWatcom documentation and instructions given during the
+ installation of the compiler.
+ My setup looks like this in owvars.bat:
+ set WATCOM=C:\watcom
+ set INCLUDE=%WATCOM%\h;%WATCOM%\h\nt
+ set PATH=%PATH%;%WATCOM%\binnt;%WATCOM%\binw
+- A fairly recent DirectX SDK. The original unmodified DX8 SDK works, as
+ well as the minimal DirectX 7 SDK from the Allegro download site
+ ().
+- The SDL sources from Subversion
+- The file Watcom-Win32.zip (now available in Subversion)
+
+
+Building the Library
+--------------------
+
+1) In the SDL base directory extract the archive Watcom-Win32.zip. This
+ creates a subdirectory named 'watcom'.
+2) The makefile expects the environment variable DXDIR to be set to the
+ base directory of a DirectX SDK. I have tried a stock DX8 SDK from
+ Microsoft as well as the minimal DirectX 7 SDK from the Allegro
+ download site.
+ You can also edit the makefile directly and hard code your path to
+ the SDK on your system.
+ I have this in my setup:
+ set DXDIR=D:\devel\DX8_SDK
+3) Enter the watcom directory and run
+ wmake sdl
+4) All tests from the test directory are working and can be built by
+ running
+ wmake tests
+
+Notes:
+
+ The makefile offers some options to tweak the way the library is built.
+ You have at your disposal the option to build a static (default)
+ library, or a DLL (with tgt=dll). You can also choose whether to build
+ a Release (default) or a Debug version (with build=debug) of the tests
+ and library. Please consult the usage comment at the top of the
+ makefile for usage instructions.
+
+ If you specify a test target (i.e. 'wmake tests' for all tests, or
+ selected targets like 'wmake testgl testvidinfo testoverlay2'), the
+ tests are always freshly compiled and linked. This is done to
+ minimise hassle when switching between library versions (static vs.
+ DLL), because they require subtly different options.
+ Also, the test executables are put directly into the test directory,
+ so they can find their data files. The clean target of the makefile
+ removes the test executables and the SDL.dll file from the test
+ directory.
+
+ To use the library in your own projects with Open Watcom, you can use
+ the way the tests are built as base of your own build environment.
+
+ The library can also be built with the stack calling convention of the
+ compiler (-6s instead of -6r).
+
+
+Test applications
+-----------------
+
+I've tried to make all tests work. The following table gives an overview
+of the current status.
+
+ Testname Status
+~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+checkkeys +
+graywin +
+loopwave +
+testalpha +
+testbitmap +
+testdyngl +
+testerror +
+testfile +
+testgamma +
+testgl +
+testhread +
+testiconv - (all failed)
+testkeys +
+testlock +
+testoverlay + (needs 'set SDL_VIDEODRIVER=directx')
+testoverlay2 + (needs 'set SDL_VIDEODRIVER=directx')
+testpalette +
+testplatform +
+testsem +
+testsprite +
+testtimer +
+testver +
+testvidinfo +
+testwin ? (fading doesn't seem right)
+testwm +
+torturethread +
+testcdrom +
+testjoystick not tested
+threadwin +
+testcursor +
+
+
+TODO
+----
+
+There is room for further improvement:
+- Test joystick functionality.
+- Investigate fading issue in 'testwin' test.
+- Fix the UTF-8 support.
+- Adapt the makefile/object file list to support more target systems
+- Use "#pragma aux" syntax for the CPU info functions.
+
+
+Questions and Comments
+----------------------
+
+Please direct any questions or comments to me:
+
+ Happy Coding!
+
+ Marc Peter
diff --git a/README.WinCE b/README.WinCE
new file mode 100644
index 0000000..6f8799e
--- /dev/null
+++ b/README.WinCE
@@ -0,0 +1,55 @@
+
+Project files for embedded Visual C++ 3.0, 4.0 and
+Visual Studio 2005 can be found in VisualCE.zip
+
+SDL supports GAPI and WinDib output for Windows CE.
+
+GAPI driver supports:
+
+- all possible WinCE devices (Pocket PC, Smartphones, HPC)
+ with different orientations of video memory and resolutions.
+- 4, 8 and 16 bpp devices
+- special handling of 8bpp on 8bpp devices
+- VGA mode, you can even switch between VGA and GAPI in runtime
+ (between 240x320 and 480x640 for example). On VGA devices you can
+ use either GAPI or VGA.
+- Landscape mode and automatic rotation of buttons and stylus coordinates.
+ To enable landscape mode make width of video screen bigger than height.
+ For example:
+ SDL_SetVideoMode(320,240,16,SDL_FULLSCREEN)
+- WM2005
+- SDL_ListModes
+
+NOTE:
+There are several SDL features not available in the WinCE port of SDL.
+
+- DirectX is not yet available
+- Semaphores are not available
+- Joystick support is not available
+- CD-ROM control is not available
+
+In addition, there are several features that run in "degraded" mode:
+
+Preprocessor Symbol Effect
+=================== =================================
+
+SDL_systimer.c:
+USE_GETTICKCOUNT Less accurate values for SDL time functions
+USE_SETTIMER Use only a single marginally accurate timer
+
+SDL_syswm.c:
+DISABLE_ICON_SUPPORT Can't set the runtime window icon
+
+SDL_sysmouse.c:
+USE_STATIC_CURSOR Only the arrow cursor is available
+
+SDL_sysevents.c:
+NO_GETKEYBOARDSTATE Can't get modifier state on keyboard focus
+
+SDL_dibevents.c:
+NO_GETKEYBOARDSTATE Very limited keycode translation
+
+SDL_dibvideo.c:
+NO_GETDIBITS Can't distinguish between 15 bpp and 16 bpp
+NO_CHANGEDISPLAYSETTINGS No fullscreen support
+NO_GAMMA_SUPPORT Gamma correction not available
diff --git a/README.wscons b/README.wscons
new file mode 100644
index 0000000..349c89c
--- /dev/null
+++ b/README.wscons
@@ -0,0 +1,107 @@
+==============================================================================
+Using the Simple DirectMedia Layer with OpenBSD/wscons
+==============================================================================
+
+The wscons SDL driver can be used to run SDL programs on OpenBSD
+without running X. So far, the driver only runs on the Sharp Zaurus,
+but the driver is written to be easily extended for other machines.
+The main missing pieces are blitting routines for anything but 16 bit
+displays, and keycode maps for other keyboards. Also, there is no
+support for hardware palettes.
+
+There is currently no mouse support.
+
+To compile SDL with support for wscons, use the
+"--enable-video-wscons" option when running configure. I used the
+following command line:
+
+./configure --disable-oss --disable-ltdl --enable-pthread-sem \
+ --disable-esd --disable-arts --disable-video-aalib \
+ --enable-openbsdaudio --enable-video-wscons \
+ --prefix=/usr/local --sysconfdir=/etc
+
+
+Setting the console device to use
+=================================
+
+When starting an SDL program on a wscons console, the driver uses the
+current virtual terminal (usually /dev/ttyC0). To force the driver to
+use a specific terminal device, set the environment variable
+SDL_WSCONSDEV:
+
+bash$ SDL_WSCONSDEV=/dev/ttyC1 ./some-sdl-program
+
+This is especially useful when starting an SDL program from a remote
+login prompt (which is great for development). If you do this, and
+want to use keyboard input, you should avoid having some other program
+reading from the used virtual console (i.e., do not have a getty
+running).
+
+
+Rotating the display
+====================
+
+The display can be rotated by the wscons SDL driver. This is useful
+for the Sharp Zaurus, since the display hardware is wired so that it
+is correctly rotated only when the display is folded into "PDA mode."
+When using the Zaurus in "normal," or "keyboard" mode, the hardware
+screen is rotated 90 degrees anti-clockwise.
+
+To let the wscons SDL driver rotate the screen, set the environment
+variable SDL_VIDEO_WSCONS_ROTATION to "CW", "CCW", or "UD", for
+clockwise, counter clockwise, and upside-down rotation respectively.
+"CW" makes the screen appear correct on a Sharp Zaurus SL-C3100.
+
+When using rotation in the driver, a "shadow" frame buffer is used to
+hold the intermediary display, before blitting it to the actual
+hardware frame buffer. This slows down performance a bit.
+
+For completeness, the rotation "NONE" can be specified to use a shadow
+frame buffer without actually rotating. Unsetting
+SDL_VIDEO_WSCONS_ROTATION, or setting it to '' turns off the shadow
+frame buffer for maximum performance.
+
+
+Running MAME
+============
+
+Since my main motivation for writing the driver was playing MAME on
+the Zaurus, I'll give a few hints:
+
+XMame compiles just fine under OpenBSD.
+
+I'm not sure this is strictly necessary, but set
+
+MY_CPU = arm
+
+in makefile.unix, and
+
+CFLAGS.arm = -DLSB_FIRST -DALIGN_INTS -DALIGN_SHORTS
+
+in src/unix/unix.max
+
+to be sure.
+
+The latest XMame (0.101 at this writing) is a very large program.
+Either tinker with the make files to compile a version without support
+for all drivers, or, get an older version of XMame. My recommendation
+would be 0.37b16.
+
+When running MAME, DO NOT SET SDL_VIDEO_WSCONS_ROTATION! Performace
+is MUCH better without this, and it is COMPLETELY UNNECESSARY, since
+MAME can rotate the picture itself while drawing, and does so MUCH
+FASTER.
+
+Use the Xmame command line option "-ror" to rotate the picture to the
+right.
+
+
+Acknowledgments
+===============
+
+I studied the wsfb driver for XFree86/Xorg quite a bit before writing
+this, so there ought to be some similarities.
+
+
+--
+Staffan Ulfberg
diff --git a/SDL.qpg.in b/SDL.qpg.in
new file mode 100644
index 0000000..8e1ff8d
--- /dev/null
+++ b/SDL.qpg.in
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QNX.ORG.RU Community
+
+
+ QNX.ORG.RU Team
+ Mike Gorchak
+ mike@malva.ua
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library
+ SDL
+ 1
+ http://qnx.org.ru/repository
+ 2.6
+
+
+
+ Simple DirectMedia Layer (SDL)
+ SDL
+ slouken@libsdl.org
+ Public
+ public
+ http://www.libsdl.org
+
+ slouken@libsdl.org
+ Sam Lantinga
+ http://www.libsdl.org
+
+ slouken@libsdl.org
+
+
+ This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms.
+ This is the Simple DirectMedia Layer (SDL), a generic API that provides low level access to audio, keyboard, mouse, and display framebuffer across multiple platforms. This is the libraries, include files and other resources you can use to develop and run SDL applications.
+ http://www.libsdl.org
+
+
+
+
+ @VERSION@
+ Medium
+ Stable
+
+
+ 1
+
+ GNU Lesser General Public License
+
+
+
+ Software Development/Libraries and Extensions/C Libraries
+ SDL,audio,graphics,demos,games,emulators,direct,media,layer
+ qnx6
+ none
+ Photon
+ Console
+ Developer
+ User
+
+ repdata://LicenseUrl/COPYING
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SDL.spec b/SDL.spec
new file mode 100644
index 0000000..fb50531
--- /dev/null
+++ b/SDL.spec
@@ -0,0 +1,113 @@
+Summary: Simple DirectMedia Layer
+Name: SDL
+Version: 1.2.14
+Release: 1
+Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
+URL: http://www.libsdl.org/
+License: LGPL
+Group: System Environment/Libraries
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Prefix: %{_prefix}
+%ifos linux
+Provides: libSDL-1.2.so.0
+%endif
+
+%define __defattr %defattr(-,root,root)
+%define __soext so
+
+%description
+This is the Simple DirectMedia Layer, a generic API that provides low
+level access to audio, keyboard, mouse, and display framebuffer across
+multiple platforms.
+
+%package devel
+Summary: Libraries, includes and more to develop SDL applications.
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+This is the Simple DirectMedia Layer, a generic API that provides low
+level access to audio, keyboard, mouse, and display framebuffer across
+multiple platforms.
+
+This is the libraries, include files and other resources you can use
+to develop SDL applications.
+
+
+%prep
+%setup -q
+
+%build
+%ifos linux
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-aalib --disable-video-directfb --disable-video-ggi --disable-video-svga
+%else
+%configure
+%endif
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifos linux
+make install prefix=$RPM_BUILD_ROOT%{prefix} \
+ bindir=$RPM_BUILD_ROOT%{_bindir} \
+ libdir=$RPM_BUILD_ROOT%{_libdir} \
+ includedir=$RPM_BUILD_ROOT%{_includedir} \
+ datadir=$RPM_BUILD_ROOT%{_datadir} \
+ mandir=$RPM_BUILD_ROOT%{_mandir}
+ln -s libSDL-1.2.so.0 $RPM_BUILD_ROOT%{_libdir}/libSDL-1.1.so.0
+%else
+%makeinstall
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%{__defattr}
+%doc README-SDL.txt COPYING CREDITS BUGS
+%{_libdir}/lib*.%{__soext}.*
+
+%files devel
+%{__defattr}
+%doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html
+%doc docs/index.html docs/html
+%{_bindir}/*-config
+%{_libdir}/lib*.a
+%{_libdir}/lib*.la
+%{_libdir}/lib*.%{__soext}
+%dir %{_includedir}/SDL
+%{_includedir}/SDL/*.h
+%{_libdir}/pkgconfig/sdl.pc
+%{_datadir}/aclocal/*
+%{_mandir}/man3/*
+
+%changelog
+* Tue May 16 2006 Sam Lantinga
+- Removed support for Darwin, due to build problems on ps2linux
+
+* Mon Jan 03 2004 Anders Bjorklund
+- Added support for Darwin, updated spec file
+
+* Wed Jan 19 2000 Sam Lantinga
+- Re-integrated spec file into SDL distribution
+- 'name' and 'version' come from configure
+- Some of the documentation is devel specific
+- Removed SMP support from %build - it doesn't work with libtool anyway
+
+* Tue Jan 18 2000 Hakan Tandogan
+- Hacked Mandrake sdl spec to build 1.1
+
+* Sun Dec 19 1999 John Buswell
+- Build Release
+
+* Sat Dec 18 1999 John Buswell
+- Add symlink for libSDL-1.0.so.0 required by sdlbomber
+- Added docs
+
+* Thu Dec 09 1999 Lenny Cartier
+- v 1.0.0
+
+* Mon Nov 1 1999 Chmouel Boudjnah
+- First spec file for Mandrake distribution.
+
+# end of file
diff --git a/SDL.spec.in b/SDL.spec.in
new file mode 100644
index 0000000..dbda112
--- /dev/null
+++ b/SDL.spec.in
@@ -0,0 +1,113 @@
+Summary: Simple DirectMedia Layer
+Name: SDL
+Version: @SDL_VERSION@
+Release: 1
+Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
+URL: http://www.libsdl.org/
+License: LGPL
+Group: System Environment/Libraries
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Prefix: %{_prefix}
+%ifos linux
+Provides: libSDL-1.2.so.0
+%endif
+
+%define __defattr %defattr(-,root,root)
+%define __soext so
+
+%description
+This is the Simple DirectMedia Layer, a generic API that provides low
+level access to audio, keyboard, mouse, and display framebuffer across
+multiple platforms.
+
+%package devel
+Summary: Libraries, includes and more to develop SDL applications.
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+This is the Simple DirectMedia Layer, a generic API that provides low
+level access to audio, keyboard, mouse, and display framebuffer across
+multiple platforms.
+
+This is the libraries, include files and other resources you can use
+to develop SDL applications.
+
+
+%prep
+%setup -q
+
+%build
+%ifos linux
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-aalib --disable-video-directfb --disable-video-ggi --disable-video-svga
+%else
+%configure
+%endif
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%ifos linux
+make install prefix=$RPM_BUILD_ROOT%{prefix} \
+ bindir=$RPM_BUILD_ROOT%{_bindir} \
+ libdir=$RPM_BUILD_ROOT%{_libdir} \
+ includedir=$RPM_BUILD_ROOT%{_includedir} \
+ datadir=$RPM_BUILD_ROOT%{_datadir} \
+ mandir=$RPM_BUILD_ROOT%{_mandir}
+ln -s libSDL-1.2.so.0 $RPM_BUILD_ROOT%{_libdir}/libSDL-1.1.so.0
+%else
+%makeinstall
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%{__defattr}
+%doc README-SDL.txt COPYING CREDITS BUGS
+%{_libdir}/lib*.%{__soext}.*
+
+%files devel
+%{__defattr}
+%doc README README-SDL.txt COPYING CREDITS BUGS WhatsNew docs.html
+%doc docs/index.html docs/html
+%{_bindir}/*-config
+%{_libdir}/lib*.a
+%{_libdir}/lib*.la
+%{_libdir}/lib*.%{__soext}
+%dir %{_includedir}/SDL
+%{_includedir}/SDL/*.h
+%{_libdir}/pkgconfig/sdl.pc
+%{_datadir}/aclocal/*
+%{_mandir}/man3/*
+
+%changelog
+* Tue May 16 2006 Sam Lantinga
+- Removed support for Darwin, due to build problems on ps2linux
+
+* Mon Jan 03 2004 Anders Bjorklund
+- Added support for Darwin, updated spec file
+
+* Wed Jan 19 2000 Sam Lantinga
+- Re-integrated spec file into SDL distribution
+- 'name' and 'version' come from configure
+- Some of the documentation is devel specific
+- Removed SMP support from %build - it doesn't work with libtool anyway
+
+* Tue Jan 18 2000 Hakan Tandogan
+- Hacked Mandrake sdl spec to build 1.1
+
+* Sun Dec 19 1999 John Buswell
+- Build Release
+
+* Sat Dec 18 1999 John Buswell
+- Add symlink for libSDL-1.0.so.0 required by sdlbomber
+- Added docs
+
+* Thu Dec 09 1999 Lenny Cartier
+- v 1.0.0
+
+* Mon Nov 1 1999 Chmouel Boudjnah
+- First spec file for Mandrake distribution.
+
+# end of file
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..65bb01c
--- /dev/null
+++ b/TODO
@@ -0,0 +1,25 @@
+
+Wish list for the 1.3 development branch:
+http://bugzilla.libsdl.org/
+
+ * Add mousewheel events (new unified event architecture?)
+ * DirectInput joystick support needs to be implemented
+ * Be able to enumerate and select available audio and video drivers
+ * Fullscreen video mode support for Mac OS X
+ * Explicit vertical retrace wait (maybe separate from SDL_Flip?)
+ * Shaped windows, windows without borders
+ * Multiple windows, multiple display support
+ * SDL_INIT_EVENTTHREAD on Windows and MacOS?
+ * Add a timestamp to events
+ * Add audio input API
+ * Add hardware accelerated scaled blit
+ * Add hardware accelerated alpha blits
+ * Redesign blitting architecture to allow blit plugins
+
+In the jump from 1.2 to 1.3, we should change the SDL_Rect members to
+int and evaluate all the rest of the datatypes. This is the only place
+we should do it though, since the 1.2 series should not break binary
+compatibility in this way.
+
+Requests:
+ * PCM and CDROM volume control (deprecated, but possible)
diff --git a/VisualC.html b/VisualC.html
new file mode 100644
index 0000000..ad2ed97
--- /dev/null
+++ b/VisualC.html
@@ -0,0 +1,171 @@
+
+
+ Using SDL with Microsoft Visual C++
+
+
+
+ Unzip the VisualC.zip file into the directory that contains this
+ file (VisualC.html).
+
+
+ Be certain that you unzip the zip file for your compiler into this
+ directory and not any other directory. If you are using WinZip, be careful to
+ make sure that it extracts to this folder, because it's
+ convenient feature of unzipping to a folder with the name of the file currently
+ being unzipped will get you in trouble if you use it right now. And that's all
+ I have to say about that.
+
+
+ Now that it's unzipped, go into the VisualC
+ directory that is created, and double-click on the VC++ file "SDL.dsw"
+ ("SDL.sln"). This should open up the IDE.
+
+
+ You may be prompted at this point to upgrade the workspace, should you be using
+ a more recent version of Visual C++. If so, allow the workspace to be upgraded.
+
+
+ Build the .dll and .lib files.
+
+
+ This is done by right clicking on each project in turn (Projects are listed in
+ the Workspace panel in the FileView tab), and selecting "Build".
+
+
+ If you get an error about SDL_config.h being missing, you should
+ copy include/SDL_config.h.default to include/SDL_config.h and try again.
+
+
+ You may get a few warnings, but you should not get any errors. You do have to
+ have at least the DirectX 5 SDK installed, however. The latest
+ version of DirectX can be downloaded or purchased on a cheap CD (my
+ recommendation) from Microsoft .
+
+
+ Later, we will refer to the following .lib and .dll files that have just been
+ generated:
+
+
+
SDL.dll
+
SDL.lib
+
SDLmain.lib
+
+
+ Search for these using the Windows Find (Windows-F) utility, if you don't
+ already know where they should be. For those of you with a clue, look inside
+ the Debug or Release directories of the subdirectories of the Project folder.
+ (It might be easier to just use Windows Find if this sounds confusing. And
+ don't worry about needing a clue; we all need visits from the clue fairy
+ frequently.)
+
+
+ Creating a Project with SDL
+
+
+ Create a project as a Win32 Application.
+
+
+ Create a C++ file for your project.
+
+
+ Set the C runtime to "Multi-threaded DLL" in the menu: Project|Settings|C/C++
+ tab|Code Generation|Runtime Library .
+
+
+ Add the SDL include directory to your list of includes in the
+ menu: Project|Settings|C/C++ tab|Preprocessor|Additional include directories
+ .
+
+ VC7 Specific: Instead of doing this I find it easier to
+ add the include and library directories to the list that VC7 keeps. Do this by
+ selecting Tools|Options|Projects|VC++ Directories and under the "Show
+ Directories For:" dropbox select "Include Files", and click the "New Directory
+ Icon" and add the [SDLROOT]\include directory (ex. If you installed to
+ c:\SDL-1.2.5\ add c:\SDL-1.2.5\include). Proceed to change the
+ dropbox selection to "Library Files" and add [SDLROOT]\lib.
+
+
+ The "include directory" I am referring to is the include folder
+ within the main SDL directory (the one that this HTML file located within).
+
+
+ Now we're going to use the files that we had created earlier in the Build SDL
+ step.
+
+
+ Copy the following files into your Project directory:
+
+
+
SDL.dll
+
+
+ Add the following files to your project (It is not necessary to copy them to
+ your project directory):
+
+
+
SDL.lib
+
SDLmain.lib
+
+
+ (To add them to your project, right click on your project, and select "Add
+ files to project")
+
+
Instead of adding the files to your project it is more
+ desireable to add them to the linker options: Project|Properties|Linker|Command
+ Line and type the names of the libraries to link with in the "Additional
+ Options:" box. Note: This must be done for each build
+ configuration (eg. Release,Debug).
+
+ SDL 101, First Day of Class
+
+
+ Now create the basic body of your project. The body of your program should take
+ the following form:
+
+#include "SDL.h"
+
+int main( int argc, char* argv[] )
+{
+ // Body of the program goes here.
+ return 0;
+}
+
+
+
+
+ That's it!
+
+
+ I hope that this document has helped you get through the most difficult part of
+ using the SDL: installing it. Suggestions for improvements to this document
+ should be sent to the writers of this document.
+
+
+ Thanks to Paulus Esterhazy (pesterhazy@gmx.net), for the work on VC++ port.
+
+
+ This document was originally called "VisualC.txt", and was written by
+ Sam Lantinga.
+
+
+ Later, it was converted to HTML and expanded into the document that you see
+ today by Lion Kimbro.
+
+
Minor Fixes and Visual C++ 7 Information (In Green) was added by James Turk
+
+
+
diff --git a/VisualC.zip b/VisualC.zip
new file mode 100644
index 0000000..5ee0c63
Binary files /dev/null and b/VisualC.zip differ
diff --git a/VisualCE.zip b/VisualCE.zip
new file mode 100644
index 0000000..0f71254
Binary files /dev/null and b/VisualCE.zip differ
diff --git a/Watcom-OS2.zip b/Watcom-OS2.zip
new file mode 100644
index 0000000..b3d1a67
Binary files /dev/null and b/Watcom-OS2.zip differ
diff --git a/Watcom-Win32.zip b/Watcom-Win32.zip
new file mode 100644
index 0000000..c60af6d
Binary files /dev/null and b/Watcom-Win32.zip differ
diff --git a/WhatsNew b/WhatsNew
new file mode 100644
index 0000000..927fdd2
--- /dev/null
+++ b/WhatsNew
@@ -0,0 +1,727 @@
+
+This is a list of API changes in SDL's version history.
+
+Version 1.0:
+
+1.2.14:
+ Added cast macros for correct usage with C++:
+ SDL_reinterpret_cast(type, expression)
+ SDL_static_cast(type, expression)
+
+ Added SDL_VIDEO_FULLSCREEN_DISPLAY as a preferred synonym for
+ SDL_VIDEO_FULLSCREEN_HEAD on X11.
+
+ Added SDL_DISABLE_LOCK_KEYS environment variable to enable normal
+ up/down events for Caps-Lock and Num-Lock keys.
+
+1.2.13:
+ Added SDL_BUTTON_X1 and SDL_BUTTON_X2 constants.
+
+1.2.12:
+ Added SDL_VIDEO_ALLOW_SCREENSAVER to override SDL's disabling
+ of the screensaver on Mac OS X and X11.
+
+1.2.10:
+ If SDL_OpenAudio() is passed zero for the desired format
+ fields, the following environment variables will be used
+ to fill them in:
+ SDL_AUDIO_FREQUENCY
+ SDL_AUDIO_FORMAT
+ SDL_AUDIO_CHANNELS
+ SDL_AUDIO_SAMPLES
+ If an environment variable is not specified, it will be set
+ to a reasonable default value.
+
+ Added support for the SDL_VIDEO_FULLSCREEN_HEAD environment
+ variable, currently supported on X11 Xinerama configurations.
+
+ Added SDL_GL_SWAP_CONTROL to wait for vsync in OpenGL applications.
+
+ Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
+
+ Added current_w and current_h to the SDL_VideoInfo structure,
+ which is set to the desktop resolution during video intialization,
+ and then set to the current resolution when a video mode is set.
+
+ SDL_SetVideoMode() now accepts 0 for width or height and will use
+ the current video mode (or the desktop mode if no mode has been set.)
+
+ Added SDL_GetKeyRepeat()
+
+ Added SDL_config.h, with defaults for various build environments.
+
+1.2.7:
+ Added CPU feature detection functions to SDL_cpuinfo.h:
+ SDL_HasRDTSC(), SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE(),
+ SDL_HasAltiVec()
+ Added function to create RWops from const memory: SDL_RWFromConstMem()
+
+1.2.6:
+ Added SDL_LoadObject(), SDL_LoadFunction(), and SDL_UnloadObject()
+
+ Added SDL_GL_MULTISAMPLEBUFFERS and SDL_GL_MULTISAMPLESAMPLES for FSAA
+
+1.2.5:
+ Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
+
+ Added SDL_GL_STEREO for stereoscopic OpenGL contexts
+
+1.2.0:
+ Added SDL_VIDEOEXPOSE event to signal that the screen needs to
+ be redrawn. This is currently only delivered to OpenGL windows
+ on X11, though it may be delivered in the future when the video
+ memory is lost under DirectX.
+
+1.1.8:
+ You can pass SDL_NOFRAME to SDL_VideoMode() to create a window
+ that has no title bar or frame decoration. Fullscreen video
+ modes automatically have this flag set.
+
+ Added a function to query the clipping rectangle for a surface:
+ void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect)
+
+ Added a function to query the current event filter:
+ SDL_EventFilter SDL_GetEventFilter(void)
+
+ If you pass -1 to SDL_ShowCursor(), it won't change the current
+ cursor visibility state, but will still return it.
+
+ SDL_LockSurface() and SDL_UnlockSurface() are recursive, meaning
+ you can nest them as deep as you want, as long as each lock call
+ has a matching unlock call. The surface remains locked until the
+ last matching unlock call.
+
+ Note that you may not blit to or from a locked surface.
+
+1.1.7:
+ The SDL_SetGammaRamp() and SDL_GetGammaRamp() functions now take
+ arrays of Uint16 values instead of Uint8 values. For the most part,
+ you can just take your old values and shift them up 8 bits to get
+ new correct values for your gamma ramps.
+
+ You can pass SDL_RLEACCEL in flags passed to SDL_ConvertSurface()
+ and SDL will try to RLE accelerate colorkey and alpha blits in the
+ resulting surface.
+
+1.1.6:
+ Added a function to return the thread ID of a specific thread:
+ Uint32 SDL_GetThreadID(SDL_Thread *thread)
+ If 'thread' is NULL, this function returns the id for this thread.
+
+1.1.5:
+ The YUV overlay structure has been changed to use an array of
+ pitches and pixels representing the planes of a YUV image, to
+ better enable hardware acceleration. The YV12 and IYUV formats
+ each have three planes, corresponding to the Y, U, and V portions
+ of the image, while packed pixel YUV formats just have one plane.
+
+ For palettized mode (8bpp), the screen colormap is now split in
+ a physical and a logical palette. The physical palette determines
+ what colours the screen pixels will get when displayed, and the
+ logical palette controls the mapping from blits to/from the screen.
+ A new function, SDL_SetPalette() has been added to change
+ logical and physical palettes separately. SDL_SetColors() works
+ just as before, and is equivalent to calling SDL_SetPalette() with
+ a flag argument of (SDL_LOGPAL|SDL_PHYSPAL).
+
+ SDL_BlitSurface() no longer modifies the source rectangle, only the
+ destination rectangle. The width/height members of the destination
+ rectangle are ignored, only the position is used.
+
+ The old source clipping function SDL_SetClipping() has been replaced
+ with a more useful function to set the destination clipping rectangle:
+ SDL_bool SDL_SetClipRect(SDL_Surface *surface, SDL_Rect *rect)
+
+ Added a function to see what subsystems have been initialized:
+ Uint32 SDL_WasInit(Uint32 flags)
+
+ The Big Alpha Flip: SDL now treats alpha as opacity like everybody
+ else, and not as transparency:
+
+ A new cpp symbol: SDL_ALPHA_OPAQUE is defined as 255
+ A new cpp symbol: SDL_ALPHA_TRANSPARENT is defined as 0
+ Values between 0 and 255 vary from fully transparent to fully opaque.
+
+ New functions:
+ SDL_DisplayFormatAlpha()
+ Returns a surface converted to a format with alpha-channel
+ that can be blit efficiently to the screen. (In other words,
+ like SDL_DisplayFormat() but the resulting surface has
+ an alpha channel.) This is useful for surfaces with alpha.
+ SDL_MapRGBA()
+ Works as SDL_MapRGB() but takes an additional alpha parameter.
+ SDL_GetRGBA()
+ Works as SDL_GetRGB() but also returns the alpha value
+ (SDL_ALPHA_OPAQUE for formats without an alpha channel)
+
+ Both SDL_GetRGB() and SDL_GetRGBA() now always return values in
+ the [0..255] interval. Previously, SDL_GetRGB() would return
+ (0xf8, 0xfc, 0xf8) for a completely white pixel in RGB565 format.
+ (N.B.: This is broken for bit fields < 3 bits.)
+
+ SDL_MapRGB() returns pixels in which the alpha channel is set opaque.
+
+ SDL_SetAlpha() can now be used for both setting the per-surface
+ alpha, using the new way of thinking of alpha, and also to enable
+ and disable per-pixel alpha blending for surfaces with an alpha
+ channel:
+ To disable alpha blending:
+ SDL_SetAlpha(surface, 0, 0);
+ To re-enable alpha blending:
+ SDL_SetAlpha(surface, SDL_SRCALPHA, 0);
+ Surfaces with an alpha channel have blending enabled by default.
+
+ SDL_SetAlpha() now accepts SDL_RLEACCEL as a flag, which requests
+ RLE acceleration of blits, just as like with SDL_SetColorKey().
+ This flag can be set for both surfaces with an alpha channel
+ and surfaces with an alpha value set by SDL_SetAlpha().
+ As always, RLE surfaces must be locked before pixel access is
+ allowed, and unlocked before any other SDL operations are done
+ on it.
+
+ The blit semantics for surfaces with and without alpha and colorkey
+ have now been defined:
+
+ RGBA->RGB:
+ SDL_SRCALPHA set:
+ alpha-blend (using alpha-channel).
+ SDL_SRCCOLORKEY ignored.
+ SDL_SRCALPHA not set:
+ copy RGB.
+ if SDL_SRCCOLORKEY set, only copy the pixels matching the
+ RGB values of the source colour key, ignoring alpha in the
+ comparison.
+
+ RGB->RGBA:
+ SDL_SRCALPHA set:
+ alpha-blend (using the source per-surface alpha value);
+ set destination alpha to opaque.
+ SDL_SRCALPHA not set:
+ copy RGB, set destination alpha to opaque.
+ both:
+ if SDL_SRCCOLORKEY set, only copy the pixels matching the
+ source colour key.
+
+ RGBA->RGBA:
+ SDL_SRCALPHA set:
+ alpha-blend (using the source alpha channel) the RGB values;
+ leave destination alpha untouched. [Note: is this correct?]
+ SDL_SRCCOLORKEY ignored.
+ SDL_SRCALPHA not set:
+ copy all of RGBA to the destination.
+ if SDL_SRCCOLORKEY set, only copy the pixels matching the
+ RGB values of the source colour key, ignoring alpha in the
+ comparison.
+
+ RGB->RGB:
+ SDL_SRCALPHA set:
+ alpha-blend (using the source per-surface alpha value).
+ SDL_SRCALPHA not set:
+ copy RGB.
+ both:
+ if SDL_SRCCOLORKEY set, only copy the pixels matching the
+ source colour key.
+
+ As a special case, blits from surfaces with per-surface alpha
+ value of 128 (50% transparency) are optimised and much faster
+ than other alpha values. This does not apply to surfaces with
+ alpha channels (per-pixel alpha).
+
+ New functions for manipulating the gamma of the display have
+ been added:
+ int SDL_SetGamma(float red, float green, float blue);
+ int SDL_SetGammaRamp(Uint8 *red, Uint8 *green, Uint8 *blue);
+ int SDL_GetGammaRamp(Uint8 *red, Uint8 *green, Uint8 *blue);
+ Gamma ramps are tables with 256 entries which map the screen color
+ components into actually displayed colors. For an example of
+ implementing gamma correction and gamma fades, see test/testgamma.c
+ Gamma control is not supported on all hardware.
+
+1.1.4:
+ The size of the SDL_CDtrack structure changed from 8 to 12 bytes
+ as the size of the length member was extended to 32 bits.
+
+ You can now use SDL for 2D blitting with a GL mode by passing the
+ SDL_OPENGLBLIT flag to SDL_SetVideoMode(). You can specify 16 or
+ 32 bpp, and the data in the framebuffer is put into the GL scene
+ when you call SDL_UpdateRects(), and the scene will be visible
+ when you call SDL_GL_SwapBuffers().
+
+ Run the "testgl" test program with the -logo command line option
+ to see an example of this blending of 2D and 3D in SDL.
+
+1.1.3:
+ Added SDL_FreeRW() to the API, to complement SDL_AllocRW()
+
+ Added resizable window support - just add SDL_RESIZABLE to the
+ SDL_SetVideoMode() flags, and then wait for SDL_VIDEORESIZE events.
+ See SDL_events.h for details on the new SDL_ResizeEvent structure.
+
+ Added condition variable support, based on mutexes and semaphores.
+ SDL_CreateCond()
+ SDL_DestroyCond()
+ SDL_CondSignal()
+ SDL_CondBroadcast()
+ SDL_CondWait()
+ SDL_CondTimedWait()
+ The new function prototypes are in SDL_mutex.h
+
+ Added counting semaphore support, based on the mutex primitive.
+ SDL_CreateSemaphore()
+ SDL_DestroySemaphore()
+ SDL_SemWait()
+ SDL_SemTryWait()
+ SDL_SemWaitTimeout()
+ SDL_SemPost()
+ SDL_SemValue()
+ The new function prototypes are in SDL_mutex.h
+
+ Added support for asynchronous blitting. To take advantage of this,
+ you must set the SDL_ASYNCBLIT flag when setting the video mode and
+ creating surfaces that you want accelerated in this way. You must
+ lock surfaces that have this flag set, and the lock will block until
+ any queued blits have completed.
+
+ Added YUV video overlay support.
+ The supported YUV formats are: YV12, IYUV, YUY2, UYVY, and YVYU.
+ This function creates an overlay surface:
+ SDL_CreateYUVOverlay()
+ You must lock and unlock the overlay to get access to the data:
+ SDL_LockYUVOverlay() SDL_UnlockYUVOverlay()
+ You can then display the overlay:
+ SDL_DisplayYUVOverlay()
+ You must free the overlay when you are done using it:
+ SDL_FreeYUVOverlay()
+ See SDL_video.h for the full function prototypes.
+
+ The joystick hat position constants have been changed:
+ Old constant New constant
+ ------------ ------------
+ 0 SDL_HAT_CENTERED
+ 1 SDL_HAT_UP
+ 2 SDL_HAT_RIGHTUP
+ 3 SDL_HAT_RIGHT
+ 4 SDL_HAT_RIGHTDOWN
+ 5 SDL_HAT_DOWN
+ 6 SDL_HAT_LEFTDOWN
+ 7 SDL_HAT_LEFT
+ 8 SDL_HAT_LEFTUP
+ The new constants are bitmasks, so you can check for the
+ individual axes like this:
+ if ( hat_position & SDL_HAT_UP ) {
+ }
+ and you'll catch left-up, up, and right-up.
+
+1.1.2:
+ Added multiple timer support:
+ SDL_AddTimer() and SDL_RemoveTimer()
+
+ SDL_WM_SetIcon() now respects the icon colorkey if mask is NULL.
+
+1.1.0:
+ Added initial OpenGL support.
+ First set GL attributes (such as RGB depth, alpha depth, etc.)
+ SDL_GL_SetAttribute()
+ Then call SDL_SetVideoMode() with the SDL_OPENGL flag.
+ Perform all of your normal GL drawing.
+ Finally swap the buffers with the new SDL function:
+ SDL_GL_SwapBuffers()
+ See the new 'testgl' test program for an example of using GL with SDL.
+
+ You can load GL extension functions by using the function:
+ SDL_GL_LoadProcAddress()
+
+ Added functions to initialize and cleanup specific SDL subsystems:
+ SDL_InitSubSystem() and SDL_QuitSubSystem()
+
+ Added user-defined event type:
+ typedef struct {
+ Uint8 type;
+ int code;
+ void *data1;
+ void *data2;
+ } SDL_UserEvent;
+ This structure is in the "user" member of an SDL_Event.
+
+ Added a function to push events into the event queue:
+ SDL_PushEvent()
+
+ Example of using the new SDL user-defined events:
+ {
+ SDL_Event event;
+
+ event.type = SDL_USEREVENT;
+ event.user.code = my_event_code;
+ event.user.data1 = significant_data;
+ event.user.data2 = 0;
+ SDL_PushEvent(&event);
+ }
+
+ Added a function to get mouse deltas since last query:
+ SDL_GetRelativeMouseState()
+
+ Added a boolean datatype to SDL_types.h:
+ SDL_bool = { SDL_TRUE, SDL_FALSE }
+
+ Added a function to get the current audio status:
+ SDL_GetAudioState();
+ It returns one of:
+ SDL_AUDIO_STOPPED,
+ SDL_AUDIO_PLAYING,
+ SDL_AUDIO_PAUSED
+
+ Added an AAlib driver (ASCII Art) - by Stephane Peter.
+
+1.0.6:
+ The input grab state is reset after each call to SDL_SetVideoMode().
+ The input is grabbed by default in fullscreen mode, and ungrabbed in
+ windowed mode. If you want to set input grab to a particular value,
+ you should set it after each call to SDL_SetVideoMode().
+
+1.0.5:
+ Exposed SDL_AudioInit(), SDL_VideoInit()
+ Added SDL_AudioDriverName() and SDL_VideoDriverName()
+
+ Added new window manager function:
+ SDL_WM_ToggleFullScreen()
+ This is currently implemented only on Linux
+
+ The ALT-ENTER code has been removed - it's not appropriate for a
+ lib to bind keys when they aren't even emergency escape sequences.
+
+ ALT-ENTER functionality can be implemented with the following code:
+
+ int Handle_AltEnter(const SDL_Event *event)
+ {
+ if ( event->type == SDL_KEYDOWN ) {
+ if ( (event->key.keysym.sym == SDLK_RETURN) &&
+ (event->key.keysym.mod & KMOD_ALT) ) {
+ SDL_WM_ToggleFullScreen(SDL_GetVideoSurface());
+ return(0);
+ }
+ }
+ return(1);
+ }
+ SDL_SetEventFilter(Handle_AltEnter);
+
+1.0.3:
+ Under X11, if you grab the input and hide the mouse cursor,
+ the mouse will go into a "relative motion" mode where you
+ will always get relative motion events no matter how far in
+ each direction you move the mouse - relative motion is not
+ bounded by the edges of the window (though the absolute values
+ of the mouse positions are clamped by the size of the window).
+ The SVGAlib, framebuffer console, and DirectInput drivers all
+ have this behavior naturally, and the GDI and BWindow drivers
+ never go into "relative motion" mode.
+
+1.0.2:
+ Added a function to enable keyboard repeat:
+ SDL_EnableKeyRepeat()
+
+ Added a function to grab the mouse and keyboard input
+ SDL_WM_GrabInput()
+
+ Added a function to iconify the window.
+ SDL_WM_IconifyWindow()
+ If this function succeeds, the application will receive an event
+ signaling SDL_APPACTIVE event
+
+1.0.1:
+ Added constants to SDL_audio.h for 16-bit native byte ordering:
+ AUDIO_U16SYS, AUDIO_S16SYS
+
+1.0.0:
+ New public release
+
+Version 0.11:
+
+0.11.5:
+ A new function SDL_GetVideoSurface() has been added, and returns
+ a pointer to the current display surface.
+
+ SDL_AllocSurface() has been renamed SDL_CreateRGBSurface(), and
+ a new function SDL_CreateRGBSurfaceFrom() has been added to allow
+ creating an SDL surface from an existing pixel data buffer.
+
+ Added SDL_GetRGB() to the headers and documentation.
+
+0.11.4:
+ SDL_SetLibraryPath() is no longer meaningful, and has been removed.
+
+0.11.3:
+ A new flag for SDL_Init(), SDL_INIT_NOPARACHUTE, prevents SDL from
+ installing fatal signal handlers on operating systems that support
+ them.
+
+Version 0.9:
+
+0.9.15:
+ SDL_CreateColorCursor() has been removed. Color cursors should
+ be implemented as sprites, blitted by the application when the
+ cursor moves. To get smooth color cursor updates when the app
+ is busy, pass the SDL_INIT_EVENTTHREAD flag to SDL_Init(). This
+ allows you to handle the mouse motion in another thread from an
+ event filter function, but is currently only supported by Linux
+ and BeOS. Note that you'll have to protect the display surface
+ from multi-threaded access by using mutexes if you do this.
+
+ Thread-safe surface support has been removed from SDL.
+ This makes blitting somewhat faster, by removing SDL_MiddleBlit().
+ Code that used SDL_MiddleBlit() should use SDL_LowerBlit() instead.
+ You can make your surfaces thread-safe by allocating your own
+ mutex and making lock/unlock calls around accesses to your surface.
+
+0.9.14:
+ SDL_GetMouseState() now takes pointers to int rather than Uint16.
+
+ If you set the SDL_WINDOWID environment variable under UNIX X11,
+ SDL will use that as the main window instead of creating it's own.
+ This is an unsupported extension to SDL, and not portable at all.
+
+0.9.13:
+ Added a function SDL_SetLibraryPath() which can be used to specify
+ the directory containing the SDL dynamic libraries. This is useful
+ for commercial applications which ship with particular versions
+ of the libraries, and for security on multi-user systems.
+ If this function is not used, the default system directories are
+ searched using the native dynamic object loading mechanism.
+
+ In order to support C linkage under Visual C++, you must declare
+ main() without any return type:
+ main(int argc, char *argv[]) {
+ /* Do the program... */
+ return(0);
+ }
+ C++ programs should also return a value if compiled under VC++.
+
+ The blit_endian member of the SDL_VideoInfo struct has been removed.
+
+ SDL_SymToASCII() has been replaced with SDL_GetKeyName(), so there
+ is now no longer any function to translate a keysym to a character.
+
+ The SDL_keysym structure has been extended with a 'scancode' and
+ 'unicode' member. The 'scancode' is a hardware specific scancode
+ for the key that was pressed, and may be 0. The 'unicode' member
+ is a 16-bit UNICODE translation of the key that was pressed along
+ with any modifiers or compose keys that have been pressed.
+ If no UNICODE translation exists for the key, 'unicode' will be 0.
+
+ Added a function SDL_EnableUNICODE() to enable/disable UNICODE
+ translation of character keypresses. Translation defaults off.
+
+ To convert existing code to use the new API, change code which
+ uses SDL_SymToASCII() to get the keyname to use SDL_GetKeyName(),
+ and change code which uses it to get the ASCII value of a sym to
+ use the 'unicode' member of the event keysym.
+
+0.9.12:
+ There is partial support for 64-bit datatypes. I don't recommend
+ you use this if you have a choice, because 64-bit datatypes are not
+ supported on many platforms. On platforms for which it is supported,
+ the SDL_HAS_64BIT_TYPE C preprocessor define will be enabled, and
+ you can use the Uint64 and Sint64 datatypes.
+
+ Added functions to SDL_endian.h to support 64-bit datatypes:
+ SDL_SwapLE64(), SDL_SwapBE64(),
+ SDL_ReadLE64(), SDL_ReadBE64(), SDL_WriteLE64(), SDL_WriteBE64()
+
+ A new member "len_ratio" has been added to the SDL_AudioCVT structure,
+ and allows you to determine either the original buffer length or the
+ converted buffer length, given the other.
+
+ A new function SDL_FreeWAV() has been added to the API to free data
+ allocated by SDL_LoadWAV_RW(). This is necessary under Win32 since
+ the gcc compiled DLL uses a different heap than VC++ compiled apps.
+
+ SDL now has initial support for international keyboards using the
+ Latin character set.
+ If a particular mapping is desired, you can set the DEFAULT_KEYBOARD
+ compile-time variable, or you can set the environment variable
+ "SDL_KEYBOARD" to a string identifying the keyboard mapping you desire.
+ The valid values for these variables can be found in SDL_keyboard.c
+
+ Full support for German and French keyboards under X11 is implemented.
+
+0.9.11:
+ The THREADED_EVENTS compile-time define has been replaced with the
+ SDL_INIT_EVENTTHREAD flag. If this flag is passed to SDL_Init(),
+ SDL will create a separate thread to perform input event handling.
+ If this flag is passed to SDL_Init(), and the OS doesn't support
+ event handling in a separate thread, SDL_Init() will fail.
+ Be sure to add calls to SDL_Delay() in your main thread to allow
+ the OS to schedule your event thread, or it may starve, leading
+ to slow event delivery and/or dropped events.
+ Currently MacOS and Win32 do not support this flag, while BeOS
+ and Linux do support it. I recommend that your application only
+ use this flag if absolutely necessary.
+
+ The SDL thread function passed to SDL_CreateThread() now returns a
+ status. This status can be retrieved by passing a non-NULL pointer
+ as the 'status' argument to SDL_WaitThread().
+
+ The volume parameter to SDL_MixAudio() has been increased in range
+ from (0-8) to (0-128)
+
+ SDL now has a data source abstraction which can encompass a file,
+ an area of memory, or any custom object you can envision. It uses
+ these abstractions, SDL_RWops, in the endian read/write functions,
+ and the built-in WAV and BMP file loaders. This means you can load
+ WAV chunks from memory mapped files, compressed archives, network
+ pipes, or anything else that has a data read abstraction.
+
+ There are three built-in data source abstractions:
+ SDL_RWFromFile(), SDL_RWFromFP(), SDL_RWFromMem()
+ along with a generic data source allocation function:
+ SDL_AllocRW()
+ These data sources can be used like stdio file pointers with the
+ following convenience functions:
+ SDL_RWseek(), SDL_RWread(), SDL_RWwrite(), SDL_RWclose()
+ These functions are defined in the new header file "SDL_rwops.h"
+
+ The endian swapping functions have been turned into macros for speed
+ and SDL_CalculateEndian() has been removed. SDL_endian.h now defines
+ SDL_BYTEORDER as either SDL_BIG_ENDIAN or SDL_LIL_ENDIAN depending on
+ the endianness of the host system.
+
+ The endian read/write functions now take an SDL_RWops pointer
+ instead of a stdio FILE pointer, to support the new data source
+ abstraction.
+
+ The SDL_*LoadWAV() functions have been replaced with a single
+ SDL_LoadWAV_RW() function that takes a SDL_RWops pointer as it's
+ first parameter, and a flag whether or not to automatically
+ free it as the second parameter. SDL_LoadWAV() is a macro for
+ backward compatibility and convenience:
+ SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
+
+ The SDL_*LoadBMP()/SDL_*SaveBMP() functions have each been replaced
+ with a single function that takes a SDL_RWops pointer as it's
+ first parameter, and a flag whether or not to automatically
+ free it as the second parameter. SDL_LoadBMP() and SDL_SaveBMP()
+ are macros for backward compatibility and convenience:
+ SDL_LoadBMP_RW(SDL_RWFromFile("sample.bmp", "rb"), 1, ...);
+ SDL_SaveBMP_RW(SDL_RWFromFile("sample.bmp", "wb"), 1, ...);
+ Note that these functions use SDL_RWseek() extensively, and should
+ not be used on pipes or other non-seekable data sources.
+
+0.9.10:
+ The Linux SDL_SysWMInfo and SDL_SysWMMsg structures have been
+ extended to support multiple types of display drivers, as well as
+ safe access to the X11 display when THREADED_EVENTS is enabled.
+ The new structures are documented in the SDL_syswm.h header file.
+
+ Thanks to John Elliott , the UK keyboard
+ should now work properly, as well as the "Windows" keys on US
+ keyboards.
+
+ The Linux CD-ROM code now reads the CD-ROM devices from /etc/fstab
+ instead of trying to open each block device on the system.
+ The CD must be listed in /etc/fstab as using the iso9660 filesystem.
+
+ On Linux, if you define THREADED_EVENTS at compile time, a separate
+ thread will be spawned to gather X events asynchronously from the
+ graphics updates. This hasn't been extensively tested, but it does
+ provide a means of handling keyboard and mouse input in a separate
+ thread from the graphics thread. (This is now enabled by default.)
+
+ A special access function SDL_PeepEvents() allows you to manipulate
+ the event queue in a thread-safe manner, including peeking at events,
+ removing events of a specified type, and adding new events of arbitrary
+ type to the queue (use the new 'user' member of the SDL_Event type).
+
+ If you use SDL_PeepEvents() to gather events, then the main graphics
+ thread needs to call SDL_PumpEvents() periodically to drive the event
+ loop and generate input events. This is not necessary if SDL has been
+ compiled with THREADED_EVENTS defined, but doesn't hurt.
+
+ A new function SDL_ThreadID() returns the identifier associated with
+ the current thread.
+
+0.9.9:
+ The AUDIO_STEREO format flag has been replaced with a new 'channels'
+ member of the SDL_AudioSpec structure. The channels are 1 for mono
+ audio, and 2 for stereo audio. In the future more channels may be
+ supported for 3D surround sound.
+
+ The SDL_MixAudio() function now takes an additional volume parameter,
+ which should be set to SDL_MIX_MAXVOLUME for compatibility with the
+ original function.
+
+ The CD-ROM functions which take a 'cdrom' parameter can now be
+ passed NULL, and will act on the last successfully opened CD-ROM.
+
+0.9.8:
+ No changes, bugfixes only.
+
+0.9.7:
+ No changes, bugfixes only.
+
+0.9.6:
+ Added a fast rectangle fill function: SDL_FillRect()
+
+ Addition of a useful function for getting info on the video hardware:
+ const SDL_VideoInfo *SDL_GetVideoInfo(void)
+ This function replaces SDL_GetDisplayFormat().
+
+ Initial support for double-buffering:
+ Use the SDL_DOUBLEBUF flag in SDL_SetVideoMode()
+ Update the screen with a new function: SDL_Flip()
+
+ SDL_AllocSurface() takes two new flags:
+ SDL_SRCCOLORKEY means that the surface will be used for colorkey blits
+ and if the hardware supports hardware acceleration of colorkey blits
+ between two surfaces in video memory, to place the surface in video
+ memory if possible, otherwise it will be placed in system memory.
+ SDL_SRCALPHA means that the surface will be used for alpha blits and
+ if the hardware supports hardware acceleration of alpha blits between
+ two surfaces in video memory, to place the surface in video memory
+ if possible, otherwise it will be placed in system memory.
+ SDL_HWSURFACE now means that the surface will be created with the
+ same format as the display surface, since having surfaces in video
+ memory is only useful for fast blitting to the screen, and you can't
+ blit surfaces with different surface formats in video memory.
+
+0.9.5:
+ You can now pass a NULL mask to SDL_WM_SetIcon(), and it will assume
+ that the icon consists of the entire image.
+
+ SDL_LowerBlit() is back -- but don't use it on the display surface.
+ It is exactly the same as SDL_MiddleBlit(), but doesn't check for
+ thread safety.
+
+ Added SDL_FPLoadBMP(), SDL_FPSaveBMP(), SDL_FPLoadWAV(), which take
+ a FILE pointer instead of a file name.
+
+ Added CD-ROM audio control API:
+ SDL_CDNumDrives()
+ SDL_CDName()
+ SDL_CDOpen()
+ SDL_CDStatus()
+ SDL_CDPlayTracks()
+ SDL_CDPlay()
+ SDL_CDPause()
+ SDL_CDResume()
+ SDL_CDStop()
+ SDL_CDEject()
+ SDL_CDClose()
+
+0.9.4:
+ No changes, bugfixes only.
+
+0.9.3:
+ Mouse motion event now includes relative motion information:
+ Sint16 event->motion.xrel, Sint16 event->motion.yrel
+
+ X11 keyrepeat handling can be disabled by defining IGNORE_X_KEYREPEAT
+ (Add -DIGNORE_X_KEYREPEAT to CFLAGS line in obj/x11Makefile)
+
+0.9.2:
+ No changes, bugfixes only.
+
+0.9.1:
+ Removed SDL_MapSurface() and SDL_UnmapSurface() -- surfaces are now
+ automatically mapped on blit.
+
+0.8.0:
+ SDL stable release
diff --git a/Xcode.tar.gz b/Xcode.tar.gz
new file mode 100644
index 0000000..b18e74e
Binary files /dev/null and b/Xcode.tar.gz differ
diff --git a/acinclude/alsa.m4 b/acinclude/alsa.m4
new file mode 100644
index 0000000..d818e70
--- /dev/null
+++ b/acinclude/alsa.m4
@@ -0,0 +1,145 @@
+##############################################################################
+dnl Configure Paths for Alsa
+dnl Some modifications by Richard Boulton
+dnl Christopher Lansdown
+dnl Jaroslav Kysela
+dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
+dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
+dnl enables arguments --with-alsa-prefix=
+dnl --with-alsa-enc-prefix=
+dnl --disable-alsatest
+dnl
+dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
+dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
+dnl
+AC_DEFUN([AM_PATH_ALSA],
+[dnl Save the original CFLAGS, LDFLAGS, and LIBS
+alsa_save_CFLAGS="$CFLAGS"
+alsa_save_LDFLAGS="$LDFLAGS"
+alsa_save_LIBS="$LIBS"
+alsa_found=yes
+
+dnl
+dnl Get the cflags and libraries for alsa
+dnl
+AC_ARG_WITH(alsa-prefix,
+[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
+[alsa_prefix="$withval"], [alsa_prefix=""])
+
+AC_ARG_WITH(alsa-inc-prefix,
+[ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
+[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
+
+dnl FIXME: this is not yet implemented
+AC_ARG_ENABLE(alsatest,
+[ --disable-alsatest Do not try to compile and run a test Alsa program],
+[enable_alsatest="$enableval"],
+[enable_alsatest=yes])
+
+dnl Add any special include directories
+AC_MSG_CHECKING(for ALSA CFLAGS)
+if test "$alsa_inc_prefix" != "" ; then
+ ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
+ CFLAGS="$CFLAGS -I$alsa_inc_prefix"
+fi
+AC_MSG_RESULT($ALSA_CFLAGS)
+
+dnl add any special lib dirs
+AC_MSG_CHECKING(for ALSA LDFLAGS)
+if test "$alsa_prefix" != "" ; then
+ ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
+ LDFLAGS="$LDFLAGS $ALSA_LIBS"
+fi
+
+dnl add the alsa library
+ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
+LIBS=`echo $LIBS | sed 's/-lm//'`
+LIBS=`echo $LIBS | sed 's/-ldl//'`
+LIBS=`echo $LIBS | sed 's/-lpthread//'`
+LIBS=`echo $LIBS | sed 's/ //'`
+LIBS="$ALSA_LIBS $LIBS"
+AC_MSG_RESULT($ALSA_LIBS)
+
+dnl Check for a working version of libasound that is of the right version.
+min_alsa_version=ifelse([$1], ,0.1.1,$1)
+AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
+no_alsa=""
+ alsa_min_major_version=`echo $min_alsa_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ alsa_min_minor_version=`echo $min_alsa_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ alsa_min_micro_version=`echo $min_alsa_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+AC_LANG_SAVE
+AC_LANG_C
+AC_TRY_COMPILE([
+#include
+], [
+/* ensure backward compatibility */
+#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
+#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
+#endif
+#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
+#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
+#endif
+#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
+#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
+#endif
+
+# if(SND_LIB_MAJOR > $alsa_min_major_version)
+ exit(0);
+# else
+# if(SND_LIB_MAJOR < $alsa_min_major_version)
+# error not present
+# endif
+
+# if(SND_LIB_MINOR > $alsa_min_minor_version)
+ exit(0);
+# else
+# if(SND_LIB_MINOR < $alsa_min_minor_version)
+# error not present
+# endif
+
+# if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
+# error not present
+# endif
+# endif
+# endif
+exit(0);
+],
+ [AC_MSG_RESULT(found.)],
+ [AC_MSG_RESULT(not present.)
+ ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
+ alsa_found=no]
+)
+AC_LANG_RESTORE
+
+dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
+if test "x$enable_alsatest" = "xyes"; then
+AC_CHECK_LIB([asound], [snd_ctl_open],,
+ [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
+ alsa_found=no]
+)
+fi
+
+if test "x$alsa_found" = "xyes" ; then
+ ifelse([$2], , :, [$2])
+ LIBS=`echo $LIBS | sed 's/-lasound//g'`
+ LIBS=`echo $LIBS | sed 's/ //'`
+ LIBS="-lasound $LIBS"
+fi
+if test "x$alsa_found" = "xno" ; then
+ ifelse([$3], , :, [$3])
+ CFLAGS="$alsa_save_CFLAGS"
+ LDFLAGS="$alsa_save_LDFLAGS"
+ LIBS="$alsa_save_LIBS"
+ ALSA_CFLAGS=""
+ ALSA_LIBS=""
+fi
+
+dnl That should be it. Now just export out symbols:
+AC_SUBST(ALSA_CFLAGS)
+AC_SUBST(ALSA_LIBS)
+])
diff --git a/acinclude/esd.m4 b/acinclude/esd.m4
new file mode 100644
index 0000000..58d64a9
--- /dev/null
+++ b/acinclude/esd.m4
@@ -0,0 +1,168 @@
+##############################################################################
+#
+# --- esd.m4 ---
+#
+# Configure paths for ESD
+# Manish Singh 98-9-30
+# stolen back from Frank Belew
+# stolen from Manish Singh
+# Shamelessly stolen from Owen Taylor
+
+dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
+dnl
+AC_DEFUN([AM_PATH_ESD],
+[dnl
+dnl Get the cflags and libraries from the esd-config script
+dnl
+AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
+ esd_prefix="$withval", esd_prefix="")
+AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
+ esd_exec_prefix="$withval", esd_exec_prefix="")
+AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
+ , enable_esdtest=yes)
+
+ if test x$esd_exec_prefix != x ; then
+ esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
+ if test x${ESD_CONFIG+set} != xset ; then
+ ESD_CONFIG=$esd_exec_prefix/bin/esd-config
+ fi
+ fi
+ if test x$esd_prefix != x ; then
+ esd_args="$esd_args --prefix=$esd_prefix"
+ if test x${ESD_CONFIG+set} != xset ; then
+ ESD_CONFIG=$esd_prefix/bin/esd-config
+ fi
+ fi
+
+ AC_PATH_PROG(ESD_CONFIG, esd-config, no)
+ min_esd_version=ifelse([$1], ,0.2.7,$1)
+ AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
+ no_esd=""
+ if test "$ESD_CONFIG" = "no" ; then
+ no_esd=yes
+ else
+ ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
+ ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
+
+ esd_major_version=`$ESD_CONFIG $esd_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ esd_minor_version=`$ESD_CONFIG $esd_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_esdtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $ESD_CFLAGS"
+ LIBS="$LIBS $ESD_LIBS"
+dnl
+dnl Now check if the installed ESD is sufficiently new. (Also sanity
+dnl checks the results of esd-config to some extent
+dnl
+ rm -f conf.esdtest
+ AC_TRY_RUN([
+#include
+#include
+#include
+#include
+
+char*
+my_strdup (char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.esdtest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_esd_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_esd_version");
+ exit(1);
+ }
+
+ if (($esd_major_version > major) ||
+ (($esd_major_version == major) && ($esd_minor_version > minor)) ||
+ (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
+ printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
+ printf("*** to point to the correct copy of esd-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_esd" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$ESD_CONFIG" = "no" ; then
+ echo "*** The esd-config script installed by ESD could not be found"
+ echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the ESD_CONFIG environment variable to the"
+ echo "*** full path to esd-config."
+ else
+ if test -f conf.esdtest ; then
+ :
+ else
+ echo "*** Could not run ESD test program, checking why..."
+ CFLAGS="$CFLAGS $ESD_CFLAGS"
+ LIBS="$LIBS $ESD_LIBS"
+ AC_TRY_LINK([
+#include
+#include
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding ESD or finding the wrong"
+ echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means ESD was incorrectly installed"
+ echo "*** or that you have moved ESD since it was installed. In the latter case, you"
+ echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ ESD_CFLAGS=""
+ ESD_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(ESD_CFLAGS)
+ AC_SUBST(ESD_LIBS)
+ rm -f conf.esdtest
+])
diff --git a/acinclude/libtool.m4 b/acinclude/libtool.m4
new file mode 100644
index 0000000..6894db8
--- /dev/null
+++ b/acinclude/libtool.m4
@@ -0,0 +1,7370 @@
+##############################################################################
+# Based on libtool-2.2.6a
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to ."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ beos*)
+ # On BeOS, this test takes a really really long time.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include
+#endif
+
+#include
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib.so
+ # instead of lib.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
+
diff --git a/acinclude/ltdl.m4 b/acinclude/ltdl.m4
new file mode 100644
index 0000000..e2b7129
--- /dev/null
+++ b/acinclude/ltdl.m4
@@ -0,0 +1,806 @@
+##############################################################################
+# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
+#
+# Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Thomas Tanner, 1999
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 17 LTDL_INIT
+
+# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
+# ------------------------------------------
+# DIRECTORY contains the libltdl sources. It is okay to call this
+# function multiple times, as long as the same DIRECTORY is always given.
+AC_DEFUN([LT_CONFIG_LTDL_DIR],
+[AC_BEFORE([$0], [LTDL_INIT])
+_$0($*)
+])# LT_CONFIG_LTDL_DIR
+
+# We break this out into a separate macro, so that we can call it safely
+# internally without being caught accidentally by the sed scan in libtoolize.
+m4_defun([_LT_CONFIG_LTDL_DIR],
+[dnl remove trailing slashes
+m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
+m4_case(_LTDL_DIR,
+ [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
+ m4_if(_ARG_DIR, [.],
+ [],
+ [m4_define([_LTDL_DIR], _ARG_DIR)
+ _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
+ [m4_if(_ARG_DIR, _LTDL_DIR,
+ [],
+ [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
+m4_popdef([_ARG_DIR])
+])# _LT_CONFIG_LTDL_DIR
+
+# Initialise:
+m4_define([_LTDL_DIR], [])
+
+
+# _LT_BUILD_PREFIX
+# ----------------
+# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
+# to `${top_builddir}/'.
+m4_define([_LT_BUILD_PREFIX],
+[m4_ifdef([AC_AUTOCONF_VERSION],
+ [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
+ [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
+ [${top_build_prefix}],
+ [${top_builddir}/])],
+ [${top_build_prefix}])],
+ [${top_builddir}/])[]dnl
+])
+
+
+# LTDL_CONVENIENCE
+# ----------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
+# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_build_prefix, top_builddir, and top_srcdir appropriately
+# in your Makefiles.
+AC_DEFUN([LTDL_CONVENIENCE],
+[AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])# LTDL_CONVENIENCE
+
+# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
+# now we have LT_CONFIG_LTDL_DIR:
+AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
+
+
+# _LTDL_CONVENIENCE
+# -----------------
+# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
+m4_defun([_LTDL_CONVENIENCE],
+[case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+esac
+LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+LTDLDEPS=$LIBLTDL
+LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+
+AC_SUBST([LIBLTDL])
+AC_SUBST([LTDLDEPS])
+AC_SUBST([LTDLINCL])
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+AC_SUBST([INCLTDL])
+])# _LTDL_CONVENIENCE
+
+
+# LTDL_INSTALLABLE
+# ----------------
+# sets LIBLTDL to the link flags for the libltdl installable library
+# and LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
+# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
+# available, otherwise with '${top_builddir}/', and LTDLINCL will be
+# prefixed with '${top_srcdir}/' (note the single quotes!). If your
+# package is not flat and you're not using automake, define top_build_prefix,
+# top_builddir, and top_srcdir appropriately in your Makefiles.
+# In the future, this macro may have to be called after LT_INIT.
+AC_DEFUN([LTDL_INSTALLABLE],
+[AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])# LTDL_INSTALLABLE
+
+# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
+# now we have LT_CONFIG_LTDL_DIR:
+AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
+
+
+# _LTDL_INSTALLABLE
+# -----------------
+# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
+m4_defun([_LTDL_INSTALLABLE],
+[if test -f $prefix/lib/libltdl.la; then
+ lt_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$prefix/lib $LDFLAGS"
+ AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
+ LDFLAGS="$lt_save_LDFLAGS"
+ if test x"${lt_lib_ltdl-no}" = xyes; then
+ if test x"$enable_ltdl_install" != xyes; then
+ # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
+ AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
+ enable_ltdl_install=no
+ fi
+ elif test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ fi
+fi
+
+# If configure.ac declared an installable ltdl, and the user didn't override
+# with --disable-ltdl-install, we will install the shipped libltdl.
+case $enable_ltdl_install in
+ no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ *) enable_ltdl_install=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
+ LTDLDEPS=$LIBLTDL
+ LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+ ;;
+esac
+
+AC_SUBST([LIBLTDL])
+AC_SUBST([LTDLDEPS])
+AC_SUBST([LTDLINCL])
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+AC_SUBST([INCLTDL])
+])# LTDL_INSTALLABLE
+
+
+# _LTDL_MODE_DISPATCH
+# -------------------
+m4_define([_LTDL_MODE_DISPATCH],
+[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
+m4_if(_LTDL_DIR, [],
+ [],
+ dnl if _LTDL_MODE was not set already, the default value is `subproject':
+ [m4_case(m4_default(_LTDL_MODE, [subproject]),
+ [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
+ _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
+ [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
+ [recursive], [],
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
+dnl Be careful not to expand twice:
+m4_define([$0], [])
+])# _LTDL_MODE_DISPATCH
+
+
+# _LT_LIBOBJ(MODULE_NAME)
+# -----------------------
+# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
+# of into LIBOBJS.
+AC_DEFUN([_LT_LIBOBJ], [
+ m4_pattern_allow([^_LT_LIBOBJS$])
+ _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
+])# _LT_LIBOBJS
+
+
+# LTDL_INIT([OPTIONS])
+# --------------------
+# Clients of libltdl can use this macro to allow the installer to
+# choose between a shipped copy of the ltdl sources or a preinstalled
+# version of the library. If the shipped ltdl sources are not in a
+# subdirectory named libltdl, the directory name must be given by
+# LT_CONFIG_LTDL_DIR.
+AC_DEFUN([LTDL_INIT],
+[dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+dnl We need to keep our own list of libobjs separate from our parent project,
+dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
+dnl we look for our own LIBOBJs.
+m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
+m4_pushdef([AC_LIBSOURCES])
+
+dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
+m4_if(_LTDL_MODE, [],
+ [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
+ m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
+
+AC_ARG_WITH([included_ltdl],
+ [AS_HELP_STRING([--with-included-ltdl],
+ [use the GNU ltdl sources included here])])
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ AC_CHECK_HEADER([ltdl.h],
+ [AC_CHECK_DECL([lt_dlinterface_register],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
+ [with_included_ltdl=no],
+ [with_included_ltdl=yes])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT
+ #include ])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT]
+ )
+fi
+
+dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
+dnl was called yet, then for old times' sake, we assume libltdl is in an
+dnl eponymous directory:
+AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
+
+AC_ARG_WITH([ltdl_include],
+ [AS_HELP_STRING([--with-ltdl-include=DIR],
+ [use the ltdl headers installed in DIR])])
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
+ fi
+else
+ with_ltdl_include=no
+fi
+
+AC_ARG_WITH([ltdl_lib],
+ [AS_HELP_STRING([--with-ltdl-lib=DIR],
+ [use the libltdl.la installed in DIR])])
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ m4_case(m4_default(_LTDL_TYPE, [convenience]),
+ [convenience], [_LTDL_CONVENIENCE],
+ [installable], [_LTDL_INSTALLABLE],
+ [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+ AC_DEFINE([HAVE_LTDL], [1],
+ [Define this if a modern libltdl is already installed])
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+AC_MSG_CHECKING([where to find libltdl headers])
+AC_MSG_RESULT([$LTDLINCL])
+AC_MSG_CHECKING([where to find libltdl library])
+AC_MSG_RESULT([$LIBLTDL])
+
+_LTDL_SETUP
+
+dnl restore autoconf definition.
+m4_popdef([AC_LIBOBJ])
+m4_popdef([AC_LIBSOURCES])
+
+AC_CONFIG_COMMANDS_PRE([
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
+ AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
+])
+
+# Only expand once:
+m4_define([LTDL_INIT])
+])# LTDL_INIT
+
+# Old names:
+AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
+AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
+AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIB_LTDL], [])
+dnl AC_DEFUN([AC_WITH_LTDL], [])
+dnl AC_DEFUN([LT_WITH_LTDL], [])
+
+
+# _LTDL_SETUP
+# -----------
+# Perform all the checks necessary for compilation of the ltdl objects
+# -- including compiler checks and header checks. This is a public
+# interface mainly for the benefit of libltdl's own configure.ac, most
+# other users should call LTDL_INIT instead.
+AC_DEFUN([_LTDL_SETUP],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
+AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
+AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
+AC_REQUIRE([LT_LIB_DLLOAD])dnl
+AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
+AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
+AC_REQUIRE([gl_FUNC_ARGZ])dnl
+
+m4_require([_LT_CHECK_OBJDIR])dnl
+m4_require([_LT_HEADER_DLFCN])dnl
+m4_require([_LT_CHECK_DLPREOPEN])dnl
+m4_require([_LT_DECL_SED])dnl
+
+dnl Don't require this, or it will be expanded earlier than the code
+dnl that sets the variables it relies on:
+_LT_ENABLE_INSTALL
+
+dnl _LTDL_MODE specific code must be called at least once:
+_LTDL_MODE_DISPATCH
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+AC_CONFIG_COMMANDS_PRE([dnl
+m4_pattern_allow([^LT_CONFIG_H$])dnl
+m4_ifset([AH_HEADER],
+ [LT_CONFIG_H=AH_HEADER],
+ [m4_ifset([AC_LIST_HEADERS],
+ [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
+ [])])])
+AC_SUBST([LT_CONFIG_H])
+
+AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
+ [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
+AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
+
+AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+AC_SUBST([LTDLOPEN])
+])# _LTDL_SETUP
+
+
+# _LT_ENABLE_INSTALL
+# ------------------
+m4_define([_LT_ENABLE_INSTALL],
+[AC_ARG_ENABLE([ltdl-install],
+ [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
+
+case ,${enable_ltdl_install},${enable_ltdl_convenience} in
+ *yes*) ;;
+ *) enable_ltdl_convenience=yes ;;
+esac
+
+m4_ifdef([AM_CONDITIONAL],
+[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
+ AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
+])# _LT_ENABLE_INSTALL
+
+
+# LT_SYS_DLOPEN_DEPLIBS
+# ---------------------
+AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
+ [lt_cv_sys_dlopen_deplibs],
+ [# PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[[4-9]]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[[12345]]*|irix6.[[01]]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[[1234]]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+ ])
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
+ [Define if the OS needs help to load dependent libraries for dlopen().])
+fi
+])# LT_SYS_DLOPEN_DEPLIBS
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
+
+
+# LT_SYS_MODULE_EXT
+# -----------------
+AC_DEFUN([LT_SYS_MODULE_EXT],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which extension is used for runtime loadable modules],
+ [libltdl_cv_shlibext],
+[
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+ ])
+if test -n "$libltdl_cv_shlibext"; then
+ m4_pattern_allow([LT_MODULE_EXT])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
+ [Define to the extension used for runtime loadable modules, say, ".so".])
+fi
+])# LT_SYS_MODULE_EXT
+
+# Old name:
+AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
+
+
+# LT_SYS_MODULE_PATH
+# ------------------
+AC_DEFUN([LT_SYS_MODULE_PATH],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which variable specifies run-time module search path],
+ [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
+if test -n "$lt_cv_module_path_var"; then
+ m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
+ [Define to the name of the environment variable that determines the run-time module search path.])
+fi
+])# LT_SYS_MODULE_PATH
+
+# Old name:
+AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
+
+
+# LT_SYS_DLSEARCH_PATH
+# --------------------
+AC_DEFUN([LT_SYS_DLSEARCH_PATH],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([for the default library search path],
+ [lt_cv_sys_dlsearch_path],
+ [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+ m4_pattern_allow([LT_DLSEARCH_PATH])dnl
+ AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
+ [Define to the system default library search path.])
+fi
+])# LT_SYS_DLSEARCH_PATH
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
+
+
+# _LT_CHECK_DLPREOPEN
+# -------------------
+m4_defun([_LT_CHECK_DLPREOPEN],
+[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
+ [libltdl_cv_preloaded_symbols],
+ [if test -n "$lt_cv_sys_global_symbol_pipe"; then
+ libltdl_cv_preloaded_symbols=yes
+ else
+ libltdl_cv_preloaded_symbols=no
+ fi
+ ])
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+ AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
+ [Define if libtool can extract symbol lists from object files.])
+fi
+])# _LT_CHECK_DLPREOPEN
+
+
+# LT_LIB_DLLOAD
+# -------------
+AC_DEFUN([LT_LIB_DLLOAD],
+[m4_pattern_allow([^LT_DLLOADERS$])
+LT_DLLOADERS=
+AC_SUBST([LT_DLLOADERS])
+
+AC_LANG_PUSH([C])
+
+LIBADD_DLOPEN=
+AC_SEARCH_LIBS([dlopen], [dl],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
+# include
+#endif
+ ]], [[dlopen(0, 0);]])],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ AC_CHECK_FUNCS([dlerror])
+ LIBS="$lt_save_LIBS"
+fi
+AC_SUBST([LIBADD_DLOPEN])
+
+LIBADD_SHL_LOAD=
+AC_CHECK_FUNC([shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"])])
+AC_SUBST([LIBADD_SHL_LOAD])
+
+case $host_os in
+darwin[[1567]].*)
+# We only want this for pre-Mac OS X 10.4.
+ AC_CHECK_FUNC([_dyld_func_lookup],
+ [AC_DEFINE([HAVE_DYLD], [1],
+ [Define if you have the _dyld_func_lookup function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+AC_CHECK_LIB([dld], [dld_link],
+ [AC_DEFINE([HAVE_DLD], [1],
+ [Define if you have the GNU dld library.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
+AC_SUBST([LIBADD_DLD_LINK])
+
+m4_pattern_allow([^LT_DLPREOPEN$])
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+ AC_DEFINE([HAVE_LIBDLLOADER], [1],
+ [Define if libdlloader will be built on this platform])
+fi
+AC_SUBST([LT_DLPREOPEN])
+
+dnl This isn't used anymore, but set it for backwards compatibility
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+AC_SUBST([LIBADD_DL])
+
+AC_LANG_POP
+])# LT_LIB_DLLOAD
+
+# Old name:
+AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_DLLIB], [])
+
+
+# LT_SYS_SYMBOL_USCORE
+# --------------------
+# does the compiler prefix global symbols with an underscore?
+AC_DEFUN([LT_SYS_SYMBOL_USCORE],
+[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([for _ prefix in compiled symbols],
+ [lt_cv_sys_symbol_underscore],
+ [lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.c >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf conftest*
+ ])
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+ AC_SUBST([sys_symbol_underscore])
+])# LT_SYS_SYMBOL_USCORE
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
+
+
+# LT_FUNC_DLSYM_USCORE
+# --------------------
+AC_DEFUN([LT_FUNC_DLSYM_USCORE],
+[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+ [libltdl_cv_need_uscore],
+ [libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ _LT_TRY_DLOPEN_SELF(
+ [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
+ [], [libltdl_cv_need_uscore=cross])
+ LIBS="$save_LIBS"
+ ])
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+ AC_DEFINE([NEED_USCORE], [1],
+ [Define if dlsym() requires a leading underscore in symbol names.])
+fi
+])# LT_FUNC_DLSYM_USCORE
+
+# Old name:
+AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
+
diff --git a/acinclude/ltoptions.m4 b/acinclude/ltoptions.m4
new file mode 100644
index 0000000..d4df679
--- /dev/null
+++ b/acinclude/ltoptions.m4
@@ -0,0 +1,370 @@
+##############################################################################
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
diff --git a/acinclude/ltsugar.m4 b/acinclude/ltsugar.m4
new file mode 100644
index 0000000..02a939d
--- /dev/null
+++ b/acinclude/ltsugar.m4
@@ -0,0 +1,125 @@
+##############################################################################
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
diff --git a/acinclude/ltversion.m4 b/acinclude/ltversion.m4
new file mode 100644
index 0000000..83a83f2
--- /dev/null
+++ b/acinclude/ltversion.m4
@@ -0,0 +1,25 @@
+##############################################################################
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3012 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6])
+m4_define([LT_PACKAGE_REVISION], [1.3012])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6'
+macro_revision='1.3012'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
diff --git a/acinclude/lt~obsolete.m4 b/acinclude/lt~obsolete.m4
new file mode 100644
index 0000000..3b2acd4
--- /dev/null
+++ b/acinclude/lt~obsolete.m4
@@ -0,0 +1,93 @@
+##############################################################################
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..649d7b3
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+echo "Generating build information using autoconf"
+echo "This may take a while ..."
+
+# Regenerate configuration files
+cat acinclude/* >aclocal.m4
+found=false
+for autoconf in autoconf autoconf259 autoconf-2.59
+do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
+done
+if test x$found = xfalse; then
+ echo "Couldn't find autoconf, aborting"
+ exit 1
+fi
+(cd test; sh autogen.sh)
+
+# Run configure for this platform
+echo "Now you are ready to run ./configure"
diff --git a/build-scripts/config.guess b/build-scripts/config.guess
new file mode 100755
index 0000000..e792aac
--- /dev/null
+++ b/build-scripts/config.guess
@@ -0,0 +1,1494 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-09-18'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# include
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-scripts/config.sub b/build-scripts/config.sub
new file mode 100755
index 0000000..5ecc18b
--- /dev/null
+++ b/build-scripts/config.sub
@@ -0,0 +1,1700 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-10-07'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to . Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-scripts/fatbuild.sh b/build-scripts/fatbuild.sh
new file mode 100755
index 0000000..b4b1616
--- /dev/null
+++ b/build-scripts/fatbuild.sh
@@ -0,0 +1,316 @@
+#!/bin/sh
+#
+# Build a fat binary on Mac OS X, thanks Ryan!
+
+# Number of CPUs (for make -j)
+NCPU=`sysctl -n hw.ncpu`
+NJOB=$NCPU
+#NJOB=`expr $NCPU + 1`
+
+# Generic, cross-platform CFLAGS you always want go here.
+CFLAGS="-O3 -g -pipe"
+
+# Locate Xcode SDK path
+SDK_PATH=/Developer/SDKs
+if [ ! -d $SDK_PATH ]; then
+ echo "Couldn't find SDK path"
+ exit 1
+fi
+
+# See if we can use 10.2 or 10.3 runtime compatibility
+if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
+ # PowerPC configure flags (10.2 runtime compatibility)
+ # We dynamically load X11, so using the system X11 headers is fine.
+ CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
+--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
+
+ # PowerPC compiler flags
+ CC_PPC="gcc-3.3 -arch ppc"
+ CXX_PPC="g++-3.3 -arch ppc"
+ CFLAGS_PPC=""
+ CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
+-nostdinc \
+-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
+-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
+-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
+
+ # PowerPC linker flags
+ LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc \
+-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
+-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
+-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
+
+else # 10.2 or 10.3 SDK
+
+ # PowerPC configure flags (10.3 runtime compatibility)
+ # We dynamically load X11, so using the system X11 headers is fine.
+ CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
+--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
+
+ # PowerPC compiler flags
+ CC_PPC="gcc-4.0 -arch ppc"
+ CXX_PPC="g++-4.0 -arch ppc"
+ CFLAGS_PPC=""
+ CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
+-nostdinc \
+-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
+-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
+-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
+
+ # PowerPC linker flags
+ LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc -mmacosx-version-min=10.3 \
+-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
+-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
+-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
+
+fi # 10.2 or 10.3 SDK
+
+# Intel configure flags (10.4 runtime compatibility)
+# We dynamically load X11, so using the system X11 headers is fine.
+CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
+--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
+
+# Intel compiler flags
+CC_X86="gcc-4.0 -arch i386"
+CXX_X86="g++-4.0 -arch i386"
+CFLAGS_X86="-mmacosx-version-min=10.4"
+CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
+-nostdinc \
+-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
+-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
+-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
+
+# Intel linker flags
+LFLAGS_X86="-Wl,-headerpad_max_install_names -arch i386 -mmacosx-version-min=10.4 \
+-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
+-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
+
+#
+# Find the configure script
+#
+srcdir=`dirname $0`/..
+auxdir=$srcdir/build-scripts
+cd $srcdir
+
+#
+# Figure out which phase to build:
+# all,
+# configure, configure-ppc, configure-x86,
+# make, make-ppc, make-x86, merge
+# install
+# clean
+if test x"$1" = x; then
+ phase=all
+else
+ phase="$1"
+fi
+case $phase in
+ all)
+ configure_ppc="yes"
+ configure_x86="yes"
+ make_ppc="yes"
+ make_x86="yes"
+ merge="yes"
+ ;;
+ configure)
+ configure_ppc="yes"
+ configure_x86="yes"
+ ;;
+ configure-ppc)
+ configure_ppc="yes"
+ ;;
+ configure-x86)
+ configure_x86="yes"
+ ;;
+ make)
+ make_ppc="yes"
+ make_x86="yes"
+ merge="yes"
+ ;;
+ make-ppc)
+ make_ppc="yes"
+ ;;
+ make-x86)
+ make_x86="yes"
+ ;;
+ merge)
+ merge="yes"
+ ;;
+ install)
+ install_bin="yes"
+ install_hdrs="yes"
+ install_lib="yes"
+ install_data="yes"
+ install_man="yes"
+ ;;
+ install-bin)
+ install_bin="yes"
+ ;;
+ install-hdrs)
+ install_hdrs="yes"
+ ;;
+ install-lib)
+ install_lib="yes"
+ ;;
+ install-data)
+ install_data="yes"
+ ;;
+ install-man)
+ install_man="yes"
+ ;;
+ clean)
+ clean_ppc="yes"
+ clean_x86="yes"
+ ;;
+ clean-ppc)
+ clean_ppc="yes"
+ ;;
+ clean-x86)
+ clean_x86="yes"
+ ;;
+ *)
+ echo "Usage: $0 [all|configure[-ppc|-x86]|make[-ppc|-x86]|merge|install|clean]"
+ exit 1
+ ;;
+esac
+case `uname -p` in
+ powerpc)
+ native_path=ppc
+ ;;
+ *86)
+ native_path=x86
+ ;;
+ *)
+ echo "Couldn't figure out native architecture path"
+ exit 1
+ ;;
+esac
+
+#
+# Create the build directories
+#
+for dir in build build/ppc build/x86; do
+ if test -d $dir; then
+ :
+ else
+ mkdir $dir || exit 1
+ fi
+done
+
+#
+# Build the PowerPC binary
+#
+if test x$configure_ppc = xyes; then
+ (cd build/ppc && \
+ sh ../../configure $CONFIG_PPC CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
+fi
+if test x$make_ppc = xyes; then
+ (cd build/ppc && ls include && make -j$NJOB) || exit 3
+fi
+
+#
+# Build the Intel binary
+#
+if test x$configure_x86 = xyes; then
+ (cd build/x86 && \
+ sh ../../configure $CONFIG_X86 CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
+fi
+if test x$make_x86 = xyes; then
+ (cd build/x86 && make -j$NJOB) || exit 3
+fi
+
+#
+# Combine into fat binary
+#
+if test x$merge = xyes; then
+ output=.libs
+ sh $auxdir/mkinstalldirs build/$output
+ cd build
+ target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
+ (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` &&
+ ln -sf $target $output/libSDL-1.2.0.dylib &&
+ ln -sf $target $output/libSDL.dylib &&
+ lipo -create -o $output/libSDL.a */build/.libs/libSDL.a &&
+ cp $native_path/build/.libs/libSDL.la $output &&
+ cp $native_path/build/.libs/libSDL.lai $output &&
+ cp $native_path/build/libSDL.la . &&
+ lipo -create -o libSDLmain.a */build/libSDLmain.a &&
+ echo "Build complete!" &&
+ echo "Files can be found in the build directory.") || exit 4
+ cd ..
+fi
+
+#
+# Install
+#
+do_install()
+{
+ echo $*
+ $* || exit 5
+}
+if test x$prefix = x; then
+ prefix=/usr/local
+fi
+if test x$exec_prefix = x; then
+ exec_prefix=$prefix
+fi
+if test x$bindir = x; then
+ bindir=$exec_prefix/bin
+fi
+if test x$libdir = x; then
+ libdir=$exec_prefix/lib
+fi
+if test x$includedir = x; then
+ includedir=$prefix/include
+fi
+if test x$datadir = x; then
+ datadir=$prefix/share
+fi
+if test x$mandir = x; then
+ mandir=$prefix/man
+fi
+if test x$install_bin = xyes; then
+ do_install sh $auxdir/mkinstalldirs $bindir
+ do_install /usr/bin/install -c -m 755 build/$native_path/sdl-config $bindir/sdl-config
+fi
+if test x$install_hdrs = xyes; then
+ do_install sh $auxdir/mkinstalldirs $includedir/SDL
+ for src in $srcdir/include/*.h; do \
+ file=`echo $src | sed -e 's|^.*/||'`; \
+ do_install /usr/bin/install -c -m 644 $src $includedir/SDL/$file; \
+ done
+ do_install /usr/bin/install -c -m 644 $srcdir/include/SDL_config_macosx.h $includedir/SDL/SDL_config.h
+fi
+if test x$install_lib = xyes; then
+ do_install sh $auxdir/mkinstalldirs $libdir
+ do_install sh build/$native_path/libtool --mode=install /usr/bin/install -c build/libSDL.la $libdir/libSDL.la
+ do_install /usr/bin/install -c -m 644 build/libSDLmain.a $libdir/libSDLmain.a
+ do_install ranlib $libdir/libSDLmain.a
+fi
+if test x$install_data = xyes; then
+ do_install sh $auxdir/mkinstalldirs $datadir/aclocal
+ do_install /usr/bin/install -c -m 644 $srcdir/sdl.m4 $datadir/aclocal/sdl.m4
+fi
+if test x$install_man = xyes; then
+ do_install sh $auxdir/mkinstalldirs $mandir/man3
+ for src in $srcdir/docs/man3/*.3; do \
+ file=`echo $src | sed -e 's|^.*/||'`; \
+ do_install /usr/bin/install -c -m 644 $src $mandir/man3/$file; \
+ done
+fi
+
+#
+# Clean up
+#
+do_clean()
+{
+ echo $*
+ $* || exit 6
+}
+if test x$clean_x86 = xyes; then
+ do_clean rm -r build/x86
+fi
+if test x$clean_ppc = xyes; then
+ do_clean rm -r build/ppc
+fi
+
diff --git a/build-scripts/install-sh b/build-scripts/install-sh
new file mode 100755
index 0000000..1a83534
--- /dev/null
+++ b/build-scripts/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-scripts/ltmain.sh b/build-scripts/ltmain.sh
new file mode 100644
index 0000000..d2b860f
--- /dev/null
+++ b/build-scripts/ltmain.sh
@@ -0,0 +1,8407 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6
+# Written by Gordon Matzigkeit , 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.6
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to .
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.6
+TIMESTAMP=""
+package_revision=1.3012
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/opt/local/bin/gsed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat </dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 /dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # Unfortunately, winepath does not exit with a non-zero
+ # error code, so we are forced to check the contents of
+ # stdout. On the other hand, if the command is not
+ # found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both
+ # error code of zero AND non-empty stdout, which explains
+ # the odd construction:
+ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ #func_error "Could not determine host path corresponding to"
+ #func_error " '$1'"
+ #func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <
+#include
+#ifdef _MSC_VER
+# include
+# include
+# include
+# define setmode _setmode
+#else
+# include
+# include
+# ifdef __CYGWIN__
+# include
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# endif
+#endif
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : ""),
+ (value ? value : "")));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : ""),
+ (value ? value : "")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : ""),
+ (value ? value : "")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c </dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh
new file mode 100755
index 0000000..ceffe27
--- /dev/null
+++ b/build-scripts/makedep.sh
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# Generate dependencies from a list of source files
+
+# Check to make sure our environment variables are set
+if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$output" = x; then
+ echo "SOURCES, INCLUDE, and output needs to be set"
+ exit 1
+fi
+cache_prefix=".#$$"
+
+generate_var()
+{
+ echo $1 | sed -e 's|^.*/||' -e 's|\.|_|g'
+}
+
+search_deps()
+{
+ base=`echo $1 | sed 's|/[^/]*$||'`
+ grep '#include "' <$1 | sed -e 's|.*"\([^"]*\)".*|\1|' | \
+ while read file
+ do cache=${cache_prefix}_`generate_var $file`
+ if test -f $cache; then
+ : # We already ahve this cached
+ else
+ : >$cache
+ for path in $base `echo $INCLUDE | sed 's|-I||g'`
+ do dep="$path/$file"
+ if test -f "$dep"; then
+ echo " $dep \\" >>$cache
+ search_deps $dep >>$cache
+ break
+ fi
+ done
+ fi
+ cat $cache
+ done
+}
+
+:>${output}.new
+for src in $SOURCES
+do echo "Generating dependencies for $src"
+ ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
+ if test x"$ext" = x"rc"; then
+ obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.o|g"`
+ else
+ obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
+ fi
+ echo "\$(objects)/$obj: $src \\" >>${output}.new
+ search_deps $src | sort | uniq >>${output}.new
+ case $ext in
+ c) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+
+__EOF__
+ ;;
+ cc) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+
+__EOF__
+ ;;
+ m) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+
+__EOF__
+ ;;
+ asm) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --tag=CC --mode=compile \$(auxdir)/strip_fPIC.sh \$(NASM) $src -o \$@
+
+__EOF__
+ ;;
+ S) cat >>${output}.new <<__EOF__
+
+ \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
+
+__EOF__
+ ;;
+ rc) cat >>${output}.new <<__EOF__
+
+ \$(WINDRES) $src \$@
+
+__EOF__
+ ;;
+ *) echo "Unknown file extension: $ext";;
+ esac
+ echo "" >>${output}.new
+done
+mv ${output}.new ${output}
+rm -f ${cache_prefix}*
diff --git a/build-scripts/mkinstalldirs b/build-scripts/mkinstalldirs
new file mode 100755
index 0000000..8ab885e
--- /dev/null
+++ b/build-scripts/mkinstalldirs
@@ -0,0 +1,99 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* ) # -h for help
+ echo "${usage}" 1>&2; exit 0 ;;
+ -m ) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+ dirmode="${1}"
+ shift ;;
+ -- ) shift; break ;; # stop option processing
+ -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
+ * ) break ;; # first non-opt arg
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+0) exit 0 ;;
+esac
+
+case $dirmode in
+'')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi ;;
+*)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 3
+# End:
+# mkinstalldirs ends here
diff --git a/build-scripts/strip_fPIC.sh b/build-scripts/strip_fPIC.sh
new file mode 100755
index 0000000..45d34ba
--- /dev/null
+++ b/build-scripts/strip_fPIC.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# libtool assumes that the compiler can handle the -fPIC flag
+# This isn't always true (for example, nasm can't handle it)
+command=""
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -fPIC)
+ # Ignore -fPIC option
+ ;;
+ -fno-common)
+ # Ignore -fPIC and -DPIC options
+ ;;
+ *)
+ command="$command $1"
+ ;;
+ esac
+ shift
+done
+echo $command
+exec $command
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..a7e9b18
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,2916 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(README)
+AC_CONFIG_HEADER(include/SDL_config.h)
+AC_GNU_SOURCE
+AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
+
+dnl Set various version strings - taken gratefully from the GTk sources
+#
+# Making releases:
+# Edit include/SDL/SDL_version.h and change the version, then:
+# SDL_MICRO_VERSION += 1;
+# SDL_INTERFACE_AGE += 1;
+# SDL_BINARY_AGE += 1;
+# if any functions have been added, set SDL_INTERFACE_AGE to 0.
+# if backwards compatibility has been broken,
+# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
+#
+SDL_MAJOR_VERSION=1
+SDL_MINOR_VERSION=2
+SDL_MICRO_VERSION=14
+SDL_INTERFACE_AGE=3
+SDL_BINARY_AGE=14
+SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
+
+AC_SUBST(SDL_MAJOR_VERSION)
+AC_SUBST(SDL_MINOR_VERSION)
+AC_SUBST(SDL_MICRO_VERSION)
+AC_SUBST(SDL_INTERFACE_AGE)
+AC_SUBST(SDL_BINARY_AGE)
+AC_SUBST(SDL_VERSION)
+
+# libtool versioning
+LT_INIT([win32-dll])
+
+LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
+LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
+LT_REVISION=$SDL_INTERFACE_AGE
+LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
+m4_pattern_allow([^LT_])
+
+AC_SUBST(LT_RELEASE)
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
+dnl Detect the canonical build and host environments
+AC_CONFIG_AUX_DIR([build-scripts])
+dnl AC_CANONICAL_HOST
+AC_C_BIGENDIAN
+if test x$ac_cv_c_bigendian = xyes; then
+ AC_DEFINE(SDL_BYTEORDER, 4321)
+else
+ AC_DEFINE(SDL_BYTEORDER, 1234)
+fi
+
+dnl Check for tools
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+if test -z "$host_alias"; then
+ hostaliaswindres=
+else
+ hostaliaswindres="$host_alias-windres"
+fi
+AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
+
+dnl Set up the compiler and linker flags
+INCLUDE="-I$srcdir/include"
+if test x$srcdir != x.; then
+ # Remove SDL_config.h from the source directory, since it's the
+ # default one, and we want to include the one that we generate.
+ if test -f $srcdir/include/SDL_config.h; then
+ rm $srcdir/include/SDL_config.h
+ fi
+ INCLUDE="-Iinclude $INCLUDE"
+fi
+case "$host" in
+ *-*-cygwin*)
+ # We build SDL on cygwin without the UNIX emulation layer
+ BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
+ BASE_LDFLAGS="-mno-cygwin"
+ ;;
+ *)
+ BASE_CFLAGS="-D_GNU_SOURCE=1"
+ BASE_LDFLAGS=""
+ ;;
+esac
+BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
+EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
+BUILD_LDFLAGS="$LDFLAGS"
+EXTRA_LDFLAGS="$BASE_LDFLAGS"
+## These are common directories to find software packages
+#for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
+# if test -d $path/include; then
+# EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
+# fi
+# if test -d $path/lib; then
+# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
+# fi
+#done
+SDL_CFLAGS="$BASE_CFLAGS"
+SDL_LIBS="-lSDL $BASE_LDFLAGS"
+CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
+CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
+
+dnl set this to use on systems that use lib64 instead of lib
+base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
+
+dnl Function to find a library in the compiler search path
+find_lib()
+{
+ gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
+ gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
+ env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
+ if test "$cross_compiling" = yes; then
+ host_lib_path=""
+ else
+ host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
+ fi
+ for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
+ lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
+ if test x$lib != x; then
+ echo $lib
+ return
+ fi
+ done
+}
+
+dnl Check for compiler characteristics
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+
+dnl See whether we are allowed to use the system C library
+AC_ARG_ENABLE(libc,
+AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
+ , enable_libc=yes)
+if test x$enable_libc = xyes; then
+ AC_DEFINE(HAVE_LIBC)
+
+ dnl Check for C library headers
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h math.h iconv.h signal.h)
+
+ dnl Check for typedefs, structures, etc.
+ AC_TYPE_SIZE_T
+ if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
+ AC_CHECK_TYPE(int64_t)
+ if test x$ac_cv_type_int64_t = xyes; then
+ AC_DEFINE(SDL_HAS_64BIT_TYPE)
+ fi
+ have_inttypes=yes
+ fi
+
+ dnl Checks for library functions.
+ case "$host" in
+ *-*-cygwin* | *-*-mingw32*)
+ ;;
+ *)
+ AC_FUNC_ALLOCA
+ ;;
+ esac
+
+ AC_FUNC_MEMCMP
+ if test x$ac_cv_func_memcmp_working = xyes; then
+ AC_DEFINE(HAVE_MEMCMP)
+ fi
+ AC_FUNC_STRTOD
+ if test x$ac_cv_func_strtod = xyes; then
+ AC_DEFINE(HAVE_STRTOD)
+ fi
+ AC_CHECK_FUNC(mprotect,
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ ],[
+ AC_DEFINE(HAVE_MPROTECT)
+ ]),
+ )
+ AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
+
+ AC_CHECK_LIB(iconv, libiconv_open, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
+ AC_CHECK_LIB(m, pow, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
+fi
+
+if test x$have_inttypes != xyes; then
+ AC_CHECK_SIZEOF(char, 1)
+ AC_CHECK_SIZEOF(short, 2)
+ AC_CHECK_SIZEOF(int, 4)
+ AC_CHECK_SIZEOF(long, 4)
+ AC_CHECK_SIZEOF(long long, 8)
+ if test x$ac_cv_sizeof_char = x1; then
+ AC_DEFINE(int8_t, signed char)
+ AC_DEFINE(uint8_t, unsigned char)
+ fi
+ if test x$ac_cv_sizeof_short = x2; then
+ AC_DEFINE(int16_t, signed short)
+ AC_DEFINE(uint16_t, unsigned short)
+ else
+ if test x$ac_cv_sizeof_int = x2; then
+ AC_DEFINE(int16_t, signed int)
+ AC_DEFINE(uint16_t, unsigned int)
+ fi
+ fi
+ if test x$ac_cv_sizeof_int = x4; then
+ AC_DEFINE(int32_t, signed int)
+ AC_DEFINE(uint32_t, unsigned int)
+ else
+ if test x$ac_cv_sizeof_long = x4; then
+ AC_DEFINE(int32_t, signed long)
+ AC_DEFINE(uint32_t, unsigned long)
+ fi
+ fi
+ if test x$ac_cv_sizeof_long = x8; then
+ AC_DEFINE(int64_t, signed long)
+ AC_DEFINE(uint64_t, unsigned long)
+ AC_DEFINE(SDL_HAS_64BIT_TYPE)
+ else
+ if test x$ac_cv_sizeof_long_long = x8; then
+ AC_DEFINE(int64_t, signed long long)
+ AC_DEFINE(uint64_t, unsigned long long)
+ AC_DEFINE(SDL_HAS_64BIT_TYPE)
+ fi
+ fi
+ AC_DEFINE(size_t, unsigned int)
+ AC_DEFINE(uintptr_t, unsigned long)
+fi
+
+# Standard C sources
+SOURCES="$SOURCES $srcdir/src/*.c"
+SOURCES="$SOURCES $srcdir/src/audio/*.c"
+SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
+SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
+SOURCES="$SOURCES $srcdir/src/events/*.c"
+SOURCES="$SOURCES $srcdir/src/file/*.c"
+SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
+SOURCES="$SOURCES $srcdir/src/thread/*.c"
+SOURCES="$SOURCES $srcdir/src/timer/*.c"
+SOURCES="$SOURCES $srcdir/src/video/*.c"
+
+dnl Enable/disable various subsystems of the SDL library
+
+AC_ARG_ENABLE(audio,
+AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
+ , enable_audio=yes)
+if test x$enable_audio != xyes; then
+ AC_DEFINE(SDL_AUDIO_DISABLED)
+fi
+AC_ARG_ENABLE(video,
+AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
+ , enable_video=yes)
+if test x$enable_video != xyes; then
+ AC_DEFINE(SDL_VIDEO_DISABLED)
+fi
+AC_ARG_ENABLE(events,
+AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
+ , enable_events=yes)
+if test x$enable_events != xyes; then
+ AC_DEFINE(SDL_EVENTS_DISABLED)
+fi
+AC_ARG_ENABLE(joystick,
+AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
+ , enable_joystick=yes)
+if test x$enable_joystick != xyes; then
+ AC_DEFINE(SDL_JOYSTICK_DISABLED)
+else
+ SOURCES="$SOURCES $srcdir/src/joystick/*.c"
+fi
+AC_ARG_ENABLE(cdrom,
+AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
+ , enable_cdrom=yes)
+if test x$enable_cdrom != xyes; then
+ AC_DEFINE(SDL_CDROM_DISABLED)
+fi
+AC_ARG_ENABLE(threads,
+AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
+ , enable_threads=yes)
+if test x$enable_threads != xyes; then
+ AC_DEFINE(SDL_THREADS_DISABLED)
+fi
+AC_ARG_ENABLE(timers,
+AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
+ , enable_timers=yes)
+if test x$enable_timers != xyes; then
+ AC_DEFINE(SDL_TIMERS_DISABLED)
+fi
+AC_ARG_ENABLE(file,
+AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
+ , enable_file=yes)
+if test x$enable_file != xyes; then
+ AC_DEFINE(SDL_FILE_DISABLED)
+fi
+AC_ARG_ENABLE(loadso,
+AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
+ , enable_loadso=yes)
+if test x$enable_loadso != xyes; then
+ AC_DEFINE(SDL_LOADSO_DISABLED)
+fi
+AC_ARG_ENABLE(cpuinfo,
+AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
+ , enable_cpuinfo=yes)
+if test x$enable_cpuinfo != xyes; then
+ AC_DEFINE(SDL_CPUINFO_DISABLED)
+fi
+AC_ARG_ENABLE(assembly,
+AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
+ , enable_assembly=yes)
+if test x$enable_assembly = xyes; then
+ AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
+fi
+
+dnl See if the OSS audio interface is supported
+CheckOSS()
+{
+ AC_ARG_ENABLE(oss,
+AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
+ , enable_oss=yes)
+ if test x$enable_audio = xyes -a x$enable_oss = xyes; then
+ AC_MSG_CHECKING(for OSS audio support)
+ have_oss=no
+ if test x$have_oss != xyes; then
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+ ])
+ fi
+ if test x$have_oss != xyes; then
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ int arg = SNDCTL_DSP_SETFRAGMENT;
+ ],[
+ have_oss=yes
+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
+ ])
+ fi
+ AC_MSG_RESULT($have_oss)
+ if test x$have_oss = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
+ SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
+ have_audio=yes
+
+ # We may need to link with ossaudio emulation library
+ case "$host" in
+ *-*-openbsd*|*-*-netbsd*)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
+ esac
+ fi
+ fi
+}
+
+dnl See if the ALSA audio interface is supported
+CheckALSA()
+{
+ AC_ARG_ENABLE(alsa,
+AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
+ , enable_alsa=yes)
+ if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
+ AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
+ # Restore all flags from before the ALSA detection runs
+ CFLAGS="$alsa_save_CFLAGS"
+ LDFLAGS="$alsa_save_LDFLAGS"
+ LIBS="$alsa_save_LIBS"
+ if test x$have_alsa = xyes; then
+ AC_ARG_ENABLE(alsa-shared,
+AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
+ , enable_alsa_shared=yes)
+ alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
+ SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_alsa_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
+ echo "-- dynamic libasound -> $alsa_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Check whether we want to use IRIX 6.5+ native audio or not
+CheckDMEDIA()
+{
+ if test x$enable_audio = xyes; then
+ AC_MSG_CHECKING(for dmedia audio support)
+ have_dmedia=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ALport audio_port;
+ ],[
+ have_dmedia=yes
+ ])
+ AC_MSG_RESULT($have_dmedia)
+ # Set up files for the audio library
+ if test x$have_dmedia = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
+ SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Check whether we want to use Tru64 UNIX native audio or not
+CheckMME()
+{
+ dnl Make sure we are running on an Tru64 UNIX
+ case $ARCH in
+ osf)
+ ;;
+ *)
+ return
+ ;;
+ esac
+ if test x$enable_audio = xyes; then
+ AC_MSG_CHECKING(for MME audio support)
+ MME_CFLAGS="-I/usr/include/mme"
+ MME_LIBS="-lmme"
+ have_mme=no
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $MME_CFLAGS"
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ HWAVEOUT sound;
+ ],[
+ have_mme=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($have_mme)
+ # Set up files for the audio library
+ if test x$have_mme = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
+ SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find the ESD includes and libraries
+CheckESD()
+{
+ AC_ARG_ENABLE(esd,
+AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
+ , enable_esd=yes)
+ if test x$enable_audio = xyes -a x$enable_esd = xyes; then
+ AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+ if test x$have_esd = xyes; then
+ AC_ARG_ENABLE(esd-shared,
+AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
+ , enable_esd_shared=yes)
+ esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
+ SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_esd_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_esd_shared = xyes && test x$esd_lib != x; then
+ echo "-- dynamic libesd -> $esd_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl Find PulseAudio
+CheckPulseAudio()
+{
+ AC_ARG_ENABLE(pulseaudio,
+AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
+ , enable_pulseaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
+ audio_pulse=no
+
+ PULSE_REQUIRED_VERSION=0.9
+
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ AC_MSG_CHECKING(for PulseAudio $PULSE_REQUIRED_VERSION support)
+ if test x$PKG_CONFIG != xno; then
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSE_REQUIRED_VERSION libpulse-simple; then
+ PULSE_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
+ PULSE_LIBS=`$PKG_CONFIG --libs libpulse-simple`
+ audio_pulse=yes
+ fi
+ fi
+ AC_MSG_RESULT($audio_pulse)
+
+ if test x$audio_pulse = xyes; then
+ AC_ARG_ENABLE(pulseaudio-shared,
+AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
+ , enable_pulseaudio_shared=yes)
+ pulse_lib=[`find_lib "libpulse-simple.so.*" "$PULSE_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_PULSE)
+ SOURCES="$SOURCES $srcdir/src/audio/pulse/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSE_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_pulseaudio_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_pulseaudio_shared = xyes && test x$pulse_lib != x; then
+ echo "-- dynamic libpulse-simple -> $pulse_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSE_DYNAMIC, "$pulse_lib")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSE_LIBS"
+ fi
+ have_audio=yes
+ fi
+ fi
+}
+
+CheckARTSC()
+{
+ AC_ARG_ENABLE(arts,
+AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
+ , enable_arts=yes)
+ if test x$enable_audio = xyes -a x$enable_arts = xyes; then
+ AC_PATH_PROG(ARTSCONFIG, artsc-config)
+ if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
+ : # arts isn't installed
+ else
+ ARTS_CFLAGS=`$ARTSCONFIG --cflags`
+ ARTS_LIBS=`$ARTSCONFIG --libs`
+ AC_MSG_CHECKING(for aRts development environment)
+ audio_arts=no
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ARTS_CFLAGS"
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ arts_stream_t stream;
+ ],[
+ audio_arts=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($audio_arts)
+ if test x$audio_arts = xyes; then
+ AC_ARG_ENABLE(arts-shared,
+AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
+ , enable_arts_shared=yes)
+ arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
+ SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
+ if test x$have_loadso != xyes && \
+ test x$enable_arts_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_arts_shared = xyes && test x$arts_lib != x; then
+ echo "-- dynamic libartsc -> $arts_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
+ fi
+ have_audio=yes
+ fi
+ fi
+ fi
+}
+
+dnl See if the NAS audio interface is supported
+CheckNAS()
+{
+ AC_ARG_ENABLE(nas,
+AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
+ , enable_nas=yes)
+ if test x$enable_audio = xyes -a x$enable_nas = xyes; then
+ AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
+ AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
+
+ AC_MSG_CHECKING(for NAS audio support)
+ have_nas=no
+
+ if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
+ have_nas=yes
+ NAS_LIBS="-laudio"
+
+ elif test -r /usr/X11R6/include/audio/audiolib.h; then
+ have_nas=yes
+ NAS_CFLAGS="-I/usr/X11R6/include/"
+ NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
+
+ dnl On IRIX, the NAS includes are in a different directory,
+ dnl and libnas must be explicitly linked in
+
+ elif test -r /usr/freeware/include/nas/audiolib.h; then
+ have_nas=yes
+ NAS_LIBS="-lnas -lXt"
+ fi
+
+ AC_MSG_RESULT($have_nas)
+
+ if test x$have_nas = xyes; then
+ AC_ARG_ENABLE(nas-shared,
+AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
+ , enable_nas_shared=yes)
+ nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+ if test x$have_loadso != xyes && \
+ test x$enable_nas_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading])
+ fi
+ if test x$have_loadso = xyes && \
+ test x$enable_nas_shared = xyes && test x$nas_lib != x; then
+ echo "-- dynamic libaudio -> $nas_lib"
+ AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib")
+ else
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
+ fi
+
+ AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
+ SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl rcg07142001 See if the user wants the disk writer audio driver...
+CheckDiskAudio()
+{
+ AC_ARG_ENABLE(diskaudio,
+AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
+ , enable_diskaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
+ SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
+ fi
+}
+
+dnl rcg03142006 See if the user wants the dummy audio driver...
+CheckDummyAudio()
+{
+ AC_ARG_ENABLE(dummyaudio,
+AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
+ , enable_dummyaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
+ SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
+ fi
+}
+
+dnl Set up the Atari Audio driver
+CheckAtariAudio()
+{
+ AC_ARG_ENABLE(mintaudio,
+AC_HELP_STRING([--enable-mintaudio], [support Atari audio driver [[default=yes]]]),
+ , enable_mintaudio=yes)
+ if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
+ mintaudio=no
+ AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
+ if test x$have_mint_falcon_hdr = xyes; then
+ mintaudio=yes
+ AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
+ have_audio=yes
+ fi
+ fi
+}
+
+dnl See if we can use x86 assembly blitters
+# NASM is available from: http://nasm.sourceforge.net
+CheckNASM()
+{
+ dnl Make sure we are running on an x86 platform
+ case $host in
+ i?86*)
+ ;;
+ *)
+ # Nope, bail early.
+ return
+ ;;
+ esac
+
+ dnl Mac OS X might report itself as "i386" but generate x86_64 code.
+ dnl So see what size we think a pointer is, and bail if not 32-bit.
+ AC_CHECK_SIZEOF([void *], 4)
+ if test x$ac_cv_sizeof_void_p != x4; then
+ return
+ fi
+
+ dnl Check for NASM (for assembly blit routines)
+ AC_ARG_ENABLE(nasm,
+AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [[default=yes]]]),
+ , enable_nasm=yes)
+ if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_nasm = xyes; then
+ CompileNASM()
+ {
+ # Usage: CompileNASM
+ AC_MSG_CHECKING(to see if $NASM supports $1)
+ if $NASM $NASMFLAGS $1 -o $1.o >&AS_MESSAGE_LOG_FD 2>&1; then
+ CompileNASM_ret="yes"
+ else
+ CompileNASM_ret="no"
+ fi
+ rm -f $1 $1.o
+ AC_MSG_RESULT($CompileNASM_ret)
+ test "$CompileNASM_ret" = "yes"
+ }
+
+ if test x"$NASMFLAGS" = x; then
+ case $ARCH in
+ win32)
+ NASMFLAGS="-f win32"
+ ;;
+ openbsd)
+ NASMFLAGS="-f aoutb"
+ ;;
+ macosx)
+ NASMFLAGS="-f macho"
+ ;;
+ *)
+ NASMFLAGS="-f elf"
+ ;;
+ esac
+ fi
+
+ AC_PATH_PROG(NASM, yasm)
+ echo "%ifidn __OUTPUT_FORMAT__,elf" > unquoted-sections
+ echo "section .note.GNU-stack noalloc noexec nowrite progbits" >> unquoted-sections
+ echo "%endif" >> unquoted-sections
+ CompileNASM unquoted-sections || NASM=""
+
+ if test "x$NASM" = x -o "x$NASM" = x'"$NASM"'; then
+ $as_unset ac_cv_path_NASM
+ AC_PATH_PROG(NASM, nasm)
+ fi
+ if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
+ AC_DEFINE(SDL_HERMES_BLITTERS)
+ SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
+ NASMFLAGS="$NASMFLAGS -I $srcdir/src/hermes/"
+
+ dnl See if hidden visibility is supported
+ echo "GLOBAL _bar:function hidden" > symbol-visibility
+ echo "_bar:" >> symbol-visibility
+ CompileNASM symbol-visibility && NASMFLAGS="$NASMFLAGS -DHIDDEN_VISIBILITY"
+
+ AC_SUBST(NASM)
+ AC_SUBST(NASMFLAGS)
+
+ case "$host" in
+ # this line is needed for QNX, because it's not defined the __ELF__
+ *-*-qnx*)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -D__ELF__";;
+ *-*-solaris*)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -D__ELF__";;
+ esac
+ fi
+ fi
+}
+
+dnl Check for altivec instruction support using gas syntax
+CheckAltivec()
+{
+ AC_ARG_ENABLE(altivec,
+AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[default=yes]]]),
+ , enable_altivec=yes)
+ if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
+ save_CFLAGS="$CFLAGS"
+ have_gcc_altivec=no
+ have_altivec_h_hdr=no
+ altivec_CFLAGS="-maltivec"
+ CFLAGS="$save_CFLAGS $altivec_CFLAGS"
+
+ AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
+ AC_TRY_COMPILE([
+ #include
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ have_altivec_h_hdr=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
+ AC_TRY_COMPILE([
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
+ altivec_CFLAGS="-faltivec"
+ CFLAGS="$save_CFLAGS $altivec_CFLAGS"
+ AC_TRY_COMPILE([
+ #include
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ have_altivec_h_hdr=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+
+ if test x$have_gcc_altivec = xno; then
+ AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
+ AC_TRY_COMPILE([
+ vector unsigned int vzero() {
+ return vec_splat_u32(0);
+ }
+ ],[
+ ],[
+ have_gcc_altivec=yes
+ ])
+ AC_MSG_RESULT($have_gcc_altivec)
+ fi
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_altivec = xyes; then
+ AC_DEFINE(SDL_ALTIVEC_BLITTERS)
+ if test x$have_altivec_h_hdr = xyes; then
+ AC_DEFINE(HAVE_ALTIVEC_H)
+ fi
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
+ fi
+ fi
+}
+
+dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
+dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
+CheckVisibilityHidden()
+{
+ AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
+ have_gcc_fvisibility=no
+
+ visibility_CFLAGS="-fvisibility=hidden"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
+ AC_TRY_COMPILE([
+ #if !defined(__GNUC__) || __GNUC__ < 4
+ #error SDL only uses visibility attributes in GCC 4 or newer
+ #endif
+ ],[
+ ],[
+ have_gcc_fvisibility=yes
+ ])
+ AC_MSG_RESULT($have_gcc_fvisibility)
+ CFLAGS="$save_CFLAGS"
+
+ if test x$have_gcc_fvisibility = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
+ fi
+}
+
+
+dnl Do the iPod thing
+CheckIPod()
+{
+ AC_ARG_ENABLE(ipod,
+AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [[default=no]]]),
+ , enable_ipod=no)
+
+ if test x$enable_ipod = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
+ AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
+ SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
+ fi
+}
+
+dnl Find the nanox include and library directories
+CheckNANOX()
+{
+ AC_ARG_ENABLE(video-nanox,
+ AC_HELP_STRING([--enable-video-nanox], [use nanox video driver [[default=no]]]),
+ , enable_video_nanox=no)
+
+ if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
+ AC_ARG_ENABLE(nanox-debug,
+ AC_HELP_STRING([--enable-nanox-debug], [print debug messages [[default=no]]]),
+ , enable_nanox_debug=no)
+ if test x$enable_nanox_debug = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DEBUG"
+ fi
+
+ AC_ARG_ENABLE(nanox-share-memory,
+ AC_HELP_STRING([--enable-nanox-share-memory], [use share memory [[default=no]]]),
+ , enable_nanox_share_memory=no)
+ if test x$enable_nanox_share_memory = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DNANOX_SHARE_MEMORY"
+ fi
+
+ AC_ARG_ENABLE(nanox_direct_fb,
+ AC_HELP_STRING([--enable-nanox-direct-fb], [use direct framebuffer access [[default=no]]]),
+ , enable_nanox_direct_fb=no)
+ if test x$enable_nanox_direct_fb = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
+ fi
+
+ AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
+ SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
+ have_video=yes
+ fi
+}
+
+dnl Find the X11 include and library directories
+CheckX11()
+{
+ AC_ARG_ENABLE(video-x11,
+AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
+ , enable_video_x11=yes)
+ if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
+ case "$host" in
+ *-*-darwin*)
+ # This isn't necessary for X11, but fixes GLX detection
+ if test "x$x_includes" = xNONE && test "x$x_libraries" = xNONE; then
+ x_includes="/usr/X11R6/include"
+ x_libraries="/usr/X11R6/lib"
+ fi
+ ;;
+ esac
+ AC_PATH_X
+ AC_PATH_XTRA
+ if test x$have_x = xyes; then
+ # Only allow dynamically loaded X11 if the X11 function pointers
+ # will not end up in the global namespace, which causes problems
+ # with other libraries calling X11 functions.
+ x11_symbols_private=$have_gcc_fvisibility
+
+ AC_ARG_ENABLE(x11-shared,
+AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
+ , enable_x11_shared=maybe)
+
+ case "$host" in
+ *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs...
+ x11_symbols_private=yes
+ x11_lib='/usr/X11R6/lib/libX11.6.dylib'
+ x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
+ xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
+ xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
+ ;;
+ *-*-osf*)
+ x11_lib='libX11.so'
+ x11ext_lib='libXext.so'
+ ;;
+ *-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
+ x11_lib='libX11.so'
+ x11ext_lib='libXext.so'
+ ;;
+ *)
+ x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
+ ;;
+ esac
+
+ X_CFLAGS="$X_CFLAGS -DXTHREADS"
+ if test x$ac_cv_func_shmat != xyes; then
+ X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
+ fi
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
+
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11)
+ SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
+
+ if test x$enable_x11_shared = xmaybe; then
+ enable_x11_shared=$x11_symbols_private
+ fi
+ if test x$have_loadso != xyes && \
+ test x$enable_x11_shared = xyes; then
+ AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
+ enable_x11_shared=no
+ fi
+ if test x$x11_symbols_private != xyes && \
+ test x$enable_x11_shared = xyes; then
+ AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading])
+ enable_x11_shared=no
+ fi
+
+ if test x$have_loadso = xyes && \
+ test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
+ echo "-- dynamic libX11 -> $x11_lib"
+ echo "-- dynamic libX11ext -> $x11ext_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
+ else
+ enable_x11_shared=no
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
+ fi
+ have_video=yes
+
+ AC_ARG_ENABLE(dga,
+AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [[default=yes]]]),
+ , enable_dga=yes)
+ if test x$enable_dga = xyes; then
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86dga/*.c"
+ fi
+ AC_ARG_ENABLE(video-dga,
+AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [[default=yes]]]),
+ , enable_video_dga=yes)
+ if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
+ SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-dgamouse,
+AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [[default=yes]]]),
+ , enable_video_x11_dgamouse=yes)
+ if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
+ fi
+ AC_ARG_ENABLE(video-x11-vm,
+AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_vm=yes)
+ if test x$enable_video_x11_vm = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xv,
+AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
+ , enable_video_x11_xv=yes)
+ if test x$enable_video_x11_xv = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xinerama,
+AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
+ , enable_video_x11_xinerama=yes)
+ if test x$enable_video_x11_xinerama = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
+ SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xme,
+AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
+ , enable_video_x11_xme=yes)
+ if test x$enable_video_x11_xme = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
+ SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
+ fi
+ AC_ARG_ENABLE(video-x11-xrandr,
+AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
+ , enable_video_x11_xrandr=yes)
+ if test x$enable_video_x11_xrandr = xyes; then
+ definitely_enable_video_x11_xrandr=no
+ AC_CHECK_HEADER(X11/extensions/Xrandr.h,
+ have_xrandr_h_hdr=yes,
+ have_xrandr_h_hdr=no,
+ [#include
+ ])
+ if test x$have_xrandr_h_hdr = xyes; then
+ if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
+ echo "-- dynamic libXrender -> $xrender_lib"
+ echo "-- dynamic libXrandr -> $xrandr_lib"
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
+ AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
+ definitely_enable_video_x11_xrandr=yes
+ else
+ AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
+ AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
+ if test x$have_xrender_lib = xyes && test x$have_xrandr_lib = xyes ; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr -lXrender"
+ definitely_enable_video_x11_xrandr=yes
+ fi
+ fi
+ fi
+ fi
+ if test x$definitely_enable_video_x11_xrandr = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
+ fi
+ fi
+ fi
+}
+
+dnl Check for QNX photon video driver
+CheckPHOTON()
+{
+ AC_ARG_ENABLE(video-photon,
+AC_HELP_STRING([--enable-video-photon], [use QNX Photon video driver [[default=yes]]]),
+ , enable_video_photon=yes)
+ if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
+ AC_MSG_CHECKING(for QNX Photon support)
+ video_photon=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ #include
+ ],[
+ PgDisplaySettings_t *visual;
+ ],[
+ video_photon=yes
+ ])
+ AC_MSG_RESULT($video_photon)
+ if test x$video_photon = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
+ SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
+ have_video=yes
+
+ CheckOpenGLQNX
+ fi
+ fi
+}
+
+dnl Set up the BWindow video driver if enabled
+CheckBWINDOW()
+{
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
+ SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
+ have_video=yes
+ fi
+}
+
+dnl Set up the Carbon/QuickDraw video driver for Mac OS X (but not Darwin)
+CheckCARBON()
+{
+ AC_ARG_ENABLE(video-carbon,
+AC_HELP_STRING([--enable-video-carbon], [use Carbon/QuickDraw video driver [[default=no]]]),
+ , enable_video_carbon=no)
+ if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
+ AC_MSG_CHECKING(for Carbon framework)
+ have_carbon=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ have_carbon=yes
+ ])
+ AC_MSG_RESULT($have_carbon)
+ if test x$have_carbon = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
+ SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Set up the Cocoa/Quartz video driver for Mac OS X (but not Darwin)
+CheckCOCOA()
+{
+ AC_ARG_ENABLE(video-cocoa,
+AC_HELP_STRING([--enable-video-cocoa], [use Cocoa/Quartz video driver [[default=yes]]]),
+ , enable_video_cocoa=yes)
+ if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
+ save_CFLAGS="$CFLAGS"
+ dnl work around that we don't have Objective-C support in autoconf
+ CFLAGS="$CFLAGS -x objective-c"
+ AC_MSG_CHECKING(for Cocoa framework)
+ have_cocoa=no
+ AC_TRY_COMPILE([
+ #import
+ ],[
+ ],[
+ have_cocoa=yes
+ ])
+ AC_MSG_RESULT($have_cocoa)
+ CFLAGS="$save_CFLAGS"
+ if test x$have_cocoa = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
+ SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find the framebuffer console includes
+CheckFBCON()
+{
+ AC_ARG_ENABLE(video-fbcon,
+AC_HELP_STRING([--enable-video-fbcon], [use framebuffer console video driver [[default=yes]]]),
+ , enable_video_fbcon=yes)
+ if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
+ AC_MSG_CHECKING(for framebuffer console support)
+ video_fbcon=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ ],[
+ ],[
+ video_fbcon=yes
+ ])
+ AC_MSG_RESULT($video_fbcon)
+ if test x$video_fbcon = xyes; then
+ AC_CHECK_FUNCS(getpagesize)
+ AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
+ SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find DirectFB
+CheckDirectFB()
+{
+ AC_ARG_ENABLE(video-directfb,
+AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=yes]]]),
+ , enable_video_directfb=yes)
+ if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
+ video_directfb=no
+
+ DIRECTFB_REQUIRED_VERSION=0.9.15
+
+ AC_PATH_PROG(DIRECTFBCONFIG, directfb-config, no)
+ if test x$DIRECTFBCONFIG = xno; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ if test x$PKG_CONFIG != xno; then
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
+ DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
+ DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
+ video_directfb=yes
+ fi
+ fi
+ else
+ set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
+ NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
+ set -- `directfb-config --version | sed 's/\./ /g'`
+ HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
+ if test $HAVE_VERSION -ge $NEED_VERSION; then
+ DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
+ DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
+ video_directfb=yes
+ fi
+ fi
+ if test x$video_directfb = xyes; then
+ # SuSE 11.1 installs directfb-config without directfb-devel
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $DIRECTFB_CFLAGS"
+ AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
+ CFLAGS="$save_CFLAGS"
+ video_directfb=$have_directfb_hdr
+ fi
+ AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
+ AC_MSG_RESULT($video_directfb)
+
+ if test x$video_directfb = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
+ SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl See if we're running on PlayStation 2 hardware
+CheckPS2GS()
+{
+ AC_ARG_ENABLE(video-ps2gs,
+AC_HELP_STRING([--enable-video-ps2gs], [use PlayStation 2 GS video driver [[default=yes]]]),
+ , enable_video_ps2gs=yes)
+ if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
+ AC_MSG_CHECKING(for PlayStation 2 GS support)
+ video_ps2gs=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ ],[
+ video_ps2gs=yes
+ ])
+ AC_MSG_RESULT($video_ps2gs)
+ if test x$video_ps2gs = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
+ SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl See if we're running on PlayStation 3 Cell hardware
+CheckPS3()
+{
+ AC_ARG_ENABLE(video-ps3,
+ AC_HELP_STRING([--enable-video-ps3], [use PlayStation 3 Cell driver [[default=yes]]]),
+ , enable_video_ps3=yes)
+ if test x$enable_video = xyes -a x$enable_video_ps3 = xyes; then
+ AC_MSG_CHECKING(for PlayStation 3 Cell support)
+ video_ps3=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ ],[
+ video_ps3=yes
+ ])
+ AC_MSG_RESULT($video_ps3)
+ if test x$video_ps3 = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_PS3)
+ SOURCES="$SOURCES $srcdir/src/video/ps3/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -I/opt/cell/sdk/usr/include"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lbilin_scaler_spu -lfb_writer_spu -lyuv2rgb_spu -L/opt/cell/sdk/usr/lib -lspe2"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find the GGI includes
+CheckGGI()
+{
+ AC_ARG_ENABLE(video-ggi,
+AC_HELP_STRING([--enable-video-ggi], [use GGI video driver [[default=no]]]),
+ , enable_video_ggi=no)
+ if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
+ AC_MSG_CHECKING(for GGI support)
+ video_ggi=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ ],[
+ video_ggi=yes
+ ])
+ AC_MSG_RESULT($video_ggi)
+ if test x$video_ggi = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
+ SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find the SVGAlib includes and libraries
+CheckSVGA()
+{
+ AC_ARG_ENABLE(video-svga,
+AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [[default=yes]]]),
+ , enable_video_svga=yes)
+ if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
+ AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
+ video_svga=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ ],[
+ if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
+ exit(0);
+ }
+ ],[
+ video_svga=yes
+ ])
+ AC_MSG_RESULT($video_svga)
+ if test x$video_svga = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
+ SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find the VGL includes and libraries
+CheckVGL()
+{
+ AC_ARG_ENABLE(video-vgl,
+AC_HELP_STRING([--enable-video-vgl], [use VGL video driver [[default=yes]]]),
+ , enable_video_vgl=yes)
+ if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
+ AC_MSG_CHECKING(for libVGL support)
+ video_vgl=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ #include
+ ],[
+ VGLBitmap bitmap;
+ bitmap.Type = VIDBUF32;
+ bitmap.PixelBytes = 4;
+ exit(bitmap.Bitmap);
+ ],[
+ video_vgl=yes
+ ])
+ AC_MSG_RESULT($video_vgl)
+ if test x$video_vgl = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
+ SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Set up the wscons video driver if enabled
+CheckWscons()
+{
+ AC_ARG_ENABLE(video-wscons,
+AC_HELP_STRING([--enable-video-wscons], [use wscons video driver [[default=yes]]]),
+ , enable_video_wscons=yes)
+ if test x$enable_video = xyes -a x$enable_video_wscons = xyes; then
+ AC_MSG_CHECKING(for wscons support)
+ video_wscons=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ ],[
+ int wsmode = WSDISPLAYIO_MODE_DUMBFB;
+ ],[
+ video_wscons=yes
+ ])
+ AC_MSG_RESULT($video_wscons)
+ if test x$video_wscons = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
+ SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
+ have_video=yes
+ fi
+ fi
+}
+
+
+dnl Find the AAlib includes
+CheckAAlib()
+{
+ AC_ARG_ENABLE(video-aalib,
+AC_HELP_STRING([--enable-video-aalib], [use AAlib video driver [[default=no]]]),
+ , enable_video_aalib=no)
+ if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
+ AC_MSG_CHECKING(for AAlib support)
+ video_aalib=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ video_aalib=yes
+ ])
+ AC_MSG_RESULT($video_aalib)
+ if test x$video_aalib = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
+ SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Find the libcaca includes
+CheckCaca()
+{
+ AC_ARG_ENABLE(video-caca,
+AC_HELP_STRING([--enable-video-caca], [use libcaca video driver [[default=no]]]),
+ , enable_video_caca=no)
+ if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
+ video_caca=no
+ AC_PATH_PROG(CACACONFIG, caca-config, no)
+ if test x$CACACONFIG != xno; then
+ AC_MSG_CHECKING(for libcaca support)
+ CACA_CFLAGS=`$CACACONFIG --cflags`
+ CACA_LDFLAGS=`$CACACONFIG --libs`
+ save_CFLAGS="$CFLAGS"
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ video_caca=yes
+ ])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($video_caca)
+ if test x$video_caca = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_CACA)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS"
+ SOURCES="$SOURCES $srcdir/src/video/caca/*.c"
+ fi
+ fi
+ fi
+}
+
+dnl Set up the QTopia video driver if enabled
+CheckQtopia()
+{
+ AC_ARG_ENABLE(video-qtopia,
+AC_HELP_STRING([--enable-video-qtopia], [use Qtopia video driver [[default=no]]]),
+ , enable_video_qtopia=no)
+ if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
+ AC_MSG_CHECKING(for Qtopia support)
+ video_qtopia=no
+ QTOPIA_FLAGS="-DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
+ AC_LANG_CPLUSPLUS
+ OLD_CXX="$CXXFLAGS"
+ CXXFLAGS="$QTOPIA_FLAGS"
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ video_qtopia=yes
+ ])
+ CXXFLAGS="$OLD_CXX"
+ AC_MSG_RESULT($video_qtopia)
+ if test x$video_qtopia = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
+ SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
+ SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $QTOPIA_FLAGS"
+ SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main"
+ SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
+ have_video=yes
+ fi
+ AC_LANG_C
+ fi
+}
+
+dnl Set up the PicoGUI video driver if enabled
+CheckPicoGUI()
+{
+ AC_ARG_ENABLE(video-picogui,
+AC_HELP_STRING([--enable-video-picogui], [use PicoGUI video driver [[default=no]]]),
+ , enable_video_picogui=no)
+ if test x$enable_video = xyes -a x$enable_video_picogui = xyes; then
+ AC_MSG_CHECKING(for PicoGUI support)
+ video_picogui=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ video_picogui=yes
+ ])
+ AC_MSG_RESULT($video_picogui)
+ if test x$video_picogui = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
+ SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
+ SDL_LIBS="$SDL_LIBS -lpgui"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Set up the Atari Bios keyboard driver
+CheckAtariBiosEvent()
+{
+ SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.S"
+}
+
+dnl Set up the Atari Xbios driver
+CheckAtariXbiosVideo()
+{
+ AC_ARG_ENABLE(xbios,
+AC_HELP_STRING([--enable-video-xbios], [use Atari Xbios video driver [[default=yes]]]),
+ , enable_video_xbios=yes)
+ video_xbios=no
+ if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
+ video_xbios=yes
+ AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
+ SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
+ have_video=yes
+ fi
+}
+
+dnl Set up the Atari Gem driver
+CheckAtariGemVideo()
+{
+ AC_ARG_ENABLE(gem,
+AC_HELP_STRING([--enable-video-gem], [use Atari Gem video driver [[default=yes]]]),
+ , enable_video_gem=yes)
+ if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
+ video_gem=no
+ AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
+ AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
+ if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
+ video_gem=yes
+ AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
+ SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
+ SDL_LIBS="$SDL_LIBS -lgem"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl rcg04172001 Set up the Null video driver.
+CheckDummyVideo()
+{
+ AC_ARG_ENABLE(video-dummy,
+AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
+ , enable_video_dummy=yes)
+ if test x$enable_video_dummy = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
+ SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
+ have_video=yes
+ fi
+}
+
+dnl Check to see if OpenGL support is desired
+AC_ARG_ENABLE(video-opengl,
+AC_HELP_STRING([--enable-video-opengl], [include OpenGL context creation [[default=yes]]]),
+ , enable_video_opengl=yes)
+
+dnl Find OpenGL
+CheckOpenGLX11()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_MSG_CHECKING(for OpenGL (GLX) support)
+ video_opengl=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ #include
+ ],[
+ ],[
+ video_opengl=yes
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
+ fi
+ fi
+}
+
+dnl Find QNX RtP OpenGL
+CheckOpenGLQNX()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_MSG_CHECKING(for OpenGL (Photon) support)
+ video_opengl=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ video_opengl=yes
+ ])
+ AC_MSG_RESULT($video_opengl)
+ if test x$video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+ fi
+}
+
+dnl Check for Win32 OpenGL
+CheckWIN32GL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
+ fi
+}
+
+dnl Check for BeOS OpenGL
+CheckBeGL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
+ fi
+}
+
+dnl Check for MacOS OpenGL
+CheckMacGL()
+{
+ if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ case "$host" in
+ *-*-darwin*)
+ if test x$enable_video_cocoa = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
+ fi
+ if test x$enable_video_carbon = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL"
+ fi
+ esac
+ fi
+}
+
+dnl Check for Mesa offscreen rendering
+CheckAtariOSMesa()
+{
+ if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
+ AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
+ AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
+
+ # Static linking to -lOSMesa
+ AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
+ if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
+ # -lOSMesa is really the static library
+ if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
+ OSMESA_LIBS="-lOSMesa"
+ fi
+ else
+ # -lOSMesa is a loader for OSMesa.ldg
+ OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
+ OSMESA_LIBS=`$OSMESA_CONFIG --libs`
+ fi
+ AC_DEFINE(SDL_VIDEO_OPENGL)
+ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
+ SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
+ SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
+
+ AC_ARG_ENABLE(osmesa-shared,
+AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [[default=yes]]]),
+ , enable_osmesa_shared=yes)
+ if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
+ # Dynamic linking
+ if test "x$have_osmesa_hdr" = "xyes"; then
+ AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
+ fi
+ fi
+ fi
+}
+
+AC_ARG_ENABLE(screensaver,
+AC_HELP_STRING([--enable-screensaver], [enable screensaver by default while any SDL application is running [[default=no]]]),
+ , enable_screensaver=no)
+if test x$enable_screensaver = xno; then
+ AC_DEFINE(SDL_VIDEO_DISABLE_SCREENSAVER)
+fi
+
+dnl See if we can use the new unified event interface in Linux 2.4
+CheckInputEvents()
+{
+ dnl Check for Linux 2.4 unified input event interface support
+ AC_ARG_ENABLE(input-events,
+AC_HELP_STRING([--enable-input-events], [use Linux 2.4 unified input interface [[default=yes]]]),
+ , enable_input_events=yes)
+ if test x$enable_input_events = xyes; then
+ AC_MSG_CHECKING(for Linux 2.4 unified input interface)
+ use_input_events=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ #ifndef EVIOCGNAME
+ #error EVIOCGNAME() ioctl not available
+ #endif
+ ],[
+ use_input_events=yes
+ ])
+ AC_MSG_RESULT($use_input_events)
+ if test x$use_input_events = xyes; then
+ AC_DEFINE(SDL_INPUT_LINUXEV)
+ fi
+ fi
+}
+
+dnl See if we can use the Touchscreen input library
+CheckTslib()
+{
+ AC_ARG_ENABLE(input-tslib,
+AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
+ , enable_input_tslib=yes)
+ if test x$enable_input_tslib = xyes; then
+ AC_MSG_CHECKING(for Touchscreen library support)
+ enable_input_tslib=no
+ AC_TRY_COMPILE([
+ #include "tslib.h"
+ ],[
+ ],[
+ enable_input_tslib=yes
+ ])
+ AC_MSG_RESULT($enable_input_tslib)
+ if test x$enable_input_tslib = xyes; then
+ AC_DEFINE(SDL_INPUT_TSLIB)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
+ fi
+ fi
+}
+
+dnl See if we can use GNU pth library for threads
+CheckPTH()
+{
+ dnl Check for pth support
+ AC_ARG_ENABLE(pth,
+AC_HELP_STRING([--enable-pth], [use GNU pth library for multi-threading [[default=yes]]]),
+ , enable_pth=yes)
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+ AC_PATH_PROG(PTH_CONFIG, pth-config, no)
+ if test "$PTH_CONFIG" = "no"; then
+ use_pth=no
+ else
+ use_pth=yes
+ fi
+ AC_MSG_CHECKING(pth)
+ AC_MSG_RESULT($use_pth)
+ if test "x$use_pth" = xyes; then
+ AC_DEFINE(SDL_THREAD_PTH)
+ SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
+ SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
+ SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
+ have_threads=yes
+ fi
+ fi
+}
+
+dnl See what type of thread model to use on Linux and Solaris
+CheckPTHREAD()
+{
+ dnl Check for pthread support
+ AC_ARG_ENABLE(pthreads,
+AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
+ , enable_pthreads=yes)
+ dnl This is used on Linux for glibc binary compatibility (Doh!)
+ AC_ARG_ENABLE(pthread-sem,
+AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
+ , enable_pthread_sem=yes)
+ case "$host" in
+ *-*-linux*|*-*-uclinux*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-bsdi*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib=""
+ ;;
+ *-*-darwin*)
+ pthread_cflags="-D_THREAD_SAFE"
+# causes Carbon.p complaints?
+# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ ;;
+ *-*-freebsd*|*-*-dragonfly*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib="-pthread"
+ ;;
+ *-*-netbsd*)
+ pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-openbsd*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-pthread"
+ ;;
+ *-*-solaris*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread -lposix4"
+ ;;
+ *-*-sysv5*)
+ pthread_cflags="-D_REENTRANT -Kthread"
+ pthread_lib=""
+ ;;
+ *-*-irix*)
+ pthread_cflags="-D_SGI_MP_SOURCE"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-aix*)
+ pthread_cflags="-D_REENTRANT -mthreads"
+ pthread_lib="-lpthread"
+ ;;
+ *-*-hpux11*)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-L/usr/lib -lpthread"
+ ;;
+ *-*-qnx*)
+ pthread_cflags=""
+ pthread_lib=""
+ ;;
+ *-*-osf*)
+ pthread_cflags="-D_REENTRANT"
+ if test x$ac_cv_prog_gcc = xyes; then
+ pthread_lib="-lpthread -lrt"
+ else
+ pthread_lib="-lpthread -lexc -lrt"
+ fi
+ ;;
+ *)
+ pthread_cflags="-D_REENTRANT"
+ pthread_lib="-lpthread"
+ ;;
+ esac
+ if test x$enable_threads = xyes -a x$enable_pthreads = xyes -a x$enable_ipod != xyes; then
+ # Save the original compiler flags and libraries
+ ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
+ # Add the pthread compiler flags and libraries
+ CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
+ # Check to see if we have pthread support on this system
+ AC_MSG_CHECKING(for pthreads)
+ use_pthreads=no
+ AC_TRY_LINK([
+ #include
+ ],[
+ pthread_attr_t type;
+ pthread_attr_init(&type);
+ ],[
+ use_pthreads=yes
+ ])
+ AC_MSG_RESULT($use_pthreads)
+ # Restore the compiler flags and libraries
+ CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
+
+ # Do futher testing if we have pthread support...
+ if test x$use_pthreads = xyes; then
+ AC_DEFINE(SDL_THREAD_PTHREAD)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
+ SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
+ SDL_LIBS="$SDL_LIBS $pthread_lib"
+
+ # Save the original compiler flags and libraries
+ ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
+ # Add the pthread compiler flags and libraries
+ CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
+
+ # Check to see if recursive mutexes are available
+ AC_MSG_CHECKING(for recursive mutexes)
+ has_recursive_mutexes=no
+ if test x$has_recursive_mutexes = xno; then
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],[
+ has_recursive_mutexes=yes
+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
+ ])
+ fi
+ if test x$has_recursive_mutexes = xno; then
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ ],[
+ has_recursive_mutexes=yes
+ AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
+ ])
+ fi
+ AC_MSG_RESULT($has_recursive_mutexes)
+
+ # Check to see if pthread semaphore support is missing
+ if test x$enable_pthread_sem = xyes; then
+ AC_MSG_CHECKING(for pthread semaphores)
+ have_pthread_sem=no
+ AC_TRY_COMPILE([
+ #include
+ #include
+ ],[
+ ],[
+ have_pthread_sem=yes
+ ])
+ AC_MSG_RESULT($have_pthread_sem)
+ fi
+
+ # Restore the compiler flags and libraries
+ CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
+
+ # Basic thread creation functions
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
+
+ # Semaphores
+ # We can fake these with mutexes and condition variables if necessary
+ if test x$have_pthread_sem = xyes; then
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
+ else
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
+ fi
+
+ # Mutexes
+ # We can fake these with semaphores if necessary
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
+
+ # Condition variables
+ # We can fake these with semaphores and mutexes if necessary
+ SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
+
+ have_threads=yes
+ else
+ CheckPTH
+ fi
+ fi
+}
+
+dnl Determine whether the compiler can produce Win32 executables
+CheckWIN32()
+{
+ AC_MSG_CHECKING(Win32 compiler)
+ have_win32_gcc=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ ],[
+ have_win32_gcc=yes
+ ])
+ AC_MSG_RESULT($have_win32_gcc)
+ if test x$have_win32_gcc != xyes; then
+ AC_MSG_ERROR([
+*** Your compiler ($CC) does not produce Win32 executables!
+ ])
+ fi
+
+ dnl See if the user wants to redirect standard output to files
+ AC_ARG_ENABLE(stdio-redirect,
+AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [[default=yes]]]),
+ , enable_stdio_redirect=yes)
+ if test x$enable_stdio_redirect != xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
+ fi
+
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
+ SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
+ have_video=yes
+ fi
+}
+
+dnl Find the DirectX includes and libraries
+CheckDIRECTX()
+{
+ AC_ARG_ENABLE(directx,
+AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [[default=yes]]]),
+ , enable_directx=yes)
+ if test x$enable_directx = xyes; then
+ have_directx=no
+ AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
+ AC_CHECK_HEADER(dsound.h, have_dsound=yes)
+ AC_CHECK_HEADER(dinput.h, use_dinput=yes)
+ if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
+ have_directx=yes
+ fi
+ if test x$enable_video = xyes -a x$have_directx = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
+ SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
+ have_video=yes
+ fi
+ fi
+}
+
+dnl Check for the dlfcn.h interface for dynamically loading objects
+CheckDLOPEN()
+{
+ AC_ARG_ENABLE(sdl-dlopen,
+AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
+ , enable_sdl_dlopen=yes)
+ if test x$enable_sdl_dlopen = xyes; then
+ AC_MSG_CHECKING(for dlopen)
+ have_dlopen=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
+ #error Use dlcompat for Mac OS X 10.2 compatibility
+ #endif
+ ],[
+ have_dlopen=yes
+ ])
+ AC_MSG_RESULT($have_dlopen)
+
+ if test x$have_dlopen = xyes; then
+ AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
+ AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
+ AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
+ AC_DEFINE(SDL_LOADSO_DLOPEN)
+ SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
+ have_loadso=yes
+ fi
+ fi
+}
+
+dnl Set up the Atari LDG (shared object loader)
+CheckAtariLdg()
+{
+ AC_ARG_ENABLE(atari-ldg,
+AC_HELP_STRING([--enable-atari-ldg], [use Atari LDG for shared object loading [[default=yes]]]),
+ , enable_atari_ldg=yes)
+ if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then
+ AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
+ AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
+ if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
+ AC_DEFINE(SDL_LOADSO_LDG)
+ SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
+ SDL_LIBS="$SDL_LIBS -lldg -lgem"
+ have_loadso=yes
+ fi
+ fi
+}
+
+dnl Check for the usbhid(3) library on *BSD
+CheckUSBHID()
+{
+ if test x$enable_joystick = xyes; then
+ AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
+ if test x$have_libusbhid = xyes; then
+ AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
+ AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
+ USB_LIBS="$USB_LIBS -lusbhid"
+ else
+ AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
+ AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
+ AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
+ fi
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $USB_CFLAGS"
+
+ AC_MSG_CHECKING(for usbhid)
+ have_usbhid=no
+ AC_TRY_COMPILE([
+ #include
+ #if defined(HAVE_USB_H)
+ #include
+ #endif
+ #ifdef __DragonFly__
+ # include
+ # include
+ #else
+ # include
+ # include
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include
+ #elif defined(HAVE_LIBUSB_H)
+ #include
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include
+ #endif
+ ],[
+ struct report_desc *repdesc;
+ struct usb_ctl_report *repbuf;
+ hid_kind_t hidkind;
+ ],[
+ have_usbhid=yes
+ ])
+ AC_MSG_RESULT($have_usbhid)
+
+ if test x$have_usbhid = xyes; then
+ AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
+ have_usbhid_ucr_data=no
+ AC_TRY_COMPILE([
+ #include
+ #if defined(HAVE_USB_H)
+ #include
+ #endif
+ #ifdef __DragonFly__
+ # include
+ # include
+ #else
+ # include
+ # include
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include
+ #elif defined(HAVE_LIBUSB_H)
+ #include
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include
+ #endif
+ ],[
+ struct usb_ctl_report buf;
+ if (buf.ucr_data) { }
+ ],[
+ have_usbhid_ucr_data=yes
+ ])
+ if test x$have_usbhid_ucr_data = xyes; then
+ USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
+ fi
+ AC_MSG_RESULT($have_usbhid_ucr_data)
+
+ AC_MSG_CHECKING(for new usbhid API)
+ have_usbhid_new=no
+ AC_TRY_COMPILE([
+ #include
+ #if defined(HAVE_USB_H)
+ #include
+ #endif
+ #ifdef __DragonFly__
+ #include
+ #include
+ #else
+ #include
+ #include
+ #endif
+ #if defined(HAVE_USBHID_H)
+ #include
+ #elif defined(HAVE_LIBUSB_H)
+ #include
+ #elif defined(HAVE_LIBUSBHID_H)
+ #include
+ #endif
+ ],[
+ report_desc_t d;
+ hid_start_parse(d, 1, 1);
+ ],[
+ have_usbhid_new=yes
+ ])
+ if test x$have_usbhid_new = xyes; then
+ USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
+ fi
+ AC_MSG_RESULT($have_usbhid_new)
+
+ AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
+ have_machine_joystick=no
+ AC_TRY_COMPILE([
+ #include
+ ],[
+ struct joystick t;
+ ],[
+ have_machine_joystick=yes
+ ])
+ if test x$have_machine_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
+ fi
+ AC_MSG_RESULT($have_machine_joystick)
+
+ AC_DEFINE(SDL_JOYSTICK_USBHID)
+ SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
+ have_joystick=yes
+ fi
+ CFLAGS="$save_CFLAGS"
+ fi
+}
+
+dnl Check for clock_gettime()
+CheckClockGettime()
+{
+ AC_ARG_ENABLE(clock_gettime,
+AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=no]]]),
+ , enable_clock_gettime=no)
+ if test x$enable_clock_gettime = xyes; then
+ AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
+ if test x$have_clock_gettime = xyes; then
+ AC_DEFINE(HAVE_CLOCK_GETTIME)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
+ fi
+ fi
+}
+
+dnl Check for a valid linux/version.h
+CheckLinuxVersion()
+{
+ AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
+ if test x$have_linux_version_h = xyes; then
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_LINUX_VERSION_H"
+ fi
+}
+
+dnl Check if we want to use RPATH
+CheckRPATH()
+{
+ AC_ARG_ENABLE(rpath,
+AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
+ , enable_rpath=yes)
+}
+
+dnl Set up the configuration based on the host platform!
+case "$host" in
+ arm-*-elf*) # FIXME: Can we get more specific for iPodLinux?
+ ARCH=linux
+ CheckDummyVideo
+ CheckIPod
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX)
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ ;;
+ *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*)
+ case "$host" in
+ *-*-linux*) ARCH=linux ;;
+ *-*-uclinux*) ARCH=linux ;;
+ *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
+ *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
+ *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
+ *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
+ *-*-bsdi*) ARCH=bsdi ;;
+ *-*-freebsd*) ARCH=freebsd ;;
+ *-*-dragonfly*) ARCH=freebsd ;;
+ *-*-netbsd*) ARCH=netbsd ;;
+ *-*-openbsd*) ARCH=openbsd ;;
+ *-*-sysv5*) ARCH=sysv5 ;;
+ *-*-solaris*) ARCH=solaris ;;
+ *-*-hpux*) ARCH=hpux ;;
+ *-*-irix*) ARCH=irix ;;
+ *-*-aix*) ARCH=aix ;;
+ *-*-osf*) ARCH=osf ;;
+ esac
+ CheckVisibilityHidden
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckNASM
+ CheckAltivec
+ CheckOSS
+ CheckDMEDIA
+ CheckMME
+ CheckALSA
+ CheckARTSC
+ CheckESD
+ CheckPulseAudio
+ CheckNAS
+ CheckX11
+ CheckNANOX
+ CheckFBCON
+ CheckDirectFB
+ CheckPS2GS
+ CheckPS3
+ CheckGGI
+ CheckSVGA
+ CheckVGL
+ CheckWscons
+ CheckAAlib
+ CheckCaca
+ CheckQtopia
+ CheckPicoGUI
+ CheckOpenGLX11
+ CheckInputEvents
+ CheckTslib
+ CheckUSBHID
+ CheckPTHREAD
+ CheckClockGettime
+ CheckLinuxVersion
+ CheckRPATH
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ case $ARCH in
+ sysv5|solaris|hpux)
+ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ ;;
+ netbsd|openbsd)
+ AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
+ SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
+ have_audio=yes
+ ;;
+ aix)
+ AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
+ SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
+ have_audio=yes
+ ;;
+ esac
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ case $ARCH in
+ linux)
+ AC_DEFINE(SDL_JOYSTICK_LINUX)
+ SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+ have_joystick=yes
+ ;;
+ esac
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ case $ARCH in
+ linux|solaris)
+ AC_DEFINE(SDL_CDROM_LINUX)
+ SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
+ have_cdrom=yes
+ ;;
+ *freebsd*)
+ AC_DEFINE(SDL_CDROM_FREEBSD)
+ SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
+ have_cdrom=yes
+ ;;
+ *openbsd*|*netbsd*)
+ AC_DEFINE(SDL_CDROM_OPENBSD)
+ SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
+ have_cdrom=yes
+ ;;
+ bsdi)
+ AC_DEFINE(SDL_CDROM_BSDI)
+ SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
+ have_cdrom=yes
+ ;;
+ aix)
+ AC_DEFINE(SDL_CDROM_AIX)
+ SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
+ have_cdrom=yes
+ ;;
+ osf)
+ AC_DEFINE(SDL_CDROM_OSF)
+ SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
+ have_cdrom=yes
+ ;;
+ esac
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
+ AC_DEFINE(SDL_THREAD_SPROC)
+ SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+ have_threads=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX)
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ ;;
+ *-*-qnx*)
+ ARCH=qnx
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ # CheckNASM
+ CheckDLOPEN
+ CheckNAS
+ CheckPHOTON
+ CheckX11
+ CheckOpenGLX11
+ CheckPTHREAD
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
+ SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
+ have_audio=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_QNX)
+ SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX)
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ ;;
+ *-*-cygwin* | *-*-mingw32*)
+ ARCH=win32
+ if test "$build" != "$host"; then # cross-compiling
+ # Default cross-compile location
+ ac_default_prefix=/usr/local/cross-tools/i386-mingw32
+ else
+ # Look for the location of the tools and install there
+ if test "$BUILD_PREFIX" != ""; then
+ ac_default_prefix=$BUILD_PREFIX
+ fi
+ fi
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckWIN32
+ CheckWIN32GL
+ CheckDIRECTX
+ CheckNASM
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
+ SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
+ if test x$have_directx = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
+ SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
+ fi
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_WINMM)
+ SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_WIN32)
+ SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREAD_WIN32)
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+ have_threads=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_WIN32)
+ SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+ AC_DEFINE(SDL_LOADSO_WIN32)
+ SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
+ have_loadso=yes
+ fi
+ # Set up the system libraries we need
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm"
+ if test x$have_directx = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
+ fi
+ # The Win32 platform requires special setup
+ SOURCES="$SOURCES $srcdir/src/main/win32/*.rc"
+ SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
+ SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
+ ;;
+ *-wince*)
+ ARCH=win32
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckWIN32
+ CheckNASM
+ SOURCES="$SOURCES $srcdir/src/video/gapi/*.c"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -D_WIN32_WCE=0x420"
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
+ SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
+ have_audio=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREAD_WIN32)
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
+ SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+ have_threads=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_WINCE)
+ SOURCES="$SOURCES $srcdir/src/timer/wince/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lmmtimer"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+ AC_DEFINE(SDL_LOADSO_WIN32)
+ SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
+ have_loadso=yes
+ fi
+ # Set up the system libraries we need
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl"
+ # The Win32 platform requires special setup
+ SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
+ SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
+ SDL_LIBS="-lSDLmain $SDL_LIBS"
+ ;;
+ *-*-beos* | *-*-haiku*)
+ ARCH=beos
+ ac_default_prefix=/boot/develop/tools/gnupro
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckNASM
+ CheckBWINDOW
+ CheckBeGL
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
+ SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_BEOS)
+ SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_BEOS)
+ SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
+ have_cdrom=yes
+ fi
+ # Set up files for the thread library
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREAD_BEOS)
+ SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
+ SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
+ have_threads=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_BEOS)
+ SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
+ have_timers=yes
+ fi
+ # Set up files for the shared object loading library
+ if test x$enable_loadso = xyes; then
+ case "$host" in
+ *-*-beos*)
+ AC_DEFINE(SDL_LOADSO_BEOS)
+ SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
+ ;;
+ *-*-haiku*)
+ AC_DEFINE(SDL_LOADSO_DLOPEN)
+ SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
+ ;;
+ esac
+ have_loadso=yes
+ fi
+ # The BeOS platform requires special setup.
+ SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
+ ;;
+ *-*-darwin* )
+ # This could be either full "Mac OS X", or plain "Darwin" which is
+ # just the OS X kernel sans upper layers like Carbon and Cocoa.
+ # Next line is broken, and a few files below require Mac OS X (full)
+ ARCH=macosx
+
+ # Mac OS X builds with both the Carbon and OSX APIs at the moment
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
+
+ # HACK: Reset EXTRA_LDFLAGS; the only thing it contains at this point
+ # is -lm which is not needed under Mac OS X. But for some reasons it
+ # also tends to contain spurious -L switches, which we don't want to
+ # use here or in sdl-config. Hence we reset it.
+ EXTRA_LDFLAGS=""
+
+ CheckVisibilityHidden
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckDLOPEN
+ CheckNASM
+
+ # Set up files for the shared object loading library
+ # (this needs to be done before the dynamic X11 check)
+ if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
+ AC_DEFINE(SDL_LOADSO_DLCOMPAT)
+ SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
+ have_loadso=yes
+ fi
+
+ CheckCOCOA
+ CheckCARBON
+ CheckX11
+ CheckMacGL
+ CheckOpenGLX11
+ CheckPTHREAD
+ CheckAltivec
+
+ # Need this or things might misbuild on a G3.
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
+
+ # Set up files for the audio library
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
+ SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
+ have_audio=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_IOKIT)
+ SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
+ have_joystick=yes
+ need_iokit_framework=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_MACOSX)
+ SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX)
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ have_timers=yes
+ fi
+ # The Mac OS X platform requires special setup.
+ SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
+ SDL_LIBS="-lSDLmain $SDL_LIBS"
+ if test x$enable_video_cocoa = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
+ need_iokit_framework=yes
+ fi
+ if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
+ # The Cocoa backend still needs Carbon
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ApplicationServices"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
+ fi
+ # If either the audio or CD driver is used, add the AudioUnit framework
+ if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
+ fi
+ # Some subsystems reference IOKit...
+ if test x$need_iokit_framework = xyes; then
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
+ fi
+ ;;
+ *-*-mint*)
+ ARCH=mint
+ CheckDummyVideo
+ CheckDiskAudio
+ CheckDummyAudio
+ CheckAtariBiosEvent
+ CheckAtariXbiosVideo
+ CheckAtariGemVideo
+ CheckAtariAudio
+ CheckAtariLdg
+ CheckAtariOSMesa
+ CheckPTH
+ # Set up files for the audio library
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+ if test x$enable_audio = xyes; then
+ AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
+ have_audio=yes
+ fi
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_MINT)
+ SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the cdrom library
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_MINT)
+ SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
+ have_cdrom=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ if test x$enable_threads = xyes -a x$enable_pth = xyes; then
+ AC_DEFINE(SDL_TIMER_UNIX)
+ SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+ else
+ AC_DEFINE(SDL_TIMER_MINT)
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
+ SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
+ fi
+ have_timers=yes
+ fi
+ ;;
+ *-riscos)
+ ARCH=riscos
+ CheckOSS
+ CheckPTHREAD
+ # Set up files for the video library
+ if test x$enable_video = xyes; then
+ AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
+ SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
+ have_video=yes
+ fi
+ # Set up files for the joystick library
+ if test x$enable_joystick = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_RISCOS)
+ SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
+ have_joystick=yes
+ fi
+ # Set up files for the timer library
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMER_RISCOS)
+ SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
+ have_timers=yes
+ fi
+ # The RISC OS platform requires special setup.
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz"
+ ;;
+ *)
+ AC_MSG_ERROR([
+*** Unsupported host: Please add to configure.in
+ ])
+ ;;
+esac
+
+# Verify that we have all the platform specific files we need
+
+if test x$enable_joystick = xyes; then
+ if test x$have_joystick != xyes; then
+ # Wants joystick subsystem, but doesn't have a platform-specific backend...
+ AC_DEFINE(SDL_JOYSTICK_DUMMY)
+ SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
+ fi
+fi
+if test x$have_cdrom != xyes; then
+ if test x$enable_cdrom = xyes; then
+ AC_DEFINE(SDL_CDROM_DISABLED)
+ fi
+ SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
+fi
+if test x$have_threads != xyes; then
+ if test x$enable_threads = xyes; then
+ AC_DEFINE(SDL_THREADS_DISABLED)
+ fi
+ SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
+fi
+if test x$have_timers != xyes; then
+ if test x$enable_timers = xyes; then
+ AC_DEFINE(SDL_TIMERS_DISABLED)
+ fi
+ SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
+fi
+if test x$have_loadso != xyes; then
+ if test x$enable_loadso = xyes; then
+ AC_DEFINE(SDL_LOADSO_DISABLED)
+ fi
+ SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
+fi
+if test x$SDLMAIN_SOURCES = x; then
+ SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
+fi
+
+OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
+
+SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
+SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
+SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
+
+# Set runtime shared library paths as needed
+
+if test "x$enable_rpath" = "xyes"; then
+ if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
+ SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
+ fi
+ if test $ARCH = solaris; then
+ SDL_RLD_FLAGS="-R\${libdir}"
+ fi
+else
+ SDL_RLD_FLAGS=""
+fi
+
+case "$ARCH" in
+ macosx)
+ if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
+ SDL_LIBS="$SDL_LIBS -Wl,-framework,Cocoa"
+ fi
+ if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
+ SDL_LIBS="$SDL_LIBS -Wl,-framework,Carbon"
+ fi
+ # Evil hack to allow static linking on Mac OS X
+ SDL_STATIC_LIBS="\${libdir}/libSDLmain.a \${libdir}/libSDL.a $EXTRA_LDFLAGS"
+ ;;
+ *)
+ SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
+ ;;
+esac
+
+dnl Expand the cflags and libraries needed by apps using SDL
+AC_SUBST(SDL_CFLAGS)
+AC_SUBST(SDL_LIBS)
+AC_SUBST(SDL_STATIC_LIBS)
+AC_SUBST(SDL_RLD_FLAGS)
+if test x$enable_shared = xyes; then
+ ENABLE_SHARED_TRUE=
+ ENABLE_SHARED_FALSE="#"
+else
+ ENABLE_SHARED_TRUE="#"
+ ENABLE_SHARED_FALSE=
+fi
+if test x$enable_static = xyes; then
+ ENABLE_STATIC_TRUE=
+ ENABLE_STATIC_FALSE="#"
+else
+ ENABLE_STATIC_TRUE="#"
+ ENABLE_STATIC_FALSE=
+fi
+AC_SUBST(ENABLE_SHARED_TRUE)
+AC_SUBST(ENABLE_SHARED_FALSE)
+AC_SUBST(ENABLE_STATIC_TRUE)
+AC_SUBST(ENABLE_STATIC_FALSE)
+
+dnl Expand the sources and objects needed to build the library
+AC_SUBST(ac_aux_dir)
+AC_SUBST(INCLUDE)
+AC_SUBST(SOURCES)
+AC_SUBST(OBJECTS)
+AC_SUBST(SDLMAIN_SOURCES)
+AC_SUBST(SDLMAIN_OBJECTS)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(EXTRA_CFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(EXTRA_LDFLAGS)
+AC_SUBST(WINDRES)
+
+AC_OUTPUT([
+ Makefile sdl-config SDL.spec SDL.qpg sdl.pc
+], [
+ : >build-deps
+ if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend
+])
diff --git a/docs.html b/docs.html
new file mode 100644
index 0000000..66ca923
--- /dev/null
+++ b/docs.html
@@ -0,0 +1,629 @@
+
+SDL Stable Release
+
+
+
+
+This source is stable, and is fully tested on all supported platforms.
+Please send bug reports or questions to the SDL mailing list:
+http://www.libsdl.org/mailing-list.php
+The latest stable release may be found on the
+ SDL website.
+
+ Fixed SDL_VIDEO_WINDOW_POS environment variable for Quartz target.
+
+
+ Fixed setting the starting working directory in release builds.
+
+
+
+
+
+
SDL 1.2.13 Release Notes
+
+SDL 1.2.13 is a minor bug fix release.
+
+
+
General Notes
+
+
+
+ Fixed link error when building with Intel Compiler 10.
+
+
+ Removed stray C++ comment from public headers.
+
+
+
+
Unix Notes
+
+
+
+ Fixed crash in SDL_SoftStretch() on secure operating systems.
+
+
+ Fixed undefined symbol on X11 implementations without UTF-8 support.
+
+
+ Worked around BadAlloc error when using XVideo on the XFree86 Intel Integrated Graphics driver.
+
+
+ Scan for all joysticks on Linux instead of stopping at one that was removed.
+
+
+ Fixed use of sdl-config arguments in sdl.m4
+
+
+
+
Windows Notes
+
+
+
+ Fixed crash when a video driver reports higher than 32 bpp video modes.
+
+
+ Fixed restoring the desktop after setting a 24-bit OpenGL video mode.
+
+
+ Fixed window titles on Windows 95/98/ME.
+
+
+ Added SDL_BUTTON_X1 and SDL_BUTTON_X2 constants for extended mouse buttons.
+
+
+ Added support for quoted command line arguments.
+
+
+
+
Mac OS X Notes
+
+
+
+ SDL now builds on Mac OS X 10.5 (Leopard).
+
+
+ Fixed high frequency crash involving text input.
+
+
+ Fixed beeping when the escape key is pressed and UNICODE translation is enabled.
+
+
+ Improved trackpad scrolling support.
+
+
+ Fixed joystick hat reporting for certain joysticks.
+
+
+
+
+
+
SDL 1.2.12 Release Notes
+
+SDL 1.2.12 is a minor bug fix release.
+
+
+
General Notes
+
+
+
+ Added support for the PulseAudio sound server: http://www.pulseaudio.org/
+
+
+ Added SDL_VIDEO_ALLOW_SCREENSAVER to override SDL's disabling of the screensaver on Mac OS X, Windows, and X11.
+
+
+ Fixed buffer overrun crash when resampling audio rates.
+
+
+ Fixed audio bug where converting to mono was doubling the volume.
+
+
+ Fixed off-by-one error in the C implementation of SDL_revcpy()
+
+
+ Fixed compiling with Sun Studio.
+
+
+ Support for AmigaOS has been removed from the main SDL code.
+
+
+ Support for Nokia 9210 "EPOC" driver has been removed from the main SDL code.
+
+
+ Unofficial support for the S60/SymbianOS platform has been added.
+
+
+ Unofficial support for the Nintendo DS platform has been added.
+
+
+ Reenabled MMX assembly for YUV overlay processing (GNU C Compiler only).
+
+
+
+
Unix Notes
+
+
+
+ Fixed detection of X11 DGA mouse support.
+
+
+ Improved XIM support for asian character sets.
+
+
+ The GFX_Display has been added to the X11 window information in SDL_syswm.h.
+
+
+ Fixed PAGE_SIZE compile error in the fbcon video driver on newer Linux kernels.
+
+
+ Fixed hang or crash at startup if aRts can't access the hardware.
+
+
+ Fixed relative mouse mode when the cursor starts outside the X11 window.
+
+
+ Fixed accidental free of stack memory in X11 mouse acceleration code.
+
+
+ Closed minor memory leak in XME code.
+
+
+ Fixed TEXTRELs in the library to resolve some PIC issues.
+
+
+
+
Windows Notes
+
+
+
+ The GDI video driver makes better use of the palette in 8-bit modes.
+
+
+ The windib driver now supports more mouse buttons with WM_XBUTTON events.
+
+
+ On Windows, SDL_SetVideoMode() will re-create the window instead of failing if the multisample settings are changed.
+
+
+ Added support for UTF-8 window titles on Windows.
+
+
+ Fixed joystick detection on Windows.
+
+
+ Improved performance with Win32 file I/O.
+
+
+ Fixed HBITMAP leak in GAPI driver.
+
+
+
+
Mac OS X Notes
+
+
+
+ Added support for multi-axis controllers like 3Dconnxion's SpaceNavigator on Mac OS X.
+
+
+ Fixed YUV overlay crash inside Quicktime on Intel Mac OS X.
+
+
+ Fixed blitting alignment in Altivec alpha blit functions.
+
+
+ Keys F13, F14, and F15 are now usable on Apple keyboards under Mac OS X.
+
+
+ Fixed joystick calibration code on Mac OS X.
+
+
+ Fixed mouse jitter when multiple motion events are queued up in Mac OS X.
+
+
+ Fixed changing the cursor in fullscreen mode on Mac OS X.
+
+
+
+
Mac OS Classic Notes
+
+
+
+ Added support for gamma ramps to both toolbox and DrawSprocket video drivers.
+
+
+
+
BeOS Notes
+
+
+
+ Implemented mouse grabbing and mouse relative mode on BeOS.
+
+
+
+
+
+
SDL 1.2.11 Release Notes
+
+SDL 1.2.11 is a minor bug fix release.
+
+
+
Unix Notes
+
+
+
+ Dynamic X11 loading is only enabled with gcc 4 supporting -fvisibility=hidden. This fixes crashes related to symbol collisions, and allows building on Solaris and IRIX.
+
+
+ Fixed building SDL with Xinerama disabled.
+
+
+ Fixed DRI OpenGL library loading, using RTLD_GLOBAL in dlopen().
+
+
+ Added pkgconfig configuration support.
+
+
+
+
Windows Notes
+
+
+
+ Setting SDL_GL_SWAP_CONTROL now works with Windows OpenGL.
+
+
+ The Win32 window positioning code works properly for windows with menus.
+
+
+ DirectSound audio quality has been improved on certain sound cards.
+
+
+ Fixed 5.1 audio channel ordering on Windows and Mac OS X.
+
+
+ Plugged a couple of minor memory leaks in the windib video driver.
+
+
+ Fixed type collision with stdint.h when building with gcc on Win32.
+
+
+ Fixed building with the Digital Mars Compiler on Win32.
+
+
+
+
Mac OS X Notes
+
+
+
+ The Quartz video driver supports 32x32 cursors on Mac OS X 10.3 and above.
+
+
+
+
+
+
SDL 1.2.10 Release Notes
+
+SDL 1.2.10 is a major release, featuring a revamp of the build system and many API improvements and bug fixes.
+
+
API enhancements
+
+
+ If SDL_OpenAudio() is passed zero for the desired format
+ fields, the following environment variables will be used
+ to fill them in:
+
+ If an environment variable is not specified, it will be set
+ to a reasonable default value.
+
+ SDL_SetVideoMode() now accepts 0 for width or height and will use
+ the current video mode (or the desktop mode if no mode has been set.)
+
+ Added current_w and current_h to the SDL_VideoInfo structure,
+ which is set to the desktop resolution during video intialization,
+ and then set to the current resolution when a video mode is set.
+
+ SDL_GL_LoadLibrary() will load the system default OpenGL library
+ if it is passed NULL as a parameter.
+
+ Added SDL_GL_SWAP_CONTROL to wait for vsync in OpenGL applications.
+
+ Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
+
+ SDL_WM_SetCaption() now officially takes UTF-8 title and icon strings, and displays international characters on supported platforms.
+
+ Added SDL_GetKeyRepeat() to query the key repeat settings.
+
+ Added the "dummy" audio driver, which can be used to emulate audio
+ output without a sound card.
+
+ Added SDL_config.h, with defaults for various build environments.
+
+ SDL is licensed under version 2.1 of the GNU Lesser General Public License.
+
+ The entire build system has been revamped to make it much more portable, including versions of C library functions to make it possible to run SDL on a minimal embedded environment. See README.Porting in the SDL source distribution for information on how to port SDL to a new platform.
+
+ The X11 libraries are dynamically loaded at runtime by default. This allows the distributed version of SDL to run on systems without X11 libraries installed.
+
+ The XiG XME extension code is now included in the X11 video driver by default.
+
+ XRandR support for video mode switching has been added to the X11 driver, but is disabled because of undesired interactions with window managers. You can enable this by setting the environment variable SDL_VIDEO_X11_XRANDR to 1.
+
+ Xinerama multi-head displays are properly handled now, and the SDL_VIDEO_FULLSCREEN_HEAD environment variable can be used to select the screen used for fullscreen video modes. Note that changing the video modes only works on screen 0.
+
+ XVidMode video modes are now sorted so they maintain the refresh rates specified in the X11 configuration file.
+
+ SDL windows are no longer transparent in X11 compositing systems like XGL.
+
+ The mouse is properly released by the X11 video driver if the fullscreen window loses focus.
+
+ The X11 input driver now uses XIM to handle international input.
+
+ The screensaver and DPMS monitor blanking are disabled while SDL games are running under the X11 and DGA video drivers. This behavior will be formalized and selectable in SDL 1.3.
+
+ Fixed a bug preventing stereo OpenGL contexts from being selected on the X11 driver.
+
+ The DGA video driver now waits for pending blits involving surfaces before they are freed. This prevents display oddities when using SDL_DisplayFormat() to convert many images.
+
+ The framebuffer console video driver now has a parser for /etc/fb.modes for improved video mode handling.
+
+ The framebuffer console video driver now allows asynchronous VT switching, and restores the full contents of the screen when switched back.
+
+ The framebuffer console now uses CTRL-ALT-FN to switch virtual terminals, to avoid collisions with application key bindings.
+
+ The framebuffer console input driver correctly sets IMPS/2 mode for wheel mice. It also properly detects when gpm is in IMPS/2 protocol mode, or passing raw protocol from an IMPS/2 mouse.
+
+ The SVGAlib video driver now has support for banked (non-linear) video modes.
+
+ A video driver for OpenBSD on the Sharp Zaurus has been contributed by Staffan Ulfberg. See the file README.wscons in the SDL source distribution for details.
+
+ Many patches have been incorporated from *BSD ports.
+
+
+
Windows Notes
+
+
+
+ The "windib" video driver is the default now, to prevent problems with certain laptops, 64-bit Windows, and Windows Vista. The DirectX driver is still available, and can be selected by setting the environment variable SDL_VIDEODRIVER to "directx".
+
+ SDL has been ported to 64-bit Windows.
+
+ Dmitry Yakimov contributed a GAPI video driver for Windows CE.
+
+ The default fullscreen refresh rate has been increased to match the desktop refresh rate, when using equivalent resolutions. A full API for querying and selecting refresh rates is planned for SDL 1.3.
+
+ Dialog boxes are now shown when SDL is in windowed OpenGL mode.
+
+ The SDL window is recreated when necessary to maintain OpenGL context attributes, when switching between windowed and fullscreen modes.
+
+ An SDL_VIDEORESIZE event is properly sent when the SDL window is maximized and restored.
+
+ Window positions are retained when switching between fullscreen and windowed modes.
+
+ ToUnicode() is used, when available, for improved handling of international keyboard input.
+
+ The PrtScrn is now treated normally with both key down and key up events.
+
+ Pressing ALT-F4 now delivers an SDL_QUIT event to SDL applications.
+
+ Joystick names are now correct for joysticks which have been unplugged and then plugged back in since booting.
+
+ An MCI error when playing the last track on a CD-ROM has been fixed.
+
+ OpenWatcom projects for building SDL have been provided by Marc Peter.
+
+
+
Mac OS X Notes
+
+
+
+ SDL now supports building Universal binaries, both through Xcode projects and when using configure/make. See README.MacOSX in the SDL source archive for details.
+
+ The X11 video driver with GLX support can be built on Mac OS X, if the X11 development SDK is installed.
+
+ Transitions between fullscreen resolutions and windowed mode now use a much faster asynchronous fade to hide desktop flicker.
+
+ Icons set with SDL_WM_SetIcon() now have the proper colors on Intel Macs.
+
+
+
OS/2 Notes
+
+
+
+ Projects for building SDL on OS/2 with OpenWatcom have been contributed by Doodle. See the file README.OS2 in the SDL source distribution for details.
+
SDL_CloseAudio -- Shuts down audio processing and closes the audio device.
Sound on the computer is translated from waves that you hear into a series of
+values, or samples, each representing the amplitude of the wave. When these
+samples are sent in a stream to a sound card, an approximation of the original
+wave can be recreated. The more bits used to represent the amplitude, and the
+greater frequency these samples are gathered, the closer the approximated
+sound is to the original, and the better the quality of sound.
This library supports both 8 and 16 bit signed and unsigned sound samples,
+at frequencies ranging from 11025 Hz to 44100 Hz, depending on the
+underlying hardware. If the hardware doesn't support the desired audio
+format or frequency, it can be emulated if desired (See
+SDL_OpenAudio())
A commonly supported audio format is 16 bits per sample at 22050 Hz.
\ No newline at end of file
diff --git a/docs/html/cdrom.html b/docs/html/cdrom.html
new file mode 100644
index 0000000..bdd6bfd
--- /dev/null
+++ b/docs/html/cdrom.html
@@ -0,0 +1,260 @@
+CD-ROM
SDL supports audio control of up to 32 local CD-ROM drives at once.
You use this API to perform all the basic functions of a CD player,
+including listing the tracks, playing, stopping, and ejecting the CD-ROM.
+(Currently, multi-changer CD drives are not supported.)
Before you call any of the SDL CD-ROM functions, you must first call
+"SDL_Init(SDL_INIT_CDROM)", which scans the system for
+CD-ROM drives, and sets the program up for audio control. Check the
+return code, which should be 0, to see if there
+were any errors in starting up.
After you have initialized the library, you can find out how many drives
+are available using the SDL_CDNumDrives() function.
+The first drive listed is the system default CD-ROM drive. After you have
+chosen a drive, and have opened it with SDL_CDOpen(),
+you can check the status and start playing if there's a CD in the drive.
A CD-ROM is organized into one or more tracks, each consisting of a certain
+number of "frames". Each frame is ~2K in size, and at normal playing speed,
+a CD plays 75 frames per second. SDL works with the number of frames on a
+CD, but this can easily be converted to the more familiar minutes/seconds
+format by using the FRAMES_TO_MSF() macro.
\ No newline at end of file
diff --git a/docs/html/event.html b/docs/html/event.html
new file mode 100644
index 0000000..f2bddb2
--- /dev/null
+++ b/docs/html/event.html
@@ -0,0 +1,216 @@
+Events
Event handling allows your application to receive input from the user. Event handling is initalised (along with video) with a call to:
+
SDL_Init(SDL_INIT_VIDEO);
+Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like SDL_PollEvent and SDL_PeepEvents you can observe and handle waiting input events.
The key to event handling in SDL is the SDL_Event union. The event queue itself is composed of a series of SDL_Event unions, one for each waiting event. SDL_Event unions are read from the queue with the SDL_PollEvent function and it is then up to the application to process the information stored with them.
\ No newline at end of file
diff --git a/docs/html/eventfunctions.html b/docs/html/eventfunctions.html
new file mode 100644
index 0000000..f68a29a
--- /dev/null
+++ b/docs/html/eventfunctions.html
@@ -0,0 +1,481 @@
+Event Functions.
\ No newline at end of file
diff --git a/docs/html/eventstructures.html b/docs/html/eventstructures.html
new file mode 100644
index 0000000..c959296
--- /dev/null
+++ b/docs/html/eventstructures.html
@@ -0,0 +1,233 @@
+SDL Event Structures.
\ No newline at end of file
diff --git a/docs/html/general.html b/docs/html/general.html
new file mode 100644
index 0000000..0beb591
--- /dev/null
+++ b/docs/html/general.html
@@ -0,0 +1,225 @@
+General
Before SDL can be used in a program it must be initialized with SDL_Init. SDL_Init initializes all the subsystems that the user requests (video, audio, joystick, timers and/or cdrom). Once SDL is initialized with SDL_Init subsystems can be shut down and initialized as needed using SDL_InitSubSystem and SDL_QuitSubSystem.
SDL must also be shut down before the program exits to make sure it cleans up correctly. Calling SDL_Quit shuts down all subsystems and frees any resources allocated to SDL.
\ No newline at end of file
diff --git a/docs/html/guide.html b/docs/html/guide.html
new file mode 100644
index 0000000..2c1297e
--- /dev/null
+++ b/docs/html/guide.html
@@ -0,0 +1,174 @@
+SDL Guide
\ No newline at end of file
diff --git a/docs/html/guideaboutsdldoc.html b/docs/html/guideaboutsdldoc.html
new file mode 100644
index 0000000..cdb0d78
--- /dev/null
+++ b/docs/html/guideaboutsdldoc.html
@@ -0,0 +1,148 @@
+About SDLdoc
SDLdoc (The SDL Documentation Project) was formed to completely rewrite the SDL documentation and to keep it continually up to date. The team consists completely of volunteers ranging from people working with SDL in their spare time to people who use SDL in their everyday working lives.
The latest version of this documentation can always be found here: http://sdldoc.csn.ul.ie Downloadable PS, man pages and html tarballs are available at http://sdldoc.csn.ul.ie/pub/
\ No newline at end of file
diff --git a/docs/html/guideaudioexamples.html b/docs/html/guideaudioexamples.html
new file mode 100644
index 0000000..afb7522
--- /dev/null
+++ b/docs/html/guideaudioexamples.html
@@ -0,0 +1,228 @@
+Audio Examples
SDL_AudioSpec wanted;
+ extern void fill_audio(void *udata, Uint8 *stream, int len);
+
+ /* Set the audio format */
+ wanted.freq = 22050;
+ wanted.format = AUDIO_S16;
+ wanted.channels = 2; /* 1 = mono, 2 = stereo */
+ wanted.samples = 1024; /* Good low-latency value for callback */
+ wanted.callback = fill_audio;
+ wanted.userdata = NULL;
+
+ /* Open the audio device, forcing the desired format */
+ if ( SDL_OpenAudio(&wanted, NULL) < 0 ) {
+ fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
+ return(-1);
+ }
+ return(0);
Playing audio
static Uint8 *audio_chunk;
+ static Uint32 audio_len;
+ static Uint8 *audio_pos;
+
+ /* The audio function callback takes the following parameters:
+ stream: A pointer to the audio buffer to be filled
+ len: The length (in bytes) of the audio buffer
+ */
+ void fill_audio(void *udata, Uint8 *stream, int len)
+ {
+ /* Only play if we have data left */
+ if ( audio_len == 0 )
+ return;
+
+ /* Mix as much data as possible */
+ len = ( len > audio_len ? audio_len : len );
+ SDL_MixAudio(stream, audio_pos, len, SDL_MIX_MAXVOLUME);
+ audio_pos += len;
+ audio_len -= len;
+ }
+
+ /* Load the audio data ... */
+
+ ;;;;;
+
+ audio_pos = audio_chunk;
+
+ /* Let the callback function play the audio chunk */
+ SDL_PauseAudio(0);
+
+ /* Do some processing */
+
+ ;;;;;
+
+ /* Wait for sound to complete */
+ while ( audio_len > 0 ) {
+ SDL_Delay(100); /* Sleep 1/10 second */
+ }
+ SDL_CloseAudio();
\ No newline at end of file
diff --git a/docs/html/guidebasicsinit.html b/docs/html/guidebasicsinit.html
new file mode 100644
index 0000000..faafdbd
--- /dev/null
+++ b/docs/html/guidebasicsinit.html
@@ -0,0 +1,240 @@
+Initializing SDL
SDL is composed of eight subsystems - Audio, CDROM, Event Handling, File I/O, Joystick Handling, Threading, Timers and Video. Before you can use any of these subsystems they must be initialized by calling SDL_Init (or SDL_InitSubSystem). SDL_Init must be called before any other SDL function. It automatically initializes the Event Handling, File I/O and Threading subsystems and it takes a parameter specifying which other subsystems to initialize. So, to initialize the default subsystems and the Video subsystems you would call:
+
SDL_Init ( SDL_INIT_VIDEO );
+To initialize the default subsystems, the Video subsystem and the Timers subsystem you would call:
+
SDL_Init ( SDL_INIT_VIDEO | SDL_INIT_TIMER );
SDL_Init is complemented by SDL_Quit (and SDL_QuitSubSystem). SDL_Quit shuts down all subsystems, including the default ones. It should always be called before a SDL application exits.
With SDL_Init and SDL_Quit firmly embedded in your programmers toolkit you can write your first and most basic SDL application. However, we must be prepare to handle errors. Many SDL functions return a value and indicates whether the function has succeeded or failed, SDL_Init, for instance, returns -1 if it could not initialize a subsystem. SDL provides a useful facility that allows you to determine exactly what the problem was, every time an error occurs within SDL an error message is stored which can be retrieved using SDL_GetError. Use this often, you can never know too much about an error.
Example 1-1. Initializing SDL
#include "SDL.h" /* All SDL App's need this */
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+
+ printf("Initializing SDL.\n");
+
+ /* Initialize defaults, Video and Audio */
+ if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) {
+ printf("Could not initialize SDL: %s.\n", SDL_GetError());
+ exit(-1);
+ }
+
+ printf("SDL initialized.\n");
+
+ printf("Quiting SDL.\n");
+
+ /* Shutdown all subsystems */
+ SDL_Quit();
+
+ printf("Quiting....\n");
+
+ exit(0);
+}
\ No newline at end of file
diff --git a/docs/html/guidecdromexamples.html b/docs/html/guidecdromexamples.html
new file mode 100644
index 0000000..2bc5a16
--- /dev/null
+++ b/docs/html/guidecdromexamples.html
@@ -0,0 +1,275 @@
+CDROM Examples
#include "SDL.h"
+
+ /* Initialize SDL first */
+ if ( SDL_Init(SDL_INIT_CDROM) < 0 ) {
+ fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError());
+ exit(1);
+ }
+ atexit(SDL_Quit);
+
+ /* Find out how many CD-ROM drives are connected to the system */
+ printf("Drives available: %d\n", SDL_CDNumDrives());
+ for ( i=0; i<SDL_CDNumDrives(); ++i ) {
+ printf("Drive %d: \"%s\"\n", i, SDL_CDName(i));
+ }
Opening the default drive
SDL_CD *cdrom;
+ CDstatus status;
+ char *status_str;
+
+ cdrom = SDL_CDOpen(0);
+ if ( cdrom == NULL ) {
+ fprintf(stderr, "Couldn't open default CD-ROM drive: %s\n",
+ SDL_GetError());
+ exit(2);
+ }
+
+ status = SDL_CDStatus(cdrom);
+ switch (status) {
+ case CD_TRAYEMPTY:
+ status_str = "tray empty";
+ break;
+ case CD_STOPPED:
+ status_str = "stopped";
+ break;
+ case CD_PLAYING:
+ status_str = "playing";
+ break;
+ case CD_PAUSED:
+ status_str = "paused";
+ break;
+ case CD_ERROR:
+ status_str = "error state";
+ break;
+ }
+ printf("Drive status: %s\n", status_str);
+ if ( status >= CD_PLAYING ) {
+ int m, s, f;
+ FRAMES_TO_MSF(cdrom->cur_frame, &m, &s, &f);
+ printf("Currently playing track %d, %d:%2.2d\n",
+ cdrom->track[cdrom->cur_track].id, m, s);
+ }
Listing the tracks on a CD
SDL_CD *cdrom; /* Assuming this has already been set.. */
+ int i;
+ int m, s, f;
+
+ SDL_CDStatus(cdrom);
+ printf("Drive tracks: %d\n", cdrom->numtracks);
+ for ( i=0; i<cdrom->numtracks; ++i ) {
+ FRAMES_TO_MSF(cdrom->track[i].length, &m, &s, &f);
+ if ( f > 0 )
+ ++s;
+ printf("\tTrack (index %d) %d: %d:%2.2d\n", i,
+ cdrom->track[i].id, m, s);
+ }
Play an entire CD
SDL_CD *cdrom; /* Assuming this has already been set.. */
+
+ // Play entire CD:
+ if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
+ SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
+
+ // Play last track:
+ if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
+ SDL_CDPlayTracks(cdrom, cdrom->numtracks-1, 0, 0, 0);
+ }
+
+ // Play first and second track and 10 seconds of third track:
+ if ( CD_INDRIVE(SDL_CDStatus(cdrom)) )
+ SDL_CDPlayTracks(cdrom, 0, 0, 2, CD_FPS * 10);
\ No newline at end of file
diff --git a/docs/html/guidecredits.html b/docs/html/guidecredits.html
new file mode 100644
index 0000000..b66b28f
--- /dev/null
+++ b/docs/html/guidecredits.html
@@ -0,0 +1,195 @@
+Credits
\ No newline at end of file
diff --git a/docs/html/guideeventexamples.html b/docs/html/guideeventexamples.html
new file mode 100644
index 0000000..3001369
--- /dev/null
+++ b/docs/html/guideeventexamples.html
@@ -0,0 +1,247 @@
+Event Examples
\ No newline at end of file
diff --git a/docs/html/guideexamples.html b/docs/html/guideexamples.html
new file mode 100644
index 0000000..5b9a847
--- /dev/null
+++ b/docs/html/guideexamples.html
@@ -0,0 +1,188 @@
+Examples
For the moment these examples are taken directly from the old SDL documentation. By the 1.2 release these examples should hopefully deal with most common SDL programming problems.
\ No newline at end of file
diff --git a/docs/html/guideinput.html b/docs/html/guideinput.html
new file mode 100644
index 0000000..4a82b67
--- /dev/null
+++ b/docs/html/guideinput.html
@@ -0,0 +1,739 @@
+Input handling
The first step in using a joystick in a SDL program is to initialize the Joystick subsystems of SDL. This done by passing the SDL_INIT_JOYSTICK flag to SDL_Init. The joystick flag will usually be used in conjunction with other flags (like the video flag) because the joystick is usually used to control something.
Example 3-1. Initializing SDL with Joystick Support
This will attempt to start SDL with both the video and the joystick subsystems activated.
Querying
If we have reached this point then we can safely assume that the SDL library has been initialized and that the Joystick subsystem is active. We can now call some video and/or sound functions to get things going before we need the joystick. Eventually we have to make sure that there is actually a joystick to work with. It's wise to always check even if you know a joystick will be present on the system because it can also help detect when the joystick is unplugged. The function used to check for joysticks is SDL_NumJoysticks.
This function simply returns the number of joysticks available on the system. If it is at least one then we are in good shape. The next step is to determine which joystick the user wants to use. If the number of joysticks available is only one then it is safe to assume that one joystick is the one the user wants to use. SDL has a function to get the name of the joysticks as assigned by the operations system and that function is SDL_JoystickName. The joystick is specified by an index where 0 is the first joystick and the last joystick is the number returned by SDL_NumJoysticks - 1. In the demonstration a list of all available joysticks is printed to stdout.
Example 3-2. Querying the Number of Available Joysticks
printf("%i joysticks were found.\n\n", SDL_NumJoysticks() );
+ printf("The names of the joysticks are:\n");
+
+ for( i=0; i < SDL_NumJoysticks(); i++ )
+ {
+ printf(" %s\n", SDL_JoystickName(i));
+ }
Opening a Joystick and Receiving Joystick Events
SDL's event driven architecture makes working with joysticks a snap. Joysticks can trigger 4 different types of events:
+
Events are received from all joysticks opened. The first thing that needs to be done in order to receive joystick events is to call SDL_JoystickEventState with the SDL_ENABLE flag. Next you must open the joysticks that you want to receive envents from. This is done with the SDL_JoystickOpen function. For the example we are only interested in events from the first joystick on the system, regardless of what it may be. To receive events from it we would do this:
If we wanted to receive events for other joysticks we would open them with calls to SDL_JoystickOpen just like we opened joystick 0, except we would store the SDL_Joystick structure they return in a different pointer. We only need the joystick pointer when we are querying the joysticks or when we are closing the joystick.
Up to this point all the code we have is used just to initialize the joysticks in order to read values at run time. All we need now is an event loop, which is something that all SDL programs should have anyway to receive the systems quit events. We must now add code to check the event loop for at least some of the above mentioned events. Let's assume our event loop looks like this:
+
SDL_Event event;
+ /* Other initializtion code goes here */
+
+ /* Start main game loop here */
+
+ while(SDL_PollEvent(&event))
+ {
+ switch(event.type)
+ {
+ case SDL_KEYDOWN:
+ /* handle keyboard stuff here */
+ break;
+
+ case SDL_QUIT:
+ /* Set whatever flags are necessary to */
+ /* end the main game loop here */
+ break;
+ }
+ }
+
+ /* End loop here */
+To handle Joystick events we merely add cases for them, first we'll add axis handling code. Axis checks can get kinda of tricky because alot of the joystick events received are junk. Joystick axis have a tendency to vary just a little between polling due to the way they are designed. To compensate for this you have to set a threshold for changes and ignore the events that have'nt exceeded the threshold. 10% is usually a good threshold value. This sounds a lot more complicated than it is. Here is the Axis event handler:
Another trick with axis events is that up-down and left-right movement are two different sets of axes. The most important axis is axis 0 (left-right) and axis 1 (up-down). To handle them seperatly in the code we do the following:
Ideally the code here should use event.jaxis.value to scale something. For example lets assume you are using the joystick to control the movement of a spaceship. If the user is using an analog joystick and they push the stick a little bit they expect to move less than if they pushed it a lot. Designing your code for this situation is preferred because it makes the experience for users of analog controls better and remains the same for users of digital controls.
If your joystick has any additional axis then they may be used for other sticks or throttle controls and those axis return values too just with different event.jaxis.axis values.
Button handling is simple compared to the axis checking.
Example 3-6. Joystick Button Events
case SDL_JOYBUTTONDOWN: /* Handle Joystick Button Presses */
+ if ( event.jbutton.button == 0 )
+ {
+ /* code goes here */
+ }
+ break;
Button checks are simpler than axis checks because a button can only be pressed or not pressed. The SDL_JOYBUTTONDOWN event is triggered when a button is pressed and the SDL_JOYBUTTONUP event is fired when a button is released. We do have to know what button was pressed though, that is done by reading the event.jbutton.button field.
Lastly when we are through using our joysticks we should close them with a call to SDL_JoystickClose. To close our opened joystick 0 we would do this at the end of our program:
+
SDL_JoystickClose(joystick);
Advanced Joystick Functions
That takes care of the controls that you can count on being on every joystick under the sun, but there are a few extra things that SDL can support. Joyballs are next on our list, they are alot like axis with a few minor differences. Joyballs store relative changes unlike the the absolute postion stored in a axis event. Also one trackball event contains both the change in x and they change in y. Our case for it is as follows:
The above checks the first joyball on the joystick. The change in position will be stored in event.jball.xrel and event.jball.yrel.
Finally we have the hat event. Hats report only the direction they are pushed in. We check hat's position with the bitmasks:
+
+
SDL_HAT_CENTERED
SDL_HAT_UP
SDL_HAT_RIGHT
SDL_HAT_DOWN
SDL_HAT_LEFT
+
+Also there are some predefined combinations of the above:
+
SDL_HAT_RIGHTUP
SDL_HAT_RIGHTDOWN
SDL_HAT_LEFTUP
SDL_HAT_LEFTDOWN
+
+Our case for the hat may resemble the following:
Example 3-8. Joystick Hat Events
case SDL_JOYHATMOTION: /* Handle Hat Motion */
+ if ( event.jhat.value & SDL_HAT_UP )
+ {
+ /* Do up stuff here */
+ }
+
+ if ( event.jhat.value & SDL_HAT_LEFT )
+ {
+ /* Do left stuff here */
+ }
+
+ if ( event.jhat.value & SDL_HAT_RIGHTDOWN )
+ {
+ /* Do right and down together stuff here */
+ }
+ break;
In addition to the queries for number of joysticks on the system and their names there are additional functions to query the capabilities of attached joysticks:
+
\ No newline at end of file
diff --git a/docs/html/guideinputkeyboard.html b/docs/html/guideinputkeyboard.html
new file mode 100644
index 0000000..787036c
--- /dev/null
+++ b/docs/html/guideinputkeyboard.html
@@ -0,0 +1,746 @@
+Handling the Keyboard
It should make it a lot easier to understand this tutorial is you are familiar with the data types involved in keyboard access, so I'll explain them first.
SDLKey
SDLKey is an enumerated type defined in SDL/include/SDL_keysym.h and detailed here. Each SDLKey symbol represents a key, SDLK_a corresponds to the 'a' key on a keyboard, SDLK_SPACE corresponds to the space bar, and so on.
SDLMod
SDLMod is an enumerated type, similar to SDLKey, however it enumerates keyboard modifiers (Control, Alt, Shift). The full list of modifier symbols is here. SDLMod values can be AND'd together to represent several modifiers.
The SDL_keysym structure describes a key press or a key release. The scancode field is hardware specific and should be ignored unless you know what your doing. The sym field is the SDLKey value of the key being pressed or released. The mod field describes the state of the keyboard modifiers at the time the key press or release occurred. So a value of KMOD_NUM | KMOD_CAPS | KMOD_LSHIFT would mean that Numlock, Capslock and the left shift key were all press (or enabled in the case of the lock keys). Finally, the unicode field stores the 16-bit unicode value of the key.
Note: It should be noted and understood that this field is only valid when the SDL_keysym is describing a key press, not a key release. Unicode values only make sense on a key press because the unicode value describes an international character and only key presses produce characters. More information on Unicode can be found at www.unicode.org
Note: Unicode translation must be enabled using the SDL_EnableUNICODE function.
The SDL_KeyboardEvent describes a keyboard event (obviously). The key member of the SDL_Event union is a SDL_KeyboardEvent structure. The type field specifies whether the event is a key release (SDL_KEYUP) or a key press (SDL_KEYDOWN) event. The state is largely redundant, it reports the same information as the type field but uses different values (SDL_RELEASED and SDL_PRESSED). The keysym contains information of the key press or release that this event represents (see above).
Reading Keyboard Events
Reading keybaord events from the event queue is quite simple (the event queue and using it is described here). We read events using SDL_PollEvent in a while() loop and check for SDL_KEYUP and SDL_KEYDOWN events using a switch statement, like so:
Example 3-10. Reading Keyboard Events
SDL_Event event;
+ .
+ .
+ /* Poll for events. SDL_PollEvent() returns 0 when there are no */
+ /* more events on the event queue, our while loop will exit when */
+ /* that occurs. */
+ while( SDL_PollEvent( &event ) ){
+ /* We are only worried about SDL_KEYDOWN and SDL_KEYUP events */
+ switch( event.type ){
+ case SDL_KEYDOWN:
+ printf( "Key press detected\n" );
+ break;
+
+ case SDL_KEYUP:
+ printf( "Key release detected\n" );
+ break;
+
+ default:
+ break;
+ }
+ }
+ .
+ .
This is a very basic example. No information about the key press or release is interpreted. We will explore the other extreme out our first full example below - reporting all available information about a keyboard event.
A More Detailed Look
Before we can read events SDL must be initialised with SDL_Init and a video mode must be set using SDL_SetVideoMode. There are, however, two other functions we must use to obtain all the information required. We must enable unicode translation by calling SDL_EnableUNICODE(1) and we must convert SDLKey values into something printable, using SDL_GetKeyName
Note: It is useful to note that unicode values < 0x80 translate directly a characters ASCII value. THis is used in the example below
Example 3-11. Interpreting Key Event Information
#include "SDL.h"
+
+ /* Function Prototypes */
+ void PrintKeyInfo( SDL_KeyboardEvent *key );
+ void PrintModifiers( SDLMod mod );
+
+ /* main */
+ int main( int argc, char *argv[] ){
+
+ SDL_Event event;
+ int quit = 0;
+
+ /* Initialise SDL */
+ if( SDL_Init( SDL_INIT_VIDEO ) < 0){
+ fprintf( stderr, "Could not initialise SDL: %s\n", SDL_GetError() );
+ exit( -1 );
+ }
+
+ /* Set a video mode */
+ if( !SDL_SetVideoMode( 320, 200, 0, 0 ) ){
+ fprintf( stderr, "Could not set video mode: %s\n", SDL_GetError() );
+ SDL_Quit();
+ exit( -1 );
+ }
+
+ /* Enable Unicode translation */
+ SDL_EnableUNICODE( 1 );
+
+ /* Loop until an SDL_QUIT event is found */
+ while( !quit ){
+
+ /* Poll for events */
+ while( SDL_PollEvent( &event ) ){
+
+ switch( event.type ){
+ /* Keyboard event */
+ /* Pass the event data onto PrintKeyInfo() */
+ case SDL_KEYDOWN:
+ case SDL_KEYUP:
+ PrintKeyInfo( &event.key );
+ break;
+
+ /* SDL_QUIT event (window close) */
+ case SDL_QUIT:
+ quit = 1;
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ }
+
+ /* Clean up */
+ SDL_Quit();
+ exit( 0 );
+ }
+
+ /* Print all information about a key event */
+ void PrintKeyInfo( SDL_KeyboardEvent *key ){
+ /* Is it a release or a press? */
+ if( key->type == SDL_KEYUP )
+ printf( "Release:- " );
+ else
+ printf( "Press:- " );
+
+ /* Print the hardware scancode first */
+ printf( "Scancode: 0x%02X", key->keysym.scancode );
+ /* Print the name of the key */
+ printf( ", Name: %s", SDL_GetKeyName( key->keysym.sym ) );
+ /* We want to print the unicode info, but we need to make */
+ /* sure its a press event first (remember, release events */
+ /* don't have unicode info */
+ if( key->type == SDL_KEYDOWN ){
+ /* If the Unicode value is less than 0x80 then the */
+ /* unicode value can be used to get a printable */
+ /* representation of the key, using (char)unicode. */
+ printf(", Unicode: " );
+ if( key->keysym.unicode < 0x80 && key->keysym.unicode > 0 ){
+ printf( "%c (0x%04X)", (char)key->keysym.unicode,
+ key->keysym.unicode );
+ }
+ else{
+ printf( "? (0x%04X)", key->keysym.unicode );
+ }
+ }
+ printf( "\n" );
+ /* Print modifier info */
+ PrintModifiers( key->keysym.mod );
+ }
+
+ /* Print modifier info */
+ void PrintModifiers( SDLMod mod ){
+ printf( "Modifers: " );
+
+ /* If there are none then say so and return */
+ if( mod == KMOD_NONE ){
+ printf( "None\n" );
+ return;
+ }
+
+ /* Check for the presence of each SDLMod value */
+ /* This looks messy, but there really isn't */
+ /* a clearer way. */
+ if( mod & KMOD_NUM ) printf( "NUMLOCK " );
+ if( mod & KMOD_CAPS ) printf( "CAPSLOCK " );
+ if( mod & KMOD_LCTRL ) printf( "LCTRL " );
+ if( mod & KMOD_RCTRL ) printf( "RCTRL " );
+ if( mod & KMOD_RSHIFT ) printf( "RSHIFT " );
+ if( mod & KMOD_LSHIFT ) printf( "LSHIFT " );
+ if( mod & KMOD_RALT ) printf( "RALT " );
+ if( mod & KMOD_LALT ) printf( "LALT " );
+ if( mod & KMOD_CTRL ) printf( "CTRL " );
+ if( mod & KMOD_SHIFT ) printf( "SHIFT " );
+ if( mod & KMOD_ALT ) printf( "ALT " );
+ printf( "\n" );
+ }
Game-type Input
I have found that people using keyboard events for games and other interactive applications don't always understand one fundemental point.
Keyboard events only take place when a keys state changes from being unpressed to pressed, and vice versa.
Imagine you have an image of an alien that you wish to move around using the cursor keys: when you pressed the left arrow key you want him to slide over to the left, and when you press the down key you want him to slide down the screen. Examine the following code; it highlights an error that many people have made.
+
/* Alien screen coordinates */
+ int alien_x=0, alien_y=0;
+ .
+ .
+ /* Initialise SDL and video modes and all that */
+ .
+ /* Main game loop */
+ /* Check for events */
+ while( SDL_PollEvent( &event ) ){
+ switch( event.type ){
+ /* Look for a keypress */
+ case SDL_KEYDOWN:
+ /* Check the SDLKey values and move change the coords */
+ switch( event.key.keysym.sym ){
+ case SDLK_LEFT:
+ alien_x -= 1;
+ break;
+ case SDLK_RIGHT:
+ alien_x += 1;
+ break;
+ case SDLK_UP:
+ alien_y -= 1;
+ break;
+ case SDLK_DOWN:
+ alien_y += 1;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+ .
+ .
+At first glance you may think this is a perfectly reasonable piece of code for the task, but it isn't. Like I said keyboard events only occur when a key changes state, so the user would have to press and release the left cursor key 100 times to move the alien 100 pixels to the left.
To get around this problem we must not use the events to change the position of the alien, we use the events to set flags which are then used in a seperate section of code to move the alien. Something like this:
Example 3-12. Proper Game Movement
/* Alien screen coordinates */
+ int alien_x=0, alien_y=0;
+ int alien_xvel=0, alien_yvel=0;
+ .
+ .
+ /* Initialise SDL and video modes and all that */
+ .
+ /* Main game loop */
+ /* Check for events */
+ while( SDL_PollEvent( &event ) ){
+ switch( event.type ){
+ /* Look for a keypress */
+ case SDL_KEYDOWN:
+ /* Check the SDLKey values and move change the coords */
+ switch( event.key.keysym.sym ){
+ case SDLK_LEFT:
+ alien_xvel = -1;
+ break;
+ case SDLK_RIGHT:
+ alien_xvel = 1;
+ break;
+ case SDLK_UP:
+ alien_yvel = -1;
+ break;
+ case SDLK_DOWN:
+ alien_yvel = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ /* We must also use the SDL_KEYUP events to zero the x */
+ /* and y velocity variables. But we must also be */
+ /* careful not to zero the velocities when we shouldn't*/
+ case SDL_KEYUP:
+ switch( event.key.keysym.sym ){
+ case SDLK_LEFT:
+ /* We check to make sure the alien is moving */
+ /* to the left. If it is then we zero the */
+ /* velocity. If the alien is moving to the */
+ /* right then the right key is still press */
+ /* so we don't tocuh the velocity */
+ if( alien_xvel < 0 )
+ alien_xvel = 0;
+ break;
+ case SDLK_RIGHT:
+ if( alien_xvel > 0 )
+ alien_xvel = 0;
+ break;
+ case SDLK_UP:
+ if( alien_yvel < 0 )
+ alien_yvel = 0;
+ break;
+ case SDLK_DOWN:
+ if( alien_yvel > 0 )
+ alien_yvel = 0;
+ break;
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ .
+ .
+ /* Update the alien position */
+ alien_x += alien_xvel;
+ alien_y += alien_yvel;
As can be seen, we use two extra variables, alien_xvel and alien_yvel, which represent the motion of the ship, it is these variables that we update when we detect keypresses and releases.
\ No newline at end of file
diff --git a/docs/html/guidepreface.html b/docs/html/guidepreface.html
new file mode 100644
index 0000000..9986fc6
--- /dev/null
+++ b/docs/html/guidepreface.html
@@ -0,0 +1,178 @@
+Preface
The SDL library is designed to make it easy to write games that run on Linux, *BSD, MacOS, Win32 and BeOS using the various native high-performance media interfaces, (for video, audio, etc) and presenting a single source-code level API to your application. SDL is a fairly low level API, but using it, completely portable applications can be written with a great deal of flexibility.
\ No newline at end of file
diff --git a/docs/html/guidethebasics.html b/docs/html/guidethebasics.html
new file mode 100644
index 0000000..4f32363
--- /dev/null
+++ b/docs/html/guidethebasics.html
@@ -0,0 +1,173 @@
+The Basics
\ No newline at end of file
diff --git a/docs/html/guidetimeexamples.html b/docs/html/guidetimeexamples.html
new file mode 100644
index 0000000..42b5019
--- /dev/null
+++ b/docs/html/guidetimeexamples.html
@@ -0,0 +1,183 @@
+Time Examples
\ No newline at end of file
diff --git a/docs/html/guidevideo.html b/docs/html/guidevideo.html
new file mode 100644
index 0000000..85da77d
--- /dev/null
+++ b/docs/html/guidevideo.html
@@ -0,0 +1,463 @@
+Graphics and Video
Video is probably the most common thing that SDL is used for, and
+so it has the most complete subsystem. Here are a few
+examples to demonstrate the basics.
Initializing the Video Display
This is what almost all SDL programs have to do in one way or
+another.
Example 2-1. Initializing the Video Display
SDL_Surface *screen;
+
+ /* Initialize the SDL library */
+ if( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
+ fprintf(stderr,
+ "Couldn't initialize SDL: %s\n", SDL_GetError());
+ exit(1);
+ }
+
+ /* Clean up on exit */
+ atexit(SDL_Quit);
+
+ /*
+ * Initialize the display in a 640x480 8-bit palettized mode,
+ * requesting a software surface
+ */
+ screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE);
+ if ( screen == NULL ) {
+ fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
+ SDL_GetError());
+ exit(1);
+ }
Initializing the Best Video Mode
If you have a preference for a certain pixel depth but will accept any
+other, use SDL_SetVideoMode with SDL_ANYFORMAT as below. You can also
+use SDL_VideoModeOK() to find the native video mode that is closest to
+the mode you request.
Example 2-2. Initializing the Best Video Mode
/* Have a preference for 8-bit, but accept any depth */
+ screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE|SDL_ANYFORMAT);
+ if ( screen == NULL ) {
+ fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n",
+ SDL_GetError());
+ exit(1);
+ }
+ printf("Set 640x480 at %d bits-per-pixel mode\n",
+ screen->format->BitsPerPixel);
Loading and Displaying a BMP File
The following function loads and displays a BMP file given as
+argument, once SDL is initialised and a video mode has been set.
Example 2-3. Loading and Displaying a BMP File
void display_bmp(char *file_name)
+{
+ SDL_Surface *image;
+
+ /* Load the BMP file into a surface */
+ image = SDL_LoadBMP(file_name);
+ if (image == NULL) {
+ fprintf(stderr, "Couldn't load %s: %s\n", file_name, SDL_GetError());
+ return;
+ }
+
+ /*
+ * Palettized screen modes will have a default palette (a standard
+ * 8*8*4 colour cube), but if the image is palettized as well we can
+ * use that palette for a nicer colour matching
+ */
+ if (image->format->palette && screen->format->palette) {
+ SDL_SetColors(screen, image->format->palette->colors, 0,
+ image->format->palette->ncolors);
+ }
+
+ /* Blit onto the screen surface */
+ if(SDL_BlitSurface(image, NULL, screen, NULL) < 0)
+ fprintf(stderr, "BlitSurface error: %s\n", SDL_GetError());
+
+ SDL_UpdateRect(screen, 0, 0, image->w, image->h);
+
+ /* Free the allocated BMP surface */
+ SDL_FreeSurface(image);
+}
Drawing Directly to the Display
The following two functions can be used to get and set single
+pixels of a surface. They are carefully written to work with any depth
+currently supported by SDL. Remember to lock the surface before
+calling them, and to unlock it before calling any other SDL
+functions.
To convert between pixel values and their red, green, blue
+components, use SDL_GetRGB() and SDL_MapRGB().
Example 2-4. getpixel()
/*
+ * Return the pixel value at (x, y)
+ * NOTE: The surface must be locked before calling this!
+ */
+Uint32 getpixel(SDL_Surface *surface, int x, int y)
+{
+ int bpp = surface->format->BytesPerPixel;
+ /* Here p is the address to the pixel we want to retrieve */
+ Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
+
+ switch(bpp) {
+ case 1:
+ return *p;
+
+ case 2:
+ return *(Uint16 *)p;
+
+ case 3:
+ if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
+ return p[0] << 16 | p[1] << 8 | p[2];
+ else
+ return p[0] | p[1] << 8 | p[2] << 16;
+
+ case 4:
+ return *(Uint32 *)p;
+
+ default:
+ return 0; /* shouldn't happen, but avoids warnings */
+ }
+}
Example 2-5. putpixel()
/*
+ * Set the pixel at (x, y) to the given value
+ * NOTE: The surface must be locked before calling this!
+ */
+void putpixel(SDL_Surface *surface, int x, int y, Uint32 pixel)
+{
+ int bpp = surface->format->BytesPerPixel;
+ /* Here p is the address to the pixel we want to set */
+ Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
+
+ switch(bpp) {
+ case 1:
+ *p = pixel;
+ break;
+
+ case 2:
+ *(Uint16 *)p = pixel;
+ break;
+
+ case 3:
+ if(SDL_BYTEORDER == SDL_BIG_ENDIAN) {
+ p[0] = (pixel >> 16) & 0xff;
+ p[1] = (pixel >> 8) & 0xff;
+ p[2] = pixel & 0xff;
+ } else {
+ p[0] = pixel & 0xff;
+ p[1] = (pixel >> 8) & 0xff;
+ p[2] = (pixel >> 16) & 0xff;
+ }
+ break;
+
+ case 4:
+ *(Uint32 *)p = pixel;
+ break;
+ }
+}
The following code uses the putpixel() function above to set a
+yellow pixel in the middle of the screen.
Example 2-6. Using putpixel()
/* Code to set a yellow pixel at the center of the screen */
+
+ int x, y;
+ Uint32 yellow;
+
+ /* Map the color yellow to this display (R=0xff, G=0xFF, B=0x00)
+ Note: If the display is palettized, you must set the palette first.
+ */
+ yellow = SDL_MapRGB(screen->format, 0xff, 0xff, 0x00);
+
+ x = screen->w / 2;
+ y = screen->h / 2;
+
+ /* Lock the screen for direct access to the pixels */
+ if ( SDL_MUSTLOCK(screen) ) {
+ if ( SDL_LockSurface(screen) < 0 ) {
+ fprintf(stderr, "Can't lock screen: %s\n", SDL_GetError());
+ return;
+ }
+ }
+
+ putpixel(screen, x, y, yellow);
+
+ if ( SDL_MUSTLOCK(screen) ) {
+ SDL_UnlockSurface(screen);
+ }
+ /* Update just the part of the display that we've changed */
+ SDL_UpdateRect(screen, x, y, 1, 1);
+
+ return;
\ No newline at end of file
diff --git a/docs/html/guidevideoopengl.html b/docs/html/guidevideoopengl.html
new file mode 100644
index 0000000..0abd567
--- /dev/null
+++ b/docs/html/guidevideoopengl.html
@@ -0,0 +1,730 @@
+Using OpenGL With SDL
SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, Mac OS X, FreeBSD/X11 and Solaris/X11). This allows you to use SDL's audio, event handling, threads and times in your OpenGL applications (a function often performed by GLUT).
Initialisation
Initialising SDL to use OpenGL is not very different to initialising SDL normally. There are three differences; you must pass SDL_OPENGL to SDL_SetVideoMode, you must specify several GL attributes (depth buffer size, framebuffer sizes) using SDL_GL_SetAttribute and finally, if you wish to use double buffering you must specify it as a GL attribute, not by passing the SDL_DOUBLEBUF flag to SDL_SetVideoMode.
Example 2-7. Initializing SDL with OpenGL
/* Information about the current video settings. */
+ const SDL_VideoInfo* info = NULL;
+ /* Dimensions of our window. */
+ int width = 0;
+ int height = 0;
+ /* Color depth in bits of our window. */
+ int bpp = 0;
+ /* Flags we will pass into SDL_SetVideoMode. */
+ int flags = 0;
+
+ /* First, initialize SDL's video subsystem. */
+ if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
+ /* Failed, exit. */
+ fprintf( stderr, "Video initialization failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
+
+ /* Let's get some video information. */
+ info = SDL_GetVideoInfo( );
+
+ if( !info ) {
+ /* This should probably never happen. */
+ fprintf( stderr, "Video query failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
+
+ /*
+ * Set our width/height to 640/480 (you would
+ * of course let the user decide this in a normal
+ * app). We get the bpp we will request from
+ * the display. On X11, VidMode can't change
+ * resolution, so this is probably being overly
+ * safe. Under Win32, ChangeDisplaySettings
+ * can change the bpp.
+ */
+ width = 640;
+ height = 480;
+ bpp = info->vfmt->BitsPerPixel;
+
+ /*
+ * Now, we want to setup our requested
+ * window attributes for our OpenGL window.
+ * We want *at least* 5 bits of red, green
+ * and blue. We also want at least a 16-bit
+ * depth buffer.
+ *
+ * The last thing we do is request a double
+ * buffered window. '1' turns on double
+ * buffering, '0' turns it off.
+ *
+ * Note that we do not use SDL_DOUBLEBUF in
+ * the flags to SDL_SetVideoMode. That does
+ * not affect the GL attribute state, only
+ * the standard 2D blitting setup.
+ */
+ SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
+ SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+
+ /*
+ * We want to request that SDL provide us
+ * with an OpenGL window, in a fullscreen
+ * video mode.
+ *
+ * EXERCISE:
+ * Make starting windowed an option, and
+ * handle the resize events properly with
+ * glViewport.
+ */
+ flags = SDL_OPENGL | SDL_FULLSCREEN;
+
+ /*
+ * Set the video mode
+ */
+ if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
+ /*
+ * This could happen for a variety of reasons,
+ * including DISPLAY not being set, the specified
+ * resolution not being available, etc.
+ */
+ fprintf( stderr, "Video mode set failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
Drawing
Apart from initialisation, using OpenGL within SDL is the same as using OpenGL
+with any other API, e.g. GLUT. You still use all the same function calls and
+data types. However if you are using a double-buffered display, then you must
+use
+SDL_GL_SwapBuffers()
+to swap the buffers and update the display. To request double-buffering
+with OpenGL, use
+SDL_GL_SetAttribute
+with SDL_GL_DOUBLEBUFFER, and use
+SDL_GL_GetAttribute
+to see if you actually got it.
A full example code listing is now presented below.
Example 2-8. SDL and OpenGL
/*
+ * SDL OpenGL Tutorial.
+ * (c) Michael Vance, 2000
+ * briareos@lokigames.com
+ *
+ * Distributed under terms of the LGPL.
+ */
+
+#include <SDL/SDL.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static GLboolean should_rotate = GL_TRUE;
+
+static void quit_tutorial( int code )
+{
+ /*
+ * Quit SDL so we can release the fullscreen
+ * mode and restore the previous video settings,
+ * etc.
+ */
+ SDL_Quit( );
+
+ /* Exit program. */
+ exit( code );
+}
+
+static void handle_key_down( SDL_keysym* keysym )
+{
+
+ /*
+ * We're only interested if 'Esc' has
+ * been presssed.
+ *
+ * EXERCISE:
+ * Handle the arrow keys and have that change the
+ * viewing position/angle.
+ */
+ switch( keysym->sym ) {
+ case SDLK_ESCAPE:
+ quit_tutorial( 0 );
+ break;
+ case SDLK_SPACE:
+ should_rotate = !should_rotate;
+ break;
+ default:
+ break;
+ }
+
+}
+
+static void process_events( void )
+{
+ /* Our SDL event placeholder. */
+ SDL_Event event;
+
+ /* Grab all the events off the queue. */
+ while( SDL_PollEvent( &event ) ) {
+
+ switch( event.type ) {
+ case SDL_KEYDOWN:
+ /* Handle key presses. */
+ handle_key_down( &event.key.keysym );
+ break;
+ case SDL_QUIT:
+ /* Handle quit requests (like Ctrl-c). */
+ quit_tutorial( 0 );
+ break;
+ }
+
+ }
+
+}
+
+static void draw_screen( void )
+{
+ /* Our angle of rotation. */
+ static float angle = 0.0f;
+
+ /*
+ * EXERCISE:
+ * Replace this awful mess with vertex
+ * arrays and a call to glDrawElements.
+ *
+ * EXERCISE:
+ * After completing the above, change
+ * it to use compiled vertex arrays.
+ *
+ * EXERCISE:
+ * Verify my windings are correct here ;).
+ */
+ static GLfloat v0[] = { -1.0f, -1.0f, 1.0f };
+ static GLfloat v1[] = { 1.0f, -1.0f, 1.0f };
+ static GLfloat v2[] = { 1.0f, 1.0f, 1.0f };
+ static GLfloat v3[] = { -1.0f, 1.0f, 1.0f };
+ static GLfloat v4[] = { -1.0f, -1.0f, -1.0f };
+ static GLfloat v5[] = { 1.0f, -1.0f, -1.0f };
+ static GLfloat v6[] = { 1.0f, 1.0f, -1.0f };
+ static GLfloat v7[] = { -1.0f, 1.0f, -1.0f };
+ static GLubyte red[] = { 255, 0, 0, 255 };
+ static GLubyte green[] = { 0, 255, 0, 255 };
+ static GLubyte blue[] = { 0, 0, 255, 255 };
+ static GLubyte white[] = { 255, 255, 255, 255 };
+ static GLubyte yellow[] = { 0, 255, 255, 255 };
+ static GLubyte black[] = { 0, 0, 0, 255 };
+ static GLubyte orange[] = { 255, 255, 0, 255 };
+ static GLubyte purple[] = { 255, 0, 255, 0 };
+
+ /* Clear the color and depth buffers. */
+ glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+
+ /* We don't want to modify the projection matrix. */
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity( );
+
+ /* Move down the z-axis. */
+ glTranslatef( 0.0, 0.0, -5.0 );
+
+ /* Rotate. */
+ glRotatef( angle, 0.0, 1.0, 0.0 );
+
+ if( should_rotate ) {
+
+ if( ++angle > 360.0f ) {
+ angle = 0.0f;
+ }
+
+ }
+
+ /* Send our triangle data to the pipeline. */
+ glBegin( GL_TRIANGLES );
+
+ glColor4ubv( red );
+ glVertex3fv( v0 );
+ glColor4ubv( green );
+ glVertex3fv( v1 );
+ glColor4ubv( blue );
+ glVertex3fv( v2 );
+
+ glColor4ubv( red );
+ glVertex3fv( v0 );
+ glColor4ubv( blue );
+ glVertex3fv( v2 );
+ glColor4ubv( white );
+ glVertex3fv( v3 );
+
+ glColor4ubv( green );
+ glVertex3fv( v1 );
+ glColor4ubv( black );
+ glVertex3fv( v5 );
+ glColor4ubv( orange );
+ glVertex3fv( v6 );
+
+ glColor4ubv( green );
+ glVertex3fv( v1 );
+ glColor4ubv( orange );
+ glVertex3fv( v6 );
+ glColor4ubv( blue );
+ glVertex3fv( v2 );
+
+ glColor4ubv( black );
+ glVertex3fv( v5 );
+ glColor4ubv( yellow );
+ glVertex3fv( v4 );
+ glColor4ubv( purple );
+ glVertex3fv( v7 );
+
+ glColor4ubv( black );
+ glVertex3fv( v5 );
+ glColor4ubv( purple );
+ glVertex3fv( v7 );
+ glColor4ubv( orange );
+ glVertex3fv( v6 );
+
+ glColor4ubv( yellow );
+ glVertex3fv( v4 );
+ glColor4ubv( red );
+ glVertex3fv( v0 );
+ glColor4ubv( white );
+ glVertex3fv( v3 );
+
+ glColor4ubv( yellow );
+ glVertex3fv( v4 );
+ glColor4ubv( white );
+ glVertex3fv( v3 );
+ glColor4ubv( purple );
+ glVertex3fv( v7 );
+
+ glColor4ubv( white );
+ glVertex3fv( v3 );
+ glColor4ubv( blue );
+ glVertex3fv( v2 );
+ glColor4ubv( orange );
+ glVertex3fv( v6 );
+
+ glColor4ubv( white );
+ glVertex3fv( v3 );
+ glColor4ubv( orange );
+ glVertex3fv( v6 );
+ glColor4ubv( purple );
+ glVertex3fv( v7 );
+
+ glColor4ubv( green );
+ glVertex3fv( v1 );
+ glColor4ubv( red );
+ glVertex3fv( v0 );
+ glColor4ubv( yellow );
+ glVertex3fv( v4 );
+
+ glColor4ubv( green );
+ glVertex3fv( v1 );
+ glColor4ubv( yellow );
+ glVertex3fv( v4 );
+ glColor4ubv( black );
+ glVertex3fv( v5 );
+
+ glEnd( );
+
+ /*
+ * EXERCISE:
+ * Draw text telling the user that 'Spc'
+ * pauses the rotation and 'Esc' quits.
+ * Do it using vetors and textured quads.
+ */
+
+ /*
+ * Swap the buffers. This this tells the driver to
+ * render the next frame from the contents of the
+ * back-buffer, and to set all rendering operations
+ * to occur on what was the front-buffer.
+ *
+ * Double buffering prevents nasty visual tearing
+ * from the application drawing on areas of the
+ * screen that are being updated at the same time.
+ */
+ SDL_GL_SwapBuffers( );
+}
+
+static void setup_opengl( int width, int height )
+{
+ float ratio = (float) width / (float) height;
+
+ /* Our shading model--Gouraud (smooth). */
+ glShadeModel( GL_SMOOTH );
+
+ /* Culling. */
+ glCullFace( GL_BACK );
+ glFrontFace( GL_CCW );
+ glEnable( GL_CULL_FACE );
+
+ /* Set the clear color. */
+ glClearColor( 0, 0, 0, 0 );
+
+ /* Setup our viewport. */
+ glViewport( 0, 0, width, height );
+
+ /*
+ * Change to the projection matrix and set
+ * our viewing volume.
+ */
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity( );
+ /*
+ * EXERCISE:
+ * Replace this with a call to glFrustum.
+ */
+ gluPerspective( 60.0, ratio, 1.0, 1024.0 );
+}
+
+int main( int argc, char* argv[] )
+{
+ /* Information about the current video settings. */
+ const SDL_VideoInfo* info = NULL;
+ /* Dimensions of our window. */
+ int width = 0;
+ int height = 0;
+ /* Color depth in bits of our window. */
+ int bpp = 0;
+ /* Flags we will pass into SDL_SetVideoMode. */
+ int flags = 0;
+
+ /* First, initialize SDL's video subsystem. */
+ if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
+ /* Failed, exit. */
+ fprintf( stderr, "Video initialization failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
+
+ /* Let's get some video information. */
+ info = SDL_GetVideoInfo( );
+
+ if( !info ) {
+ /* This should probably never happen. */
+ fprintf( stderr, "Video query failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
+
+ /*
+ * Set our width/height to 640/480 (you would
+ * of course let the user decide this in a normal
+ * app). We get the bpp we will request from
+ * the display. On X11, VidMode can't change
+ * resolution, so this is probably being overly
+ * safe. Under Win32, ChangeDisplaySettings
+ * can change the bpp.
+ */
+ width = 640;
+ height = 480;
+ bpp = info->vfmt->BitsPerPixel;
+
+ /*
+ * Now, we want to setup our requested
+ * window attributes for our OpenGL window.
+ * We want *at least* 5 bits of red, green
+ * and blue. We also want at least a 16-bit
+ * depth buffer.
+ *
+ * The last thing we do is request a double
+ * buffered window. '1' turns on double
+ * buffering, '0' turns it off.
+ *
+ * Note that we do not use SDL_DOUBLEBUF in
+ * the flags to SDL_SetVideoMode. That does
+ * not affect the GL attribute state, only
+ * the standard 2D blitting setup.
+ */
+ SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
+ SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
+ SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
+
+ /*
+ * We want to request that SDL provide us
+ * with an OpenGL window, in a fullscreen
+ * video mode.
+ *
+ * EXERCISE:
+ * Make starting windowed an option, and
+ * handle the resize events properly with
+ * glViewport.
+ */
+ flags = SDL_OPENGL | SDL_FULLSCREEN;
+
+ /*
+ * Set the video mode
+ */
+ if( SDL_SetVideoMode( width, height, bpp, flags ) == 0 ) {
+ /*
+ * This could happen for a variety of reasons,
+ * including DISPLAY not being set, the specified
+ * resolution not being available, etc.
+ */
+ fprintf( stderr, "Video mode set failed: %s\n",
+ SDL_GetError( ) );
+ quit_tutorial( 1 );
+ }
+
+ /*
+ * At this point, we should have a properly setup
+ * double-buffered window for use with OpenGL.
+ */
+ setup_opengl( width, height );
+
+ /*
+ * Now we want to begin our normal app process--
+ * an event loop with a lot of redrawing.
+ */
+ while( 1 ) {
+ /* Process incoming events. */
+ process_events( );
+ /* Draw the screen. */
+ draw_screen( );
+ }
+
+ /*
+ * EXERCISE:
+ * Record timings using SDL_GetTicks() and
+ * and print out frames per second at program
+ * end.
+ */
+
+ /* Never reached. */
+ return 0;
+}
\ No newline at end of file
diff --git a/docs/html/index.html b/docs/html/index.html
new file mode 100644
index 0000000..f86ff19
--- /dev/null
+++ b/docs/html/index.html
@@ -0,0 +1,1156 @@
+
\ No newline at end of file
diff --git a/docs/html/joystick.html b/docs/html/joystick.html
new file mode 100644
index 0000000..abdb28c
--- /dev/null
+++ b/docs/html/joystick.html
@@ -0,0 +1,296 @@
+Joystick
Joysticks, and other similar input devices, have a very strong role in game playing and SDL provides comprehensive support for them. Axes, Buttons, POV Hats and trackballs are all supported.
Joystick support is initialized by passed the SDL_INIT_JOYSTICK flag to SDL_Init. Once initilized joysticks must be opened using SDL_JoystickOpen.
While using the functions describe in this secton may seem like the best way to access and read from joysticks, in most cases they aren't. Ideally joysticks should be read using the event system. To enable this, you must set the joystick event processing state with SDL_JoystickEventState. Joysticks must be opened before they can be used of course.
Note: If you are not handling the joystick via the event queue then you must explicitly request a joystick update by calling SDL_JoystickUpdate.
Note: Force Feedback is not yet support. Sam (slouken@libsdl.org) is soliciting suggestions from people with force-feedback experience on the best wat to desgin the API.
\ No newline at end of file
diff --git a/docs/html/reference.html b/docs/html/reference.html
new file mode 100644
index 0000000..e7707a7
--- /dev/null
+++ b/docs/html/reference.html
@@ -0,0 +1,194 @@
+SDL Reference
\ No newline at end of file
diff --git a/docs/html/sdlactiveevent.html b/docs/html/sdlactiveevent.html
new file mode 100644
index 0000000..d3f2821
--- /dev/null
+++ b/docs/html/sdlactiveevent.html
@@ -0,0 +1,335 @@
+SDL_ActiveEvent
SDL_APPMOUSEFOCUS if mouse focus was gained or lost, SDL_APPINPUTFOCUS if input focus was gained or lost, or SDL_APPACTIVE if the application was iconified (gain=0) or restored(gain=1).
Description
SDL_ActiveEvent is a member of the SDL_Event union and is used when an event of type SDL_ACTIVEEVENT is reported.
When the mouse leaves or enters the window area a SDL_APPMOUSEFOCUS type activation event occurs, if the mouse entered the window then gain will be 1, otherwise gain will be 0. A SDL_APPINPUTFOCUS type activation event occurs when the application loses or gains keyboard focus. This usually occurs when another application is made active. Finally, a SDL_APPACTIVE type event occurs when the application is either minimised/iconified (gain=0) or restored.
Note: This event does not occur when an application window is first created.
\ No newline at end of file
diff --git a/docs/html/sdladdtimer.html b/docs/html/sdladdtimer.html
new file mode 100644
index 0000000..81c49e5
--- /dev/null
+++ b/docs/html/sdladdtimer.html
@@ -0,0 +1,296 @@
+SDL_AddTimer
/* type definition for the "new" timer callback function */
+typedef Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param);
Description
Adds a callback function to be run after the specified number of
+milliseconds has elapsed. The callback function is passed the current
+timer interval and the user supplied parameter from the
+SDL_AddTimer call and returns the next timer
+interval. If the returned value from the callback is the same as the one
+passed in, the periodic alarm continues, otherwise a new alarm is
+scheduled.
To cancel a currently running timer call
+SDL_RemoveTimer with the
+timer ID returned from
+SDL_AddTimer.
The timer callback function may run in a different thread than your
+main program, and so shouldn't call any functions from within itself.
+You may always call SDL_PushEvent, however.
The granularity of the timer is platform-dependent, but you should count
+on it being at least 10 ms as this is the most common number.
+This means that if
+you request a 16 ms timer, your callback will run approximately 20 ms
+later on an unloaded system. If you wanted to set a flag signaling
+a frame update at 30 frames per second (every 33 ms), you might set a
+timer for 30 ms (see example below).
+
+If you use this function, you need to pass SDL_INIT_TIMER
+to SDL_Init.
Return Value
Returns an ID value for the added timer or
+NULL if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlaudiocvt.html b/docs/html/sdlaudiocvt.html
new file mode 100644
index 0000000..ff39209
--- /dev/null
+++ b/docs/html/sdlaudiocvt.html
@@ -0,0 +1,556 @@
+SDL_AudioCVT
typedef struct{
+ int needed;
+ Uint16 src_format;
+ Uint16 dest_format;
+ double rate_incr;
+ Uint8 *buf;
+ int len;
+ int len_cvt;
+ int len_mult;
+ double len_ratio;
+ void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
+ int filter_index;
+} SDL_AudioCVT;
Structure Data
needed
Set to one if the conversion is possible
src_format
Audio format of the source
dest_format
Audio format of the destination
rate_incr
Rate conversion increment
buf
Audio buffer
len
Length of the original audio buffer in bytes
len_cvt
Length of converted audio buffer in bytes (calculated)
len_mult
buf must be len*len_mult bytes in size(calculated)
len_ratio
Final audio size is len*len_ratio
filters[10](..)
Pointers to functions needed for this conversion
filter_index
Current conversion function
Description
The SDL_AudioCVT is used to convert audio data between different formats. A SDL_AudioCVT structure is created with the SDL_BuildAudioCVT function, while the actual conversion is done by the SDL_ConvertAudio function.
Many of the fields in the SDL_AudioCVT structure should be considered private and their function will not be discussed here.
Uint8 *buf
This points to the audio data that will be used in the conversion. It is both the source and the destination, which means the converted audio data overwrites the original data. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure buf is large enough. See below.
intlen
This is the length of the original audio data in bytes.
intlen_mult
As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data. The length of buf should be len*len_mult.
doublelen_ratio
When you have finished converting your audio data, you need to know how much of your audio buffer is valid. len*len_ratio is the size of the converted audio data in bytes. This is very similar to len_mult, however when the convert audio data is shorter than the original len_mult would be 1. len_ratio, on the other hand, would be a fractional number between 0 and 1.
\ No newline at end of file
diff --git a/docs/html/sdlaudiospec.html b/docs/html/sdlaudiospec.html
new file mode 100644
index 0000000..fc6fa75
--- /dev/null
+++ b/docs/html/sdlaudiospec.html
@@ -0,0 +1,589 @@
+SDL_AudioSpec
Pointer the user data which is passed to the callback function
Description
The SDL_AudioSpec structure is used to describe the format of some audio data. This structure is used by SDL_OpenAudio and SDL_LoadWAV. While all fields are used by SDL_OpenAudio only freq, format, samples and channels are used by SDL_LoadWAV. We will detail these common members here.
freq
The number of samples sent to the sound device every second. Common values are 11025, 22050 and 44100. The higher the better.
format
Specifies the size and type of each sample element
+
AUDIO_U8
Unsigned 8-bit samples
AUDIO_S8
Signed 8-bit samples
AUDIO_U16 or AUDIO_U16LSB
Unsigned 16-bit little-endian samples
AUDIO_S16 or AUDIO_S16LSB
Signed 16-bit little-endian samples
AUDIO_U16MSB
Unsigned 16-bit big-endian samples
AUDIO_S16MSB
Signed 16-bit big-endian samples
AUDIO_U16SYS
Either AUDIO_U16LSB or AUDIO_U16MSB depending on you systems endianness
AUDIO_S16SYS
Either AUDIO_S16LSB or AUDIO_S16MSB depending on you systems endianness
channels
The number of seperate sound channels. 1 is mono (single channel), 2 is stereo (dual channel).
samples
When used with SDL_OpenAudio this refers to the size of the audio buffer in samples. A sample a chunk of audio data of the size specified in format mulitplied by the number of channels. When the SDL_AudioSpec is used with SDL_LoadWAVsamples is set to 4096.
\ No newline at end of file
diff --git a/docs/html/sdlblitsurface.html b/docs/html/sdlblitsurface.html
new file mode 100644
index 0000000..3123ff5
--- /dev/null
+++ b/docs/html/sdlblitsurface.html
@@ -0,0 +1,339 @@
+SDL_BlitSurface
SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.
Synopsis
#include "SDL.h"
int SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect);
Description
This performs a fast blit from the source surface to the destination surface.
The width and height in srcrect determine the
+size of the copied rectangle. Only the position is used in the
+dstrect (the width and height are ignored).
If srcrect is NULL, the
+entire surface is copied. If dstrect is
+NULL, then the destination position (upper left
+corner) is (0, 0).
The final blit rectangle is saved in
+dstrect after all clipping is performed
+(srcrect is not modified).
The blit function should not be called on a locked surface.
The results of blitting operations vary greatly depending on whether SDL_SRCAPLHA is set or not. See SDL_SetAlpha for an explaination of how this affects your results. Colorkeying and alpha attributes also interact with surface blitting, as the following pseudo-code should hopefully explain.
+
if (source surface has SDL_SRCALPHA set) {
+ if (source surface has alpha channel (that is, format->Amask != 0))
+ blit using per-pixel alpha, ignoring any colour key
+ else {
+ if (source surface has SDL_SRCCOLORKEY set)
+ blit using the colour key AND the per-surface alpha value
+ else
+ blit using the per-surface alpha value
+ }
+} else {
+ if (source surface has SDL_SRCCOLORKEY set)
+ blit using the colour key
+ else
+ ordinary opaque rectangular blit
+}
Return Value
If the blit is successful, it returns 0,
+otherwise it returns -1.
If either of the surfaces were in video memory, and the blit returns
+-2, the video memory was lost, so it should be
+reloaded with artwork and re-blitted:
+
+This happens under DirectX 5.0 when the system switches away from your
+fullscreen application. Locking the surface will also fail until you
+have access to the video memory again.
\ No newline at end of file
diff --git a/docs/html/sdlbuildaudiocvt.html b/docs/html/sdlbuildaudiocvt.html
new file mode 100644
index 0000000..2e8420e
--- /dev/null
+++ b/docs/html/sdlbuildaudiocvt.html
@@ -0,0 +1,291 @@
+SDL_BuildAudioCVT
SDL_BuildAudioCVT -- Initializes a SDL_AudioCVT structure for conversion
Synopsis
#include "SDL.h"
int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate);
Description
Before an SDL_AudioCVT structure can be used to convert audio data it must be initialized with source and destination information.
src_format and dst_format are the source and destination format of the conversion. (For information on audio formats see SDL_AudioSpec). src_channels and dst_channels are the number of channels in the source and destination formats. Finally, src_rate and dst_rate are the frequency or samples-per-second of the source and destination formats. Once again, see SDL_AudioSpec.
Return Values
Returns -1 if the filter could not be built or 1 if it could.
\ No newline at end of file
diff --git a/docs/html/sdlcd.html b/docs/html/sdlcd.html
new file mode 100644
index 0000000..6f8a7cd
--- /dev/null
+++ b/docs/html/sdlcd.html
@@ -0,0 +1,359 @@
+SDL_CD
An SDL_CD structure is returned by SDL_CDOpen. It represents an opened CDROM device and stores information on the layout of the tracks on the disc.
A frame is the base data unit of a CD. CD_FPS frames is equal to 1 second of music. SDL provides two macros for converting between time and frames: FRAMES_TO_MSF(f, M,S,F) and MSF_TO_FRAMES.
\ No newline at end of file
diff --git a/docs/html/sdlcdclose.html b/docs/html/sdlcdclose.html
new file mode 100644
index 0000000..2a984a8
--- /dev/null
+++ b/docs/html/sdlcdclose.html
@@ -0,0 +1,217 @@
+SDL_CDClose
\ No newline at end of file
diff --git a/docs/html/sdlcdeject.html b/docs/html/sdlcdeject.html
new file mode 100644
index 0000000..03a3b78
--- /dev/null
+++ b/docs/html/sdlcdeject.html
@@ -0,0 +1,226 @@
+SDL_CDEject
\ No newline at end of file
diff --git a/docs/html/sdlcdname.html b/docs/html/sdlcdname.html
new file mode 100644
index 0000000..55a18e2
--- /dev/null
+++ b/docs/html/sdlcdname.html
@@ -0,0 +1,239 @@
+SDL_CDName
SDL_CDName -- Returns a human-readable, system-dependent identifier for the CD-ROM.
Synopsis
#include "SDL.h"
const char *SDL_CDName(int drive);
Description
Returns a human-readable, system-dependent identifier for the CD-ROM. drive is the index of the drive. Drive indices start to 0 and end at SDL_CDNumDrives()-1.
\ No newline at end of file
diff --git a/docs/html/sdlcdnumdrives.html b/docs/html/sdlcdnumdrives.html
new file mode 100644
index 0000000..9816a73
--- /dev/null
+++ b/docs/html/sdlcdnumdrives.html
@@ -0,0 +1,205 @@
+SDL_CDNumDrives
\ No newline at end of file
diff --git a/docs/html/sdlcdopen.html b/docs/html/sdlcdopen.html
new file mode 100644
index 0000000..09a6bd9
--- /dev/null
+++ b/docs/html/sdlcdopen.html
@@ -0,0 +1,275 @@
+SDL_CDOpen
Opens a CD-ROM drive for access. It returns a SDL_CD structure on success, or NULL if the drive was invalid or busy. This newly opened CD-ROM becomes the default CD used when other CD functions are passed a NULL CD-ROM handle.
Drives are numbered starting with 0.
+Drive 0 is the system default CD-ROM.
Examples
SDL_CD *cdrom;
+int cur_track;
+int min, sec, frame;
+SDL_Init(SDL_INIT_CDROM);
+atexit(SDL_Quit);
+
+/* Check for CD drives */
+if(!SDL_CDNumDrives()){
+ /* None found */
+ fprintf(stderr, "No CDROM devices available\n");
+ exit(-1);
+}
+
+/* Open the default drive */
+cdrom=SDL_CDOpen(0);
+
+/* Did if open? Check if cdrom is NULL */
+if(!cdrom){
+ fprintf(stderr, "Couldn't open drive: %s\n", SDL_GetError());
+ exit(-1);
+}
+
+/* Print Volume info */
+printf("Name: %s\n", SDL_CDName(0));
+printf("Tracks: %d\n", cdrom->numtracks);
+for(cur_track=0;cur_track < cdrom->numtracks; cur_track++){
+ FRAMES_TO_MSF(cdrom->track[cur_track].length, &min, &sec, &frame);
+ printf("\tTrack %d: Length %d:%d\n", cur_track, min, sec);
+}
+
+SDL_CDClose(cdrom);
\ No newline at end of file
diff --git a/docs/html/sdlcdpause.html b/docs/html/sdlcdpause.html
new file mode 100644
index 0000000..4def8e3
--- /dev/null
+++ b/docs/html/sdlcdpause.html
@@ -0,0 +1,233 @@
+SDL_CDPause
\ No newline at end of file
diff --git a/docs/html/sdlcdplay.html b/docs/html/sdlcdplay.html
new file mode 100644
index 0000000..dc6489c
--- /dev/null
+++ b/docs/html/sdlcdplay.html
@@ -0,0 +1,243 @@
+SDL_CDPlay
\ No newline at end of file
diff --git a/docs/html/sdlcdplaytracks.html b/docs/html/sdlcdplaytracks.html
new file mode 100644
index 0000000..7546181
--- /dev/null
+++ b/docs/html/sdlcdplaytracks.html
@@ -0,0 +1,325 @@
+SDL_CDPlayTracks
int SDL_CDPlayTracks(SDL_CD *cdrom, int start_track, int start_frame, int ntracks, int nframes));
Description
SDL_CDPlayTracks plays the given CD starting at track
+start_track, for ntracks tracks.
start_frame is the frame offset, from the beginning of the start_track, at which to start. nframes is the frame offset, from the beginning of the last track (start_track+ntracks), at which to end playing.
SDL_CDPlayTracks should only be called after calling
+SDL_CDStatus
+to get track information about the CD.
Note: Data tracks are ignored.
Return Value
Returns 0, or -1
+if there was an error.
Examples
/* assuming cdrom is a previously opened device */
+/* Play the entire CD */
+if(CD_INDRIVE(SDL_CDStatus(cdrom)))
+ SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
+
+/* Play the first track */
+if(CD_INDRIVE(SDL_CDStatus(cdrom)))
+ SDL_CDPlayTracks(cdrom, 0, 0, 1, 0);
+
+/* Play first 15 seconds of the 2nd track */
+if(CD_INDRIVE(SDL_CDStatus(cdrom)))
+ SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15);
\ No newline at end of file
diff --git a/docs/html/sdlcdresume.html b/docs/html/sdlcdresume.html
new file mode 100644
index 0000000..4a25ab6
--- /dev/null
+++ b/docs/html/sdlcdresume.html
@@ -0,0 +1,233 @@
+SDL_CDResume
\ No newline at end of file
diff --git a/docs/html/sdlcdstatus.html b/docs/html/sdlcdstatus.html
new file mode 100644
index 0000000..3ebf965
--- /dev/null
+++ b/docs/html/sdlcdstatus.html
@@ -0,0 +1,273 @@
+SDL_CDStatus
If the drive has a CD in it, the table of contents of the CD and current
+play position of the CD will be stored in the SDL_CD structure.
The macro CD_INDRIVE is provided for convenience,
+and given a status returns true if there's a disk in the drive.
Note: SDL_CDStatus also updates the SDL_CD structure passed to it.
Example
int playTrack(int track)
+{
+ int playing = 0;
+
+ if ( CD_INDRIVE(SDL_CDStatus(cdrom)) ) {
+ /* clamp to the actual number of tracks on the CD */
+ if (track >= cdrom->numtracks) {
+ track = cdrom->numtracks-1;
+ }
+
+ if ( SDL_CDPlayTracks(cdrom, track, 0, 1, 0) == 0 ) {
+ playing = 1;
+ }
+ }
+ return playing;
+}
\ No newline at end of file
diff --git a/docs/html/sdlcdstop.html b/docs/html/sdlcdstop.html
new file mode 100644
index 0000000..68f8d81
--- /dev/null
+++ b/docs/html/sdlcdstop.html
@@ -0,0 +1,226 @@
+SDL_CDStop
\ No newline at end of file
diff --git a/docs/html/sdlcdtrack.html b/docs/html/sdlcdtrack.html
new file mode 100644
index 0000000..bbb04bb
--- /dev/null
+++ b/docs/html/sdlcdtrack.html
@@ -0,0 +1,313 @@
+SDL_CDtrack
\ No newline at end of file
diff --git a/docs/html/sdlcloseaudio.html b/docs/html/sdlcloseaudio.html
new file mode 100644
index 0000000..599f058
--- /dev/null
+++ b/docs/html/sdlcloseaudio.html
@@ -0,0 +1,205 @@
+SDL_CloseAudio
\ No newline at end of file
diff --git a/docs/html/sdlcolor.html b/docs/html/sdlcolor.html
new file mode 100644
index 0000000..c8b7d44
--- /dev/null
+++ b/docs/html/sdlcolor.html
@@ -0,0 +1,300 @@
+SDL_Color
\ No newline at end of file
diff --git a/docs/html/sdlcondbroadcast.html b/docs/html/sdlcondbroadcast.html
new file mode 100644
index 0000000..9b0fc83
--- /dev/null
+++ b/docs/html/sdlcondbroadcast.html
@@ -0,0 +1,224 @@
+SDL_CondBroadcast
\ No newline at end of file
diff --git a/docs/html/sdlcondsignal.html b/docs/html/sdlcondsignal.html
new file mode 100644
index 0000000..24e9175
--- /dev/null
+++ b/docs/html/sdlcondsignal.html
@@ -0,0 +1,224 @@
+SDL_CondSignal
\ No newline at end of file
diff --git a/docs/html/sdlcondwait.html b/docs/html/sdlcondwait.html
new file mode 100644
index 0000000..8f15452
--- /dev/null
+++ b/docs/html/sdlcondwait.html
@@ -0,0 +1,231 @@
+SDL_CondWait
Wait on the condition variable cond and unlock the provided mutex. The mutex must the locked before entering this function. Returns 0 when it is signalled, or -1 on an error.
\ No newline at end of file
diff --git a/docs/html/sdlcondwaittimeout.html b/docs/html/sdlcondwaittimeout.html
new file mode 100644
index 0000000..deed50b
--- /dev/null
+++ b/docs/html/sdlcondwaittimeout.html
@@ -0,0 +1,230 @@
+SDL_CondWaitTimeout
SDL_CondWaitTimeout -- Wait on a condition variable, with timeout
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, Uint32 ms);
Description
Wait on the condition variable cond for, at most, ms milliseconds. mut is unlocked so it must be locked when the function is called. Returns SDL_MUTEX_TIMEDOUT if the condition is not signalled in the allotted time, 0 if it was signalled or -1 on an error.
\ No newline at end of file
diff --git a/docs/html/sdlconvertaudio.html b/docs/html/sdlconvertaudio.html
new file mode 100644
index 0000000..52f1229
--- /dev/null
+++ b/docs/html/sdlconvertaudio.html
@@ -0,0 +1,407 @@
+SDL_ConvertAudio
SDL_ConvertAudio -- Convert audio data to a desired audio format.
Synopsis
#include "SDL.h"
int SDL_ConvertAudio(SDL_AudioCVT *cvt);
Description
SDL_ConvertAudio takes one parameter, cvt, which was previously initilized. Initilizing a SDL_AudioCVT is a two step process. First of all, the structure must be passed to SDL_BuildAudioCVT along with source and destination format parameters. Secondly, the cvt->buf and cvt->len fields must be setup. cvt->buf should point to the audio data and cvt->len should be set to the length of the audio data in bytes. Remember, the length of the buffer pointed to by buf show be len*len_mult bytes in length.
Once the SDL_AudioCVTstructure is initilized then we can pass it to SDL_ConvertAudio, which will convert the audio data pointer to by cvt->buf. If SDL_ConvertAudio returned 0 then the conversion was completed successfully, otherwise -1 is returned.
If the conversion completed successfully then the converted audio data can be read from cvt->buf. The amount of valid, converted, audio data in the buffer is equal to cvt->len*cvt->len_ratio.
Examples
/* Converting some WAV data to hardware format */
+void my_audio_callback(void *userdata, Uint8 *stream, int len);
+
+SDL_AudioSpec *desired, *obtained;
+SDL_AudioSpec wav_spec;
+SDL_AudioCVT wav_cvt;
+Uint32 wav_len;
+Uint8 *wav_buf;
+int ret;
+
+/* Allocated audio specs */
+desired = malloc(sizeof(SDL_AudioSpec));
+obtained = malloc(sizeof(SDL_AudioSpec));
+
+/* Set desired format */
+desired->freq=22050;
+desired->format=AUDIO_S16LSB;
+desired->samples=8192;
+desired->callback=my_audio_callback;
+desired->userdata=NULL;
+
+/* Open the audio device */
+if ( SDL_OpenAudio(desired, obtained) < 0 ){
+ fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
+ exit(-1);
+}
+
+free(desired);
+
+/* Load the test.wav */
+if( SDL_LoadWAV("test.wav", &wav_spec, &wav_buf, &wav_len) == NULL ){
+ fprintf(stderr, "Could not open test.wav: %s\n", SDL_GetError());
+ SDL_CloseAudio();
+ free(obtained);
+ exit(-1);
+}
+
+/* Build AudioCVT */
+ret = SDL_BuildAudioCVT(&wav_cvt,
+ wav_spec.format, wav_spec.channels, wav_spec.freq,
+ obtained->format, obtained->channels, obtained->freq);
+
+/* Check that the convert was built */
+if(ret==-1){
+ fprintf(stderr, "Couldn't build converter!\n");
+ SDL_CloseAudio();
+ free(obtained);
+ SDL_FreeWAV(wav_buf);
+}
+
+/* Setup for conversion */
+wav_cvt.buf = malloc(wav_len * wav_cvt.len_mult);
+wav_cvt.len = wav_len;
+memcpy(wav_cvt.buf, wav_buf, wav_len);
+
+/* We can delete to original WAV data now */
+SDL_FreeWAV(wav_buf);
+
+/* And now we're ready to convert */
+SDL_ConvertAudio(&wav_cvt);
+
+/* do whatever */
+.
+.
+.
+.
+
\ No newline at end of file
diff --git a/docs/html/sdlconvertsurface.html b/docs/html/sdlconvertsurface.html
new file mode 100644
index 0000000..cc21f78
--- /dev/null
+++ b/docs/html/sdlconvertsurface.html
@@ -0,0 +1,271 @@
+SDL_ConvertSurface
\ No newline at end of file
diff --git a/docs/html/sdlcreatecond.html b/docs/html/sdlcreatecond.html
new file mode 100644
index 0000000..02fcdb2
--- /dev/null
+++ b/docs/html/sdlcreatecond.html
@@ -0,0 +1,240 @@
+SDL_CreateCond
\ No newline at end of file
diff --git a/docs/html/sdlcreatecursor.html b/docs/html/sdlcreatecursor.html
new file mode 100644
index 0000000..a444165
--- /dev/null
+++ b/docs/html/sdlcreatecursor.html
@@ -0,0 +1,398 @@
+SDL_CreateCursor
\ No newline at end of file
diff --git a/docs/html/sdlcreatemutex.html b/docs/html/sdlcreatemutex.html
new file mode 100644
index 0000000..53ed48b
--- /dev/null
+++ b/docs/html/sdlcreatemutex.html
@@ -0,0 +1,249 @@
+SDL_CreateMutex
\ No newline at end of file
diff --git a/docs/html/sdlcreatergbsurface.html b/docs/html/sdlcreatergbsurface.html
new file mode 100644
index 0000000..736ec8f
--- /dev/null
+++ b/docs/html/sdlcreatergbsurface.html
@@ -0,0 +1,458 @@
+SDL_CreateRGBSurface
SDL_CreateRGBSurface -- Create an empty SDL_Surface
Synopsis
#include "SDL.h"
SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
Description
Allocate an empty surface (must be called after SDL_SetVideoMode)
If depth is 8 bits an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL_PixelFormat is created using the [RGBA]mask's provided (see SDL_PixelFormat). The flags specifies the type of surface that should be created, it is an OR'd combination of the following possible values.
SDL_SWSURFACE
SDL will create the surface in system memory. This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.
SDL_HWSURFACE
SDL will attempt to create the surface in video memory. This will allow SDL to take advantage of Video->Video blits (which are often accelerated).
SDL_SRCCOLORKEY
This flag turns on colourkeying for blits from this surface. If
+SDL_HWSURFACE is also specified and colourkeyed blits
+are hardware-accelerated, then SDL will attempt to place the surface in
+video memory.
+Use SDL_SetColorKey
+to set or clear this flag after surface creation.
SDL_SRCALPHA
This flag turns on alpha-blending for blits from this surface. If
+SDL_HWSURFACE is also specified and alpha-blending blits
+are hardware-accelerated, then the surface will be placed in video memory if
+possible.
+Use SDL_SetAlpha to
+set or clear this flag after surface creation.
Note: If an alpha-channel is specified (that is, if Amask is
+nonzero), then the SDL_SRCALPHA flag is automatically
+set. You may remove this flag by calling
+SDL_SetAlpha
+after surface creation.
Return Value
Returns the created surface, or NULL upon error.
Example
/* Create a 32-bit surface with the bytes of each pixel in R,G,B,A order,
+ as expected by OpenGL for textures */
+ SDL_Surface *surface;
+ Uint32 rmask, gmask, bmask, amask;
+
+ /* SDL interprets each pixel as a 32-bit number, so our masks must depend
+ on the endianness (byte order) of the machine */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ rmask = 0xff000000;
+ gmask = 0x00ff0000;
+ bmask = 0x0000ff00;
+ amask = 0x000000ff;
+#else
+ rmask = 0x000000ff;
+ gmask = 0x0000ff00;
+ bmask = 0x00ff0000;
+ amask = 0xff000000;
+#endif
+
+ surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32,
+ rmask, gmask, bmask, amask);
+ if(surface == NULL) {
+ fprintf(stderr, "CreateRGBSurface failed: %s\n", SDL_GetError());
+ exit(1);
+ }
\ No newline at end of file
diff --git a/docs/html/sdlcreatergbsurfacefrom.html b/docs/html/sdlcreatergbsurfacefrom.html
new file mode 100644
index 0000000..6acfdcc
--- /dev/null
+++ b/docs/html/sdlcreatergbsurfacefrom.html
@@ -0,0 +1,256 @@
+SDL_CreateRGBSurfaceFrom
SDL_CreateRGBSurfaceFrom -- Create an SDL_Surface from pixel data
Synopsis
#include "SDL.h"
SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
Description
Creates an SDL_Surface from the provided pixel data.
The data stored in pixels is assumed to be of the depth specified in the parameter list. The pixel data is not copied into the SDL_Surface structure so it should not be freed until the surface has been freed with a called to SDL_FreeSurface. pitch is the length of each scanline in bytes.
See SDL_CreateRGBSurface for a more detailed description of the other parameters.
\ No newline at end of file
diff --git a/docs/html/sdlcreatesemaphore.html b/docs/html/sdlcreatesemaphore.html
new file mode 100644
index 0000000..43dcbf5
--- /dev/null
+++ b/docs/html/sdlcreatesemaphore.html
@@ -0,0 +1,303 @@
+SDL_CreateSemaphore
SDL_CreateSemaphore() creates a new semaphore and
+initializes it with the value initial_value.
+Each locking operation on the semaphore by
+SDL_SemWait,
+SDL_SemTryWait or
+SDL_SemWaitTimeout
+will atomically decrement the semaphore value. The locking operation will be blocked
+if the semaphore value is not positive (greater than zero). Each unlock operation by
+SDL_SemPost
+will atomically increment the semaphore value.
Return Value
Returns a pointer to an initialized semaphore or
+NULL if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlcreatethread.html b/docs/html/sdlcreatethread.html
new file mode 100644
index 0000000..ca3c2d9
--- /dev/null
+++ b/docs/html/sdlcreatethread.html
@@ -0,0 +1,223 @@
+SDL_CreateThread
SDL_CreateThread creates a new thread of execution
+that shares all of its parent's global memory, signal handlers,
+file descriptors, etc, and runs the function fn
+passed the void pointer data
+The thread quits when this function returns.
\ No newline at end of file
diff --git a/docs/html/sdlcreateyuvoverlay.html b/docs/html/sdlcreateyuvoverlay.html
new file mode 100644
index 0000000..c24ef6e
--- /dev/null
+++ b/docs/html/sdlcreateyuvoverlay.html
@@ -0,0 +1,256 @@
+SDL_CreateYUVOverlay
SDL_CreateYUVOverlay -- Create a YUV video overlay
Synopsis
#include "SDL.h"
SDL_Overlay *SDL_CreateYUVOverlay(int width, int height, Uint32 format, SDL_Surface *display);
Description
SDL_CreateYUVOverlay creates a YUV overlay of the specified width, height and format (see SDL_Overlay for a list of available formats), for the provided display. A SDL_Overlay structure is returned.
The term 'overlay' is a misnomer since, unless the overlay is created in hardware, the contents for the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed.
\ No newline at end of file
diff --git a/docs/html/sdldelay.html b/docs/html/sdldelay.html
new file mode 100644
index 0000000..a5417fa
--- /dev/null
+++ b/docs/html/sdldelay.html
@@ -0,0 +1,231 @@
+SDL_Delay
\ No newline at end of file
diff --git a/docs/html/sdldestroycond.html b/docs/html/sdldestroycond.html
new file mode 100644
index 0000000..ac08042
--- /dev/null
+++ b/docs/html/sdldestroycond.html
@@ -0,0 +1,206 @@
+SDL_DestroyCond
\ No newline at end of file
diff --git a/docs/html/sdldestroymutex.html b/docs/html/sdldestroymutex.html
new file mode 100644
index 0000000..949bfc5
--- /dev/null
+++ b/docs/html/sdldestroymutex.html
@@ -0,0 +1,209 @@
+SDL_DestroyMutex
\ No newline at end of file
diff --git a/docs/html/sdldestroysemaphore.html b/docs/html/sdldestroysemaphore.html
new file mode 100644
index 0000000..d32bdfa
--- /dev/null
+++ b/docs/html/sdldestroysemaphore.html
@@ -0,0 +1,278 @@
+SDL_DestroySemaphore
SDL_DestroySemaphore -- Destroys a semaphore that was created by SDL_CreateSemaphore.
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
void SDL_DestroySemaphore(SDL_sem *sem);
Description
SDL_DestroySemaphore destroys the semaphore pointed to
+by sem that was created by
+SDL_CreateSemaphore.
+It is not safe to destroy a semaphore if there are threads currently blocked
+waiting on it.
\ No newline at end of file
diff --git a/docs/html/sdldisplayformat.html b/docs/html/sdldisplayformat.html
new file mode 100644
index 0000000..c91adfe
--- /dev/null
+++ b/docs/html/sdldisplayformat.html
@@ -0,0 +1,262 @@
+SDL_DisplayFormat
This function takes a surface and copies it to a new surface of the
+pixel format and colors of the video framebuffer, suitable for fast
+blitting onto the display surface. It calls
+SDL_ConvertSurface
If you want to take advantage of hardware colorkey or alpha blit
+acceleration, you should set the colorkey and alpha value before
+calling this function.
\ No newline at end of file
diff --git a/docs/html/sdldisplayformatalpha.html b/docs/html/sdldisplayformatalpha.html
new file mode 100644
index 0000000..6e88604
--- /dev/null
+++ b/docs/html/sdldisplayformatalpha.html
@@ -0,0 +1,250 @@
+SDL_DisplayFormatAlpha
This function takes a surface and copies it to a new surface of the
+pixel format and colors of the video framebuffer plus an alpha channel,
+suitable for fast blitting onto the display surface. It calls
+SDL_ConvertSurface
If you want to take advantage of hardware colorkey or alpha blit
+acceleration, you should set the colorkey and alpha value before
+calling this function.
This function can be used to convert a colourkey to an alpha channel,
+if the SDL_SRCCOLORKEY flag is set on the surface.
+The generated surface will then be transparent (alpha=0) where the
+pixels match the colourkey, and opaque (alpha=255) elsewhere.
Return Value
If the conversion fails or runs out of memory, it returns
+NULL
\ No newline at end of file
diff --git a/docs/html/sdldisplayyuvoverlay.html b/docs/html/sdldisplayyuvoverlay.html
new file mode 100644
index 0000000..456c998
--- /dev/null
+++ b/docs/html/sdldisplayyuvoverlay.html
@@ -0,0 +1,246 @@
+SDL_DisplayYUVOverlay
SDL_DisplayYUVOverlay -- Blit the overlay to the display
Synopsis
#include "SDL.h"
int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);
Description
Blit the overlay to the surface specified when it was created. The SDL_Rect structure, dstrect, specifies the position and size of the destination. If the dstrect is a larger or smaller than the overlay then the overlay will be scaled, this is optimized for 2x scaling.
\ No newline at end of file
diff --git a/docs/html/sdlenablekeyrepeat.html b/docs/html/sdlenablekeyrepeat.html
new file mode 100644
index 0000000..878feb1
--- /dev/null
+++ b/docs/html/sdlenablekeyrepeat.html
@@ -0,0 +1,238 @@
+SDL_EnableKeyRepeat
Enables or disables the keyboard repeat rate. delay specifies how long the key must be pressed before it begins repeating, it then repeats at the speed specified by interval. Both delay and interval are expressed in milliseconds.
Setting delay to 0 disables key repeating completely. Good default values are SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL.
\ No newline at end of file
diff --git a/docs/html/sdlenableunicode.html b/docs/html/sdlenableunicode.html
new file mode 100644
index 0000000..855debb
--- /dev/null
+++ b/docs/html/sdlenableunicode.html
@@ -0,0 +1,252 @@
+SDL_EnableUNICODE
To obtain the character codes corresponding to received keyboard events,
+Unicode translation must first be turned on using this function. The
+translation incurs a slight overhead for each keyboard event and is therefore
+disabled by default. For each subsequently received key down event, the
+unicode member of the
+SDL_keysym structure
+will then contain the corresponding character code, or zero for keysyms that do
+not correspond to any character code.
A value of 1 for enable enables Unicode translation;
+0 disables it, and -1 leaves it unchanged (useful for querying the current
+translation mode).
Note that only key press events will be translated, not release events.
\ No newline at end of file
diff --git a/docs/html/sdlenvvars.html b/docs/html/sdlenvvars.html
new file mode 100644
index 0000000..8999ed1
--- /dev/null
+++ b/docs/html/sdlenvvars.html
@@ -0,0 +1,1227 @@
+SDL_envvars
Several environment variables are available to modify the
+behaviour of SDL. Using these variables isn't recommened and the names
+and presence of these variables aren't guaranteed from one release to
+the next. However, they can be very useful for debugging
+purposes.
Video
SDL_FBACCEL
If set to 0, disable hardware acceleration in the linux fbcon driver.
SDL_FBDEV
Frame buffer device to use in the linux fbcon driver, instead of /dev/fb0
SDL_FULLSCREEN_UPDATE
In the ps2gs driver, sets the SDL_ASYNCBLIT flag on the
+display surface.
SDL_VIDEODRIVER
Selectes the video driver for SDL to use. Possible values, in the
+order they are tried if this variable is not set:
x11
dga
(the XFree86 DGA2)
nanox
(Linux)
fbcon
(Linux)
directfb
(Linux)
ps2gs
(Playstation 2)
ggi
vgl
(BSD)
svgalib
(Linux)
aalib
directx
(Win32)
windib
(Win32)
bwindow
(BeOS)
toolbox
(MacOS Classic)
DSp
(MacOS Classic)
Quartz
(Mac OS X)
CGX
(Amiga)
photon
(QNX)
dummy
SDL_VIDEO_CENTERED
If set, tries to center the SDL window when running in X11 windowed
+mode, or using the CyberGrafix driver.
SDL_VIDEO_GL_DRIVER
The openGL driver (shared library) to use for X11. Default is libGL.so.1
SDL_VIDEO_X11_DGAMOUSE
With XFree86, enables use of DGA mouse if set.
SDL_VIDEO_X11_MOUSEACCEL
For X11, sets the mouse acceleration. The value should be a string
+on the form:
"n/d/t"
where n and d are the
+acceleration numerator/denumerators (so mouse movement is accelerated by
+n/d), and
+t is the threshold above which acceleration applies
+(counted as number of pixels the mouse moves at once).
SDL_VIDEO_X11_NODIRECTCOLOR
If set, don't attempt to use DirectColor visuals even if they are
+present. (SDL will use them otherwise for gamma correction).
+This is needed with older X servers when using the XVideo extension.
SDL_VIDEO_X11_VISUALID
ID of an X11 visual to use, overriding SDL's default visual selection
+algorithm. It can be in decimal or in hex (prefixed by 0x).
SDL_VIDEO_YUV_DIRECT
If set, display YUV overlay directly on the video surface if possible,
+instead of on the surface passed to
+SDL_CreateYUVOverlay.
SDL_VIDEO_YUV_HWACCEL
If not set or set to a nonzero value, SDL will attempt to use
+hardware YUV acceleration for video playback.
SDL_WINDOWID
For X11 or Win32, contains the ID number of the window to be used by
+SDL instead of creating its own window. Either in decimal or
+in hex (prefixed by 0x).
Events/Input
SDL_MOUSE_RELATIVE
If set to 0, do not use mouse relative mode in X11. The default is
+to use it if the mouse is hidden and input is grabbed.
SDL_MOUSEDEV
The mouse device to use for the linux fbcon driver. If not set,
+SDL first tries to use GPM in repeater mode, then various other
+devices (/dev/pcaux, /dev/adbmouse, /dev/mouse etc).
SDL_MOUSEDEV_IMPS2
If set, SDL will not try to auto-detect the IMPS/2 protocol of
+a PS/2 mouse but use it right away. For the fbcon and ps2gs drivers.
SDL_MOUSEDRV
For the linux fbcon driver: if set to ELO, use the ELO touchscreen
+controller as a pointer device
SDL_NO_RAWKBD
For the libvga driver: If set, do not attempt to put the keyboard in raw mode.
SDL_NOMOUSE
If set, the linux fbcon driver will not use a mouse at all.
SDL_NO_LOCK_KEYS
Disable CAPS-LOCK and NUM-LOCK suppression of down+up key events,
+suitable for games where the player needs these keys to do more than just toggle.
+A value of 1 will effect both CAPS-LOCK and NUM-LOCK.
+A value of 2 will effect only CAPS-LOCK.
+A value of 3 will effect only NUM-LOCK.
+All other values have no effect.
+
Audio
AUDIODEV
The audio device to use, if SDL_PATH_DSP isn't set.
SDL_AUDIODRIVER
Selects the audio driver for SDL to use. Possible values, in the
+order they are tried if this variable is not set:
openbsd
(OpenBSD)
dsp
(OSS /dev/dsp: Linux, Solaris, BSD etc)
alsa
(Linux)
pulse
(PulseAudio daemon)
audio
(Unix style /dev/audio: SunOS, Solaris etc)
AL
(Irix)
artsc
(ARTS audio daemon)
esd
(esound audio daemon)
nas
(NAS audio daemon)
dma
(OSS /dev/dsp, using DMA)
dsound
(Win32 DirectX)
waveout
(Win32 WaveOut)
baudio
(BeOS)
sndmgr
(MacOS SoundManager)
paud
(AIX)
AHI
(Amiga)
disk
(all; output to file)
SDL_DISKAUDIOFILE
The name of the output file for the "disk" audio driver. If not
+set, the name sdlaudio.raw is used.
SDL_DISKAUDIODELAY
For the "disk" audio driver, how long to wait (in ms) before writing
+a full sound buffer. The default is 150 ms.
SDL_DSP_NOSELECT
For some audio drivers (alsa, paud, dma and dsp), don't use select()
+but a timed method instead. May cure some audio problems, or cause
+others.
SDL_PATH_DSP
The audio device to use. If not set, SDL tries AUDIODEV and then
+a platform-dependent default value (/dev/audio on Solaris,
+/dev/dsp on Linux etc).
CD-ROM
SDL_CDROM
A colon-separated list of CD-ROM devices to use, in addition to
+the standard devices (typically /dev/cdrom, platform-dependent).
Debugging
SDL_DEBUG
If set, causes every call to SDL_SetError (that
+is, every time SDL signals an error) to also print an error message on
+stderr.
Joystick
SDL_JOYSTICK_DEVICE
Joystick device to use in the linux joystick driver, in addition
+to the usual: /dev/js*, /dev/input/event*, /dev/input/js*
SDL_LINUX_JOYSTICK
Special joystick configuration string for linux. The format is
"namenumaxesnumhatsnumballs"
where name is the name string of the joystick
+(possibly in single quotes), and the rest are the number of axes, hats
+and balls respectively.
The SDL_Event union is the core to all event handling is SDL, its probably the most important structure after SDL_Surface. SDL_Event is a union of all event structures used in SDL, using it is a simple matter of knowing which union member relates to which event type.
Reading events from the event queue is done with either SDL_PollEvent or SDL_PeepEvents. We'll use SDL_PollEvent and step through an example.
First off, we create an empty SDL_Event structure.
+
SDL_Event test_event;
+SDL_PollEvent removes the next event from the event queue, if there are no events on the queue it returns 0 otherwise it returns 1. We use a while loop to process each event in turn.
+
while(SDL_PollEvent(&test_event)) {
+The SDL_PollEvent function take a pointer to an SDL_Event structure that is to be filled with event information. We know that if SDL_PollEvent removes an event from the queue then the event information will be placed in our test_event structure, but we also know that the type of event will be placed in the type member of test_event. So to handle each event type seperately we use a switch statement.
+
switch(test_event.type) {
+We need to know what kind of events we're looking for and the event type's of those events. So lets assume we want to detect where the user is moving the mouse pointer within our application. We look through our event types and notice that SDL_MOUSEMOTION is, more than likely, the event we're looking for. A little more research tells use that SDL_MOUSEMOTION events are handled within the SDL_MouseMotionEvent structure which is the motion member of SDL_Event. We can check for the SDL_MOUSEMOTION event type within our switch statement like so:
+
case SDL_MOUSEMOTION:
+All we need do now is read the information out of the motion member of test_event.
+
printf("We got a motion event.\n");
+ printf("Current mouse position is: (%d, %d)\n", test_event.motion.x, test_event.motion.y);
+ break;
+ default:
+ printf("Unhandled Event!\n");
+ break;
+ }
+}
+printf("Event queue empty.\n");
It is also possible to push events onto the event queue and so use it as a two-way communication path. Both SDL_PushEvent and SDL_PeepEvents allow you to place events onto the event queue. This is usually used to place a SDL_USEREVENT on the event queue, however you could use it to post fake input events if you wished. Creating your own events is a simple matter of choosing the event type you want, setting the type member and filling the appropriate member structure with information.
+
\ No newline at end of file
diff --git a/docs/html/sdlexposeevent.html b/docs/html/sdlexposeevent.html
new file mode 100644
index 0000000..82c2a3e
--- /dev/null
+++ b/docs/html/sdlexposeevent.html
@@ -0,0 +1,252 @@
+SDL_ExposeEvent
SDL_ExposeEvent is a member of the SDL_Event union and is used whan an event of type SDL_VIDEOEXPOSE is reported.
A VIDEOEXPOSE event is triggered when the screen has been modified
+outside of the application, usually by the window manager and needs to
+be redrawn.
SDL_FillRect -- This function performs a fast fill of the given rectangle with some color
Synopsis
#include "SDL.h"
int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
Description
This function performs a fast fill of the given rectangle with
+color. If dstrect
+is NULL, the whole surface will be filled with
+color.
The color should be a pixel of the format used by the surface, and
+can be generated by the
+SDL_MapRGB or SDL_MapRGBA
+functions. If the color value contains an alpha value then the
+destination is simply "filled" with that alpha information, no blending
+takes place.
If there is a clip rectangle set on the destination (set via
+SDL_SetClipRect) then this
+function will clip based on the intersection of the clip rectangle and
+the dstrect rectangle and the dstrect rectangle
+will be modified to represent the area actually filled.
Return Value
This function returns 0 on success, or
+-1 on error.
\ No newline at end of file
diff --git a/docs/html/sdlflip.html b/docs/html/sdlflip.html
new file mode 100644
index 0000000..b480f99
--- /dev/null
+++ b/docs/html/sdlflip.html
@@ -0,0 +1,259 @@
+SDL_Flip
On hardware that supports double-buffering, this function sets up a flip
+and returns. The hardware will wait for vertical retrace, and then swap
+video buffers before the next video surface blit or lock will return.
+On hardware that doesn't support double-buffering, this is equivalent
+to calling SDL_UpdateRect(screen, 0, 0, 0, 0)
The SDL_DOUBLEBUF flag must have been passed to
+SDL_SetVideoMode,
+ when
+setting the video mode for this function to perform hardware flipping.
Return Value
This function returns 0 if successful, or
+-1 if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlfreecursor.html b/docs/html/sdlfreecursor.html
new file mode 100644
index 0000000..01a4f7c
--- /dev/null
+++ b/docs/html/sdlfreecursor.html
@@ -0,0 +1,209 @@
+SDL_FreeCursor
\ No newline at end of file
diff --git a/docs/html/sdlfreesurface.html b/docs/html/sdlfreesurface.html
new file mode 100644
index 0000000..84b6048
--- /dev/null
+++ b/docs/html/sdlfreesurface.html
@@ -0,0 +1,219 @@
+SDL_FreeSurface
Frees the resources used by a previously created SDL_Surface. If the surface was created using
+SDL_CreateRGBSurfaceFrom then the pixel data is not freed.
\ No newline at end of file
diff --git a/docs/html/sdlfreewav.html b/docs/html/sdlfreewav.html
new file mode 100644
index 0000000..24242c4
--- /dev/null
+++ b/docs/html/sdlfreewav.html
@@ -0,0 +1,222 @@
+SDL_FreeWAV
After a WAVE file has been opened with SDL_LoadWAV its data can eventually be freed with SDL_FreeWAV. audio_buf is a pointer to the buffer created by SDL_LoadWAV.
\ No newline at end of file
diff --git a/docs/html/sdlfreeyuvoverlay.html b/docs/html/sdlfreeyuvoverlay.html
new file mode 100644
index 0000000..e82340d
--- /dev/null
+++ b/docs/html/sdlfreeyuvoverlay.html
@@ -0,0 +1,233 @@
+SDL_FreeYUVOverlay
\ No newline at end of file
diff --git a/docs/html/sdlgetappstate.html b/docs/html/sdlgetappstate.html
new file mode 100644
index 0000000..d09e2e0
--- /dev/null
+++ b/docs/html/sdlgetappstate.html
@@ -0,0 +1,263 @@
+SDL_GetAppState
\ No newline at end of file
diff --git a/docs/html/sdlgetaudiostatus.html b/docs/html/sdlgetaudiostatus.html
new file mode 100644
index 0000000..3fc3a09
--- /dev/null
+++ b/docs/html/sdlgetaudiostatus.html
@@ -0,0 +1,221 @@
+SDL_GetAudioStatus
\ No newline at end of file
diff --git a/docs/html/sdlgetcliprect.html b/docs/html/sdlgetcliprect.html
new file mode 100644
index 0000000..f00ac77
--- /dev/null
+++ b/docs/html/sdlgetcliprect.html
@@ -0,0 +1,229 @@
+SDL_GetClipRect
\ No newline at end of file
diff --git a/docs/html/sdlgetcursor.html b/docs/html/sdlgetcursor.html
new file mode 100644
index 0000000..72ecbc7
--- /dev/null
+++ b/docs/html/sdlgetcursor.html
@@ -0,0 +1,219 @@
+SDL_GetCursor
\ No newline at end of file
diff --git a/docs/html/sdlgeterror.html b/docs/html/sdlgeterror.html
new file mode 100644
index 0000000..cdf5792
--- /dev/null
+++ b/docs/html/sdlgeterror.html
@@ -0,0 +1,205 @@
+SDL_GetError
\ No newline at end of file
diff --git a/docs/html/sdlgeteventfilter.html b/docs/html/sdlgeteventfilter.html
new file mode 100644
index 0000000..d254d34
--- /dev/null
+++ b/docs/html/sdlgeteventfilter.html
@@ -0,0 +1,235 @@
+SDL_GetEventFilter
\ No newline at end of file
diff --git a/docs/html/sdlgetgammaramp.html b/docs/html/sdlgetgammaramp.html
new file mode 100644
index 0000000..bfcc03c
--- /dev/null
+++ b/docs/html/sdlgetgammaramp.html
@@ -0,0 +1,219 @@
+SDL_GetGammaRamp
\ No newline at end of file
diff --git a/docs/html/sdlgetkeyname.html b/docs/html/sdlgetkeyname.html
new file mode 100644
index 0000000..6c51c94
--- /dev/null
+++ b/docs/html/sdlgetkeyname.html
@@ -0,0 +1,216 @@
+SDL_GetKeyName
\ No newline at end of file
diff --git a/docs/html/sdlgetkeystate.html b/docs/html/sdlgetkeystate.html
new file mode 100644
index 0000000..1c16f2e
--- /dev/null
+++ b/docs/html/sdlgetkeystate.html
@@ -0,0 +1,253 @@
+SDL_GetKeyState
SDL_GetKeyState -- Get a snapshot of the current keyboard state
Synopsis
#include "SDL.h"
Uint8 *SDL_GetKeyState(int *numkeys);
Description
Gets a snapshot of the current keyboard state. The current state is return as a pointer to an array, the size of this array is stored in numkeys. The array is indexed by the SDLK_* symbols. A value of 1 means the key is pressed and a value of 0 means its not. The pointer returned is a pointer to an internal SDL array and should not be freed by the caller.
\ No newline at end of file
diff --git a/docs/html/sdlgetmodstate.html b/docs/html/sdlgetmodstate.html
new file mode 100644
index 0000000..64d2f35
--- /dev/null
+++ b/docs/html/sdlgetmodstate.html
@@ -0,0 +1,257 @@
+SDL_GetModState
\ No newline at end of file
diff --git a/docs/html/sdlgetmousestate.html b/docs/html/sdlgetmousestate.html
new file mode 100644
index 0000000..d96a55b
--- /dev/null
+++ b/docs/html/sdlgetmousestate.html
@@ -0,0 +1,253 @@
+SDL_GetMouseState
SDL_GetMouseState -- Retrieve the current state of the mouse
Synopsis
#include "SDL.h"
Uint8 SDL_GetMouseState(int *x, int *y);
Description
The current button state is returned as a button bitmask, which can
+be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+current mouse cursor position. You can pass NULL for either x or y.
Example
SDL_PumpEvents();
+if(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1))
+ printf("Mouse Button 1(left) is pressed.\n");
\ No newline at end of file
diff --git a/docs/html/sdlgetrelativemousestate.html b/docs/html/sdlgetrelativemousestate.html
new file mode 100644
index 0000000..52a5106
--- /dev/null
+++ b/docs/html/sdlgetrelativemousestate.html
@@ -0,0 +1,235 @@
+SDL_GetRelativeMouseState
SDL_GetRelativeMouseState -- Retrieve the current state of the mouse
Synopsis
#include "SDL.h"
Uint8 SDL_GetRelativeMouseState(int *x, int *y);
Description
The current button state is returned as a button bitmask, which can
+be tested using the SDL_BUTTON(X) macros, and x and y are set to the change in the mouse position since the last call to SDL_GetRelativeMouseState or since event initialization. You can pass NULL for either x or y.
\ No newline at end of file
diff --git a/docs/html/sdlgetrgb.html b/docs/html/sdlgetrgb.html
new file mode 100644
index 0000000..47774dc
--- /dev/null
+++ b/docs/html/sdlgetrgb.html
@@ -0,0 +1,231 @@
+SDL_GetRGB
Get RGB component values from a pixel stored in the specified pixel format.
This function uses the entire 8-bit [0..255] range when converting color
+components from pixel formats with less than 8-bits per RGB component
+(e.g., a completely white pixel in 16-bit RGB565 format would return
+[0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
\ No newline at end of file
diff --git a/docs/html/sdlgetrgba.html b/docs/html/sdlgetrgba.html
new file mode 100644
index 0000000..a9e1093
--- /dev/null
+++ b/docs/html/sdlgetrgba.html
@@ -0,0 +1,222 @@
+SDL_GetRGBA
Get RGBA component values from a pixel stored in the specified pixel format.
This function uses the entire 8-bit [0..255] range when converting color
+components from pixel formats with less than 8-bits per RGB component
+(e.g., a completely white pixel in 16-bit RGB565 format would return
+[0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
If the surface has no alpha component, the alpha will be returned as 0xff
+(100% opaque).
\ No newline at end of file
diff --git a/docs/html/sdlgetthreadid.html b/docs/html/sdlgetthreadid.html
new file mode 100644
index 0000000..4bc59cb
--- /dev/null
+++ b/docs/html/sdlgetthreadid.html
@@ -0,0 +1,209 @@
+SDL_GetThreadID
\ No newline at end of file
diff --git a/docs/html/sdlgetticks.html b/docs/html/sdlgetticks.html
new file mode 100644
index 0000000..0911aae
--- /dev/null
+++ b/docs/html/sdlgetticks.html
@@ -0,0 +1,206 @@
+SDL_GetTicks
\ No newline at end of file
diff --git a/docs/html/sdlgetvideoinfo.html b/docs/html/sdlgetvideoinfo.html
new file mode 100644
index 0000000..25c4b45
--- /dev/null
+++ b/docs/html/sdlgetvideoinfo.html
@@ -0,0 +1,226 @@
+SDL_GetVideoInfo
SDL_GetVideoInfo -- returns a pointer to information about the video hardware
Synopsis
#include "SDL.h"
SDL_VideoInfo *SDL_GetVideoInfo(void);
Description
This function returns a read-only pointer to information about the video
+hardware. If this is called before SDL_SetVideoMode, the
+vfmt member of the returned structure will contain the
+pixel format of the "best" video mode.
\ No newline at end of file
diff --git a/docs/html/sdlgetvideosurface.html b/docs/html/sdlgetvideosurface.html
new file mode 100644
index 0000000..905b1f6
--- /dev/null
+++ b/docs/html/sdlgetvideosurface.html
@@ -0,0 +1,208 @@
+SDL_GetVideoSurface
SDL_GetVideoSurface -- returns a pointer to the current display surface
Synopsis
#include "SDL.h"
SDL_Surface *SDL_GetVideoSurface(void);
Description
This function returns a pointer to the current display surface.
+If SDL is doing format conversion on the display surface, this
+function returns the publicly visible surface, not the real video
+surface.
\ No newline at end of file
diff --git a/docs/html/sdlglattr.html b/docs/html/sdlglattr.html
new file mode 100644
index 0000000..0ae0127
--- /dev/null
+++ b/docs/html/sdlglattr.html
@@ -0,0 +1,379 @@
+SDL_GLattr
Size of the accumulation buffer red component, in bits
SDL_GL_ACCUM_GREEN_SIZE
Size of the accumulation buffer green component, in bits
SDL_GL_ACCUM_BLUE_SIZE
Size of the accumulation buffer blue component, in bits
SDL_GL_ACCUM_ALPHA_SIZE
Size of the accumulation buffer alpha component, in bits
Description
While you can set most OpenGL attributes normally, the attributes list above must be known before SDL sets the video mode. These attributes a set and read with SDL_GL_SetAttribute and SDL_GL_GetAttribute.
\ No newline at end of file
diff --git a/docs/html/sdlglgetattribute.html b/docs/html/sdlglgetattribute.html
new file mode 100644
index 0000000..26c8913
--- /dev/null
+++ b/docs/html/sdlglgetattribute.html
@@ -0,0 +1,247 @@
+SDL_GL_GetAttribute
SDL_GL_GetAttribute -- Get the value of a special SDL/OpenGL attribute
Synopsis
#include "SDL.h"
int SDL_GL_GetAttribute(SDLGLattr attr, int *value);
Description
Places the value of the SDL/OpenGL attributeattr into value. This is useful after a call to SDL_SetVideoMode to check whether your attributes have been set as you expected.
\ No newline at end of file
diff --git a/docs/html/sdlglgetprocaddress.html b/docs/html/sdlglgetprocaddress.html
new file mode 100644
index 0000000..a6cf6e4
--- /dev/null
+++ b/docs/html/sdlglgetprocaddress.html
@@ -0,0 +1,262 @@
+SDL_GL_GetProcAddress
SDL_GL_GetProcAddress -- Get the address of a GL function
Synopsis
#include "SDL.h"
void *SDL_GL_GetProcAddress(const char* proc);
Description
Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with SDL_GL_LoadLibrary, then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions.
Example
typedef void (*GL_ActiveTextureARB_Func)(unsigned int);
+GL_ActiveTextureARB_Func glActiveTextureARB_ptr = 0;
+int has_multitexture=1;
+.
+.
+.
+/* Get function pointer */
+glActiveTextureARB_ptr=(GL_ActiveTextureARB_Func) SDL_GL_GetProcAddress("glActiveTextureARB");
+
+/* Check for a valid function ptr */
+if(!glActiveTextureARB_ptr){
+ fprintf(stderr, "Multitexture Extensions not present.\n");
+ has_multitexture=0;
+}
+.
+.
+.
+.
+if(has_multitexture){
+ glActiveTextureARB_ptr(GL_TEXTURE0_ARB);
+ .
+ .
+}
+else{
+ .
+ .
+}
\ No newline at end of file
diff --git a/docs/html/sdlglloadlibrary.html b/docs/html/sdlglloadlibrary.html
new file mode 100644
index 0000000..d3c4c6d
--- /dev/null
+++ b/docs/html/sdlglloadlibrary.html
@@ -0,0 +1,231 @@
+SDL_GL_LoadLibrary
If you wish, you may load the OpenGL library at runtime, this must be done before SDL_SetVideoMode is called. The path of the GL library is passed to SDL_GL_LoadLibrary and it returns 0 on success, or -1 on an error. You must then use SDL_GL_GetProcAddress to retrieve function pointers to GL functions.
\ No newline at end of file
diff --git a/docs/html/sdlglsetattribute.html b/docs/html/sdlglsetattribute.html
new file mode 100644
index 0000000..ffb1204
--- /dev/null
+++ b/docs/html/sdlglsetattribute.html
@@ -0,0 +1,286 @@
+SDL_GL_SetAttribute
SDL_GL_SetAttribute -- Set a special SDL/OpenGL attribute
Synopsis
#include "SDL.h"
int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
Description
Sets the OpenGL attributeattr to value. The attributes you set don't take effect until after a call to SDL_SetVideoMode. You should use SDL_GL_GetAttribute to check the values after a SDL_SetVideoMode call.
Note: The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute.
\ No newline at end of file
diff --git a/docs/html/sdlglswapbuffers.html b/docs/html/sdlglswapbuffers.html
new file mode 100644
index 0000000..fa38341
--- /dev/null
+++ b/docs/html/sdlglswapbuffers.html
@@ -0,0 +1,212 @@
+SDL_GL_SwapBuffers
\ No newline at end of file
diff --git a/docs/html/sdlinit.html b/docs/html/sdlinit.html
new file mode 100644
index 0000000..11f27b8
--- /dev/null
+++ b/docs/html/sdlinit.html
@@ -0,0 +1,368 @@
+SDL_Init
\ No newline at end of file
diff --git a/docs/html/sdlinitsubsystem.html b/docs/html/sdlinitsubsystem.html
new file mode 100644
index 0000000..917fd10
--- /dev/null
+++ b/docs/html/sdlinitsubsystem.html
@@ -0,0 +1,283 @@
+SDL_InitSubSystem
After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem. The flags parameter is the same as that used in SDL_Init.
Examples
/* Seperating Joystick and Video initialization. */
+SDL_Init(SDL_INIT_VIDEO);
+.
+.
+SDL_SetVideoMode(640, 480, 16, SDL_DOUBLEBUF|SDL_FULLSCREEN);
+.
+/* Do Some Video stuff */
+.
+.
+/* Initialize the joystick subsystem */
+SDL_InitSubSystem(SDL_INIT_JOYSTICK);
+
+/* Do some stuff with video and joystick */
+.
+.
+.
+/* Shut them both down */
+SDL_Quit();
\ No newline at end of file
diff --git a/docs/html/sdljoyaxisevent.html b/docs/html/sdljoyaxisevent.html
new file mode 100644
index 0000000..9f01669
--- /dev/null
+++ b/docs/html/sdljoyaxisevent.html
@@ -0,0 +1,330 @@
+SDL_JoyAxisEvent
SDL_JoyAxisEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYAXISMOTION is reported.
A SDL_JOYAXISMOTION event occurs when ever a user moves an axis on the joystick. The field which is the index of the joystick that reported the event and axis is the index of the axis (for a more detailed explaination see the Joystick section). value is the current position of the axis.
\ No newline at end of file
diff --git a/docs/html/sdljoyballevent.html b/docs/html/sdljoyballevent.html
new file mode 100644
index 0000000..4ab96fe
--- /dev/null
+++ b/docs/html/sdljoyballevent.html
@@ -0,0 +1,340 @@
+SDL_JoyBallEvent
SDL_JoyBallEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBALLMOTION is reported.
A SDL_JOYBALLMOTION event occurs when a user moves a trackball on the joystick. The field which is the index of the joystick that reported the event and ball is the index of the trackball (for a more detailed explaination see the Joystick section). Trackballs only return relative motion, this is the change in position on the ball since it was last polled (last cycle of the event loop) and it is stored in xrel and yrel.
\ No newline at end of file
diff --git a/docs/html/sdljoybuttonevent.html b/docs/html/sdljoybuttonevent.html
new file mode 100644
index 0000000..d1d9c1e
--- /dev/null
+++ b/docs/html/sdljoybuttonevent.html
@@ -0,0 +1,351 @@
+SDL_JoyButtonEvent
SDL_JoyButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP is reported.
A SDL_JOYBUTTONDOWN or SDL_JOYBUTTONUP event occurs when ever a user presses or releases a button on a joystick. The field which is the index of the joystick that reported the event and button is the index of the button (for a more detailed explaination see the Joystick section). state is the current state or the button which is either SDL_PRESSED or SDL_RELEASED.
\ No newline at end of file
diff --git a/docs/html/sdljoyhatevent.html b/docs/html/sdljoyhatevent.html
new file mode 100644
index 0000000..5e115be
--- /dev/null
+++ b/docs/html/sdljoyhatevent.html
@@ -0,0 +1,413 @@
+SDL_JoyHatEvent
SDL_JoyHatEvent is a member of the SDL_Event union and is used when an event of type SDL_JOYHATMOTION is reported.
A SDL_JOYHATMOTION event occurs when ever a user moves a hat on the joystick. The field which is the index of the joystick that reported the event and hat is the index of the hat (for a more detailed exlaination see the Joystick section). value is the current position of the hat. It is a logically OR'd combination of the following values (whose meanings should be pretty obvious:) :
\ No newline at end of file
diff --git a/docs/html/sdljoystickclose.html b/docs/html/sdljoystickclose.html
new file mode 100644
index 0000000..efb44e0
--- /dev/null
+++ b/docs/html/sdljoystickclose.html
@@ -0,0 +1,223 @@
+SDL_JoystickClose
\ No newline at end of file
diff --git a/docs/html/sdljoystickeventstate.html b/docs/html/sdljoystickeventstate.html
new file mode 100644
index 0000000..11b148a
--- /dev/null
+++ b/docs/html/sdljoystickeventstate.html
@@ -0,0 +1,290 @@
+SDL_JoystickEventState
This function is used to enable or disable joystick event processing. With joystick event processing disabled you will have to update joystick states with SDL_JoystickUpdate and read the joystick information manually. state is either SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
Note: Joystick event handling is prefered
Return Value
If state is SDL_QUERY then the current state is returned, otherwise the new processing state is returned.
\ No newline at end of file
diff --git a/docs/html/sdljoystickgetaxis.html b/docs/html/sdljoystickgetaxis.html
new file mode 100644
index 0000000..40a17b4
--- /dev/null
+++ b/docs/html/sdljoystickgetaxis.html
@@ -0,0 +1,271 @@
+SDL_JoystickGetAxis
SDL_JoystickGetAxis -- Get the current state of an axis
Synopsis
#include "SDL.h"
Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
Description
SDL_JoystickGetAxis returns the current state of the given axis on the given joystick.
On most modern joysticks the X axis is usually represented by axis 0 and the Y axis by axis 1. The value returned by SDL_JoystickGetAxis is a signed integer (-32768 to 32768) representing the current position of the axis, it maybe necessary to impose certain tolerances on these values to account for jitter. It is worth noting that some joysticks use axes 2 and 3 for extra buttons.
Return Value
Returns a 16-bit signed integer representing the current position of the axis.
\ No newline at end of file
diff --git a/docs/html/sdljoystickgetball.html b/docs/html/sdljoystickgetball.html
new file mode 100644
index 0000000..0da252a
--- /dev/null
+++ b/docs/html/sdljoystickgetball.html
@@ -0,0 +1,262 @@
+SDL_JoystickGetBall
\ No newline at end of file
diff --git a/docs/html/sdljoystickgetbutton.html b/docs/html/sdljoystickgetbutton.html
new file mode 100644
index 0000000..680e356
--- /dev/null
+++ b/docs/html/sdljoystickgetbutton.html
@@ -0,0 +1,231 @@
+SDL_JoystickGetButton
\ No newline at end of file
diff --git a/docs/html/sdljoystickgethat.html b/docs/html/sdljoystickgethat.html
new file mode 100644
index 0000000..c638abb
--- /dev/null
+++ b/docs/html/sdljoystickgethat.html
@@ -0,0 +1,297 @@
+SDL_JoystickGetHat
\ No newline at end of file
diff --git a/docs/html/sdljoystickindex.html b/docs/html/sdljoystickindex.html
new file mode 100644
index 0000000..868a75a
--- /dev/null
+++ b/docs/html/sdljoystickindex.html
@@ -0,0 +1,218 @@
+SDL_JoystickIndex
\ No newline at end of file
diff --git a/docs/html/sdljoystickname.html b/docs/html/sdljoystickname.html
new file mode 100644
index 0000000..0add817
--- /dev/null
+++ b/docs/html/sdljoystickname.html
@@ -0,0 +1,238 @@
+SDL_JoystickName
\ No newline at end of file
diff --git a/docs/html/sdljoysticknumaxes.html b/docs/html/sdljoysticknumaxes.html
new file mode 100644
index 0000000..53b67f5
--- /dev/null
+++ b/docs/html/sdljoysticknumaxes.html
@@ -0,0 +1,225 @@
+SDL_JoystickNumAxes
\ No newline at end of file
diff --git a/docs/html/sdljoysticknumballs.html b/docs/html/sdljoysticknumballs.html
new file mode 100644
index 0000000..0a8405d
--- /dev/null
+++ b/docs/html/sdljoysticknumballs.html
@@ -0,0 +1,225 @@
+SDL_JoystickNumBalls
\ No newline at end of file
diff --git a/docs/html/sdljoysticknumbuttons.html b/docs/html/sdljoysticknumbuttons.html
new file mode 100644
index 0000000..625b893
--- /dev/null
+++ b/docs/html/sdljoysticknumbuttons.html
@@ -0,0 +1,225 @@
+SDL_JoystickNumButtons
\ No newline at end of file
diff --git a/docs/html/sdljoysticknumhats.html b/docs/html/sdljoysticknumhats.html
new file mode 100644
index 0000000..ed53235
--- /dev/null
+++ b/docs/html/sdljoysticknumhats.html
@@ -0,0 +1,225 @@
+SDL_JoystickNumHats
\ No newline at end of file
diff --git a/docs/html/sdljoystickopen.html b/docs/html/sdljoystickopen.html
new file mode 100644
index 0000000..e608c43
--- /dev/null
+++ b/docs/html/sdljoystickopen.html
@@ -0,0 +1,259 @@
+SDL_JoystickOpen
\ No newline at end of file
diff --git a/docs/html/sdljoystickopened.html b/docs/html/sdljoystickopened.html
new file mode 100644
index 0000000..5275a09
--- /dev/null
+++ b/docs/html/sdljoystickopened.html
@@ -0,0 +1,233 @@
+SDL_JoystickOpened
\ No newline at end of file
diff --git a/docs/html/sdljoystickupdate.html b/docs/html/sdljoystickupdate.html
new file mode 100644
index 0000000..0cb37dc
--- /dev/null
+++ b/docs/html/sdljoystickupdate.html
@@ -0,0 +1,211 @@
+SDL_JoystickUpdate
SDL_JoystickUpdate -- Updates the state of all joysticks
Synopsis
#include "SDL.h"
void SDL_JoystickUpdate(void);
Description
Updates the state(position, buttons, etc.) of all open joysticks. If joystick events have been enabled with SDL_JoystickEventState then this is called automatically in the event loop.
\ No newline at end of file
diff --git a/docs/html/sdlkey.html b/docs/html/sdlkey.html
new file mode 100644
index 0000000..6591884
--- /dev/null
+++ b/docs/html/sdlkey.html
@@ -0,0 +1,2630 @@
+SDLKey
\ No newline at end of file
diff --git a/docs/html/sdlkeyboardevent.html b/docs/html/sdlkeyboardevent.html
new file mode 100644
index 0000000..1a6962c
--- /dev/null
+++ b/docs/html/sdlkeyboardevent.html
@@ -0,0 +1,375 @@
+SDL_KeyboardEvent
SDL_KeyboardEvent is a member of the SDL_Event union and is used when an event of type SDL_KEYDOWN or SDL_KEYUP is reported.
The type and state actually report the same information, they just use different values to do it! A keyboard event occurs when a key is released (type=SDK_KEYUP or state=SDL_RELEASED) and when a key is pressed (type=SDL_KEYDOWN or state=SDL_PRESSED). The information on what key was pressed or released is in the keysym structure.
Note: Repeating SDL_KEYDOWN events will occur if key repeat is enabled (see SDL_EnableKeyRepeat).
\ No newline at end of file
diff --git a/docs/html/sdlkeysym.html b/docs/html/sdlkeysym.html
new file mode 100644
index 0000000..7a22f79
--- /dev/null
+++ b/docs/html/sdlkeysym.html
@@ -0,0 +1,355 @@
+SDL_keysym
The SDL_keysym structure is used by reporting key presses and releases since it is a part of the SDL_KeyboardEvent.
The scancode field should generally be left alone, it is the hardware dependent scancode returned by the keyboard. The sym field is extremely useful. It is the SDL-defined value of the key (see SDL Key Syms. This field is very useful when you are checking for certain key presses, like so:
+
+mod stores the current state of the keyboard modifiers as explained in SDL_GetModState. The unicode is only used when UNICODE translation is enabled with SDL_EnableUNICODE. If unicode is non-zero then this a the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character:
+
\ No newline at end of file
diff --git a/docs/html/sdlkillthread.html b/docs/html/sdlkillthread.html
new file mode 100644
index 0000000..2ce7b9b
--- /dev/null
+++ b/docs/html/sdlkillthread.html
@@ -0,0 +1,223 @@
+SDL_KillThread
SDL_KillThread -- Gracelessly terminates the thread.
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
void SDL_KillThread(SDL_Thread *thread);
Description
SDL_KillThread gracelessly terminates the thread
+associated with thread. If possible, you should
+use some other form of IPC to signal the thread to quit.
\ No newline at end of file
diff --git a/docs/html/sdllistmodes.html b/docs/html/sdllistmodes.html
new file mode 100644
index 0000000..ee7bc0e
--- /dev/null
+++ b/docs/html/sdllistmodes.html
@@ -0,0 +1,310 @@
+SDL_ListModes
Return a pointer to an array of available screen dimensions for the given
+format and video flags, sorted largest to smallest. Returns
+NULL if there are no dimensions available for a particular
+format, or -1 if any dimension is okay for
+the given format.
If format is NULL, the mode list
+will be for the format returned by SDL_GetVideoInfo()->vfmt. The flag parameter is an OR'd combination of surface flags. The flags are the same as those used SDL_SetVideoMode and they play a strong role in deciding what modes are valid. For instance, if you pass SDL_HWSURFACE as a flag only modes that support hardware video surfaces will be returned.
Example
SDL_Rect **modes;
+int i;
+.
+.
+.
+
+/* Get available fullscreen/hardware modes */
+modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
+
+/* Check is there are any modes available */
+if(modes == (SDL_Rect **)0){
+ printf("No modes available!\n");
+ exit(-1);
+}
+
+/* Check if our resolution is restricted */
+if(modes == (SDL_Rect **)-1){
+ printf("All resolutions available.\n");
+}
+else{
+ /* Print valid modes */
+ printf("Available Modes\n");
+ for(i=0;modes[i];++i)
+ printf(" %d x %d\n", modes[i]->w, modes[i]->h);
+}
+.
+.
\ No newline at end of file
diff --git a/docs/html/sdlloadbmp.html b/docs/html/sdlloadbmp.html
new file mode 100644
index 0000000..41556e3
--- /dev/null
+++ b/docs/html/sdlloadbmp.html
@@ -0,0 +1,219 @@
+SDL_LoadBMP
\ No newline at end of file
diff --git a/docs/html/sdlloadwav.html b/docs/html/sdlloadwav.html
new file mode 100644
index 0000000..8abb73e
--- /dev/null
+++ b/docs/html/sdlloadwav.html
@@ -0,0 +1,296 @@
+SDL_LoadWAV
SDL_LoadWAV
+This function loads a WAVE file into memory.
If this function succeeds, it returns the given
+SDL_AudioSpec,
+filled with the audio data format of the wave data, and sets
+audio_buf to a malloc'd
+buffer containing the audio data, and sets audio_len
+to the length of that audio buffer, in bytes. You need to free the audio
+buffer with SDL_FreeWAV when you are
+done with it.
This function returns NULL and sets the SDL
+error message if the wave file cannot be opened, uses an unknown data format,
+or is corrupt. Currently raw, MS-ADPCM and IMA-ADPCM WAVE files are supported.
Example
SDL_AudioSpec wav_spec;
+Uint32 wav_length;
+Uint8 *wav_buffer;
+
+/* Load the WAV */
+if( SDL_LoadWAV("test.wav", &wav_spec, &wav_buffer, &wav_length) == NULL ){
+ fprintf(stderr, "Could not open test.wav: %s\n", SDL_GetError());
+ exit(-1);
+}
+.
+.
+.
+/* Do stuff with the WAV */
+.
+.
+/* Free It */
+SDL_FreeWAV(wav_buffer);
\ No newline at end of file
diff --git a/docs/html/sdllockaudio.html b/docs/html/sdllockaudio.html
new file mode 100644
index 0000000..0e6fc29
--- /dev/null
+++ b/docs/html/sdllockaudio.html
@@ -0,0 +1,208 @@
+SDL_LockAudio
The lock manipulated by these functions protects the callback function.
+During a LockAudio period, you can be guaranteed that the
+callback function is not running. Do not call these from the callback
+function or you will cause deadlock.
\ No newline at end of file
diff --git a/docs/html/sdllocksurface.html b/docs/html/sdllocksurface.html
new file mode 100644
index 0000000..40c8959
--- /dev/null
+++ b/docs/html/sdllocksurface.html
@@ -0,0 +1,306 @@
+SDL_LockSurface
SDL_LockSurface -- Lock a surface for directly access.
Synopsis
#include "SDL.h"
int SDL_LockSurface(SDL_Surface *surface);
Description
SDL_LockSurface sets up a surface for directly
+accessing the pixels. Between calls to SDL_LockSurface
+and SDL_UnlockSurface, you can write to and read from
+surface->pixels, using the pixel format stored in
+surface->format. Once you are done accessing the
+surface, you should use SDL_UnlockSurface to release it.
Not all surfaces require locking.
+If SDL_MUSTLOCK(surface)
+evaluates to 0, then you can read and write to the
+surface at any time, and the pixel format of the surface will not change.
No operating system or library calls should be made between lock/unlock
+pairs, as critical system locks may be held during this time.
It should be noted, that since SDL 1.1.8 surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have a match unlock.
+
.
+ .
+ SDL_LockSurface( surface );
+ .
+ /* Surface is locked */
+ /* Direct pixel access on surface here */
+ .
+ SDL_LockSurface( surface );
+ .
+ /* More direct pixel access on surface */
+ .
+ SDL_UnlockSurface( surface );
+ /* Surface is still locked */
+ /* Note: Is versions < 1.1.8, the surface would have been */
+ /* no longer locked at this stage */
+ .
+ SDL_UnlockSurface( surface );
+ /* Surface is now unlocked */
+ .
+ .
Return Value
SDL_LockSurface returns 0,
+or -1 if the surface couldn't be locked.
\ No newline at end of file
diff --git a/docs/html/sdllockyuvoverlay.html b/docs/html/sdllockyuvoverlay.html
new file mode 100644
index 0000000..74e6ce6
--- /dev/null
+++ b/docs/html/sdllockyuvoverlay.html
@@ -0,0 +1,252 @@
+SDL_LockYUVOverlay
\ No newline at end of file
diff --git a/docs/html/sdlmaprgb.html b/docs/html/sdlmaprgb.html
new file mode 100644
index 0000000..5086d0c
--- /dev/null
+++ b/docs/html/sdlmaprgb.html
@@ -0,0 +1,254 @@
+SDL_MapRGB
Maps the RGB color value to the specified pixel format and returns the
+pixel value as a 32-bit int.
If the format has a palette (8-bit) the index of the closest matching
+color in the palette will be returned.
If the specified pixel format has an alpha component it will be returned
+as all 1 bits (fully opaque).
Return Value
A pixel value best approximating the given RGB color value for a given
+pixel format. If the pixel format bpp (color depth) is less than 32-bpp
+then the unused upper bits of the return value can safely be ignored
+(e.g., with a 16-bpp format the return value can be assigned to a
+Uint16, and similarly a Uint8 for an 8-bpp
+format).
\ No newline at end of file
diff --git a/docs/html/sdlmaprgba.html b/docs/html/sdlmaprgba.html
new file mode 100644
index 0000000..e6bff27
--- /dev/null
+++ b/docs/html/sdlmaprgba.html
@@ -0,0 +1,242 @@
+SDL_MapRGBA
Maps the RGBA color value to the specified pixel format and returns the
+pixel value as a 32-bit int.
If the format has a palette (8-bit) the index of the closest matching
+color in the palette will be returned.
If the specified pixel format has no alpha component the alpha value
+will be ignored (as it will be in formats with a palette).
Return Value
A pixel value best approximating the given RGBA color value for a given
+pixel format. If the pixel format bpp (color depth) is less than 32-bpp
+then the unused upper bits of the return value can safely be ignored
+(e.g., with a 16-bpp format the return value can be assigned to a
+Uint16, and similarly a Uint8 for an 8-bpp
+format).
\ No newline at end of file
diff --git a/docs/html/sdlmixaudio.html b/docs/html/sdlmixaudio.html
new file mode 100644
index 0000000..6cbf0f0
--- /dev/null
+++ b/docs/html/sdlmixaudio.html
@@ -0,0 +1,237 @@
+SDL_MixAudio
void SDL_MixAudio(Uint8 *dst, Uint8 *src, Uint32 len, int volume);
Description
This function takes two audio buffers of len bytes each
+of the playing audio format and mixes them, performing addition, volume
+adjustment, and overflow clipping. The volume ranges
+from 0 to SDL_MIX_MAXVOLUME and should be set to the maximum
+value for full audio volume. Note this does not change hardware volume. This is
+provided for convenience -- you can mix your own audio data.
Note: Do not use this function for mixing together more than two streams of sample
+data. The output from repeated application of this function may be distorted
+by clipping, because there is no accumulator with greater range than the
+input (not to mention this being an inefficient way of doing it).
+Use mixing functions from SDL_mixer, OpenAL, or write your own mixer instead.
\ No newline at end of file
diff --git a/docs/html/sdlmousebuttonevent.html b/docs/html/sdlmousebuttonevent.html
new file mode 100644
index 0000000..b0b40df
--- /dev/null
+++ b/docs/html/sdlmousebuttonevent.html
@@ -0,0 +1,346 @@
+SDL_MouseButtonEvent
The mouse button index (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT)
state
SDL_PRESSED or SDL_RELEASED
x, y
The X/Y coordinates of the mouse at press/release time
Description
SDL_MouseButtonEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP is reported.
When a mouse button press or release is detected then number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into button, the position of the mouse when this event occured is stored in the x and the y fields. Like SDL_KeyboardEvent, information on whether the event was a press or a release event is stored in both the type and state fields, but this should be obvious.
\ No newline at end of file
diff --git a/docs/html/sdlmousemotionevent.html b/docs/html/sdlmousemotionevent.html
new file mode 100644
index 0000000..3cc7cb5
--- /dev/null
+++ b/docs/html/sdlmousemotionevent.html
@@ -0,0 +1,365 @@
+SDL_MouseMotionEvent
SDL_MouseMotionEvent is a member of the SDL_Event union and is used when an event of type SDL_MOUSEMOTION is reported.
Simply put, a SDL_MOUSEMOTION type event occurs when a user moves the mouse within the application window or when SDL_WarpMouse is called. Both the absolute (x and y) and relative (xrel and yrel) coordinates are reported along with the current button states (state). The button state can be interpreted using the SDL_BUTTON macro (see SDL_GetMouseState).
If the cursor is hidden (SDL_ShowCursor(0)) and the input is grabbed (SDL_WM_GrabInput(SDL_GRAB_ON)), then the mouse will give relative motion events even when the cursor reaches the edge fo the screen. This is currently only implemented on Windows and Linux/Unix-a-likes.
\ No newline at end of file
diff --git a/docs/html/sdlmutexp.html b/docs/html/sdlmutexp.html
new file mode 100644
index 0000000..fc32ca5
--- /dev/null
+++ b/docs/html/sdlmutexp.html
@@ -0,0 +1,241 @@
+SDL_mutexP
Locks the mutex, which was previously created with SDL_CreateMutex. If the mutex is already locked then SDL_mutexP will not return until it is unlocked. Returns 0 on success, or -1 on an error.
SDL also defines a macro #define SDL_LockMutex(m) SDL_mutexP(m).
\ No newline at end of file
diff --git a/docs/html/sdlmutexv.html b/docs/html/sdlmutexv.html
new file mode 100644
index 0000000..06a68bd
--- /dev/null
+++ b/docs/html/sdlmutexv.html
@@ -0,0 +1,235 @@
+SDL_mutexV
\ No newline at end of file
diff --git a/docs/html/sdlnumjoysticks.html b/docs/html/sdlnumjoysticks.html
new file mode 100644
index 0000000..68e3e3a
--- /dev/null
+++ b/docs/html/sdlnumjoysticks.html
@@ -0,0 +1,222 @@
+SDL_NumJoysticks
\ No newline at end of file
diff --git a/docs/html/sdlopenaudio.html b/docs/html/sdlopenaudio.html
new file mode 100644
index 0000000..bcfed54
--- /dev/null
+++ b/docs/html/sdlopenaudio.html
@@ -0,0 +1,578 @@
+SDL_OpenAudio
SDL_OpenAudio -- Opens the audio device with the desired parameters.
Synopsis
#include "SDL.h"
int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
Description
This function opens the audio device with the desired parameters, and
+returns 0 if successful, placing the actual hardware parameters in the
+structure pointed to by obtained. If obtained is NULL, the audio
+data passed to the callback function will be guaranteed to be in the
+requested format, and will be automatically converted to the hardware
+audio format if necessary. This function returns -1 if it failed
+to open the audio device, or couldn't set up the audio thread.
To open the audio device a desiredSDL_AudioSpec must be created.
+
The desired size of the audio buffer in samples. This number should be a power of two, and may be adjusted by the audio driver to a value more suitable for the hardware. Good values seem to range between 512 and 8192 inclusive, depending on the application and CPU speed. Smaller values yield faster response time, but can lead to underflow if the application is doing heavy processing and cannot fill the audio buffer in time. A stereo sample consists of both right and left channels in LR ordering. Note that the number of samples is directly related to time by the following formula: ms = (samples*1000)/freq
desired->callback
This should be set to a function that will be called when the audio device is ready for more data. It is passed a pointer to the audio buffer, and the length in bytes of the audio buffer. This function usually runs in a separate thread, and so you should protect data structures that it accesses by calling SDL_LockAudio and SDL_UnlockAudio in your code. The callback prototype is:
+
void callback(void *userdata, Uint8 *stream, int len);
+userdata is the pointer stored in userdata field of the SDL_AudioSpec. stream is a pointer to the audio buffer you want to fill with information and len is the length of the audio buffer in bytes.
desired->userdata
This pointer is passed as the first parameter to the callback function.
SDL_OpenAudio reads these fields from the desiredSDL_AudioSpec structure pass to the function and attempts to find an audio configuration matching your desired. As mentioned above, if the obtained parameter is NULL then SDL with convert from your desired audio settings to the hardware settings as it plays.
If obtained is NULL then the desiredSDL_AudioSpec is your working specification, otherwise the obtainedSDL_AudioSpec becomes the working specification and the desirec specification can be deleted. The data in the working specification is used when building SDL_AudioCVT's for converting loaded data to the hardware format.
SDL_OpenAudio calculates the size and silence fields for both the desired and obtained specifications. The size field stores the total size of the audio buffer in bytes, while the silence stores the value used to represent silence in the audio buffer
The audio device starts out playing silence when it's opened, and should be enabled for playing by calling SDL_PauseAudio(0) when you are ready for your audio callback function to be called. Since the audio driver may modify the requested size of the audio buffer, you should allocate any local mixing buffers after you open the audio device.
Examples
/* Prototype of our callback function */
+void my_audio_callback(void *userdata, Uint8 *stream, int len);
+
+/* Open the audio device */
+SDL_AudioSpec *desired, *obtained;
+SDL_AudioSpec *hardware_spec;
+
+/* Allocate a desired SDL_AudioSpec */
+desired = malloc(sizeof(SDL_AudioSpec));
+
+/* Allocate space for the obtained SDL_AudioSpec */
+obtained = malloc(sizeof(SDL_AudioSpec));
+
+/* 22050Hz - FM Radio quality */
+desired->freq=22050;
+
+/* 16-bit signed audio */
+desired->format=AUDIO_S16LSB;
+
+/* Mono */
+desired->channels=0;
+
+/* Large audio buffer reduces risk of dropouts but increases response time */
+desired->samples=8192;
+
+/* Our callback function */
+desired->callback=my_audio_callback;
+
+desired->userdata=NULL;
+
+/* Open the audio device */
+if ( SDL_OpenAudio(desired, obtained) < 0 ){
+ fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
+ exit(-1);
+}
+/* desired spec is no longer needed */
+free(desired);
+hardware_spec=obtained;
+.
+.
+/* Prepare callback for playing */
+.
+.
+.
+/* Start playing */
+SDL_PauseAudio(0);
\ No newline at end of file
diff --git a/docs/html/sdloverlay.html b/docs/html/sdloverlay.html
new file mode 100644
index 0000000..422919e
--- /dev/null
+++ b/docs/html/sdloverlay.html
@@ -0,0 +1,362 @@
+SDL_Overlay
Number of planes in the overlay. Usually either 1 or 3
pitches
An array of pitches, one for each plane. Pitch is the length of a row in bytes.
pixels
An array of pointers to teh data of each plane. The overlay should be locked before these pointers are used.
hw_overlay
This will be set to 1 if the overlay is hardware accelerated.
Description
A SDL_Overlay is similar to a SDL_Surface except it stores a YUV overlay. All the fields are read only, except for pixels which should be locked before use. The format field stores the format of the overlay which is one of the following:
+
#define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U */
+#define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V */
+#define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 */
+#define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 */
+#define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 */
\ No newline at end of file
diff --git a/docs/html/sdlpalette.html b/docs/html/sdlpalette.html
new file mode 100644
index 0000000..6498ac4
--- /dev/null
+++ b/docs/html/sdlpalette.html
@@ -0,0 +1,301 @@
+SDL_Palette
SDL_Palette -- Color palette for 8-bit pixel formats
Structure Definition
typedef struct{
+ int ncolors;
+ SDL_Color *colors;
+} SDL_Palette;
Structure Data
ncolors
Number of colors used in this palette
colors
Pointer to SDL_Color structures that make up the palette.
Description
Each pixel in an 8-bit surface is an index into the colors field of the SDL_Palette structure store in SDL_PixelFormat. A SDL_Palette should never need to be created manually. It is automatically created when SDL allocates a SDL_PixelFormat for a surface. The colors values of a SDL_Surfaces palette can be set with the SDL_SetColors.
\ No newline at end of file
diff --git a/docs/html/sdlpauseaudio.html b/docs/html/sdlpauseaudio.html
new file mode 100644
index 0000000..39d5a0f
--- /dev/null
+++ b/docs/html/sdlpauseaudio.html
@@ -0,0 +1,221 @@
+SDL_PauseAudio
SDL_PauseAudio -- Pauses and unpauses the audio callback processing
Synopsis
#include "SDL.h"
void SDL_PauseAudio(int pause_on);
Description
This function pauses and unpauses the audio callback processing.
+It should be called with pause_on=0 after opening the audio
+device to start playing sound. This is so you can safely initialize
+data for your callback function after opening the audio device.
+Silence will be written to the audio device during the pause.
\ No newline at end of file
diff --git a/docs/html/sdlpeepevents.html b/docs/html/sdlpeepevents.html
new file mode 100644
index 0000000..d5a0ff6
--- /dev/null
+++ b/docs/html/sdlpeepevents.html
@@ -0,0 +1,321 @@
+SDL_PeepEvents
SDL_PeepEvents -- Checks the event queue for messages and optionally returns them.
Synopsis
#include "SDL.h"
int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask);
Description
Checks the event queue for messages and optionally returns them.
If action is SDL_ADDEVENT, up to
+numevents events will be added to the back of the event
+ queue.
If action is SDL_PEEKEVENT, up to
+numevents events at the front of the event queue,
+matching mask,
+will be returned and will not be removed from the queue.
If action is SDL_GETEVENT, up to
+numevents events at the front of the event queue,
+matching mask,
+will be returned and will be removed from the queue.
The mask parameter is an bitwise OR of
+SDL_EVENTMASK(event_type), for all
+event types you are interested in.
This function is thread-safe.
Return Value
This function returns the number of events actually stored, or
+-1 if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlpixelformat.html b/docs/html/sdlpixelformat.html
new file mode 100644
index 0000000..000ddc0
--- /dev/null
+++ b/docs/html/sdlpixelformat.html
@@ -0,0 +1,528 @@
+SDL_PixelFormat
Pointer to the palette, or NULL if the BitsPerPixel>8
BitsPerPixel
The number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32.
BytesPerPixel
The number of bytes used to represent each pixel in a surface. Usually one to four.
[RGBA]mask
Binary mask used to retrieve individual color values
[RGBA]loss
Precision loss of each color component (2[RGBA]loss)
[RGBA]shift
Binary left shift of each color component in the pixel value
colorkey
Pixel value of transparent pixels
alpha
Overall surface alpha value
Description
A SDL_PixelFormat describes the format of the pixel data stored at the pixels field of a SDL_Surface. Every surface stores a SDL_PixelFormat in the format field.
If you wish to do pixel level modifications on a surface, then understanding how SDL stores its color information is essential.
8-bit pixel formats are the easiest to understand. Since its an 8-bit format, we have 8 BitsPerPixel and 1 BytesPerPixel. Since BytesPerPixel is 1, all pixels are represented by a Uint8 which contains an index into palette->colors. So, to determine the color of a pixel in a 8-bit surface: we read the color index from surface->pixels and we use that index to read the SDL_Color structure from surface->format->palette->colors. Like so:
+
SDL_Surface *surface;
+SDL_PixelFormat *fmt;
+SDL_Color *color;
+Uint8 index;
+
+.
+.
+
+/* Create surface */
+.
+.
+fmt=surface->format;
+
+/* Check the bitdepth of the surface */
+if(fmt->BitsPerPixel!=8){
+ fprintf(stderr, "Not an 8-bit surface.\n");
+ return(-1);
+}
+
+/* Lock the surface */
+SDL_LockSurface(surface);
+
+/* Get the topleft pixel */
+index=*(Uint8 *)surface->pixels;
+color=fmt->palette->colors[index];
+
+/* Unlock the surface */
+SDL_UnlockSurface(surface);
+printf("Pixel Color-> Red: %d, Green: %d, Blue: %d. Index: %d\n",
+ color->r, color->g, color->b, index);
+.
+.
Pixel formats above 8-bit are an entirely different experience. They are
+considered to be "TrueColor" formats and the color information is stored in the
+pixels themselves, not in a palette. The mask, shift and loss fields tell us
+how the color information is encoded. The mask fields allow us to isolate each
+color component, the shift fields tell us the number of bits to the right of
+each component in the pixel value and the loss fields tell us the number of
+bits lost from each component when packing 8-bit color component in a pixel.
+
/* Extracting color components from a 32-bit color value */
+SDL_PixelFormat *fmt;
+SDL_Surface *surface;
+Uint32 temp, pixel;
+Uint8 red, green, blue, alpha;
+.
+.
+.
+fmt=surface->format;
+SDL_LockSurface(surface);
+pixel=*((Uint32*)surface->pixels);
+SDL_UnlockSurface(surface);
+
+/* Get Red component */
+temp=pixel&fmt->Rmask; /* Isolate red component */
+temp=temp>>fmt->Rshift;/* Shift it down to 8-bit */
+temp=temp<<fmt->Rloss; /* Expand to a full 8-bit number */
+red=(Uint8)temp;
+
+/* Get Green component */
+temp=pixel&fmt->Gmask; /* Isolate green component */
+temp=temp>>fmt->Gshift;/* Shift it down to 8-bit */
+temp=temp<<fmt->Gloss; /* Expand to a full 8-bit number */
+green=(Uint8)temp;
+
+/* Get Blue component */
+temp=pixel&fmt->Bmask; /* Isolate blue component */
+temp=temp>>fmt->Bshift;/* Shift it down to 8-bit */
+temp=temp<<fmt->Bloss; /* Expand to a full 8-bit number */
+blue=(Uint8)temp;
+
+/* Get Alpha component */
+temp=pixel&fmt->Amask; /* Isolate alpha component */
+temp=temp>>fmt->Ashift;/* Shift it down to 8-bit */
+temp=temp<<fmt->Aloss; /* Expand to a full 8-bit number */
+alpha=(Uint8)temp;
+
+printf("Pixel Color -> R: %d, G: %d, B: %d, A: %d\n", red, green, blue, alpha);
+.
+.
+.
SDL_PollEvent -- Polls for currently pending events.
Synopsis
#include "SDL.h"
int SDL_PollEvent(SDL_Event *event);
Description
Polls for currently pending events, and returns 1
+if there are any pending events, or 0 if there
+are none available.
If event is not NULL, the next
+event is removed from the queue and stored in that area.
Examples
SDL_Event event; /* Event structure */
+
+.
+.
+.
+/* Check for events */
+while(SDL_PollEvent(&event)){ /* Loop until there are no events left on the queue */
+ switch(event.type){ /* Process the appropiate event type */
+ case SDL_KEYDOWN: /* Handle a KEYDOWN event */
+ printf("Oh! Key press\n");
+ break;
+ case SDL_MOUSEMOTION:
+ .
+ .
+ .
+ default: /* Report an unhandled event */
+ printf("I don't know what this event is!\n");
+ }
+}
\ No newline at end of file
diff --git a/docs/html/sdlpumpevents.html b/docs/html/sdlpumpevents.html
new file mode 100644
index 0000000..a7e528f
--- /dev/null
+++ b/docs/html/sdlpumpevents.html
@@ -0,0 +1,244 @@
+SDL_PumpEvents
SDL_PumpEvents -- Pumps the event loop, gathering events from the input devices.
Synopsis
#include "SDL.h"
void SDL_PumpEvents(void);
Description
Pumps the event loop, gathering events from the input devices.
SDL_PumpEvents gathers all the pending input information from devices and places it on the event queue. Without calls to SDL_PumpEvents no events would ever be placed on the queue. Often calls the need for SDL_PumpEvents is hidden from the user since SDL_PollEvent and SDL_WaitEvent implicitly call SDL_PumpEvents. However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call SDL_PumpEvents to force an event queue update.
Note: You can only call this function in the thread that set the video mode.
\ No newline at end of file
diff --git a/docs/html/sdlpushevent.html b/docs/html/sdlpushevent.html
new file mode 100644
index 0000000..6905385
--- /dev/null
+++ b/docs/html/sdlpushevent.html
@@ -0,0 +1,266 @@
+SDL_PushEvent
SDL_PushEvent -- Pushes an event onto the event queue
Synopsis
#include "SDL.h"
int SDL_PushEvent(SDL_Event *event);
Description
The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events onto it. event is a pointer to the event structure you wish to push onto the queue.
Note: Pushing device input events onto the queue doesn't modify the state of the device within SDL.
Return Value
Returns 0 on success or -1 if the event couldn't be pushed.
\ No newline at end of file
diff --git a/docs/html/sdlquit.html b/docs/html/sdlquit.html
new file mode 100644
index 0000000..1f31c82
--- /dev/null
+++ b/docs/html/sdlquit.html
@@ -0,0 +1,244 @@
+SDL_Quit
SDL_Quit shuts down all SDL subsystems and frees the resources allocated to them. This should always be called before you exit. For the sake of simplicity you can set SDL_Quit as your atexit call, like:
+
Note: While using atexit maybe be fine for small programs, more advanced users should shut down SDL in their own cleanup code. Plus, using atexit in a library is a sure way to crash dynamically loaded code
\ No newline at end of file
diff --git a/docs/html/sdlquitevent.html b/docs/html/sdlquitevent.html
new file mode 100644
index 0000000..d575f38
--- /dev/null
+++ b/docs/html/sdlquitevent.html
@@ -0,0 +1,263 @@
+SDL_QuitEvent
SDL_QuitEvent is a member of the SDL_Event union and is used whan an event of type SDL_QUIT is reported.
As can be seen, the SDL_QuitEvent structure serves no useful purpose. The event itself, on the other hand, is very important. If you filter out or ignore a quit event then it is impossible for the user to close the window. On the other hand, if you do accept a quit event then the application window will be closed, and screen updates will still report success event though the application will no longer be visible.
Note: The macro SDL_QuitRequested will return non-zero if a quit event is pending
\ No newline at end of file
diff --git a/docs/html/sdlquitsubsystem.html b/docs/html/sdlquitsubsystem.html
new file mode 100644
index 0000000..877e3ce
--- /dev/null
+++ b/docs/html/sdlquitsubsystem.html
@@ -0,0 +1,248 @@
+SDL_QuitSubSystem
SDL_QuitSubSystem allows you to shut down a subsystem that has been previously initialized by SDL_Init or SDL_InitSubSystem. The flags tells SDL_QuitSubSystem which subsystems to shut down, it uses the same values that are passed to SDL_Init.
\ No newline at end of file
diff --git a/docs/html/sdlrect.html b/docs/html/sdlrect.html
new file mode 100644
index 0000000..ba4a80b
--- /dev/null
+++ b/docs/html/sdlrect.html
@@ -0,0 +1,258 @@
+SDL_Rect
\ No newline at end of file
diff --git a/docs/html/sdlremovetimer.html b/docs/html/sdlremovetimer.html
new file mode 100644
index 0000000..26a3d11
--- /dev/null
+++ b/docs/html/sdlremovetimer.html
@@ -0,0 +1,236 @@
+SDL_RemoveTimer
\ No newline at end of file
diff --git a/docs/html/sdlresizeevent.html b/docs/html/sdlresizeevent.html
new file mode 100644
index 0000000..1d446a5
--- /dev/null
+++ b/docs/html/sdlresizeevent.html
@@ -0,0 +1,307 @@
+SDL_ResizeEvent
SDL_ResizeEvent is a member of the SDL_Event union and is used when an event of type SDL_VIDEORESIZE is reported.
When SDL_RESIZABLE is passed as a flag to SDL_SetVideoMode the user is allowed to resize the applications window. When the window is resized an SDL_VIDEORESIZE is report, with the new window width and height values stored in w and h, respectively. When an SDL_VIDEORESIZE is recieved the window should be resized to the new dimensions using SDL_SetVideoMode.
\ No newline at end of file
diff --git a/docs/html/sdlsavebmp.html b/docs/html/sdlsavebmp.html
new file mode 100644
index 0000000..4c318ed
--- /dev/null
+++ b/docs/html/sdlsavebmp.html
@@ -0,0 +1,236 @@
+SDL_SaveBMP
\ No newline at end of file
diff --git a/docs/html/sdlsempost.html b/docs/html/sdlsempost.html
new file mode 100644
index 0000000..18fb01a
--- /dev/null
+++ b/docs/html/sdlsempost.html
@@ -0,0 +1,299 @@
+SDL_SemPost
SDL_SemPost unlocks the semaphore pointed to by
+sem and atomically increments the semaphores value.
+Threads that were blocking on the semaphore may be scheduled after this call
+succeeds.
\ No newline at end of file
diff --git a/docs/html/sdlsemtrywait.html b/docs/html/sdlsemtrywait.html
new file mode 100644
index 0000000..86f47a1
--- /dev/null
+++ b/docs/html/sdlsemtrywait.html
@@ -0,0 +1,319 @@
+SDL_SemTryWait
SDL_SemTryWait -- Attempt to lock a semaphore but don't suspend the thread.
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
int SDL_SemTryWait(SDL_sem *sem);
Description
SDL_SemTryWait is a non-blocking varient of
+SDL_SemWait. If the value of the semaphore
+pointed to by sem is positive it will atomically
+decrement the semaphore value and return 0, otherwise it will return
+SDL_MUTEX_TIMEDOUT instead of suspending the thread.
After SDL_SemTryWait is successful, the semaphore
+can be released and its count atomically incremented by a successful call to
+SDL_SemPost.
Return Value
Returns 0 if the semaphore was successfully locked or
+either SDL_MUTEX_TIMEDOUT or -1
+if the thread would have suspended or there was an error, respectivly.
If the semaphore was not successfully locked, the semaphore will be unchanged.
\ No newline at end of file
diff --git a/docs/html/sdlsemvalue.html b/docs/html/sdlsemvalue.html
new file mode 100644
index 0000000..7867369
--- /dev/null
+++ b/docs/html/sdlsemvalue.html
@@ -0,0 +1,273 @@
+SDL_SemValue
\ No newline at end of file
diff --git a/docs/html/sdlsemwait.html b/docs/html/sdlsemwait.html
new file mode 100644
index 0000000..5e98d55
--- /dev/null
+++ b/docs/html/sdlsemwait.html
@@ -0,0 +1,298 @@
+SDL_SemWait
SDL_SemWait -- Lock a semaphore and suspend the thread if the semaphore value is zero.
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
int SDL_SemWait(SDL_sem *sem);
Description
SDL_SemWait() suspends the calling thread until either
+the semaphore pointed to by sem has a positive value,
+the call is interrupted by a signal or error. If the call is successful it
+will atomically decrement the semaphore value.
After SDL_SemWait() is successful, the semaphore
+can be released and its count atomically incremented by a successful call to
+SDL_SemPost.
Return Value
Returns 0 if successful or
+-1 if there was an error (leaving the semaphore unchanged).
\ No newline at end of file
diff --git a/docs/html/sdlsemwaittimeout.html b/docs/html/sdlsemwaittimeout.html
new file mode 100644
index 0000000..788f5b7
--- /dev/null
+++ b/docs/html/sdlsemwaittimeout.html
@@ -0,0 +1,322 @@
+SDL_SemWaitTimeout
SDL_SemWaitTimeout -- Lock a semaphore, but only wait up to a specified maximum time.
Synopsis
#include "SDL.h"
+#include "SDL_thread.h"
int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout);
Description
SDL_SemWaitTimeout() is a varient of
+SDL_SemWait
+with a maximum timeout value.
+If the value of the semaphore pointed to by sem is
+positive (greater than zero) it will atomically decrement the semaphore value
+and return 0, otherwise it will wait up to timeout
+milliseconds trying to lock the semaphore. This function is to be avoided if
+possible since on some platforms it is implemented by polling the semaphore
+every millisecond in a busy loop.
After SDL_SemWaitTimeout() is successful, the semaphore
+can be released and its count atomically incremented by a successful call to
+SDL_SemPost.
Return Value
Returns 0 if the semaphore was successfully locked or
+either SDL_MUTEX_TIMEDOUT or -1
+if the timeout period was exceeded or there was an error, respectivly.
If the semaphore was not successfully locked, the semaphore will be unchanged.
\ No newline at end of file
diff --git a/docs/html/sdlsetalpha.html b/docs/html/sdlsetalpha.html
new file mode 100644
index 0000000..fc84498
--- /dev/null
+++ b/docs/html/sdlsetalpha.html
@@ -0,0 +1,500 @@
+SDL_SetAlpha
SDL_SetAlpha -- Adjust the alpha properties of a surface
Synopsis
#include "SDL.h"
int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
Description
Note: This function and the semantics of SDL alpha blending have changed since version 1.1.4. Up until version 1.1.5, an alpha value of 0 was considered opaque and a value of 255 was considered transparent. This has now been inverted: 0 (SDL_ALPHA_TRANSPARENT) is now considered transparent and 255 (SDL_ALPHA_OPAQUE) is now considered opaque.
SDL_SetAlpha is used for setting the per-surface alpha
+value and/or enabling and disabling alpha blending.
Thesurface parameter specifies which surface whose alpha
+attributes you wish to adjust. flags is used to specify
+whether alpha blending should be used (SDL_SRCALPHA) and
+whether the surface should use RLE acceleration for blitting
+(SDL_RLEACCEL). flags can be an OR'd
+combination of these two options, one of these options or 0. If
+SDL_SRCALPHA is not passed as a flag then all alpha
+information is ignored when blitting the surface. The
+alpha parameter is the per-surface alpha value; a
+surface need not have an alpha channel to use per-surface alpha and blitting
+can still be accelerated with SDL_RLEACCEL.
Note: The per-surface alpha value of 128 is considered a special case and
+is optimised, so it's much faster than other per-surface values.
Alpha effects surface blitting in the following ways:
RGBA->RGB with SDL_SRCALPHA
The source is alpha-blended with the destination, using the alpha channel. SDL_SRCCOLORKEY and the per-surface alpha are ignored.
RGBA->RGB without SDL_SRCALPHA
The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored.
RGB->RGBA with SDL_SRCALPHA
The source is alpha-blended with the destination using the per-surface alpha
+value. If SDL_SRCCOLORKEY is set, only the pixels not
+matching the colorkey value are copied. The alpha channel of the copied pixels
+is set to opaque.
RGB->RGBA without SDL_SRCALPHA
The RGB data is copied from the source and the alpha value of the copied pixels
+is set to opaque. If SDL_SRCCOLORKEY is set, only the pixels
+not matching the colorkey value are copied.
RGBA->RGBA with SDL_SRCALPHA
The source is alpha-blended with the destination using the source alpha
+channel. The alpha channel in the destination surface is left untouched.
+SDL_SRCCOLORKEY is ignored.
RGBA->RGBA without SDL_SRCALPHA
The RGBA data is copied to the destination surface. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
RGB->RGB with SDL_SRCALPHA
The source is alpha-blended with the destination using the per-surface alpha value. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
RGB->RGB without SDL_SRCALPHA
The RGB data is copied from the source. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
Note: Note that RGBA->RGBA blits (with SDL_SRCALPHA set) keep the alpha
+of the destination surface. This means that you cannot compose two arbitrary
+RGBA surfaces this way and get the result you would expect from "overlaying"
+them; the destination alpha will work as a mask.
Also note that per-pixel and per-surface alpha cannot be combined;
+the per-pixel alpha is always used if available
Return Value
This function returns 0, or
+-1 if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlsetcliprect.html b/docs/html/sdlsetcliprect.html
new file mode 100644
index 0000000..03898d5
--- /dev/null
+++ b/docs/html/sdlsetcliprect.html
@@ -0,0 +1,241 @@
+SDL_SetClipRect
Sets the clipping rectangle for a surface. When this surface is the
+destination of a blit, only the area within the clip rectangle will be
+drawn into.
The rectangle pointed to by rect will be
+clipped to the edges of the surface so that the clip rectangle for a
+surface can never fall outside the edges of the surface.
If rect is NULL the clipping
+rectangle will be set to the full size of the surface.
\ No newline at end of file
diff --git a/docs/html/sdlsetcolorkey.html b/docs/html/sdlsetcolorkey.html
new file mode 100644
index 0000000..0cb6695
--- /dev/null
+++ b/docs/html/sdlsetcolorkey.html
@@ -0,0 +1,321 @@
+SDL_SetColorKey
SDL_SetColorKey -- Sets the color key (transparent pixel) in a blittable surface and
+RLE acceleration.
Synopsis
#include "SDL.h"
int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key);
Description
Sets the color key (transparent pixel) in a blittable surface and enables or
+ disables RLE blit acceleration.
RLE acceleration can substantially speed up blitting of images with large
+horizontal runs of transparent pixels (i.e., pixels that match the
+key value). The key must be of the same pixel format as the surface, SDL_MapRGB is often useful for obtaining an acceptable value.
If flag is SDL_SRCCOLORKEY then
+key is the transparent pixel value in the source image of a
+blit.
If flag is OR'd with
+SDL_RLEACCEL then the surface will be draw using RLE
+acceleration when drawn with
+SDL_BlitSurface. The surface will
+actually be encoded for RLE acceleration the first time
+SDL_BlitSurface or
+SDL_DisplayFormat is called on the
+surface.
If flag is 0, this function clears
+any current color key.
Return Value
This function returns 0, or
+-1 if there was an error.
\ No newline at end of file
diff --git a/docs/html/sdlsetcolors.html b/docs/html/sdlsetcolors.html
new file mode 100644
index 0000000..5695645
--- /dev/null
+++ b/docs/html/sdlsetcolors.html
@@ -0,0 +1,358 @@
+SDL_SetColors
SDL_SetColors -- Sets a portion of the colormap for the given 8-bit surface.
Synopsis
#include "SDL.h"
int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);
Description
Sets a portion of the colormap for the given 8-bit surface.
When surface is the surface associated with the current
+display, the display colormap will be updated with the requested colors. If
+SDL_HWPALETTE was set in SDL_SetVideoMode flags,
+SDL_SetColors will always return 1,
+and the palette is guaranteed to be set the way you desire, even if the window
+colormap has to be warped or run under emulation.
The color components of a
+SDL_Color
+structure are 8-bits in size, giving you a total of 2563
+=16777216 colors.
Palettized (8-bit) screen surfaces with the SDL_HWPALETTE
+flag have two palettes, a logical palette that is used for mapping blits
+to/from the surface and a physical palette (that determines how the
+hardware will map the colors to the display). SDL_SetColors
+modifies both palettes (if present), and is equivalent to calling
+SDL_SetPalette with the
+flags set to
+(SDL_LOGPAL | SDL_PHYSPAL).
Return Value
If surface is not a palettized surface, this function
+does nothing, returning 0. If all of the colors were set
+as passed to SDL_SetColors, it will return
+1. If not all the color entries were set exactly as
+given, it will return 0, and you should look at the
+surface palette to determine the actual color palette.
Example
/* Create a display surface with a grayscale palette */
+SDL_Surface *screen;
+SDL_Color colors[256];
+int i;
+.
+.
+.
+/* Fill colors with color information */
+for(i=0;i<256;i++){
+ colors[i].r=i;
+ colors[i].g=i;
+ colors[i].b=i;
+}
+
+/* Create display */
+screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE);
+if(!screen){
+ printf("Couldn't set video mode: %s\n", SDL_GetError());
+ exit(-1);
+}
+
+/* Set palette */
+SDL_SetColors(screen, colors, 0, 256);
+.
+.
+.
+.
\ No newline at end of file
diff --git a/docs/html/sdlsetcursor.html b/docs/html/sdlsetcursor.html
new file mode 100644
index 0000000..9c5443e
--- /dev/null
+++ b/docs/html/sdlsetcursor.html
@@ -0,0 +1,222 @@
+SDL_SetCursor
SDL_SetCursor -- Set the currently active mouse cursor.
Synopsis
#include "SDL.h"
void SDL_SetCursor(SDL_Cursor *cursor);
Description
Sets the currently active cursor to
+the specified one.
+If the cursor is currently visible, the change will be immediately
+represented on the display.
SDL_SetEventFilter -- Sets up a filter to process all events before they are posted
+to the event queue.
Synopsis
#include "SDL.h"
void SDL_SetEventFilter(SDL_EventFilter filter);
Description
This function sets up a filter to process all events before they are posted
+to the event queue. This is a very powerful and flexible feature. The filter
+is prototyped as:
+
typedef int (*SDL_EventFilter)(const SDL_Event *event);
+If the filter returns 1, then the event will be
+added to the internal queue. If it returns 0,
+then the event will be dropped from the queue. This allows selective
+filtering of dynamically.
There is one caveat when dealing with the SDL_QUITEVENT event type. The
+event filter is only called when the window manager desires to close the
+application window. If the event filter returns 1, then the window will
+be closed, otherwise the window will remain open if possible.
+If the quit event is generated by an interrupt signal, it will bypass the
+internal queue and be delivered to the application at the next event poll.
Note: Events pushed onto the queue with SDL_PushEvent or SDL_PeepEvents do not get passed through the event filter.
Note: Be Careful! The event filter function may run in a different thread so be careful what you do within it.
\ No newline at end of file
diff --git a/docs/html/sdlsetgamma.html b/docs/html/sdlsetgamma.html
new file mode 100644
index 0000000..6443a96
--- /dev/null
+++ b/docs/html/sdlsetgamma.html
@@ -0,0 +1,231 @@
+SDL_SetGamma
SDL_SetGamma -- Sets the color gamma function for the display
Synopsis
#include "SDL.h"
int SDL_SetGamma(float redgamma, float greengamma, float bluegamma);
Description
Sets the "gamma function" for the display of each color component. Gamma
+controls the brightness/contrast of colors displayed on the screen.
+A gamma value of 1.0 is identity (i.e., no adjustment
+is made).
This function adjusts the gamma based on the "gamma function" parameter,
+you can directly specify lookup tables for gamma adjustment with
+SDL_SetGammaRamp.
Not all display hardware is able to change gamma.
Return Value
Returns -1 on error (or if gamma adjustment is not supported).
\ No newline at end of file
diff --git a/docs/html/sdlsetgammaramp.html b/docs/html/sdlsetgammaramp.html
new file mode 100644
index 0000000..79599c8
--- /dev/null
+++ b/docs/html/sdlsetgammaramp.html
@@ -0,0 +1,230 @@
+SDL_SetGammaRamp
SDL_SetGammaRamp -- Sets the color gamma lookup tables for the display
Synopsis
#include "SDL.h"
int SDL_SetGammaRamp(Uint16 *redtable, Uint16 *greentable, Uint16 *bluetable);
Description
Sets the gamma lookup tables for the display for each color component.
+Each table is an array of 256 Uint16 values, representing a mapping
+between the input and output for that channel. The input is the index
+into the array, and the output is the 16-bit gamma value at that index,
+scaled to the output color precision. You may pass NULL to any of the
+channels to leave them unchanged.
This function adjusts the gamma based on lookup tables, you can also
+have the gamma calculated based on a "gamma function" parameter with
+SDL_SetGamma.
Not all display hardware is able to change gamma.
Return Value
Returns -1 on error (or if gamma adjustment is not supported).
\ No newline at end of file
diff --git a/docs/html/sdlsetmodstate.html b/docs/html/sdlsetmodstate.html
new file mode 100644
index 0000000..ee69a3f
--- /dev/null
+++ b/docs/html/sdlsetmodstate.html
@@ -0,0 +1,237 @@
+SDL_SetModState
\ No newline at end of file
diff --git a/docs/html/sdlsetpalette.html b/docs/html/sdlsetpalette.html
new file mode 100644
index 0000000..1622f15
--- /dev/null
+++ b/docs/html/sdlsetpalette.html
@@ -0,0 +1,352 @@
+SDL_SetPalette
SDL_SetPalette -- Sets the colors in the palette of an 8-bit surface.
Synopsis
#include "SDL.h"
int SDL_SetPalette(SDL_Surface *surface, int flags, SDL_Color *colors, int firstcolor, int ncolors);
Description
Sets a portion of the palette for the given 8-bit surface.
Palettized (8-bit) screen surfaces with the
+SDL_HWPALETTE flag have two palettes, a logical
+palette that is used for mapping blits to/from the surface and a
+physical palette (that determines how the hardware will map the colors
+to the display). SDL_BlitSurface
+always uses the logical palette when blitting surfaces (if it has to
+convert between surface pixel formats). Because of this, it is often
+useful to modify only one or the other palette to achieve various
+special color effects (e.g., screen fading, color flashes, screen dimming).
This function can modify either the logical or physical palette by
+specifing SDL_LOGPAL or
+SDL_PHYSPALthe in the flags
+parameter.
When surface is the surface associated with the current
+display, the display colormap will be updated with the requested colors. If
+SDL_HWPALETTE was set in SDL_SetVideoMode flags,
+SDL_SetPalette will always return 1,
+and the palette is guaranteed to be set the way you desire, even if the window
+colormap has to be warped or run under emulation.
The color components of a
+SDL_Color structure
+are 8-bits in size, giving you a total of
+2563=16777216 colors.
Return Value
If surface is not a palettized surface, this function
+does nothing, returning 0. If all of the colors were set
+as passed to SDL_SetPalette, it will return
+1. If not all the color entries were set exactly as
+given, it will return 0, and you should look at the
+surface palette to determine the actual color palette.
Example
/* Create a display surface with a grayscale palette */
+ SDL_Surface *screen;
+ SDL_Color colors[256];
+ int i;
+ .
+ .
+ .
+ /* Fill colors with color information */
+ for(i=0;i<256;i++){
+ colors[i].r=i;
+ colors[i].g=i;
+ colors[i].b=i;
+ }
+
+ /* Create display */
+ screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE);
+ if(!screen){
+ printf("Couldn't set video mode: %s\n", SDL_GetError());
+ exit(-1);
+ }
+
+ /* Set palette */
+ SDL_SetPalette(screen, SDL_LOGPAL|SDL_PHYSPAL, colors, 0, 256);
+ .
+ .
+ .
+ .
\ No newline at end of file
diff --git a/docs/html/sdlsettimer.html b/docs/html/sdlsettimer.html
new file mode 100644
index 0000000..40b737c
--- /dev/null
+++ b/docs/html/sdlsettimer.html
@@ -0,0 +1,267 @@
+SDL_SetTimer
SDL_SetTimer -- Set a callback to run after the specified number of milliseconds has
+elapsed.
Synopsis
#include "SDL.h"
int SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
Callback
/* Function prototype for the timer callback function */
+typedef Uint32 (*SDL_TimerCallback)(Uint32 interval);
Description
Set a callback to run after the specified number of milliseconds has
+elapsed. The callback function is passed the current timer interval
+and returns the next timer interval. If the returned value is the
+same as the one passed in, the periodic alarm continues, otherwise a
+new alarm is scheduled.
To cancel a currently running timer, call
+SDL_SetTimer(0, NULL);
The timer callback function may run in a different thread than your
+main constant, and so shouldn't call any functions from within itself.
The maximum resolution of this timer is 10 ms, which means that if
+you request a 16 ms timer, your callback will run approximately 20 ms
+later on an unloaded system. If you wanted to set a flag signaling
+a frame update at 30 frames per second (every 33 ms), you might set a
+timer for 30 ms (see example below).
If you use this function, you need to pass SDL_INIT_TIMER
+to SDL_Init().
Note: This function is kept for compatibility but has been superseded
+by the new timer functions
+SDL_AddTimer and
+SDL_RemoveTimer which support
+multiple timers.
\ No newline at end of file
diff --git a/docs/html/sdlsetvideomode.html b/docs/html/sdlsetvideomode.html
new file mode 100644
index 0000000..8b309b0
--- /dev/null
+++ b/docs/html/sdlsetvideomode.html
@@ -0,0 +1,558 @@
+SDL_SetVideoMode
SDL_SetVideoMode -- Set up a video mode with the specified width, height and bits-per-pixel.
Synopsis
#include "SDL.h"
SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags);
Description
Set up a video mode with the specified width, height and bits-per-pixel.
If bpp is 0, it is treated as the
+current display bits per pixel.
The flags parameter is the same as the flags field of the SDL_Surface structure. OR'd combinations of the following values are valid.
SDL_SWSURFACE
Create the video surface in system memory
SDL_HWSURFACE
Create the video surface in video memory
SDL_ASYNCBLIT
Enables the use of asynchronous updates of the display surface. This will
+usually slow down blitting on single CPU machines, but may provide a speed
+increase on SMP systems.
SDL_ANYFORMAT
Normally, if a video surface of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface. Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its pixel depth.
SDL_HWPALETTE
Give SDL exclusive palette access. Without this flag you may not always get the the colors you request with SDL_SetColors or SDL_SetPalette.
SDL_DOUBLEBUF
Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling
+SDL_Flip will flip the
+buffers and update the screen. All drawing will take place on the surface
+that is not displayed at the moment. If double buffering could not be enabled
+then SDL_Flip will just perform a
+SDL_UpdateRect
+on the entire screen.
SDL_FULLSCREEN
SDL will attempt to use a fullscreen mode. If a hardware resolution change is
+not possible (for whatever reason), the next higher resolution will be used and
+the display window centered on a black background.
SDL_OPENGL
Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL_GL_SetAttribute.
SDL_OPENGLBLIT
Create an OpenGL rendering context, like above, but allow normal blitting
+operations. The screen (2D) surface may have an alpha channel, and
+SDL_UpdateRects
+must be used for updating changes to the screen surface. NOTE: This option
+is kept for compatibility only, and is not recommended for
+new code.
SDL_RESIZABLE
Create a resizable window. When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL_SetVideoMode can be called again with the new size.
SDL_NOFRAME
If possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration. Fullscreen modes automatically have this flag set.
Note: Whatever flagsSDL_SetVideoMode could satisfy are set in the flags member of the returned surface.
Note: The bpp parameter is the number of bits per pixel,
+so a bpp of 24 uses the packed representation of
+3 bytes/pixel. For the more common 4 bytes/pixel mode, use a
+bpp of 32. Somewhat oddly, both 15 and 16 will
+request a 2 bytes/pixel mode, but different pixel formats.
Return Value
The framebuffer surface, or NULL if it fails.
+The surface returned is freed by SDL_Quit() and should nt be freed by
+the caller.
\ No newline at end of file
diff --git a/docs/html/sdlshowcursor.html b/docs/html/sdlshowcursor.html
new file mode 100644
index 0000000..5a8f19d
--- /dev/null
+++ b/docs/html/sdlshowcursor.html
@@ -0,0 +1,239 @@
+SDL_ShowCursor
SDL_ShowCursor -- Toggle whether or not the cursor is shown on the screen.
Synopsis
#include "SDL.h"
int SDL_ShowCursor(int toggle);
Description
Toggle whether or not the cursor is shown on the screen. Passing SDL_ENABLE displays the cursor and passing SDL_DISABLE hides it. The current state of the mouse cursor can be queried by passing SDL_QUERY, either SDL_DISABLE or SDL_ENABLE will be returned.
The cursor starts off displayed, but can be turned off.
\ No newline at end of file
diff --git a/docs/html/sdlsurface.html b/docs/html/sdlsurface.html
new file mode 100644
index 0000000..fda55f1
--- /dev/null
+++ b/docs/html/sdlsurface.html
@@ -0,0 +1,597 @@
+SDL_Surface
SDL_Surface's represent areas of "graphical"
+memory, memory that can be drawn to. The video framebuffer is returned
+as a SDL_Surface by
+SDL_SetVideoMode
+and SDL_GetVideoSurface.
+Most of the fields should be pretty obvious.
+w and h are the
+width and height of the surface in pixels.
+pixels is a pointer to the actual pixel data,
+the surface should be locked
+before accessing this field. The clip_rect field
+is the clipping rectangle as set by
+SDL_SetClipRect.
\ No newline at end of file
diff --git a/docs/html/sdlsyswmevent.html b/docs/html/sdlsyswmevent.html
new file mode 100644
index 0000000..fd7180e
--- /dev/null
+++ b/docs/html/sdlsyswmevent.html
@@ -0,0 +1,233 @@
+SDL_SysWMEvent
The system window manager event contains a pointer to system-specific
+information about unknown window manager events. If you enable this event
+using
+SDL_EventState(),
+it will be generated whenever unhandled events are received from the window
+manager. This can be used, for example, to implement cut-and-paste in your
+application.
+
+
+
+If you want to obtain system-specific information about the window manager,
+you can fill the version member of a SDL_SysWMinfo
+structure (details can be found in SDL_syswm.h, which must be included) using the SDL_VERSION() macro found in
+SDL_version.h, and pass it to the
+function:
+
\ No newline at end of file
diff --git a/docs/html/sdlthreadid.html b/docs/html/sdlthreadid.html
new file mode 100644
index 0000000..e0bde2e
--- /dev/null
+++ b/docs/html/sdlthreadid.html
@@ -0,0 +1,190 @@
+SDL_ThreadID
\ No newline at end of file
diff --git a/docs/html/sdlunlockaudio.html b/docs/html/sdlunlockaudio.html
new file mode 100644
index 0000000..0019bd6
--- /dev/null
+++ b/docs/html/sdlunlockaudio.html
@@ -0,0 +1,211 @@
+SDL_UnlockAudio
\ No newline at end of file
diff --git a/docs/html/sdlunlocksurface.html b/docs/html/sdlunlocksurface.html
new file mode 100644
index 0000000..13ba5fc
--- /dev/null
+++ b/docs/html/sdlunlocksurface.html
@@ -0,0 +1,219 @@
+SDL_UnlockSurface
\ No newline at end of file
diff --git a/docs/html/sdlunlockyuvoverlay.html b/docs/html/sdlunlockyuvoverlay.html
new file mode 100644
index 0000000..936ed9e
--- /dev/null
+++ b/docs/html/sdlunlockyuvoverlay.html
@@ -0,0 +1,225 @@
+SDL_UnlockYUVOverlay
\ No newline at end of file
diff --git a/docs/html/sdlupdaterect.html b/docs/html/sdlupdaterect.html
new file mode 100644
index 0000000..f54d9f5
--- /dev/null
+++ b/docs/html/sdlupdaterect.html
@@ -0,0 +1,266 @@
+SDL_UpdateRect
\ No newline at end of file
diff --git a/docs/html/sdlupdaterects.html b/docs/html/sdlupdaterects.html
new file mode 100644
index 0000000..0553a7a
--- /dev/null
+++ b/docs/html/sdlupdaterects.html
@@ -0,0 +1,255 @@
+SDL_UpdateRects
SDL_UpdateRects -- Makes sure the given list of rectangles is updated on the given screen.
Synopsis
#include "SDL.h"
void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects);
Description
Makes sure the given list of rectangles is updated on the given screen.
+The rectangles must all be confined within the screen boundaries (no
+clipping is done).
This function should not be called while screen is
+locked.
Note: It is adviced to call this function only once per frame, since each
+call has some processing overhead. This is no restriction since you
+can pass any number of rectangles each time.
The rectangles are not automatically merged or checked for overlap. In
+general, the programmer can use his knowledge about his particular
+rectangles to merge them in an efficient way, to avoid overdraw.
\ No newline at end of file
diff --git a/docs/html/sdluserevent.html b/docs/html/sdluserevent.html
new file mode 100644
index 0000000..178769c
--- /dev/null
+++ b/docs/html/sdluserevent.html
@@ -0,0 +1,337 @@
+SDL_UserEvent
SDL_UserEvent is in the user member of the structure SDL_Event. This event is unique, it is never created by SDL but only by the user. The event can be pushed onto the event queue using SDL_PushEvent. The contents of the structure members or completely up to the programmer, the only requirement is that type is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive).
\ No newline at end of file
diff --git a/docs/html/sdlvideodrivername.html b/docs/html/sdlvideodrivername.html
new file mode 100644
index 0000000..1419656
--- /dev/null
+++ b/docs/html/sdlvideodrivername.html
@@ -0,0 +1,243 @@
+SDL_VideoDriverName
SDL_VideoDriverName -- Obtain the name of the video driver
Synopsis
#include "SDL.h"
char *SDL_VideoDriverName(char *namebuf, int maxlen);
Description
The buffer pointed to by namebuf is filled up to a maximum of maxlen characters (include the NULL terminator) with the name of the initialised video driver. The driver name is a simple one word identifier like "x11" or "windib".
Return Value
Returns NULL if video has not been initialised with SDL_Init or a pointer to namebuf otherwise.
\ No newline at end of file
diff --git a/docs/html/sdlvideoinfo.html b/docs/html/sdlvideoinfo.html
new file mode 100644
index 0000000..3a0da31
--- /dev/null
+++ b/docs/html/sdlvideoinfo.html
@@ -0,0 +1,408 @@
+SDL_VideoInfo
This (read-only) structure is returned by SDL_GetVideoInfo. It contains information on either the 'best' available mode (if called before SDL_SetVideoMode) or the current video mode.
\ No newline at end of file
diff --git a/docs/html/sdlvideomodeok.html b/docs/html/sdlvideomodeok.html
new file mode 100644
index 0000000..5d2d6c4
--- /dev/null
+++ b/docs/html/sdlvideomodeok.html
@@ -0,0 +1,270 @@
+SDL_VideoModeOK
SDL_VideoModeOK -- Check to see if a particular video mode is supported.
Synopsis
#include "SDL.h"
int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
Description
SDL_VideoModeOK returns 0
+if the requested mode is not supported under any bit depth, or returns the
+bits-per-pixel of the closest available mode with the given width, height and requested surface flags (see SDL_SetVideoMode).
The bits-per-pixel value returned is only a suggested mode. You can usually request and bpp you want when setting the video mode and SDL will emulate that color depth with a shadow video surface.
The arguments to SDL_VideoModeOK are the same ones you
+would pass to SDL_SetVideoMode
\ No newline at end of file
diff --git a/docs/html/sdlwaitevent.html b/docs/html/sdlwaitevent.html
new file mode 100644
index 0000000..b473d3b
--- /dev/null
+++ b/docs/html/sdlwaitevent.html
@@ -0,0 +1,231 @@
+SDL_WaitEvent
\ No newline at end of file
diff --git a/docs/html/sdlwaitthread.html b/docs/html/sdlwaitthread.html
new file mode 100644
index 0000000..2becfbc
--- /dev/null
+++ b/docs/html/sdlwaitthread.html
@@ -0,0 +1,231 @@
+SDL_WaitThread
\ No newline at end of file
diff --git a/docs/html/sdlwarpmouse.html b/docs/html/sdlwarpmouse.html
new file mode 100644
index 0000000..e7b2d8d
--- /dev/null
+++ b/docs/html/sdlwarpmouse.html
@@ -0,0 +1,205 @@
+SDL_WarpMouse
\ No newline at end of file
diff --git a/docs/html/sdlwasinit.html b/docs/html/sdlwasinit.html
new file mode 100644
index 0000000..b4effeb
--- /dev/null
+++ b/docs/html/sdlwasinit.html
@@ -0,0 +1,284 @@
+SDL_WasInit
SDL_WasInit -- Check which subsystems are initialized
Synopsis
#include "SDL.h"
Uint32 SDL_WasInit(Uint32 flags);
Description
SDL_WasInit allows you to see which SDL subsytems have been initialized. flags is a bitwise OR'd combination of the subsystems you wish to check (see SDL_Init for a list of subsystem flags).
Return Value
SDL_WasInit returns a bitwised OR'd combination of the initialized subsystems.
Examples
/* Here are several ways you can use SDL_WasInit() */
+
+/* Get init data on all the subsystems */
+Uint32 subsystem_init;
+
+subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING);
+
+if(subsystem_init&SDL_INIT_VIDEO)
+ printf("Video is initialized.\n");
+else
+ printf("Video is not initialized.\n");
+
+
+
+/* Just check for one specfic subsystem */
+
+if(SDL_WasInit(SDL_INIT_VIDEO)!=0)
+ printf("Video is initialized.\n");
+else
+ printf("Video is not initialized.\n");
+
+
+
+
+/* Check for two subsystems */
+
+Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO;
+
+if(SDL_WasInit(subsystem_mask)==subsystem_mask)
+ printf("Video and Audio initialized.\n");
+else
+ printf("Video and Audio not initialized.\n");
\ No newline at end of file
diff --git a/docs/html/sdlwmgetcaption.html b/docs/html/sdlwmgetcaption.html
new file mode 100644
index 0000000..829c68a
--- /dev/null
+++ b/docs/html/sdlwmgetcaption.html
@@ -0,0 +1,222 @@
+SDL_WM_GetCaption
\ No newline at end of file
diff --git a/docs/html/sdlwmgrabinput.html b/docs/html/sdlwmgrabinput.html
new file mode 100644
index 0000000..740dcd6
--- /dev/null
+++ b/docs/html/sdlwmgrabinput.html
@@ -0,0 +1,224 @@
+SDL_WM_GrabInput
SDL_WM_GrabInput -- Grabs mouse and keyboard input.
Synopsis
#include "SDL.h"
SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
Description
Grabbing means that the mouse is confined to the application window,
+and nearly all keyboard input is passed directly to the application,
+and not interpreted by a window manager, if any.
When mode is SDL_GRAB_QUERY the grab mode is not changed, but the current grab mode is returned.
\ No newline at end of file
diff --git a/docs/html/sdlwmiconifywindow.html b/docs/html/sdlwmiconifywindow.html
new file mode 100644
index 0000000..1113656
--- /dev/null
+++ b/docs/html/sdlwmiconifywindow.html
@@ -0,0 +1,211 @@
+SDL_WM_IconifyWindow
SDL_WM_IconifyWindow -- Iconify/Minimise the window
Synopsis
#include "SDL.h"
int SDL_WM_IconifyWindow(void);
Description
If the application is running in a window managed environment SDL attempts to iconify/minimise it. If SDL_WM_IconifyWindow is successful, the application will receive a SDL_APPACTIVE loss event.
Return Value
Returns non-zero on success or 0 if iconification is not support or was refused by the window manager.
\ No newline at end of file
diff --git a/docs/html/sdlwmsetcaption.html b/docs/html/sdlwmsetcaption.html
new file mode 100644
index 0000000..bc47c27
--- /dev/null
+++ b/docs/html/sdlwmsetcaption.html
@@ -0,0 +1,212 @@
+SDL_WM_SetCaption
\ No newline at end of file
diff --git a/docs/html/sdlwmseticon.html b/docs/html/sdlwmseticon.html
new file mode 100644
index 0000000..12eb207
--- /dev/null
+++ b/docs/html/sdlwmseticon.html
@@ -0,0 +1,260 @@
+SDL_WM_SetIcon
Sets the icon for the display window. Win32 icons must be 32x32.
This function must be called before the first call to
+SDL_SetVideoMode.
The mask is a bitmask that describes the shape of the
+icon. If mask is NULL, then the shape is determined by
+the colorkey of icon, if any, or makes the icon
+rectangular (no transparency) otherwise.
If mask is non-NULL, it points to a bitmap with bits set
+where the corresponding pixel should be visible. The format of the bitmap is as
+follows: Scanlines come in the usual top-down order. Each scanline consists of
+(width / 8) bytes, rounded up. The most significant bit of each byte represents
+the leftmost pixel.
\ No newline at end of file
diff --git a/docs/html/sdlwmtogglefullscreen.html b/docs/html/sdlwmtogglefullscreen.html
new file mode 100644
index 0000000..b7973de
--- /dev/null
+++ b/docs/html/sdlwmtogglefullscreen.html
@@ -0,0 +1,205 @@
+SDL_WM_ToggleFullScreen
int SDL_WM_ToggleFullScreen(SDL_Surface *surface);
Description
Toggles the application between windowed and fullscreen mode, if supported. (X11 is the only target currently supported, BeOS support is experimental).
\ No newline at end of file
diff --git a/docs/html/thread.html b/docs/html/thread.html
new file mode 100644
index 0000000..c66018e
--- /dev/null
+++ b/docs/html/thread.html
@@ -0,0 +1,313 @@
+Multi-threaded Programming
\ No newline at end of file
diff --git a/docs/html/time.html b/docs/html/time.html
new file mode 100644
index 0000000..854b7cb
--- /dev/null
+++ b/docs/html/time.html
@@ -0,0 +1,206 @@
+Time
SDL_SetTimer -- Set a callback to run after the specified number of milliseconds has
+elapsed.
SDL provides several cross-platform functions for dealing with time.
+It provides a way to get the current time, a way to wait a little while,
+and a simple timer mechanism. These functions give you two ways of moving an
+object every x milliseconds:
+
+
Use a timer callback function. This may have the bad effect that it runs in a seperate thread or uses alarm signals, but it's easier to implement.
Or you can get the number of milliseconds passed, and move the object if, for example, 30 ms passed.
\ No newline at end of file
diff --git a/docs/html/video.html b/docs/html/video.html
new file mode 100644
index 0000000..9b1434e
--- /dev/null
+++ b/docs/html/video.html
@@ -0,0 +1,507 @@
+Video
SDL presents a very simple interface to the display framebuffer. The
+framebuffer is represented as an offscreen surface to which you can write
+directly. If you want the screen to show what you have written, call the update function which will
+guarantee that the desired portion of the screen is updated.
Before you call any of the SDL video functions, you must first call
+SDL_Init(SDL_INIT_VIDEO), which initializes the video
+and events in the SDL library. Check the return code, which should be
+0, to see if there were any errors in starting up.
If you use both sound and video in your application, you need to call
+SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO) before opening the
+sound device, otherwise under Win32 DirectX, you won't be able to set
+full-screen display modes.
After you have initialized the library, you can start up the video display in a
+number of ways. The easiest way is to pick a common screen resolution and
+depth and just initialize the video, checking for errors. You will probably
+get what you want, but SDL may be emulating your requested mode and converting
+the display on update. The best way is to
+query, for the best
+video mode closest to the desired one, and then
+convert
+your images to that pixel format.
SDL currently supports any bit depth >= 8 bits per pixel. 8 bpp formats are
+considered 8-bit palettized modes, while 12, 15, 16, 24, and 32 bits per pixel
+are considered "packed pixel" modes, meaning each pixel contains the RGB color
+components packed in the bits of the pixel.
After you have initialized your video mode, you can take the surface that was
+returned, and write to it like any other framebuffer, calling the update
+routine as you go.
When you have finished your video access and are ready to quit your
+application, you should call "SDL_Quit()" to shutdown the
+video and events.
\ No newline at end of file
diff --git a/docs/html/wm.html b/docs/html/wm.html
new file mode 100644
index 0000000..f53a349
--- /dev/null
+++ b/docs/html/wm.html
@@ -0,0 +1,188 @@
+Window Management
SDL provides a small set of window management functions which allow applications to change their title and toggle from windowed mode to fullscreen (if available)
+This library is designed to make it easy to write games that run on many
+different platforms using the various native high-performance media interfaces,
+(for video, audio, etc) and presenting a single source-code level API to
+your application. This is a fairly low level API, but using this, completely
+portable applications can be written with a great deal of flexibility.
+